ozyman commited on
Commit
6f38faa
1 Parent(s): 002a9f8

fixed image text

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -141,17 +141,16 @@ def analyze_face(img):
141
  x2 = x + w
142
  y2 = y + h
143
  bbox = (x, y, x2, y2)
144
- img_dsdg = img.copy()
145
  if w < MIN_FACE_WIDTH_THRESHOLD:
146
  color_dsdg = (0, 0, 0)
147
  text = f'Small res ({w}*{h})'
148
- img_dsdg = cv.rectangle(img_dsdg, (x, y), (x2, y2), color_dsdg, 2)
149
- cv.putText(img_dsdg, text, (x, y2 + 30),
150
  cv.FONT_HERSHEY_COMPLEX, 1, color_dsdg)
151
  # cls_dsdg = -1
152
- return img_dsdg, bbox, None
153
  depth_img = get_depth_img(img, bbox)
154
- return img_dsdg, bbox, depth_img
155
 
156
 
157
  def prepare_data_dsdg(images, boxes, depths):
 
141
  x2 = x + w
142
  y2 = y + h
143
  bbox = (x, y, x2, y2)
 
144
  if w < MIN_FACE_WIDTH_THRESHOLD:
145
  color_dsdg = (0, 0, 0)
146
  text = f'Small res ({w}*{h})'
147
+ cv.rectangle(img, (x, y), (x2, y2), color_dsdg, 2)
148
+ cv.putText(img, text, (x, y2 + 30),
149
  cv.FONT_HERSHEY_COMPLEX, 1, color_dsdg)
150
  # cls_dsdg = -1
151
+ return img, bbox, None
152
  depth_img = get_depth_img(img, bbox)
153
+ return img, bbox, depth_img
154
 
155
 
156
  def prepare_data_dsdg(images, boxes, depths):