Skip to content

Commit 9c91e4b

Browse files
committed
del paddlevideo_loc,mv paddlevieo_clas to tools
1 parent 9d80104 commit 9c91e4b

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

MANIFEST.in

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ include LICENSE
22
include README.md
33
include tools/__init__.py
44
include tools/utils.py
5+
include tools/paddlevideo_clas.py
56

6-
recursive-include paddlevideo/ *.py *.txt
7-
8-
9-
10-
7+
recursive-include paddlevideo/ *.py *.txt

__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414

1515
__all__ = ['PaddleVideo']
16-
from .paddlevideo_clas import PaddleVideo
16+
from .tools import PaddleVideo

paddlevideo_loc.py

Whitespace-only changes.

tools/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from . import utils
15+
from . import utils
16+
from .paddlevideo_clas import PaddleVideo

paddlevideo_clas.py tools/paddlevideo_clas.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
BASE_INFERENCE_MODEL_DIR = os.path.join(BASE_DIR, 'inference_model')
4949
BASE_VIDEOS_DIR = os.path.join(BASE_DIR, 'videos')
5050

51-
model_names = {'TSM','TSN','PPTSM'}
51+
model_names = {'ppTSM','TSM','TSN'}
5252

5353

5454
def create_paddle_predictor(args):
@@ -78,7 +78,6 @@ def create_paddle_predictor(args):
7878

7979
return predictor
8080

81-
8281
def download_with_progressbar(url, save_path):
8382
response = requests.get(url, stream=True)
8483
total_size_in_bytes = int(response.headers.get('content-length', 0))
@@ -95,7 +94,7 @@ def download_with_progressbar(url, save_path):
9594
def maybe_download(model_storage_directory, url):
9695
# using custom model
9796
tar_file_name_list = [
98-
'inference.pdiparams', 'inference.pdiparams.info', 'inference.pdmodel' #pdiparams,和pdmodel直接下载
97+
'inference.pdiparams', 'inference.pdiparams.info', 'inference.pdmodel'
9998
]
10099
if not os.path.exists(
101100
os.path.join(model_storage_directory, 'inference.pdiparams')
@@ -225,8 +224,7 @@ def __init__(self, **kwargs):
225224
raise Exception(
226225
'Please input model name that you want to use!')
227226
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)
230228
if not os.path.exists(
231229
os.path.join(BASE_INFERENCE_MODEL_DIR,
232230
process_params.model_name)):

0 commit comments

Comments
 (0)