未验证 提交 11c02c46 编写于 作者: Z zhiboniu 提交者: GitHub

fix detector.predict(image) to predict([image]) (#3571)

上级 b97fc1d9
......@@ -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 = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册