From 8a5906c824d55af5889ae3558153176609ace868 Mon Sep 17 00:00:00 2001 From: JYChen Date: Wed, 13 Apr 2022 15:46:50 +0800 Subject: [PATCH] fix visualize error in keypoint infer (#5677) --- 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