diff --git a/deploy/pphuman/datacollector.py b/deploy/pphuman/datacollector.py index 62bd68bfc575481bea17da321b4030644379858f..8dfef12dbb9a0de65f294a306dec43102a0b00fb 100644 --- a/deploy/pphuman/datacollector.py +++ b/deploy/pphuman/datacollector.py @@ -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) diff --git a/deploy/pphuman/pipeline.py b/deploy/pphuman/pipeline.py index bbbf4da956b9ad3790c6f9787c493fd435d65a9c..2090b2a0c91e12a0f065bbdb32c74f647af7f4b1 100644 --- a/deploy/pphuman/pipeline.py +++ b/deploy/pphuman/pipeline.py @@ -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,