未验证 提交 24e1a7d5 编写于 作者: C cnn 提交者: GitHub

fix bug of predict video (#3158) (#3218)

上级 4c18e94b
......@@ -534,6 +534,8 @@ def predict_video(detector, camera_id):
capture = cv2.VideoCapture(FLAGS.video_file)
video_name = os.path.split(FLAGS.video_file)[-1]
fps = 30
frame_count = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))
print('frame_count', frame_count)
width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
# yapf: disable
......@@ -550,7 +552,7 @@ def predict_video(detector, camera_id):
break
print('detect frame:%d' % (index))
index += 1
results = detector.predict(frame, FLAGS.threshold)
results = detector.predict([frame], FLAGS.threshold)
im = visualize_box_mask(
frame,
results,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册