From 8dfe9bc7d71923879720bfb6b3c201fbc99c8e93 Mon Sep 17 00:00:00 2001 From: JYChen Date: Wed, 13 Apr 2022 15:46:26 +0800 Subject: [PATCH] fix visualize error in keypoint infer (#5676) --- deploy/python/keypoint_infer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/python/keypoint_infer.py b/deploy/python/keypoint_infer.py index b87bac92c..4227a281a 100644 --- a/deploy/python/keypoint_infer.py +++ b/deploy/python/keypoint_infer.py @@ -267,8 +267,10 @@ class KeyPointDetector(Detector): print('detect frame: %d' % (index)) index += 1 results = self.predict_image([frame], visual=False) + im_results = {} + im_results['keypoint'] = [results['keypoint'], results['score']] im = visualize_pose( - frame, results, visual_thresh=self.threshold, returnimg=True) + frame, im_results, visual_thresh=self.threshold, returnimg=True) writer.write(im) if camera_id != -1: cv2.imshow('Mask Detection', im) -- GitLab