未验证 提交 c7fc1473 编写于 作者: S songzhangzhang 提交者: GitHub

SDE_Detector: convert frame color format to rgb (#8284)

predict_image() requires that the image is RGB format, but VideoCapture.read() returns BGR image,
so we need to convert the frame to RGB format.
上级 d40a6ddb
......@@ -681,8 +681,9 @@ class SDE_Detector(Detector):
if mot_skip_frame_num > 1 and frame_id > 0 and frame_id % mot_skip_frame_num > 0:
reuse_det_result = True
seq_name = video_out_name.split('.')[0]
frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
mot_results = self.predict_image(
[frame],
[frame_rgb],
visual=False,
seq_name=seq_name,
reuse_det_result=reuse_det_result,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册