提交 d5ae73f0 编写于 作者: Z zhiboniu 提交者: zhiboniu

add standard actions

上级 14b7a24b
...@@ -24,6 +24,11 @@ ATTR: ...@@ -24,6 +24,11 @@ ATTR:
basemode: "idbased" basemode: "idbased"
enable: False enable: False
VIDEO_ACTION:
model_dir: output_inference/pp-stm
batch_size: 1
enable: False
SKELETON_ACTION: SKELETON_ACTION:
model_dir: output_inference/STGCN model_dir: output_inference/STGCN
batch_size: 1 batch_size: 1
...@@ -33,6 +38,16 @@ SKELETON_ACTION: ...@@ -33,6 +38,16 @@ SKELETON_ACTION:
basemode: "skeletonbased" basemode: "skeletonbased"
enable: False enable: False
ID_BASED_DETACTION:
model_dir: output_inference/detector
batch_size: 1
enable: False
ID_BASED_CLSACTION:
model_dir: output_inference/classification
batch_size: 1
enable: False
REID: REID:
model_dir: output_inference/reid_model/ model_dir: output_inference/reid_model/
batch_size: 16 batch_size: 16
......
...@@ -266,12 +266,27 @@ class PipePredictor(object): ...@@ -266,12 +266,27 @@ class PipePredictor(object):
self.with_skeleton_action = cfg.get( self.with_skeleton_action = cfg.get(
'SKELETON_ACTION', False)['enable'] if cfg.get('SKELETON_ACTION', 'SKELETON_ACTION', False)['enable'] if cfg.get('SKELETON_ACTION',
False) else False False) else False
self.with_video_action = cfg.get(
'VIDEO_ACTION', False)['enable'] if cfg.get('VIDEO_ACTION',
False) else False
self.with_idbased_detaction = cfg.get(
'ID_BASED_DETACTION', False)['enable'] if cfg.get(
'ID_BASED_DETACTION', False) else False
self.with_idbased_clsaction = cfg.get(
'ID_BASED_CLSACTION', False)['enable'] if cfg.get(
'ID_BASED_CLSACTION', False) else False
self.with_mtmct = cfg.get('REID', False)['enable'] if cfg.get( self.with_mtmct = cfg.get('REID', False)['enable'] if cfg.get(
'REID', False) else False 'REID', False) else False
if self.with_attr: if self.with_attr:
print('Attribute Recognition enabled') print('Attribute Recognition enabled')
if self.with_skeleton_action: if self.with_skeleton_action:
print('SkeletonAction Recognition enabled') print('SkeletonAction Recognition enabled')
if self.with_video_action:
print('VideoAction Recognition enabled')
if self.with_idbased_detaction:
print('IDBASED Detection Action Recognition enabled')
if self.with_idbased_clsaction:
print('IDBASED Classification Action Recognition enabled')
if self.with_mtmct: if self.with_mtmct:
print("MTMCT enabled") print("MTMCT enabled")
...@@ -547,6 +562,7 @@ class PipePredictor(object): ...@@ -547,6 +562,7 @@ class PipePredictor(object):
self.pipeline_res.update(mot_res, 'mot') self.pipeline_res.update(mot_res, 'mot')
if self.with_attr or self.with_skeleton_action: if self.with_attr or self.with_skeleton_action:
#todo: move this code to each class's predeal function
crop_input, new_bboxes, ori_bboxes = crop_image_with_mot( crop_input, new_bboxes, ori_bboxes = crop_image_with_mot(
frame, mot_res) frame, mot_res)
...@@ -559,6 +575,18 @@ class PipePredictor(object): ...@@ -559,6 +575,18 @@ class PipePredictor(object):
self.pipe_timer.module_time['attr'].end() self.pipe_timer.module_time['attr'].end()
self.pipeline_res.update(attr_res, 'attr') self.pipeline_res.update(attr_res, 'attr')
if self.with_idbased_detaction:
#predeal, get what your model need
#predict, model preprocess\run\postprocess
#postdeal, interact with pipeline
pass
if self.with_idbased_clsaction:
#predeal, get what your model need
#predict, model preprocess\run\postprocess
#postdeal, interact with pipeline
pass
if self.with_skeleton_action: if self.with_skeleton_action:
if self.modebase["skeletonbased"]: if self.modebase["skeletonbased"]:
if frame_id > self.warmup_frame: if frame_id > self.warmup_frame:
...@@ -621,10 +649,10 @@ class PipePredictor(object): ...@@ -621,10 +649,10 @@ class PipePredictor(object):
else: else:
self.pipeline_res.clear('reid') self.pipeline_res.clear('reid')
if self.modebase["videobased"]: if self.with_video_action:
pass #predeal, get what your model need
#predict, model preprocess\run\postprocess
if self.modebase["framebased"]: #postdeal, interact with pipeline
pass pass
self.collector.append(frame_id, self.pipeline_res) self.collector.append(frame_id, self.pipeline_res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册