diff --git a/README.md b/README.md index a27e3ae5e61667618daf9d83b51ce6968fd02e51..482a0977cc81f0615893c83ad5651a268aaeb644 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,17 @@ PaddleX是基于飞桨核心框架、开发套件和工具组件的深度学习 ## 特点 - **全流程打通** - - 数据准备:支持LabelMe,精灵标注等主流数据标注工具协议,同时无缝集成[EasyData智能数据服务平台](https://ai.baidu.com/easydata/), 助力开发者高效获取AI开发所需高质量数据。 - - 模型训练:基于飞桨核心框架集成[PaddleClas](https://github.com/PaddlePaddle/PaddleClas), [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection), [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg)视觉开发套件,[VisualDL](https://github.com/PaddlePaddle/VisualDL)可视化分析组件,高效完成模型训练。 - - 多端部署:内置[PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim)模型压缩工具和AES模型加密SDK,结合Paddle Inference和[Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite)便捷完成高性能且可靠的多端部署。 + - **数据准备**:支持[EasyData智能数据服务平台](https://ai.baidu.com/easydata/)数据协议,通过平台便捷完成智能标注,低质数据清洗工作, 同时兼容主流标注工具协议, 助力开发者更快完成数据准备工作。 + - **模型训练**:集成[PaddleClas](https://github.com/PaddlePaddle/PaddleClas), [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection), [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg)视觉开发套件,丰富的高质量预训练模型,更快实现工业级模型效果。 + - **模型调优**:内置模型可解释性模块、[VisualDL](https://github.com/PaddlePaddle/VisualDL)可视化分析组件, 提供丰富的信息更好地理解模型,优化模型。 + - **多端安全部署**:内置[PaddleSlim](https://github.com/PaddlePaddle/PaddleSlim)模型压缩工具和**模型加密部署模块**,结合Paddle Inference或[Paddle Lite](https://github.com/PaddlePaddle/Paddle-Lite)便捷完成高性能的多端安全部署。 - **融合产业实践** - 精选飞桨产业实践的成熟模型结构,开放案例实践教程,加速开发者产业落地。 - - 通过[PaddleHub](https://github.com/PaddlePaddle/Paddle)内置丰富的飞桨高质量预训练模型,助力开发者高效实现飞桨Master模式。 - **易用易集成** - - PadldeX提供简洁易用的全流程API,几行代码即可实现上百种数据增强、模型可解释性、C++模型部署等功能。 - - 提供以PaddleX API为核心集成的跨平台GUI界面,降低深度学习全流程应用门槛。 + - 统一易用的全流程API,5步完成模型训练,10行代码实现Python/C++高性能部署。 + - 提供以PaddleX为核心集成的跨平台可视化工具PaddleX-GUI,快速体验飞桨深度学习全流程。 ## 安装 @@ -31,7 +31,7 @@ PaddleX提供两种开发模式,满足不同场景和用户需求: - **Python开发模式:** 通过Python API方式完成全流程使用或集成,该模型提供全面、灵活、开放的深度学习功能,有更高的定制化空间。 -- **GUI开发模式:** 以PaddleX API为核心集成的跨平台GUI客户端,支持`Python开发模式`下的常用功能,以更低门槛的方式快速完成产业验证的模型训练。 +- **Padlde-GUI模式:** PaddleX-GUI支持`Python开发模式`下的常用功能,以更低门槛的方式快速完成产业验证的模型训练。 开发者可根据自身需要按需选择不同的模式进行安装使用。 @@ -48,20 +48,19 @@ PaddleX提供两种开发模式,满足不同场景和用户需求: pip install paddlex -i https://mirror.baidu.com/pypi/simple ``` -### GUI开发模式安装 +### PaddleX-GUI安装 进入PaddleX官网[下载使用](https://www.paddlepaddle.org.cn/paddle/paddlex),申请下载绿色安装包,开箱即用。 -GUI模式的使用教程可参考[PaddleX GUI模式使用教程](https://paddlex.readthedocs.io/zh_CN/latest/paddlex_gui/index.html) +Paddle-GUI的使用教程可参考[PaddleX-GUI模式使用教程](https://paddlex.readthedocs.io/zh_CN/latest/paddlex_gui/index.html) ## 使用文档 推荐访问[PaddleX在线使用文档](https://paddlex.readthedocs.io/zh_CN/latest/index.html),快速查阅读使用教程和API文档说明。 -- [10分钟快速上手](https://paddlex.readthedocs.io/zh_CN/latest/quick_start.html) -- [PaddleX模型训练](https://paddlex.readthedocs.io/zh_CN/latest/tutorials/train/index.html#id1) -- [PaddleX模型压缩](https://paddlex.readthedocs.io/zh_CN/latest/slim/index.html#id1) -- [PaddleX模型库](https://paddlex.readthedocs.io/zh_CN/latest/model_zoo.html#id1) -- [PaddleX多端部署](docs/deploy.md) +- [10分钟快速上手使用](https://paddlex.readthedocs.io/zh_CN/latest/quick_start.html) +- [PaddleX全流程开发教程](https://paddlex.readthedocs.io/zh_CN/latest/tutorials/index.html) +- [PaddleX视觉方案介绍](https://paddlex.readthedocs.io/zh_CN/latest/cv_solutions.html) +- [PaddleX API参考文档](https://paddlex.readthedocs.io/zh_CN/latest/apis/index.html) ## 在线教程 @@ -74,13 +73,17 @@ GUI模式的使用教程可参考[PaddleX GUI模式使用教程](https://paddlex ## 交流与反馈 - 项目官网: https://www.paddlepaddle.org.cn/paddle/paddlex -- PaddleX用户QQ群: 1045148026 (手机QQ扫描如下二维码快速加入) +- PaddleX用户交流群: 1045148026 (手机QQ扫描如下二维码快速加入) QQGroup ## FAQ ## 更新日志 +* 2020.05.20 + **`v1.0.0`** + * 初始版本发布。 + ## 贡献代码 我们非常欢迎您为PaddleX贡献代码或者提供使用建议。如果您可以修复某个issue或者增加一个新功能,欢迎给我们提交Pull Requests. diff --git a/docs/index.rst b/docs/index.rst index 3e4c80103288de087952261e623295041e96770a..c3276f301bcd54846ba3639441572a26a5dd0f6a 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,19 +3,18 @@ PaddleX是基于飞桨核心框架、开发套件和工具组件的深度学习全流程开发工具。具备 **全流程打通** 、**融合产业实践** 、**易用易集成** 三大特点。 - 全流程打通 - | - **数据准备**: 支持LabelMe,精灵标注等主流数据标注工具协议,同时无缝集成 `EasyData智能数据服务平台 `_ ,助力开发者高效获取AI开发所需高质量数据。 - | - **模型训练**: 基于飞桨核心框架集成 `PaddleClas `_ ,`PaddleDetection `_ ,`PaddleSeg `_ 视觉开发套件 ,`VisualDL `_ 可视化分析组件,高效完成模型训练。 - | _ **多端部署**: 内置 `PaddleSlim `_ 模型压缩工具和AES模型加密SDK,结合Paddle Inference和 `Paddle Lite `_ 便捷完成高性能且可靠的多端部署。 + | - **数据准备**: 支持 `EasyData智能数据服务平台数据协议 `_ ,通过平台便捷完成智能标注,低质数据清洗工作;同时兼容主流标注工具协议, 助力开发者更快完成数据准备工作。 + | - **模型训练**: 基于飞桨核心框架集成 `PaddleClas `_ ,`PaddleDetection `_ ,`PaddleSeg `_ 视觉开发套件,丰富的高质量预训练模型,更快实现工业级模型训练。 + | - **模型调优**: 内置模型可解释性模块、`VisualDL `_ 可视化分析组件,提供丰富的信息更好地理解模型,优化模型。 + | - **多端安全部署**: 内置 `PaddleSlim `_ 模型压缩工具和AES模型加密SDK,结合Paddle Inference和 `Paddle Lite `_ 便捷完成高性能的多端安全部署。 融合产业实践 | - 精选飞桨产业实践的成熟模型结构,开放案例实践教程,加速开发者产业落地。 - | - 通过 `PaddleHub `_ 内置丰富的飞桨高质量预训练模型,助力开发者高效实现飞桨Master模式。 易用易集成 - | - PadldeX提供简洁易用的全流程API,几行代码即可实现上百种数据增强、模型可解释性、C++模型部署等功能。 - | - 提供以PaddleX API为核心集成的跨平台GUI界面,降低深度学习全流程应用门槛。 + | - 统一易用的全流程API,5步完成模型训练,10行代码实现Python/C++高性能部署。 + | - 提供以PaddleX为核心集成的跨平台可视化开发工具PaddleX-GUI,更低门槛快速体验飞桨深度学习全流程。 .. toctree:: :maxdepth: 2 @@ -31,7 +30,7 @@ PaddleX是基于飞桨核心框架、开发套件和工具组件的深度学习 FAQ.md appendix/index.rst -* PaddleX版本: v0.1.7 +* PaddleX版本: v1.0.0 * 项目官网: http://www.paddlepaddle.org.cn/paddle/paddlex * 项目GitHub: https://github.com/PaddlePaddle/PaddleX/tree/develop * 官方QQ用户群: 1045148026 diff --git a/docs/tutorials/README.md b/docs/tutorials/README.md deleted file mode 100755 index b2453e23ff6f086bf6229cf5599ab8f5a648ac56..0000000000000000000000000000000000000000 --- a/docs/tutorials/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# PaddleX使用教程 - -- [模型训练](./train) -- [模型裁剪](./compress) diff --git a/paddlex/cls.py b/paddlex/cls.py index 750e1bce59c18aa3cea7be77d7d4db767f296aa5..e440c726b639ac6d78cc3c62dd8ef2df7bf8a327 100644 --- a/paddlex/cls.py +++ b/paddlex/cls.py @@ -1,4 +1,4 @@ -# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/paddlex/command.py b/paddlex/command.py index 07b0e68020a2ce37be043603a705ee6180dee066..8198291180b92a061dd633eae863f8ddb17727cb 100644 --- a/paddlex/command.py +++ b/paddlex/command.py @@ -1,3 +1,17 @@ +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from six import text_type as _text_type import argparse import sys diff --git a/paddlex/convertor.py b/paddlex/convertor.py index fa74f49cac68fb7cbacadb6e38e7493c28857a92..a6888ae1ef9bd764d213125142d355e7e2ca2428 100644 --- a/paddlex/convertor.py +++ b/paddlex/convertor.py @@ -1,16 +1,16 @@ -#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. -# -#Licensed under the Apache License, Version 2.0 (the "License"); -#you may not use this file except in compliance with the License. -#You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, software -#distributed under the License is distributed on an "AS IS" BASIS, -#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#See the License for the specific language governing permissions and -#limitations under the License. +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import absolute_import import paddle.fluid as fluid diff --git a/paddlex/cv/models/utils/pretrain_weights.py b/paddlex/cv/models/utils/pretrain_weights.py index 3f41838b7d3e1529558ced1db23e84292bdd5270..81790a20144d8c255601b8a778eebf02c409c55d 100644 --- a/paddlex/cv/models/utils/pretrain_weights.py +++ b/paddlex/cv/models/utils/pretrain_weights.py @@ -1,5 +1,5 @@ import paddlex -#import paddlehub as hub +import paddlehub as hub import os import os.path as osp @@ -85,53 +85,49 @@ def get_pretrain_weights(flag, model_type, backbone, save_dir): backbone = 'DetResNet50' assert backbone in image_pretrain, "There is not ImageNet pretrain weights for {}, you may try COCO.".format( backbone) - url = image_pretrain[backbone] - fname = osp.split(url)[-1].split('.')[0] - paddlex.utils.download_and_decompress(url, path=new_save_dir) - return osp.join(new_save_dir, fname) -# try: -# hub.download(backbone, save_path=new_save_dir) -# except Exception as e: -# if isinstance(e, hub.ResourceNotFoundError): -# raise Exception( -# "Resource for backbone {} not found".format(backbone)) -# elif isinstance(e, hub.ServerConnectionError): -# raise Exception( -# "Cannot get reource for backbone {}, please check your internet connecgtion" -# .format(backbone)) -# else: -# raise Exception( -# "Unexpected error, please make sure paddlehub >= 1.6.2") -# return osp.join(new_save_dir, backbone) + # url = image_pretrain[backbone] + # fname = osp.split(url)[-1].split('.')[0] + # paddlex.utils.download_and_decompress(url, path=new_save_dir) + # return osp.join(new_save_dir, fname) + try: + hub.download(backbone, save_path=new_save_dir) + except Exception as e: + if isinstance(e, hub.ResourceNotFoundError): + raise Exception("Resource for backbone {} not found".format( + backbone)) + elif isinstance(e, hub.ServerConnectionError): + raise Exception( + "Cannot get reource for backbone {}, please check your internet connecgtion" + .format(backbone)) + else: + raise Exception( + "Unexpected error, please make sure paddlehub >= 1.6.2") + return osp.join(new_save_dir, backbone) elif flag == 'COCO': new_save_dir = save_dir if hasattr(paddlex, 'pretrain_dir'): new_save_dir = paddlex.pretrain_dir url = coco_pretrain[backbone] fname = osp.split(url)[-1].split('.')[0] - paddlex.utils.download_and_decompress(url, path=new_save_dir) - return osp.join(new_save_dir, fname) - + # paddlex.utils.download_and_decompress(url, path=new_save_dir) + # return osp.join(new_save_dir, fname) -# new_save_dir = save_dir -# if hasattr(paddlex, 'pretrain_dir'): -# new_save_dir = paddlex.pretrain_dir -# assert backbone in coco_pretrain, "There is not COCO pretrain weights for {}, you may try ImageNet.".format( -# backbone) -# try: -# hub.download(backbone, save_path=new_save_dir) -# except Exception as e: -# if isinstance(hub.ResourceNotFoundError): -# raise Exception( -# "Resource for backbone {} not found".format(backbone)) -# elif isinstance(hub.ServerConnectionError): -# raise Exception( -# "Cannot get reource for backbone {}, please check your internet connecgtion" -# .format(backbone)) -# else: -# raise Exception( -# "Unexpected error, please make sure paddlehub >= 1.6.2") -# return osp.join(new_save_dir, backbone) + assert backbone in coco_pretrain, "There is not COCO pretrain weights for {}, you may try ImageNet.".format( + backbone) + try: + hub.download(backbone, save_path=new_save_dir) + except Exception as e: + if isinstance(hub.ResourceNotFoundError): + raise Exception("Resource for backbone {} not found".format( + backbone)) + elif isinstance(hub.ServerConnectionError): + raise Exception( + "Cannot get reource for backbone {}, please check your internet connecgtion" + .format(backbone)) + else: + raise Exception( + "Unexpected error, please make sure paddlehub >= 1.6.2") + return osp.join(new_save_dir, backbone) else: raise Exception( "pretrain_weights need to be defined as directory path or `IMAGENET` or 'COCO' (download pretrain weights automatically)." diff --git a/tutorials/compress/classification/cal_sensitivities_file.py b/tutorials/compress/classification/cal_sensitivities_file.py index bfe17385c41dd4b4d49d0efa968ea8ccf1cfa4a9..b762ec26031d4b971d6311f13ef79ce721ecb670 100644 --- a/tutorials/compress/classification/cal_sensitivities_file.py +++ b/tutorials/compress/classification/cal_sensitivities_file.py @@ -1,16 +1,16 @@ -#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. -# -#Licensed under the Apache License, Version 2.0 (the "License"); -#you may not use this file except in compliance with the License. -#You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, software -#distributed under the License is distributed on an "AS IS" BASIS, -#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#See the License for the specific language governing permissions and -#limitations under the License. +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import argparse import os diff --git a/tutorials/compress/classification/mobilenetv2.py b/tutorials/compress/classification/mobilenetv2.py index 7ab2a6049fc006f8932e78372f6f421b42f9c1e5..86fb3795c9103def6b72daede56856a8ce9388cd 100644 --- a/tutorials/compress/classification/mobilenetv2.py +++ b/tutorials/compress/classification/mobilenetv2.py @@ -1,16 +1,16 @@ -#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. -# -#Licensed under the Apache License, Version 2.0 (the "License"); -#you may not use this file except in compliance with the License. -#You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -#Unless required by applicable law or agreed to in writing, software -#distributed under the License is distributed on an "AS IS" BASIS, -#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#See the License for the specific language governing permissions and -#limitations under the License. +# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. import argparse import os