未验证 提交 4f05f2f9 编写于 作者: J JYChen 提交者: GitHub

[Cherry-Pick] fix data collector error (#5534)

* fix data collector error

* change List to Tuple to adapt different cv version

* fix reid model_dir set
上级 3b35926d
...@@ -90,7 +90,7 @@ class DataCollector(object): ...@@ -90,7 +90,7 @@ class DataCollector(object):
if kpt_res: if kpt_res:
self.collector[ids]["kpts"].append( self.collector[ids]["kpts"].append(
[kpt_res['keypoint'][0][idx], kpt_res['keypoint'][1][idx]]) [kpt_res['keypoint'][0][idx], kpt_res['keypoint'][1][idx]])
if action_res: if action_res and (idx + 1) in action_res:
self.collector[ids]["actions"].append(action_res[idx + 1]) self.collector[ids]["actions"].append(action_res[idx + 1])
else: else:
# action model generate result per X frames, Not available every frames # action model generate result per X frames, Not available every frames
......
...@@ -217,7 +217,7 @@ class PipeTimer(Times): ...@@ -217,7 +217,7 @@ class PipeTimer(Times):
def merge_model_dir(args, model_dir): def merge_model_dir(args, model_dir):
# set --model_dir DET=ppyoloe/ to overwrite the model_dir in config file # set --model_dir DET=ppyoloe/ to overwrite the model_dir in config file
task_set = ['DET', 'ATTR', 'MOT', 'KPT', 'ACTION'] task_set = ['DET', 'ATTR', 'MOT', 'KPT', 'ACTION', 'REID']
if not model_dir: if not model_dir:
return args return args
for md in model_dir: for md in model_dir:
......
...@@ -73,7 +73,7 @@ class ReID(object): ...@@ -73,7 +73,7 @@ class ReID(object):
self.det_times = Timer() self.det_times = Timer()
self.cpu_mem, self.gpu_mem, self.gpu_util = 0, 0, 0 self.cpu_mem, self.gpu_mem, self.gpu_util = 0, 0, 0
self.batch_size = batch_size self.batch_size = batch_size
self.input_wh = [128, 256] self.input_wh = (128, 256)
def set_config(self, model_dir): def set_config(self, model_dir):
return PredictConfig(model_dir) return PredictConfig(model_dir)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册