未验证 提交 87b9d564 编写于 作者: Z zhiboniu 提交者: GitHub

fix datacollector error without reid;test=document_fix (#5459)

上级 153080b2
......@@ -75,7 +75,8 @@ class DataCollector(object):
action_res = Result.get('action')
reid_res = Result.get('reid')
for idx, mot_item in enumerate(reid_res['rects']):
rects = reid_res['rects'] if reid_res is not None else mot_res['boxes']
for idx, mot_item in enumerate(rects):
ids = int(mot_item[0])
if ids not in self.collector:
self.collector[ids] = copy.deepcopy(self.mots)
......
......@@ -460,8 +460,9 @@ class PipePredictor(object):
# nothing detected
if len(mot_res['boxes']) == 0:
frame_id += 1
self.pipe_timer.img_num += 1
self.pipe_timer.total_time.end()
if frame_id > self.warmup_frame:
self.pipe_timer.img_num += 1
self.pipe_timer.total_time.end()
if self.cfg['visual']:
_, _, fps = self.pipe_timer.get_total_time()
im = self.visualize_video(frame, mot_res, frame_id,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册