From 11c02c464536cea615f5d0968490689c47b3c477 Mon Sep 17 00:00:00 2001 From: zhiboniu <31800336+zhiboniu@users.noreply.github.com> Date: Fri, 2 Jul 2021 19:37:27 +0800 Subject: [PATCH] fix detector.predict(image) to predict([image]) (#3571) --- deploy/python/keypoint_det_unite_infer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/python/keypoint_det_unite_infer.py b/deploy/python/keypoint_det_unite_infer.py index dd80b290f..88ae6cf07 100644 --- a/deploy/python/keypoint_det_unite_infer.py +++ b/deploy/python/keypoint_det_unite_infer.py @@ -68,7 +68,7 @@ def affine_backto_orgimages(keypoint_result, batch_records): def topdown_unite_predict(detector, topdown_keypoint_detector, image_list): for i, img_file in enumerate(image_list): image, _ = decode_image(img_file, {}) - results = detector.predict(image, FLAGS.det_threshold) + results = detector.predict([image], FLAGS.det_threshold) batchs_images, det_rects = get_person_from_rect(image, results) keypoint_vector = [] score_vector = [] @@ -121,7 +121,7 @@ def topdown_unite_predict_video(detector, topdown_keypoint_detector, camera_id): print('detect frame:%d' % (index)) frame2 = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) - results = detector.predict(frame2, FLAGS.det_threshold) + results = detector.predict([frame2], FLAGS.det_threshold) batchs_images, rect_vecotr = get_person_from_rect(frame2, results) keypoint_vector = [] score_vector = [] -- GitLab