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

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

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