未验证 提交 8dfe9bc7 编写于 作者: J JYChen 提交者: GitHub

fix visualize error in keypoint infer (#5676)

上级 ce0d2bdb
...@@ -267,8 +267,10 @@ class KeyPointDetector(Detector): ...@@ -267,8 +267,10 @@ class KeyPointDetector(Detector):
print('detect frame: %d' % (index)) print('detect frame: %d' % (index))
index += 1 index += 1
results = self.predict_image([frame], visual=False) results = self.predict_image([frame], visual=False)
im_results = {}
im_results['keypoint'] = [results['keypoint'], results['score']]
im = visualize_pose( im = visualize_pose(
frame, results, visual_thresh=self.threshold, returnimg=True) frame, im_results, visual_thresh=self.threshold, returnimg=True)
writer.write(im) writer.write(im)
if camera_id != -1: if camera_id != -1:
cv2.imshow('Mask Detection', im) cv2.imshow('Mask Detection', im)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册