Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -67,8 +67,10 @@ def predict(img):
|
|
67 |
|
68 |
# draw circles at each keypoint
|
69 |
for i in range(keypoints.shape[0]):
|
70 |
-
|
71 |
-
|
|
|
|
|
72 |
|
73 |
# write black_img to a jpg file
|
74 |
cv2.imwrite("output.jpg", black_img)
|
|
|
67 |
|
68 |
# draw circles at each keypoint
|
69 |
for i in range(keypoints.shape[0]):
|
70 |
+
if keypoints[i][2] > 0.0: # check if the keypoint is visible
|
71 |
+
pt = (int(keypoints[i][0]), int(keypoints[i][1]))
|
72 |
+
cv2.circle(black_img, pt, 3, (255, 255, 255), thickness=-1, lineType=cv2.LINE_AA)
|
73 |
+
|
74 |
|
75 |
# write black_img to a jpg file
|
76 |
cv2.imwrite("output.jpg", black_img)
|