@@ -197,8 +197,8 @@ def run(self):
197
197
198
198
199
199
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.
202
202
Otherwise it will use the model_path directly.
203
203
"""
204
204
for key in cfg .keys ():
@@ -240,13 +240,13 @@ def get_model_dir(cfg):
240
240
class PipePredictor (object ):
241
241
"""
242
242
Predictor in single camera
243
-
244
- The pipeline for image input:
243
+
244
+ The pipeline for image input:
245
245
246
246
1. Detection
247
247
2. Detection -> Attribute
248
248
249
- The pipeline for video input:
249
+ The pipeline for video input:
250
250
251
251
1. Tracking
252
252
2. Tracking -> Attribute
@@ -257,7 +257,7 @@ class PipePredictor(object):
257
257
args (argparse.Namespace): arguments in pipeline, which contains environment and runtime settings
258
258
cfg (dict): config of models in pipeline
259
259
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,
261
261
default as False
262
262
"""
263
263
@@ -723,7 +723,7 @@ def predict_video(self, video_file, thread_idx=0):
723
723
scale = ShortSizeScale (short_size )
724
724
725
725
object_in_region_info = {
726
- } # store info for vehicle parking in region
726
+ } # store info for vehicle parking in region
727
727
illegal_parking_dict = None
728
728
cars_count = 0
729
729
retrograde_traj_len = 0
@@ -1021,7 +1021,7 @@ def predict_video(self, video_file, thread_idx=0):
1021
1021
frame_mot_res , max_len = frame_len )
1022
1022
retrograde_traj_len = retrograde_traj_len + 1
1023
1023
1024
- #the number of collected frames is enough to predict
1024
+ #the number of collected frames is enough to predict
1025
1025
if retrograde_traj_len == frame_len :
1026
1026
retrograde_mot_res = copy .deepcopy (
1027
1027
self .pipeline_res .get ('mot' ))
@@ -1315,7 +1315,7 @@ def main():
1315
1315
parser = argsparser ()
1316
1316
FLAGS = parser .parse_args ()
1317
1317
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 "
1320
1320
1321
1321
main ()
0 commit comments