Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,9 @@ def detect_faces(image):
|
|
| 13 |
output = model(image)
|
| 14 |
results = Detections.from_ultralytics(output[0])
|
| 15 |
|
|
|
|
| 16 |
for i in results:
|
| 17 |
-
im = cv2.rectangle(
|
| 18 |
|
| 19 |
image_np = np.array(image)
|
| 20 |
gray_image = cv2.cvtColor(image_np, cv2.COLOR_RGB2GRAY)
|
|
|
|
| 13 |
output = model(image)
|
| 14 |
results = Detections.from_ultralytics(output[0])
|
| 15 |
|
| 16 |
+
im = image
|
| 17 |
for i in results:
|
| 18 |
+
im = cv2.rectangle(im, (int(i[0][0]),int(i[0][1])), (int(i[0][2]),int(i[0][3])), (0,0,255), 2)
|
| 19 |
|
| 20 |
image_np = np.array(image)
|
| 21 |
gray_image = cv2.cvtColor(image_np, cv2.COLOR_RGB2GRAY)
|