Skip to content

Commit 6e31718

Browse files
author
John Harrington
committed
Changing zeros to Nans for better missing detection marking
1 parent 3c4a7d2 commit 6e31718

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

demo/demo.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ def main():
281281
draw_pose(kpt,image_bgr) # draw the poses
282282
else:
283283
if keypoints is None:
284-
keypoints = np.array([[[0, 0]]*len(COCO_KEYPOINT_INDEXES)])
284+
keypoints = np.array([[[np.nan, np.nan]]*len(COCO_KEYPOINT_INDEXES)])
285285
else:
286-
keypoints = np.append(keypoints, [[[0, 0]]*len(COCO_KEYPOINT_INDEXES)], axis=0)
286+
keypoints = np.append(keypoints, [[[np.nan, np.nan]]*len(COCO_KEYPOINT_INDEXES)], axis=0)
287287
else:
288288
#Fill undetected frames with zero vectors
289289
if keypoints is None:
290-
keypoints = np.array([[[0, 0]]*len(COCO_KEYPOINT_INDEXES)])
290+
keypoints = np.array([[[np.nan, np.nan]]*len(COCO_KEYPOINT_INDEXES)])
291291
else:
292-
keypoints = np.append(keypoints, [[[0, 0]]*len(COCO_KEYPOINT_INDEXES)], axis=0)
292+
keypoints = np.append(keypoints, [[[np.nan, np.nan]]*len(COCO_KEYPOINT_INDEXES)], axis=0)
293293

294294
if args.showFps:
295295
fps = 1/(time.time()-last_time)

0 commit comments

Comments
 (0)