Selaa lähdekoodia

Merge branch 'develop' of https://github.com/PaddlePaddle/PaddleX into develop_qh

FlyingQianMM 5 vuotta sitten
vanhempi
commit
e87bb3c64e

+ 18 - 15
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扫描如下二维码快速加入)  
 <img src="./docs/images/QQGroup.jpeg" width="195" height="300" alt="QQGroup" align="center" />
 
 ## FAQ
 
 ## 更新日志
+* 2020.05.20
 
+  **`v1.0.0`**
+  * 初始版本发布。
+  
 ## 贡献代码
 
 我们非常欢迎您为PaddleX贡献代码或者提供使用建议。如果您可以修复某个issue或者增加一个新功能,欢迎给我们提交Pull Requests.

+ 7 - 8
docs/index.rst

@@ -3,19 +3,18 @@
 
 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>`_ 模型压缩工具和AES模型加密SDK,结合Paddle Inference和 `Paddle Lite <https://github.com/PaddlePaddle/Paddle-Lite>`_ 便捷完成高性能的多端安全部署。
 
 融合产业实践
   | - 精选飞桨产业实践的成熟模型结构,开放案例实践教程,加速开发者产业落地。
-  | - 通过 `PaddleHub <https://github.com/PaddlePaddle/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  

+ 0 - 4
docs/tutorials/README.md

@@ -1,4 +0,0 @@
-# PaddleX使用教程
-
-- [模型训练](./train)
-- [模型裁剪](./compress)

+ 1 - 1
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.

+ 14 - 0
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

+ 13 - 13
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

+ 37 - 41
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)."

+ 13 - 13
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

+ 13 - 13
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