fixed image text
Browse files
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 |
-
|
149 |
-
cv.putText(
|
150 |
cv.FONT_HERSHEY_COMPLEX, 1, color_dsdg)
|
151 |
# cls_dsdg = -1
|
152 |
-
return
|
153 |
depth_img = get_depth_img(img, bbox)
|
154 |
-
return
|
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):
|