Turing311 commited on
Commit
4967de5
·
1 Parent(s): 30d9a11
Files changed (1) hide show
  1. gradio/demo.py +2 -2
gradio/demo.py CHANGED
@@ -46,7 +46,7 @@ def compare_face(frame1, frame2):
46
  y1 = face.get('y1')
47
  x2 = face.get('x2')
48
  y2 = face.get('y2')
49
-
50
  if x1 < 0:
51
  x1 = 0
52
  if y1 < 0:
@@ -55,7 +55,7 @@ def compare_face(frame1, frame2):
55
  x2 = image2.width - 1
56
  if y2 >= image2.height:
57
  y2 = image2.height - 1
58
-
59
  face2 = image2.crop((x1, y1, x2, y2))
60
  face_image_ratio = face2.width / float(face2.height)
61
  resized_w = int(face_image_ratio * 150)
 
46
  y1 = face.get('y1')
47
  x2 = face.get('x2')
48
  y2 = face.get('y2')
49
+ log += "3-1 \n"
50
  if x1 < 0:
51
  x1 = 0
52
  if y1 < 0:
 
55
  x2 = image2.width - 1
56
  if y2 >= image2.height:
57
  y2 = image2.height - 1
58
+ log += "3-2 " + str(x1) + " " + str(y1) + " " + str(x2) + " " + str(y2) + "\n"
59
  face2 = image2.crop((x1, y1, x2, y2))
60
  face_image_ratio = face2.width / float(face2.height)
61
  resized_w = int(face_image_ratio * 150)