Spaces:
Sleeping
Sleeping
Commit
·
27ef2bf
1
Parent(s):
aa3afc9
fixed bug
Browse files
yolov8.py
CHANGED
|
@@ -112,8 +112,9 @@ class YOLOv8Face:
|
|
| 112 |
landmarks = landmarks[mask]
|
| 113 |
|
| 114 |
indices = cv2.dnn.NMSBoxes(bboxes_wh.tolist(), confidences.tolist(), self.conf_threshold,
|
| 115 |
-
self.iou_threshold)
|
| 116 |
if len(indices) > 0:
|
|
|
|
| 117 |
mlvl_bboxes = bboxes_wh[indices]
|
| 118 |
confidences = confidences[indices]
|
| 119 |
classIds = classIds[indices]
|
|
|
|
| 112 |
landmarks = landmarks[mask]
|
| 113 |
|
| 114 |
indices = cv2.dnn.NMSBoxes(bboxes_wh.tolist(), confidences.tolist(), self.conf_threshold,
|
| 115 |
+
self.iou_threshold)
|
| 116 |
if len(indices) > 0:
|
| 117 |
+
indices = indices.flatten()
|
| 118 |
mlvl_bboxes = bboxes_wh[indices]
|
| 119 |
confidences = confidences[indices]
|
| 120 |
classIds = classIds[indices]
|