From cfca9c746f567a12b3a377ae0303d2e337785c8c Mon Sep 17 00:00:00 2001 From: dengkaipeng Date: Sun, 25 Apr 2021 02:07:07 +0000 Subject: [PATCH] update 2.0.1 --- docs/tutorials/INSTALL.md | 2 +- docs/tutorials/INSTALL_cn.md | 2 +- ppdet/model_zoo/model_zoo.py | 4 ++-- ppdet/utils/download.py | 3 ++- setup.py | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/INSTALL.md b/docs/tutorials/INSTALL.md index 15aee6a99..f6fe75d1f 100644 --- a/docs/tutorials/INSTALL.md +++ b/docs/tutorials/INSTALL.md @@ -71,7 +71,7 @@ PaddleDetection can be installed in the following two ways: ``` # install paddledet via pip -pip install paddledet==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple +pip install paddledet==2.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple # Download and use the configuration files and code examples in the source code git clone https://github.com/PaddlePaddle/PaddleDetection.git diff --git a/docs/tutorials/INSTALL_cn.md b/docs/tutorials/INSTALL_cn.md index 1c557b76d..f0d7c2e21 100644 --- a/docs/tutorials/INSTALL_cn.md +++ b/docs/tutorials/INSTALL_cn.md @@ -66,7 +66,7 @@ python -c "import paddle; print(paddle.__version__)" ``` # pip安装paddledet -pip install paddledet==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple +pip install paddledet==2.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple # 下载使用源码中的配置文件和代码示例 git clone https://github.com/PaddlePaddle/PaddleDetection.git diff --git a/ppdet/model_zoo/model_zoo.py b/ppdet/model_zoo/model_zoo.py index 0f7f24467..17af46f79 100644 --- a/ppdet/model_zoo/model_zoo.py +++ b/ppdet/model_zoo/model_zoo.py @@ -68,11 +68,11 @@ def list_model(filters=[]): # models and configs save on bcebos under dygraph directory def get_config_file(model_name): - return get_config_path("ppdet://dygraph/configs/{}.yml".format(model_name)) + return get_config_path("ppdet://configs/{}.yml".format(model_name)) def get_weights_url(model_name): - return "ppdet://dygraph/{}.pdparams".format(model_name) + return "ppdet://models/{}.pdparams".format(osp.split(model_name)[-1]) def get_model(model_name, pretrained=True): diff --git a/ppdet/utils/download.py b/ppdet/utils/download.py index 9e983efa6..99635c75f 100644 --- a/ppdet/utils/download.py +++ b/ppdet/utils/download.py @@ -260,7 +260,8 @@ def get_path(url, root_dir, md5sum=None, check_exist=True): fullpath = osp.join(osp.split(fullpath)[0], v) if osp.exists(fullpath) and check_exist: - if _check_exist_file_md5(fullpath, md5sum, url): + if not osp.isfile(fullpath) or \ + _check_exist_file_md5(fullpath, md5sum, url): logger.debug("Found {}".format(fullpath)) return fullpath, True else: diff --git a/setup.py b/setup.py index 23cdb590e..c2d03ade3 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def package_model_zoo(): # exclude dataset base config if osp.split(osp.split(cfg)[0])[1] not in ['datasets']: valid_cfgs.append(cfg) - model_names = [osp.splitext(osp.split(cfg)[1])[0] for cfg in valid_cfgs] + model_names = [osp.relpath(cfg, cfg_dir).replace(".yml", "") for cfg in valid_cfgs] model_zoo_file = osp.join(cur_dir, 'ppdet', 'model_zoo', 'MODEL_ZOO') with open(model_zoo_file, 'w') as wf: @@ -70,7 +70,7 @@ if __name__ == "__main__": packages=find_packages(exclude=("configs", "tools", "deploy")), package_data={'ppdet.model_zoo': package_model_zoo()}, author='PaddlePaddle', - version='2.0.0', + version='2.0.1', install_requires=parse_requirements('./requirements.txt'), description='Object detection and instance segmentation toolkit based on PaddlePaddle', long_description=readme(), -- GitLab