Spaces:
Runtime error
Runtime error
Edison Lee
commited on
fix: numpy.ndarray and str compare
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def detect(
|
|
54 |
for pred in preds:
|
55 |
box = pred["bbox"]
|
56 |
box, score = box[:4], box[4]
|
57 |
-
if score < face_score_threshold:
|
58 |
continue
|
59 |
box = np.round(box).astype(int)
|
60 |
|
@@ -64,7 +64,7 @@ def detect(
|
|
64 |
|
65 |
pred_pts = pred["keypoints"]
|
66 |
for *pt, score in pred_pts:
|
67 |
-
if score < landmark_score_threshold:
|
68 |
color = (0, 255, 255)
|
69 |
else:
|
70 |
color = (0, 0, 255)
|
|
|
54 |
for pred in preds:
|
55 |
box = pred["bbox"]
|
56 |
box, score = box[:4], box[4]
|
57 |
+
if score < float(face_score_threshold):
|
58 |
continue
|
59 |
box = np.round(box).astype(int)
|
60 |
|
|
|
64 |
|
65 |
pred_pts = pred["keypoints"]
|
66 |
for *pt, score in pred_pts:
|
67 |
+
if score < float(landmark_score_threshold):
|
68 |
color = (0, 255, 255)
|
69 |
else:
|
70 |
color = (0, 0, 255)
|