Skip to content

Commit aba23bb

Browse files
authored
add support for mot and ppyolox (#9222)
1 parent 0914611 commit aba23bb

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

deploy/pipeline/pipeline.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ def run(self):
197197

198198

199199
def get_model_dir(cfg):
200-
"""
201-
Auto download inference model if the model_path is a url link.
200+
"""
201+
Auto download inference model if the model_path is a url link.
202202
Otherwise it will use the model_path directly.
203203
"""
204204
for key in cfg.keys():
@@ -240,13 +240,13 @@ def get_model_dir(cfg):
240240
class PipePredictor(object):
241241
"""
242242
Predictor in single camera
243-
244-
The pipeline for image input:
243+
244+
The pipeline for image input:
245245
246246
1. Detection
247247
2. Detection -> Attribute
248248
249-
The pipeline for video input:
249+
The pipeline for video input:
250250
251251
1. Tracking
252252
2. Tracking -> Attribute
@@ -257,7 +257,7 @@ class PipePredictor(object):
257257
args (argparse.Namespace): arguments in pipeline, which contains environment and runtime settings
258258
cfg (dict): config of models in pipeline
259259
is_video (bool): whether the input is video, default as False
260-
multi_camera (bool): whether to use multi camera in pipeline,
260+
multi_camera (bool): whether to use multi camera in pipeline,
261261
default as False
262262
"""
263263

@@ -723,7 +723,7 @@ def predict_video(self, video_file, thread_idx=0):
723723
scale = ShortSizeScale(short_size)
724724

725725
object_in_region_info = {
726-
} # store info for vehicle parking in region
726+
} # store info for vehicle parking in region
727727
illegal_parking_dict = None
728728
cars_count = 0
729729
retrograde_traj_len = 0
@@ -1021,7 +1021,7 @@ def predict_video(self, video_file, thread_idx=0):
10211021
frame_mot_res, max_len=frame_len)
10221022
retrograde_traj_len = retrograde_traj_len + 1
10231023

1024-
#the number of collected frames is enough to predict
1024+
#the number of collected frames is enough to predict
10251025
if retrograde_traj_len == frame_len:
10261026
retrograde_mot_res = copy.deepcopy(
10271027
self.pipeline_res.get('mot'))
@@ -1315,7 +1315,7 @@ def main():
13151315
parser = argsparser()
13161316
FLAGS = parser.parse_args()
13171317
FLAGS.device = FLAGS.device.upper()
1318-
assert FLAGS.device in ['CPU', 'GPU', 'XPU', 'NPU'
1319-
], "device should be CPU, GPU, XPU or NPU"
1318+
assert FLAGS.device in ['CPU', 'GPU', 'XPU', 'NPU', 'GCU'
1319+
], "device should be CPU, GPU, XPU, NPU or GCU"
13201320

13211321
main()

deploy/pipeline/pphuman/video_action_infer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ def __init__(self,
109109
self.config.enable_xpu(10 * 1024 * 1024)
110110
elif device == "NPU" or device == "npu":
111111
self.config.enable_custom_device('npu')
112+
elif device == "GCU" or device == "gcu":
113+
self.config.enable_custom_device('gcu')
112114
else:
113115
self.config.disable_gpu()
114116
if self.enable_mkldnn:
@@ -168,7 +170,7 @@ def predict(self, input):
168170
Args:
169171
input (str) or (list): video file path or image data list
170172
Returns:
171-
results (dict):
173+
results (dict):
172174
'''
173175

174176
input_names = self.predictor.get_input_names()

0 commit comments

Comments
 (0)