Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def detect_faces(image_np,slider):
|
|
| 16 |
|
| 17 |
# Draw rectangles around faces
|
| 18 |
for (x, y, w, h) in faces:
|
| 19 |
-
cv2.rectangle(image_np, (x, y), (x + w, y + h), (0, 0, 255),
|
| 20 |
|
| 21 |
return image_np, len(faces)
|
| 22 |
|
|
@@ -24,9 +24,9 @@ def detect_faces(image_np,slider):
|
|
| 24 |
iface = gr.Interface(
|
| 25 |
fn=detect_faces,
|
| 26 |
inputs=["image",gr.Slider(minimum=1,maximum=2,step=.1,label= "adjust the scaleFactor")],
|
| 27 |
-
outputs=["image",gr.Label("
|
| 28 |
title="Face Detection",
|
| 29 |
-
description="Upload an image, and the model will detect faces and draw
|
| 30 |
)
|
| 31 |
|
| 32 |
iface.launch()
|
|
|
|
| 16 |
|
| 17 |
# Draw rectangles around faces
|
| 18 |
for (x, y, w, h) in faces:
|
| 19 |
+
cv2.rectangle(image_np, (x, y), (x + w, y + h), (0, 0, 255), 3)
|
| 20 |
|
| 21 |
return image_np, len(faces)
|
| 22 |
|
|
|
|
| 24 |
iface = gr.Interface(
|
| 25 |
fn=detect_faces,
|
| 26 |
inputs=["image",gr.Slider(minimum=1,maximum=2,step=.1,label= "adjust the scaleFactor")],
|
| 27 |
+
outputs=["image",gr.Label("No Of Faces Detected")],
|
| 28 |
title="Face Detection",
|
| 29 |
+
description="Upload an image, and the model will detect faces and draw blue boxes around them."
|
| 30 |
)
|
| 31 |
|
| 32 |
iface.launch()
|