未验证 提交 24e96056 编写于 作者: F Feng Ni 提交者: GitHub

[MOT] fix plot_tracking_dict (#4694)

上级 cc70a3df
...@@ -205,14 +205,15 @@ def plot_tracking_dict(image, ...@@ -205,14 +205,15 @@ def plot_tracking_dict(image,
line_thickness = max(1, int(image.shape[1] / 500.)) line_thickness = max(1, int(image.shape[1] / 500.))
if num_classes == 1: if num_classes == 1:
start = records[-1].find('Total') if records is not None:
end = records[-1].find('In') start = records[-1].find('Total')
cv2.putText( end = records[-1].find('In')
im, cv2.putText(
records[-1][start:end], (0, int(40 * text_scale)), im,
cv2.FONT_HERSHEY_PLAIN, records[-1][start:end], (0, int(40 * text_scale)),
text_scale, (0, 0, 255), cv2.FONT_HERSHEY_PLAIN,
thickness=2) text_scale, (0, 0, 255),
thickness=2)
if num_classes == 1 and do_entrance_counting: if num_classes == 1 and do_entrance_counting:
entrance_line = tuple(map(int, entrance)) entrance_line = tuple(map(int, entrance))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册