Update
Browse files
app.py
CHANGED
@@ -124,8 +124,7 @@ def detect(image, face_detector: cv2.CascadeClassifier, device: torch.device,
|
|
124 |
pt = np.array([x0, y0]) + pt_crop
|
125 |
cv2.circle(res, tuple(pt), 2, (0, 0, 255), cv2.FILLED)
|
126 |
|
127 |
-
res
|
128 |
-
return res
|
129 |
|
130 |
|
131 |
def main():
|
@@ -154,7 +153,7 @@ def main():
|
|
154 |
gr.Interface(
|
155 |
func,
|
156 |
gr.inputs.Image(type='file', label='Input'),
|
157 |
-
gr.outputs.Image(label='Output'),
|
158 |
examples=examples,
|
159 |
title=TITLE,
|
160 |
description=DESCRIPTION,
|
|
|
124 |
pt = np.array([x0, y0]) + pt_crop
|
125 |
cv2.circle(res, tuple(pt), 2, (0, 0, 255), cv2.FILLED)
|
126 |
|
127 |
+
return res[:, :, ::-1]
|
|
|
128 |
|
129 |
|
130 |
def main():
|
|
|
153 |
gr.Interface(
|
154 |
func,
|
155 |
gr.inputs.Image(type='file', label='Input'),
|
156 |
+
gr.outputs.Image(type='numpy', label='Output'),
|
157 |
examples=examples,
|
158 |
title=TITLE,
|
159 |
description=DESCRIPTION,
|