diff --git a/modelcenter/PP-HumanV2/APP/pipeline/pipeline.py b/modelcenter/PP-HumanV2/APP/pipeline/pipeline.py index c43fb34f0f1d49e88dde58aea257afb858da8fc3..2aa69c8fab803ce99c8c4d276742d1bc4bb72d30 100644 --- a/modelcenter/PP-HumanV2/APP/pipeline/pipeline.py +++ b/modelcenter/PP-HumanV2/APP/pipeline/pipeline.py @@ -135,7 +135,7 @@ def get_model_dir_with_list(cfg, args): cfg[key]["rec_model_dir"] = rec_model_dir print("rec_model_dir model dir: ", rec_model_dir) - if key == 'ID_BASED_DETACTION' or key == 'SKELETON_ACTION' or key == 'ATTR' or key =='ID_BASED_CLSACTION' or key=='REID': + if (key == 'ID_BASED_DETACTION' and (key in activate_list)) or (key == 'SKELETON_ACTION' and (key in activate_list))or (key == 'ATTR' and (key in activate_list)) or (key =='ID_BASED_CLSACTION' and (key in activate_list)) or (key=='REID' and (key in activate_list)): model_dir = cfg['MOT']["model_dir"] downloaded_model_dir = auto_download_model(model_dir) if downloaded_model_dir: diff --git a/modelcenter/PP-Vehicle/APP/pipeline/pipeline.py b/modelcenter/PP-Vehicle/APP/pipeline/pipeline.py index f883734defdf68dc67de635648988161a6ed091a..124a8a6dd06149aceeea17c33d5105ad888cbfdb 100644 --- a/modelcenter/PP-Vehicle/APP/pipeline/pipeline.py +++ b/modelcenter/PP-Vehicle/APP/pipeline/pipeline.py @@ -133,13 +133,12 @@ def get_model_dir_with_list(cfg, args): cfg[key]["rec_model_dir"] = rec_model_dir print("rec_model_dir model dir: ", rec_model_dir) - elif key == "MOT" and ( - key in activate_list): # for idbased and skeletonbased actions - model_dir = cfg[key]["model_dir"] + if (key == "MOT" and (key in activate_list)) or (key == "VEHICLE_PLATE" and (key in activate_list)) or (key == "VEHICLE_ATTR" and (key in activate_list)): # for idbased and skeletonbased actions + model_dir = cfg["MOT"]["model_dir"] downloaded_model_dir = auto_download_model(model_dir) if downloaded_model_dir: model_dir = downloaded_model_dir - cfg[key]["model_dir"] = model_dir + cfg["MOT"]["model_dir"] = model_dir print("mot_model_dir model_dir: ", model_dir) @@ -219,10 +218,12 @@ class PipePredictor(object): # only for ppvehicle self.with_vehicleplate = True if 'VEHICLE_PLATE' in activate_list else False if self.with_vehicleplate: + self.with_mot = True print('Vehicle Plate Recognition enabled') self.with_vehicle_attr = True if 'VEHICLE_ATTR' in activate_list else False if self.with_vehicle_attr: + self.with_mot = True print('Vehicle Attribute Recognition enabled') self.modebase = {