48
48
BASE_INFERENCE_MODEL_DIR = os .path .join (BASE_DIR , 'inference_model' )
49
49
BASE_VIDEOS_DIR = os .path .join (BASE_DIR , 'videos' )
50
50
51
- model_names = {'TSM ' ,'TSN ' ,'PPTSM ' }
51
+ model_names = {'ppTSM ' ,'TSM ' ,'TSN ' }
52
52
53
53
54
54
def create_paddle_predictor (args ):
@@ -78,7 +78,6 @@ def create_paddle_predictor(args):
78
78
79
79
return predictor
80
80
81
-
82
81
def download_with_progressbar (url , save_path ):
83
82
response = requests .get (url , stream = True )
84
83
total_size_in_bytes = int (response .headers .get ('content-length' , 0 ))
@@ -95,7 +94,7 @@ def download_with_progressbar(url, save_path):
95
94
def maybe_download (model_storage_directory , url ):
96
95
# using custom model
97
96
tar_file_name_list = [
98
- 'inference.pdiparams' , 'inference.pdiparams.info' , 'inference.pdmodel' #pdiparams,和pdmodel直接下载
97
+ 'inference.pdiparams' , 'inference.pdiparams.info' , 'inference.pdmodel'
99
98
]
100
99
if not os .path .exists (
101
100
os .path .join (model_storage_directory , 'inference.pdiparams' )
@@ -225,8 +224,7 @@ def __init__(self, **kwargs):
225
224
raise Exception (
226
225
'Please input model name that you want to use!' )
227
226
if process_params .model_name in model_names :
228
- url = 'https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/{}_infer.tar' .format (
229
- process_params .model_name )
227
+ url = 'https://videotag.bj.bcebos.com/PaddleVideo/InferenceModel/{}_infer.tar' .format (process_params .model_name )
230
228
if not os .path .exists (
231
229
os .path .join (BASE_INFERENCE_MODEL_DIR ,
232
230
process_params .model_name )):
0 commit comments