diff --git a/docs/zh_CN/faq_series/faq_2020_s1.md b/docs/zh_CN/FAQ/faq_2020_s1.md
similarity index 100%
rename from docs/zh_CN/faq_series/faq_2020_s1.md
rename to docs/zh_CN/FAQ/faq_2020_s1.md
diff --git a/docs/zh_CN/faq_series/faq_2021_s1.md b/docs/zh_CN/FAQ/faq_2021_s1.md
similarity index 100%
rename from docs/zh_CN/faq_series/faq_2021_s1.md
rename to docs/zh_CN/FAQ/faq_2021_s1.md
diff --git a/docs/zh_CN/faq_series/faq_2021_s2.md b/docs/zh_CN/FAQ/faq_2021_s2.md
similarity index 100%
rename from docs/zh_CN/faq_series/faq_2021_s2.md
rename to docs/zh_CN/FAQ/faq_2021_s2.md
diff --git a/docs/zh_CN/faq_series/faq_2022_s1.md b/docs/zh_CN/FAQ/faq_2022_s1.md
similarity index 100%
rename from docs/zh_CN/faq_series/faq_2022_s1.md
rename to docs/zh_CN/FAQ/faq_2022_s1.md
diff --git a/docs/zh_CN/faq_series/faq_selected_30.md b/docs/zh_CN/FAQ/faq_selected_30.md
similarity index 100%
rename from docs/zh_CN/faq_series/faq_selected_30.md
rename to docs/zh_CN/FAQ/faq_selected_30.md
diff --git a/docs/zh_CN/Makefile b/docs/zh_CN/Makefile
deleted file mode 100644
index 7823a523754c7496183b0a02cd969071fe954b11..0000000000000000000000000000000000000000
--- a/docs/zh_CN/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# Minimal makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line, and also
-# from the environment for the first two.
-SPHINXOPTS ?=
-SPHINXBUILD ?= sphinx-build
-
-#SOURCEDIR = source
-BUILDDIR = build
-
-
-# Put it first so that "make" without argument is like "make help".
-help:
- @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-
-.PHONY: help Makefile
-
-# Catch-all target: route all unknown targets to Sphinx using the new
-# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/zh_CN/advanced_tutorials/gallery2fc.md b/docs/zh_CN/advanced_tutorials/gallery2fc.md
deleted file mode 100644
index 87d5caa81e87c9d4bd1c2d707d2b850994372488..0000000000000000000000000000000000000000
--- a/docs/zh_CN/advanced_tutorials/gallery2fc.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# 识别模型转分类模型
-
-PaddleClas 提供了 `gallery2fc.py` 工具,帮助大家将识别模型转为分类模型。目前该工具仅支持转换量化后模型,因此建议使用 PaddleClas 提供的 `general_PPLCNet_x2_5_pretrained_v1.0_quant` 预训练模型,该模型为量化后的通用识别模型,backbone 为 PPLCNet_x2_5。
-
-如需使用其他模型,关于量化的具体操作请参考文档 [模型量化](./model_prune_quantization.md)。
-
-## 一、模型转换说明
-
-### 1.1 准备底库数据、预训练模型
-
-#### 1. 底库数据集
-
-首先需要准备好底库数据,下面以 PaddleClas 提供的饮料数据集(drink_dataset_v1.0)为例进行说明,饮料数据集获取方法:
-
-```shell
-cd PaddleClas/
-wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/data/drink_dataset_v1.0.tar
-tar -xf drink_dataset_v1.0.tar
-```
-
-饮料数据集的底库图片路径为 `drink_dataset_v1.0/gallery/`,底库图片列表可在 `drink_dataset_v1.0/gallery/drink_label.txt` 中查看,关于底库数据格式说明,请参考文档[数据集格式说明](../data_preparation/recognition_dataset.md#1-数据集格式说明)。
-
-#### 2. 预训练模型
-
-在开始转换模型前,需要准备好预训练模型,下面以量化后的 `general_PPLCNet_x2_5` 模型为例,下载预训练模型:
-
-```shell
-cd PaddleClas/pretrained/
-wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/pretrain/general_PPLCNet_x2_5_pretrained_v1.0_quant.pdparams
-```
-
-### 1.2 准备配置文件
-
-在进行模型转换时,需要通过配置文件定义所需参数,本例中所用配置文件为 `ppcls/configs/GeneralRecognition/Gallery2FC_PPLCNet_x2_5.yaml`,对于配置文件字段的说明,如下所示:
-
-* Global:
- * pretrained_model: 预训练模型路径,无需包含 `.pdparams` 后缀名;
- * image_shape: 模型输入数据尺寸,无需包含 batch size 维度;
- * save_inference_dir: 转换后模型的保存路径;
-* Arch: 模型结构相关定义,可参考 [配置说明](../models_training/config_description.md#3-%E8%AF%86%E5%88%AB%E6%A8%A1%E5%9E%8B);
-* IndexProcess: 底库数据集相关定义
- * image_root: 底库数据集路径;
- * data_file: 底库数据集列表文件路径;
-
-### 1.3 模型转换
-
-在完成上述准备工作后,即可进行模型转换,命令如下所示:
-
-```python
-python ppcls/utils/gallery2fc.py -c ppcls/configs/GeneralRecognition/Gallery2FC_PPLCNet_x2_5.yaml
-```
-
-在上述命令执行完成后,转换并导出的模型保存在目录 `./inference/general_PPLCNet_x2_5_quant/` 下。在推理部署时,需要注意的是,模型的输出结果通常有多个,应选取分类结果作为模型输出,需要注意区分。
diff --git a/docs/zh_CN/advanced_tutorials/index.rst b/docs/zh_CN/advanced_tutorials/index.rst
deleted file mode 100644
index 760ec5cef5a82ea62cdb6eb4a0ab58293778483d..0000000000000000000000000000000000000000
--- a/docs/zh_CN/advanced_tutorials/index.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-高级教程
-================================
-
-.. toctree::
- :maxdepth: 2
-
- DataAugmentation.md
- knowledge_distillation.md
- model_prune_quantization.md
- code_overview.md
- how_to_contribute.md
-
-
diff --git a/docs/zh_CN/algorithm_introduction/reid.md b/docs/zh_CN/algorithm_introduction/ReID.md
similarity index 100%
rename from docs/zh_CN/algorithm_introduction/reid.md
rename to docs/zh_CN/algorithm_introduction/ReID.md
diff --git a/docs/zh_CN/algorithm_introduction/DataAugmentation.md b/docs/zh_CN/algorithm_introduction/data_augmentation.md
similarity index 100%
rename from docs/zh_CN/algorithm_introduction/DataAugmentation.md
rename to docs/zh_CN/algorithm_introduction/data_augmentation.md
diff --git a/docs/zh_CN/algorithm_introduction/deep_hashing_introduction.md b/docs/zh_CN/algorithm_introduction/deep_hashing.md
similarity index 100%
rename from docs/zh_CN/algorithm_introduction/deep_hashing_introduction.md
rename to docs/zh_CN/algorithm_introduction/deep_hashing.md
diff --git a/docs/zh_CN/algorithm_introduction/index.rst b/docs/zh_CN/algorithm_introduction/index.rst
deleted file mode 100644
index aa56459b8882431878202349c61e73fcf3e12c52..0000000000000000000000000000000000000000
--- a/docs/zh_CN/algorithm_introduction/index.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-算法介绍
-================================
-
-.. toctree::
- :maxdepth: 2
-
- image_classification.md
- metric_learning.md
- knowledge_distillation.md
- model_prune_quantization.md
- ImageNet_models.md
- DataAugmentation.md
diff --git a/docs/zh_CN/algorithm_introduction/model_prune_quantization.md b/docs/zh_CN/algorithm_introduction/prune_quantization.md
similarity index 100%
rename from docs/zh_CN/algorithm_introduction/model_prune_quantization.md
rename to docs/zh_CN/algorithm_introduction/prune_quantization.md
diff --git a/docs/zh_CN/others/transfer_learning.md b/docs/zh_CN/algorithm_introduction/transfer_learning.md
similarity index 100%
rename from docs/zh_CN/others/transfer_learning.md
rename to docs/zh_CN/algorithm_introduction/transfer_learning.md
diff --git a/docs/zh_CN/others/competition_support.md b/docs/zh_CN/community/competition_support.md
similarity index 100%
rename from docs/zh_CN/others/competition_support.md
rename to docs/zh_CN/community/competition_support.md
diff --git a/docs/zh_CN/others/course_link.md b/docs/zh_CN/community/courses.md
similarity index 90%
rename from docs/zh_CN/others/course_link.md
rename to docs/zh_CN/community/courses.md
index 177632076350b63a3531472d0ee8b81820f6d37a..3780586b3ebf601587311638f3d90fefae371c86 100644
--- a/docs/zh_CN/others/course_link.md
+++ b/docs/zh_CN/community/courses.md
@@ -16,19 +16,16 @@
- Metric Learning——更鲁棒的检索特征
- Logo识别等方向延展
- [超轻量图像识别系统概览](https://aistudio.baidu.com/aistudio/education/lessonvideo/1890318)
- - 图像识别技术选型策略
+ - 图像识别技术选型策略
- 推理速度提升8倍的秘籍
- - 四大典型行业应用案例
+ - 四大典型行业应用案例
- [SOTA模型炼丹秘诀](https://aistudio.baidu.com/aistudio/education/lessonvideo/1890323)
- CPU定制模型PP-LCNet优化思路
- Vison Transformer模型的应用拓展
- [商品识别产业痛点剖析](https://aistudio.baidu.com/aistudio/education/lessonvideo/1896890)
- 特征提取技术详解
- - 向量快速检索揭秘
+ - 向量快速检索揭秘
- [手把手教你玩转图像识别](https://aistudio.baidu.com/aistudio/education/lessonvideo/1911507)
- - 产业应用十问十答
+ - 产业应用十问十答
- 智能零售下的应用案例
- 识别系统快速落地方案
-
-
-
diff --git a/docs/zh_CN/advanced_tutorials/how_to_contribute.md b/docs/zh_CN/community/how_to_contribute.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/how_to_contribute.md
rename to docs/zh_CN/community/how_to_contribute.md
diff --git a/docs/zh_CN/conf.py b/docs/zh_CN/conf.py
deleted file mode 100644
index 889ef592d9a4f8dda990f82fd4e3c5a116e461f9..0000000000000000000000000000000000000000
--- a/docs/zh_CN/conf.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Configuration file for the Sphinx documentation builder.
-#
-# This file only contains a selection of the most common options. For a full
-# list see the documentation:
-# https://www.sphinx-doc.org/en/master/usage/configuration.html
-
-# -- Path setup --------------------------------------------------------------
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
-import sphinx_rtd_theme
-from recommonmark.parser import CommonMarkParser
-#import sphinx-markdown-tables
-# -- Project information -----------------------------------------------------
-
-project = 'PaddleClas'
-copyright = '2021, PaddleClas'
-author = 'PaddleClas'
-
-# The full version, including alpha/beta/rc tags
-release = '2.3.0'
-
-
-# -- General configuration ---------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-source_parsers = {
- '.md': CommonMarkParser,
-}
-source_suffix = ['.rst', '.md']
-extensions = [
- 'recommonmark',
- 'sphinx_markdown_tables'
- ]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = 'zh_CN'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This pattern also affects html_static_path and html_extra_path.
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
-
-
-# -- Options for HTML output -------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-#
-html_theme = "sphinx_rtd_theme"
-html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
diff --git a/docs/zh_CN/data_preparation/index.rst b/docs/zh_CN/data_preparation/index.rst
deleted file mode 100644
index c851ca5f6f0db75551c98c9e7b3a3a865c56eb89..0000000000000000000000000000000000000000
--- a/docs/zh_CN/data_preparation/index.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-数据准备
-================================
-
-.. toctree::
- :maxdepth: 2
-
- recognition_dataset.md
- classification_dataset.md
diff --git a/docs/zh_CN/inference_deployment/lite_shitu.md b/docs/zh_CN/deployment/PP-ShiTu/PaddleLite.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/lite_shitu.md
rename to docs/zh_CN/deployment/PP-ShiTu/PaddleLite.md
diff --git a/docs/zh_CN/inference_deployment/recognition_serving_deploy.md b/docs/zh_CN/deployment/PP-ShiTu/PaddleServing.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/recognition_serving_deploy.md
rename to docs/zh_CN/deployment/PP-ShiTu/PaddleServing.md
diff --git a/docs/zh_CN/introduction/ppshitu_application_scenarios.md b/docs/zh_CN/deployment/PP-ShiTu/application_scenarios.md
similarity index 100%
rename from docs/zh_CN/introduction/ppshitu_application_scenarios.md
rename to docs/zh_CN/deployment/PP-ShiTu/application_scenarios.md
diff --git a/docs/zh_CN/inference_deployment/shitu_gallery_manager.md b/docs/zh_CN/deployment/PP-ShiTu/gallery_manager.md
similarity index 97%
rename from docs/zh_CN/inference_deployment/shitu_gallery_manager.md
rename to docs/zh_CN/deployment/PP-ShiTu/gallery_manager.md
index 4023ff9c4e87a79c33d30fdbc16d4f479a88f51b..c874432b96b1e2dc4e83ee714ccacb6cd0c7e40b 100644
--- a/docs/zh_CN/inference_deployment/shitu_gallery_manager.md
+++ b/docs/zh_CN/deployment/PP-ShiTu/gallery_manager.md
@@ -90,7 +90,7 @@
在打开图像库或者新建图像库完成后,可以使用导入图像功能,即导入用户自己生成好的图像库。具体有支持两种导入格式
- image_list格式:打开具体的`.txt`文件。`.txt`文件中每一行格式: `image_path label`。跟据文件路径及label导入
-- 多文件夹格式:打开`具体文件夹`,此文件夹下存储多个子文件夹,每个子文件夹名字为`label_name`,每个子文件夹中存储对应的图像数据。
+- 多文件夹格式:打开`具体文件夹`,此文件夹下存储多个子文件夹,每个子文件夹名字为`label_name`,每个子文件夹中存储对应的图像数据。
@@ -150,10 +150,10 @@ python index_manager.py -c ../configs/inference_drink.yaml
```shell
index_root/ # 库存储目录
-|-- image_list.txt # 图像列表,每行:image_path label。由前端生成及修改,后端只读
+|-- image_list.txt # 图像列表,每行:image_path label。由前端生成及修改,后端只读
|-- images # 图像存储目录,由前端生成及增删查等操作。后端只读
-| |-- md5.jpg
-| |-- md5.jpg
+| |-- md5.jpg
+| |-- md5.jpg
| |-- ……
|-- features.pkl # 建库之后,保存的embedding向量,后端生成,前端无需操作
|-- index # 真正的生成的index库存储目录,后端生成及操作,前端无需操作。
@@ -192,4 +192,3 @@ index_root/ # 库存储目录
- 问题4: 报错 图像与index库不一致
答:可能用户自己修改了image_list.txt,修改完成后,请及时更新index库,保证其一致。
-
diff --git a/docs/zh_CN/advanced_tutorials/shitu_deploy.md b/docs/zh_CN/deployment/PP-ShiTu/shitu_deploy.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/shitu_deploy.md
rename to docs/zh_CN/deployment/PP-ShiTu/shitu_deploy.md
diff --git a/docs/zh_CN/image_recognition_pipeline/vector_search.md b/docs/zh_CN/deployment/PP-ShiTu/vector_search.md
similarity index 100%
rename from docs/zh_CN/image_recognition_pipeline/vector_search.md
rename to docs/zh_CN/deployment/PP-ShiTu/vector_search.md
diff --git a/docs/zh_CN/inference_deployment/export_model.md b/docs/zh_CN/deployment/export_model.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/export_model.md
rename to docs/zh_CN/deployment/export_model.md
diff --git a/docs/zh_CN/inference_deployment/paddle_hub_serving_deploy.md b/docs/zh_CN/deployment/image_classification/PaddleHub.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/paddle_hub_serving_deploy.md
rename to docs/zh_CN/deployment/image_classification/PaddleHub.md
diff --git a/docs/zh_CN/inference_deployment/paddle_lite_deploy.md b/docs/zh_CN/deployment/image_classification/PaddleLite.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/paddle_lite_deploy.md
rename to docs/zh_CN/deployment/image_classification/PaddleLite.md
diff --git a/docs/zh_CN/inference_deployment/classification_serving_deploy.md b/docs/zh_CN/deployment/image_classification/PaddleServing.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/classification_serving_deploy.md
rename to docs/zh_CN/deployment/image_classification/PaddleServing.md
diff --git a/docs/zh_CN/inference_deployment/cpp_deploy.md b/docs/zh_CN/deployment/image_classification/cpp/linux.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/cpp_deploy.md
rename to docs/zh_CN/deployment/image_classification/cpp/linux.md
diff --git a/docs/zh_CN/inference_deployment/cpp_deploy_on_windows.md b/docs/zh_CN/deployment/image_classification/cpp/windows.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/cpp_deploy_on_windows.md
rename to docs/zh_CN/deployment/image_classification/cpp/windows.md
diff --git a/docs/zh_CN/inference_deployment/python_deploy.md b/docs/zh_CN/deployment/python.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/python_deploy.md
rename to docs/zh_CN/deployment/python.md
diff --git a/docs/zh_CN/inference_deployment/whl_deploy.md b/docs/zh_CN/deployment/whl.md
similarity index 100%
rename from docs/zh_CN/inference_deployment/whl_deploy.md
rename to docs/zh_CN/deployment/whl.md
diff --git a/docs/zh_CN/faq_series/index.rst b/docs/zh_CN/faq_series/index.rst
deleted file mode 100644
index 225b82dc5e35d14c56b57bfc8ac890220c2dfb11..0000000000000000000000000000000000000000
--- a/docs/zh_CN/faq_series/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-FAQ系列
-================================
-
-.. toctree::
- :maxdepth: 2
-
- faq_2021_s2.md
- faq_2021_s1.md
- faq_2020_s1.md
- faq_selected_30.md
diff --git a/docs/zh_CN/image_recognition_pipeline/index.rst b/docs/zh_CN/image_recognition_pipeline/index.rst
deleted file mode 100644
index 6cf5e5a606b829cca08cab1eedb059280e616272..0000000000000000000000000000000000000000
--- a/docs/zh_CN/image_recognition_pipeline/index.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-图像识别流程
-================================
-
-.. toctree::
- :maxdepth: 2
-
- mainbody_detection.md
- feature_extraction.md
- vector_search.md
diff --git a/docs/zh_CN/index.rst b/docs/zh_CN/index.rst
deleted file mode 100644
index a41ca9b90b293eff929a91ae09180969987f1bff..0000000000000000000000000000000000000000
--- a/docs/zh_CN/index.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-欢迎使用PaddleClas图像分类库!
-================================
-
-.. toctree::
- :maxdepth: 1
-
- introduction/index
- installation/index
- quick_start/index
- image_recognition_pipeline/index
- data_preparation/index
- models_training/index
- inference_deployment/index
- models/index
- algorithm_introduction/index
- advanced_tutorials/index
- others/index
- faq_series/index
diff --git a/docs/zh_CN/inference_deployment/index.rst b/docs/zh_CN/inference_deployment/index.rst
deleted file mode 100644
index beddc138796b310fecfd03e70501a686cf237a15..0000000000000000000000000000000000000000
--- a/docs/zh_CN/inference_deployment/index.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-推理部署
-================================
-
-.. toctree::
- :maxdepth: 2
-
- export_model.md
- python_deploy.md
- cpp_deploy.md
- paddle_serving_deploy.md
- paddle_hub_serving_deploy.md
- paddle_lite_deploy.md
- whl_deploy.md
- cpp_deploy_on_windows.md
-
-
-
diff --git a/docs/zh_CN/installation/install_paddleclas.md b/docs/zh_CN/installation.md
similarity index 100%
rename from docs/zh_CN/installation/install_paddleclas.md
rename to docs/zh_CN/installation.md
diff --git a/docs/zh_CN/installation/index.rst b/docs/zh_CN/installation/index.rst
deleted file mode 100644
index 752d0500b79095c65ae0f9526fb7b63ce9dec786..0000000000000000000000000000000000000000
--- a/docs/zh_CN/installation/index.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-安装
-================================
-
-.. toctree::
- :maxdepth: 2
-
- install_paddle.md
- install_paddleclas.md
diff --git a/docs/zh_CN/introduction/function_intro.md b/docs/zh_CN/introduction/function_intro.md
deleted file mode 100644
index 63afc75cf7c04e8121611d319e2a02eeab83a739..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/function_intro.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## PaddleClas 功能特性
-
-飞桨图像识别套件 PaddleClas 是飞桨为工业界和学术界所准备的一个图像识别任务的工具集,助力使用者训练出更好的视觉模型和应用落地。具体地,它包含以下几个核心特性。
-
-
-- 实用的图像识别系统:集成了目标检测、特征学习、图像检索等模块,广泛适用于各类图像识别任务。
-提供商品识别、车辆识别、 logo 识别和动漫人物识别等 4 个场景应用示例。
-
-- 丰富的预训练模型库:提供了 36 个系列共 175 个 ImageNet 预训练模型,其中 7 个精选系列模型支持结构快速修改。
-
-- 全面易用的特征学习组件:集成 arcmargin, triplet loss 等 12 度量学习方法,通过配置文件即可随意组合切换。
-
-- SSLD 知识蒸馏: 14 个分类预训练模型,精度普遍提升 3% 以上;其中 ResNet50_vd 模型在 ImageNet-1k 数据集上的 Top-1 精度达到了 84.0%,Res2Net200_vd 预训练模型 Top-1 精度高达 85.1% 。
-
-- 数据增广:支持 AutoAugment 、 Cutout 、 Cutmix 等 8 种数据增广算法详细介绍、代码复现和在统一实验环境下的效果评估。
-
-
-![](../../images/recognition.gif)
-
-更多关于图像识别快速体验、算法详解、模型训练评估与预测部署方法,请参考[首页 README 文档教程](../../../README_ch.md)。
diff --git a/docs/zh_CN/introduction/index.rst b/docs/zh_CN/introduction/index.rst
deleted file mode 100644
index c33c6897af74aed3423519a94c4f0a184ac3764d..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/index.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-介绍
-================================
-
-.. toctree::
- :maxdepth: 2
-
- function_intro.md
- more_demo/index
diff --git a/docs/zh_CN/introduction/more_demo/cartoon.md b/docs/zh_CN/introduction/more_demo/cartoon.md
deleted file mode 100644
index 825da493ae212ac8521c257ddb7d54afd273ca4c..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/cartoon.md
+++ /dev/null
@@ -1,53 +0,0 @@
-## 动漫人物图片识别效果图
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/zh_CN/introduction/more_demo/index.rst b/docs/zh_CN/introduction/more_demo/index.rst
deleted file mode 100644
index 448e9fefb986e11bbddeacfc55d714c8538d0583..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-介绍
-================================
-
-.. toctree::
- :maxdepth: 2
-
- cartoon.md
- logo.md
- more_demo.md
- product.md
- vehicle.md
diff --git a/docs/zh_CN/introduction/more_demo/logo.md b/docs/zh_CN/introduction/more_demo/logo.md
deleted file mode 100644
index cbed4a6e6a14b0dbeafae00f83378d9a95d2a0b7..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/logo.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## 商标图片识别效果图
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/zh_CN/introduction/more_demo/more_demo.md b/docs/zh_CN/introduction/more_demo/more_demo.md
deleted file mode 100644
index 97732e3f2a1eb2404e14954d8ec55142cfc4d5b9..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/more_demo.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## 识别效果展示
-- 商品识别
-
-
-
-
-
-
-[更多效果图](product.md)
-
-
-- 动漫人物识别
-
-
-
-
-
-[更多效果图](cartoon.md)
-
-
-- logo识别
-
-
-
-
-
-
-
-
-
-[更多效果图](logo.md)
-
-
-- 车辆识别
-
-
-
-
-
-[更多效果图](vehicle.md)
diff --git a/docs/zh_CN/introduction/more_demo/product.md b/docs/zh_CN/introduction/more_demo/product.md
deleted file mode 100644
index df211f04a52c7ec2f35be2a5bba9e0a00af22b33..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/product.md
+++ /dev/null
@@ -1,179 +0,0 @@
-## 商品图片识别效果图
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/zh_CN/introduction/more_demo/vehicle.md b/docs/zh_CN/introduction/more_demo/vehicle.md
deleted file mode 100644
index 975c98bd818895bb503915354602523cecc60622..0000000000000000000000000000000000000000
--- a/docs/zh_CN/introduction/more_demo/vehicle.md
+++ /dev/null
@@ -1,33 +0,0 @@
-## 车辆图片识别效果图
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/zh_CN/make.bat b/docs/zh_CN/make.bat
deleted file mode 100644
index fca029c5b49971e7b9e2c7fddb3f897ca903f364..0000000000000000000000000000000000000000
--- a/docs/zh_CN/make.bat
+++ /dev/null
@@ -1,37 +0,0 @@
-@ECHO OFF
-
-pushd %~dp0
-
-REM Command file for Sphinx documentation
-
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-
-set SOURCEDIR=source
-set BUILDDIR=build
-
-
-if "%1" == "" goto help
-
-%SPHINXBUILD% >NUL 2>NUL
-if errorlevel 9009 (
- echo.
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
- echo.installed, then set the SPHINXBUILD environment variable to point
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
- echo.may add the Sphinx directory to PATH.
- echo.
- echo.If you don't have Sphinx installed, grab it from
- echo.https://www.sphinx-doc.org/
- exit /b 1
-)
-
-%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-goto end
-
-:help
-%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
-
-:end
-popd
diff --git a/docs/zh_CN/models/CSWinTransformer.md b/docs/zh_CN/models/ImageNet1k/CSWinTransformer.md
similarity index 100%
rename from docs/zh_CN/models/CSWinTransformer.md
rename to docs/zh_CN/models/ImageNet1k/CSWinTransformer.md
diff --git a/docs/zh_CN/models/DLA.md b/docs/zh_CN/models/ImageNet1k/DLA.md
similarity index 99%
rename from docs/zh_CN/models/DLA.md
rename to docs/zh_CN/models/ImageNet1k/DLA.md
index 3612b9ed406c31ab3355a14de728966245fa6287..e9db08d15f4fb72b01462f5516512a5805fc3219 100644
--- a/docs/zh_CN/models/DLA.md
+++ b/docs/zh_CN/models/ImageNet1k/DLA.md
@@ -22,7 +22,7 @@ DLA(Deep Layer Aggregation)。 视觉识别需要丰富的表示形式,其范
| DLA46x_c | 1.1 | 0.5 | 64.36 | 86.01 |
| DLA60 | 22.0 | 4.2 | 76.10 | 92.92 |
| DLA60x | 17.4 | 3.5 | 77.53 | 93.78 |
-| DLA60x_c | 1.3 | 0.6 | 66.45 | 87.54 |
+| DLA60x_c | 1.3 | 0.6 | 66.45 | 87.54 |
| DLA102 | 33.3 | 7.2 | 78.93 | 94.52 |
| DLA102x | 26.4 | 5.9 | 78.10 | 94.00 |
| DLA102x2 | 41.4 | 9.3 | 78.85 | 94.45 |
@@ -42,4 +42,4 @@ DLA(Deep Layer Aggregation)。 视觉识别需要丰富的表示形式,其范
| DLA46_c | 224 | 256 | 1.06 | 2.08 | 3.23 |
| DLA60 | 224 | 256 | 2.78 | 5.36 | 8.29 |
| DLA60x_c | 224 | 256 | 1.79 | 3.68 | 5.19 |
-| DLA60x | 224 | 256 | 5.98 | 9.24 | 12.52 |
\ No newline at end of file
+| DLA60x | 224 | 256 | 5.98 | 9.24 | 12.52 |
diff --git a/docs/zh_CN/models/DPN_DenseNet.md b/docs/zh_CN/models/ImageNet1k/DPN_DenseNet.md
similarity index 100%
rename from docs/zh_CN/models/DPN_DenseNet.md
rename to docs/zh_CN/models/ImageNet1k/DPN_DenseNet.md
diff --git a/docs/zh_CN/models/ESNet.md b/docs/zh_CN/models/ImageNet1k/ESNet.md
similarity index 100%
rename from docs/zh_CN/models/ESNet.md
rename to docs/zh_CN/models/ImageNet1k/ESNet.md
diff --git a/docs/zh_CN/models/EfficientNet_and_ResNeXt101_wsl.md b/docs/zh_CN/models/ImageNet1k/EfficientNet_and_ResNeXt101_wsl.md
similarity index 100%
rename from docs/zh_CN/models/EfficientNet_and_ResNeXt101_wsl.md
rename to docs/zh_CN/models/ImageNet1k/EfficientNet_and_ResNeXt101_wsl.md
diff --git a/docs/zh_CN/models/HRNet.md b/docs/zh_CN/models/ImageNet1k/HRNet.md
similarity index 100%
rename from docs/zh_CN/models/HRNet.md
rename to docs/zh_CN/models/ImageNet1k/HRNet.md
diff --git a/docs/zh_CN/models/HarDNet.md b/docs/zh_CN/models/ImageNet1k/HarDNet.md
similarity index 99%
rename from docs/zh_CN/models/HarDNet.md
rename to docs/zh_CN/models/ImageNet1k/HarDNet.md
index 3f75fad7bc876843640c888b0c6d80f822b344ac..ddd15c5cd01ae730ef8fdb32086fdb2285e7e581 100644
--- a/docs/zh_CN/models/HarDNet.md
+++ b/docs/zh_CN/models/ImageNet1k/HarDNet.md
@@ -32,4 +32,3 @@ HarDNet(Harmonic DenseNet)是 2019 年由国立清华大学提出的一种
| HarDNet85 | 224 | 256 | 6.24 | 14.85 | 20.57 |
| HarDNet39_ds | 224 | 256 | 1.40 | 2.30 | 3.33 |
| HarDNet68_ds | 224 | 256 | 2.26 | 3.34 | 5.06 |
-
diff --git a/docs/zh_CN/models/Inception.md b/docs/zh_CN/models/ImageNet1k/Inception.md
similarity index 100%
rename from docs/zh_CN/models/Inception.md
rename to docs/zh_CN/models/ImageNet1k/Inception.md
diff --git a/docs/zh_CN/models/LeViT.md b/docs/zh_CN/models/ImageNet1k/LeViT.md
similarity index 100%
rename from docs/zh_CN/models/LeViT.md
rename to docs/zh_CN/models/ImageNet1k/LeViT.md
diff --git a/docs/zh_CN/models/MixNet.md b/docs/zh_CN/models/ImageNet1k/MixNet.md
similarity index 100%
rename from docs/zh_CN/models/MixNet.md
rename to docs/zh_CN/models/ImageNet1k/MixNet.md
diff --git a/docs/zh_CN/models/Mobile.md b/docs/zh_CN/models/ImageNet1k/Mobile.md
similarity index 100%
rename from docs/zh_CN/models/Mobile.md
rename to docs/zh_CN/models/ImageNet1k/Mobile.md
diff --git a/docs/zh_CN/models/MobileViT.md b/docs/zh_CN/models/ImageNet1k/MobileViT.md
similarity index 100%
rename from docs/zh_CN/models/MobileViT.md
rename to docs/zh_CN/models/ImageNet1k/MobileViT.md
diff --git a/docs/zh_CN/models/Others.md b/docs/zh_CN/models/ImageNet1k/Others.md
similarity index 100%
rename from docs/zh_CN/models/Others.md
rename to docs/zh_CN/models/ImageNet1k/Others.md
diff --git a/docs/zh_CN/models/PP-HGNet.md b/docs/zh_CN/models/ImageNet1k/PP-HGNet.md
similarity index 96%
rename from docs/zh_CN/models/PP-HGNet.md
rename to docs/zh_CN/models/ImageNet1k/PP-HGNet.md
index f89c11c84b20723a84f98754d090ea1119931e92..67ef5ca89ab61cabaecf32818be98c38072c0664 100644
--- a/docs/zh_CN/models/PP-HGNet.md
+++ b/docs/zh_CN/models/ImageNet1k/PP-HGNet.md
@@ -65,7 +65,7 @@ PP-HGNet 目前提供的模型的精度、速度指标及预训练权重链接
| PPHGNet_base_ssld | 85.00| 97.35 | 5.97 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPHGNet_base_ssld_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet_base_ssld_infer.tar) |
**备注:**
-
+
* 1. `_ssld` 表示使用 `SSLD 蒸馏`后的模型。关于 `SSLD蒸馏` 的内容,详情 [SSLD 蒸馏](../advanced_tutorials/knowledge_distillation.md)。
* 2. PP-HGNet 更多模型指标及权重,敬请期待。
@@ -89,8 +89,8 @@ PP-HGNet 与其他模型的比较如下,其中测试机器为 NVIDIA® Tesla®
| ResNeXt101_32x48d_wsl | 85.37 | 97.69 | 55.07 |
| SwinTransformer_base | 85.2 | 97.5 | 13.53 |
| PPHGNet_base_ssld | 85.00| 97.35 | 5.97 |
-
-
+
+
## 2. 模型快速体验
@@ -123,26 +123,26 @@ python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
pip3 install paddleclas
```
-
-
+
+
### 2.3 预测
* 在命令行中使用 PPHGNet_small 的权重快速预测
-
+
```bash
paddleclas --model_name=PPHGNet_small --infer_imgs="docs/images/inference_deployment/whl_demo.jpg"
```
-
+
结果如下:
```
>>> result
class_ids: [8, 7, 86, 82, 81], scores: [0.71479, 0.08682, 0.00806, 0.0023, 0.00121], label_names: ['hen', 'cock', 'partridge', 'ruffed grouse, partridge, Bonasa umbellus', 'ptarmigan'], filename: docs/images/inference_deployment/whl_demo.jpg
Predict complete!
```
-
-**备注**: 更换 PPHGNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `PPHGNet_tiny` 时,只需要将 `--model_name=PPHGNet_small` 改为 `--model_name=PPHGNet_tiny` 即可。
-
+**备注**: 更换 PPHGNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `PPHGNet_tiny` 时,只需要将 `--model_name=PPHGNet_small` 改为 `--model_name=PPHGNet_tiny` 即可。
+
+
* 在 Python 代码中预测
```python
from paddleclas import PaddleClas
@@ -159,19 +159,19 @@ print(next(result))
>>> result
[{'class_ids': [8, 7, 86, 82, 81], 'scores': [0.71479, 0.08682, 0.00806, 0.0023, 0.00121], 'label_names': ['hen', 'cock', 'partridge', 'ruffed grouse, partridge, Bonasa umbellus', 'ptarmigan'], 'filename': 'docs/images/inference_deployment/whl_demo.jpg'}]
```
-
-
-
-
+
+
+
+
## 3. 模型训练、评估和预测
-
+
### 3.1 环境配置
* 安装:请先参考文档[环境准备](../installation/install_paddleclas.md) 配置 PaddleClas 运行环境。
-
+
### 3.2 数据准备
@@ -200,15 +200,15 @@ cd path_to_PaddleClas
```
其中 `train/` 和 `val/` 分别为训练集和验证集。`train_list.txt` 和 `val_list.txt` 分别为训练集和验证集的标签文件。
-
-**备注:**
+
+**备注:**
* 关于 `train_list.txt`、`val_list.txt`的格式说明,可以参考[PaddleClas分类数据集格式说明](../data_preparation/classification_dataset.md#1-数据集格式说明) 。
-
+
-### 3.3 模型训练
+### 3.3 模型训练
在 `ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml` 中提供了 PPHGNet_small 训练配置,可以通过如下脚本启动训练:
@@ -218,11 +218,11 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 -m paddle.distributed.launch \
--gpus="0,1,2,3" \
tools/train.py \
- -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml
+ -c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml
```
-**备注:**
+**备注:**
* 当前精度最佳的模型会保存在 `output/PPHGNet_small/best_model.pdparams`
@@ -249,7 +249,7 @@ python3 tools/eval.py \
```python
python3 tools/infer.py \
-c ppcls/configs/ImageNet/PPHGNet/PPHGNet_small.yaml \
- -o Global.pretrained_model=output/PPHGNet_small/best_model
+ -o Global.pretrained_model=output/PPHGNet_small/best_model
```
输出结果如下:
@@ -258,30 +258,30 @@ python3 tools/infer.py \
[{'class_ids': [8, 7, 86, 82, 81], 'scores': [0.71479, 0.08682, 0.00806, 0.0023, 0.00121], 'file_name': 'docs/images/inference_deployment/whl_demo.jpg', 'label_names': ['hen', 'cock', 'partridge', 'ruffed grouse, partridge, Bonasa umbellus', 'ptarmigan']}]
```
-**备注:**
+**备注:**
* 这里`-o Global.pretrained_model="output/PPHGNet_small/best_model"` 指定了当前最佳权重所在的路径,如果指定其他权重,只需替换对应的路径即可。
-
+
* 默认是对 `docs/images/inference_deployment/whl_demo.jpg` 进行预测,此处也可以通过增加字段 `-o Infer.infer_imgs=xxx` 对其他图片预测。
-
+
* 默认输出的是 Top-5 的值,如果希望输出 Top-k 的值,可以指定`-o Infer.PostProcess.topk=k`,其中,`k` 为您指定的值。
-
+
## 4. 模型推理部署
-
+
### 4.1 推理模型准备
Paddle Inference 是飞桨的原生推理库, 作用于服务器端和云端,提供高性能的推理能力。相比于直接基于预训练模型进行预测,Paddle Inference可使用MKLDNN、CUDNN、TensorRT 进行预测加速,从而实现更优的推理性能。更多关于Paddle Inference推理引擎的介绍,可以参考[Paddle Inference官网教程](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/infer/inference/inference_cn.html)。
-
+
当使用 Paddle Inference 推理时,加载的模型类型为 inference 模型。本案例提供了两种获得 inference 模型的方法,如果希望得到和文档相同的结果,请选择[直接下载 inference 模型](#6.1.2)的方式。
-
-
+
+
### 4.1.1 基于训练得到的权重导出 inference 模型
@@ -303,7 +303,7 @@ python3 tools/export_model.py \
```
-
+
### 4.1.2 直接下载 inference 模型
@@ -324,7 +324,7 @@ wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPHGNet
│ └── inference.pdmodel
```
-
+
### 4.2 基于 Python 预测引擎推理
@@ -375,33 +375,32 @@ ILSVRC2012_val_00030010.jpeg: class id(s): [80, 83, 136, 23, 93], score(s): [0.8
```
-
+
### 4.3 基于 C++ 预测引擎推理
PaddleClas 提供了基于 C++ 预测引擎推理的示例,您可以参考[服务器端 C++ 预测](../inference_deployment/cpp_deploy.md)来完成相应的推理部署。如果您使用的是 Windows 平台,可以参考[基于 Visual Studio 2019 Community CMake 编译指南](../inference_deployment/cpp_deploy_on_windows.md)完成相应的预测库编译和模型预测工作。
-
+
### 4.4 服务化部署
Paddle Serving 提供高性能、灵活易用的工业级在线推理服务。Paddle Serving 支持 RESTful、gRPC、bRPC 等多种协议,提供多种异构硬件和多种操作系统环境下推理解决方案。更多关于Paddle Serving 的介绍,可以参考[Paddle Serving 代码仓库](https://github.com/PaddlePaddle/Serving)。
-
+
PaddleClas 提供了基于 Paddle Serving 来完成模型服务化部署的示例,您可以参考[模型服务化部署](../inference_deployment/paddle_serving_deploy.md)来完成相应的部署工作。
-
+
### 4.5 端侧部署
Paddle Lite 是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架,定位于支持包括移动端、嵌入式以及服务器端在内的多硬件平台。更多关于 Paddle Lite 的介绍,可以参考[Paddle Lite 代码仓库](https://github.com/PaddlePaddle/Paddle-Lite)。
-
+
PaddleClas 提供了基于 Paddle Lite 来完成模型端侧部署的示例,您可以参考[端侧部署](../inference_deployment/paddle_lite_deploy.md)来完成相应的部署工作。
-
+
### 4.6 Paddle2ONNX 模型转换与预测
-
+
Paddle2ONNX 支持将 PaddlePaddle 模型格式转化到 ONNX 模型格式。通过 ONNX 可以完成将 Paddle 模型到多种推理引擎的部署,包括TensorRT/OpenVINO/MNN/TNN/NCNN,以及其它对 ONNX 开源格式进行支持的推理引擎或硬件。更多关于 Paddle2ONNX 的介绍,可以参考[Paddle2ONNX 代码仓库](https://github.com/PaddlePaddle/Paddle2ONNX)。
PaddleClas 提供了基于 Paddle2ONNX 来完成 inference 模型转换 ONNX 模型并作推理预测的示例,您可以参考[Paddle2ONNX 模型转换与预测](../../../deploy/paddle2onnx/readme.md)来完成相应的部署工作。
-
diff --git a/docs/zh_CN/models/PP-LCNet.md b/docs/zh_CN/models/ImageNet1k/PP-LCNet.md
similarity index 97%
rename from docs/zh_CN/models/PP-LCNet.md
rename to docs/zh_CN/models/ImageNet1k/PP-LCNet.md
index 2df3c3e297f3f20cb3ffca62c67397f61364de3f..df52f3c7c075a12fdbba5b5c06b93b1c9ef63ff8 100644
--- a/docs/zh_CN/models/PP-LCNet.md
+++ b/docs/zh_CN/models/ImageNet1k/PP-LCNet.md
@@ -37,8 +37,8 @@
- [4.5 端侧部署](#4.5)
- [4.6 Paddle2ONNX 模型转换与预测](#4.6)
- [5. 引用](#5)
-
-
+
+
@@ -83,7 +83,7 @@ SE 模块是 SENet 提出的一种通道注意力机制,可以有效提升模
最终,PP-LCNet 中的 SE 模块的位置选用了表格中第三行的方案。
-
+
#### 1.2.3 合适的位置添加更大的卷积核
在 MixNet 的论文中,作者分析了卷积核大小对模型性能的影响,结论是在一定范围内大的卷积核可以提升模型的性能,但是超过这个范围会有损模型的性能,所以作者组合了一种 split-concat 范式的 MixConv,这种组合虽然可以提升模型的性能,但是不利于推理。我们通过实验总结了一些更大的卷积核在不同位置的作用,类似 SE 模块的位置,更大的卷积核在网络的中后部作用更明显,下表展示了 5x5 卷积核的位置对精度的影响:
@@ -96,9 +96,9 @@ SE 模块是 SENet 提出的一种通道注意力机制,可以有效提升模
实验表明,更大的卷积核放在网络的中后部即可达到放在所有位置的精度,与此同时,获得更快的推理速度。PP-LCNet 最终选用了表格中第三行的方案。
-
+
-
+
#### 1.2.4 GAP 后使用更大的 1x1 卷积层
在 GoogLeNet 之后,GAP(Global-Average-Pooling)后往往直接接分类层,但是在轻量级网络中,这样会导致 GAP 后提取的特征没有得到进一步的融合和加工。如果在此后使用一个更大的 1x1 卷积层(等同于 FC 层),GAP 后的特征便不会直接经过分类层,而是先进行了融合,并将融合的特征进行分类。这样可以在不影响模型推理速度的同时大大提升准确率。
@@ -113,17 +113,17 @@ BaseNet 经过以上四个方面的改进,得到了 PP-LCNet。下表进一步
| 1 | 1 | 1 | 1 | 63.14 | 2.05 |
-
+
### 1.3 实验结果
-
+
#### 1.3.1 图像分类
图像分类我们选用了 ImageNet 数据集,相比目前主流的轻量级网络,PP-LCNet 在相同精度下可以获得更快的推理速度。当使用百度自研的 SSLD 蒸馏策略后,精度进一步提升,在 Intel cpu 端约 5ms 的推理速度下 ImageNet 的 Top-1 Acc 超过了 80%。
| Model | Params(M) | FLOPs(M) | Top-1 Acc(\%) | Top-5 Acc(\%) | Latency(ms) | 预训练模型下载地址 | inference模型下载地址 |
-|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
+|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| PPLCNet_x0_25 | 1.5 | 18 | 51.86 | 75.65 | 1.74 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_25_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_25_infer.tar) |
| PPLCNet_x0_35 | 1.6 | 29 | 58.09 | 80.83 | 1.92 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_35_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_35_infer.tar) |
| PPLCNet_x0_5 | 1.9 | 47 | 63.14 | 84.66 | 2.05 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/legendary_models/PPLCNet_x0_5_pretrained.pdparams) | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet_x0_5_infer.tar) |
@@ -156,7 +156,7 @@ BaseNet 经过以上四个方面的改进,得到了 PP-LCNet。下表进一步
| PPLCNet_x1_0 | 3.0 | 161 | 71.32 | 90.03 | 2.46 |
-
+
#### 1.3.2 目标检测
目标检测的方法我们选用了百度自研的 PicoDet,该方法主打轻量级目标检测场景,下表展示了在 COCO 数据集上、backbone 选用 PP-LCNet 与 MobileNetV3 的结果的比较,无论在精度还是速度上,PP-LCNet 的优势都非常明显。
@@ -169,7 +169,7 @@ MobileNetV3_large_x0_75 | 25.8 | 11.1 |
PPLCNet_x1_0 | 26.9 | 7.9 |
-
+
#### 1.3.3 语义分割
语义分割的方法我们选用了 DeeplabV3+,下表展示了在 Cityscapes 数据集上、backbone 选用 PP-LCNet 与 MobileNetV3 的比较,在精度和速度方面,PP-LCNet 的优势同样明显。
@@ -186,8 +186,8 @@ MobileNetV3_large_x0_75 | 64.53 | 151 |
## 1.4 Benchmark
-
-#### 1.4.1 基于 Intel Xeon Gold 6148 的预测速度
+
+#### 1.4.1 基于 Intel Xeon Gold 6148 的预测速度
| Model | Latency(ms)
bs=1, thread=10 |
|:--:|:--:|
@@ -199,11 +199,11 @@ MobileNetV3_large_x0_75 | 64.53 | 151 |
| PPLCNet_x1_5 | 3.19 |
| PPLCNet_x2_0 | 4.27 |
| PPLCNet_x2_5 | 5.39 |
-
+
**备注:** 精度类型为 FP32,推理过程使用 MKLDNN。
-
+
#### 1.4.2 基于 V100 GPU 的预测速度
| Models | Latency(ms)
bs=1 | Latency(ms)
bs=4 | Latency(ms)
bs=8 |
@@ -215,7 +215,7 @@ MobileNetV3_large_x0_75 | 64.53 | 151 |
| PPLCNet_x1_0 | 0.73 | 1.64 | 2.53 |
| PPLCNet_x1_5 | 0.82 | 2.06 | 3.12 |
| PPLCNet_x2_0 | 0.94 | 2.58 | 4.08 |
-
+
**备注:** 精度类型为 FP32,推理过程使用 TensorRT。
@@ -232,15 +232,15 @@ MobileNetV3_large_x0_75 | 64.53 | 151 |
| PPLCNet_x1_5 | 20.55 | 12.26 | 7.54 |
| PPLCNet_x2_0 | 33.79 | 20.17 | 12.10 |
| PPLCNet_x2_5 | 49.89 | 29.60 | 17.82 |
-
+
**备注:** 精度类型为 FP32。
-
-
+
+
## 2. 模型快速体验
-
-
+
+
### 2.1 安装 paddlepaddle
- 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
@@ -266,27 +266,27 @@ python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```
pip3 install paddleclas
```
-
-
-
+
+
+
### 2.3 预测
* 在命令行中使用 PPLCNet_x1_0 的权重快速预测
-
+
```bash
paddleclas --model_name=PPLCNet_x1_0 --infer_imgs="docs/images/inference_deployment/whl_demo.jpg"
```
-
+
结果如下:
```
>>> result
class_ids: [8, 7, 86, 81, 85], scores: [0.91347, 0.03779, 0.0036, 0.00117, 0.00112], label_names: ['hen', 'cock', 'partridge', 'ptarmigan', 'quail'], filename: docs/images/inference_deployment/whl_demo.jpg
Predict complete!
-```
-
-**备注**: 更换 PPLCNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `PPLCNet_x2_0` 时,只需要将 `--model_name=PPLCNet_x1_0` 改为 `--model_name=PPLCNet_x2_0` 即可。
+```
+
+**备注**: 更换 PPLCNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `PPLCNet_x2_0` 时,只需要将 `--model_name=PPLCNet_x1_0` 改为 `--model_name=PPLCNet_x2_0` 即可。
+
-
* 在 Python 代码中预测
```python
from paddleclas import PaddleClas
@@ -303,18 +303,18 @@ print(next(result))
>>> result
[{'class_ids': [8, 7, 86, 81, 85], 'scores': [0.91347, 0.03779, 0.0036, 0.00117, 0.00112], 'label_names': ['hen', 'cock', 'partridge', 'ptarmigan', 'quail'], 'filename': 'docs/images/inference_deployment/whl_demo.jpg'}]
```
-
-
-
+
+
+
## 3. 模型训练、评估和预测
-
+
### 3.1 环境配置
* 安装:请先参考 [Paddle 安装教程](../installation/install_paddle.md) 以及 [PaddleClas 安装教程](../installation/install_paddleclas.md) 配置 PaddleClas 运行环境。
-
+
### 3.2 数据准备
@@ -343,15 +343,15 @@ cd path_to_PaddleClas
```
其中 `train/` 和 `val/` 分别为训练集和验证集。`train_list.txt` 和 `val_list.txt` 分别为训练集和验证集的标签文件。
-
-**备注:**
+
+**备注:**
* 关于 `train_list.txt`、`val_list.txt`的格式说明,可以参考[PaddleClas分类数据集格式说明](../data_preparation/classification_dataset.md#1-数据集格式说明) 。
-
+
-### 3.3 模型训练
+### 3.3 模型训练
在 `ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml` 中提供了 PPLCNet_x1_0 训练配置,可以通过如下脚本启动训练:
@@ -361,11 +361,11 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 -m paddle.distributed.launch \
--gpus="0,1,2,3" \
tools/train.py \
- -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml
+ -c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml
```
-**备注:**
+**备注:**
* 当前精度最佳的模型会保存在 `output/PPLCNet_x1_0/best_model.pdparams`
@@ -392,7 +392,7 @@ python3 tools/eval.py \
```python
python3 tools/infer.py \
-c ppcls/configs/ImageNet/PPLCNet/PPLCNet_x1_0.yaml \
- -o Global.pretrained_model=output/PPLCNet_x1_0/best_model
+ -o Global.pretrained_model=output/PPLCNet_x1_0/best_model
```
输出结果如下:
@@ -401,30 +401,30 @@ python3 tools/infer.py \
[{'class_ids': [8, 7, 86, 81, 85], 'scores': [0.91347, 0.03779, 0.0036, 0.00117, 0.00112], 'file_name': 'docs/images/inference_deployment/whl_demo.jpg', 'label_names': ['hen', 'cock', 'partridge', 'ptarmigan', 'quail']}]
```
-**备注:**
+**备注:**
* 这里`-o Global.pretrained_model="output/PPLCNet_x1_0/best_model"` 指定了当前最佳权重所在的路径,如果指定其他权重,只需替换对应的路径即可。
-
+
* 默认是对 `docs/images/inference_deployment/whl_demo.jpg` 进行预测,此处也可以通过增加字段 `-o Infer.infer_imgs=xxx` 对其他图片预测。
-
+
* 默认输出的是 Top-5 的值,如果希望输出 Top-k 的值,可以指定`-o Infer.PostProcess.topk=k`,其中,`k` 为您指定的值。
-
+
## 4. 模型推理部署
-
+
### 4.1 推理模型准备
Paddle Inference 是飞桨的原生推理库, 作用于服务器端和云端,提供高性能的推理能力。相比于直接基于预训练模型进行预测,Paddle Inference可使用MKLDNN、CUDNN、TensorRT 进行预测加速,从而实现更优的推理性能。更多关于Paddle Inference推理引擎的介绍,可以参考[Paddle Inference官网教程](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/infer/inference/inference_cn.html)。
-
+
当使用 Paddle Inference 推理时,加载的模型类型为 inference 模型。本案例提供了两种获得 inference 模型的方法,如果希望得到和文档相同的结果,请选择[直接下载 inference 模型](#6.1.2)的方式。
-
-
+
+
### 4.1.1 基于训练得到的权重导出 inference 模型
@@ -446,7 +446,7 @@ python3 tools/export_model.py \
```
-
+
### 4.1.2 直接下载 inference 模型
@@ -467,7 +467,7 @@ wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/PPLCNet
│ └── inference.pdmodel
```
-
+
### 4.2 基于 Python 预测引擎推理
@@ -518,37 +518,37 @@ ILSVRC2012_val_00030010.jpeg: class id(s): [80, 23, 93, 81, 99], score(s): [0.87
```
-
+
### 4.3 基于 C++ 预测引擎推理
PaddleClas 提供了基于 C++ 预测引擎推理的示例,您可以参考[服务器端 C++ 预测](../inference_deployment/cpp_deploy.md)来完成相应的推理部署。如果您使用的是 Windows 平台,可以参考[基于 Visual Studio 2019 Community CMake 编译指南](../inference_deployment/cpp_deploy_on_windows.md)完成相应的预测库编译和模型预测工作。
-
+
### 4.4 服务化部署
Paddle Serving 提供高性能、灵活易用的工业级在线推理服务。Paddle Serving 支持 RESTful、gRPC、bRPC 等多种协议,提供多种异构硬件和多种操作系统环境下推理解决方案。更多关于Paddle Serving 的介绍,可以参考[Paddle Serving 代码仓库](https://github.com/PaddlePaddle/Serving)。
-
+
PaddleClas 提供了基于 Paddle Serving 来完成模型服务化部署的示例,您可以参考[模型服务化部署](../inference_deployment/paddle_serving_deploy.md)来完成相应的部署工作。
-
+
### 4.5 端侧部署
Paddle Lite 是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架,定位于支持包括移动端、嵌入式以及服务器端在内的多硬件平台。更多关于 Paddle Lite 的介绍,可以参考[Paddle Lite 代码仓库](https://github.com/PaddlePaddle/Paddle-Lite)。
-
+
PaddleClas 提供了基于 Paddle Lite 来完成模型端侧部署的示例,您可以参考[端侧部署](../inference_deployment/paddle_lite_deploy.md)来完成相应的部署工作。
-
+
### 4.6 Paddle2ONNX 模型转换与预测
-
+
Paddle2ONNX 支持将 PaddlePaddle 模型格式转化到 ONNX 模型格式。通过 ONNX 可以完成将 Paddle 模型到多种推理引擎的部署,包括TensorRT/OpenVINO/MNN/TNN/NCNN,以及其它对 ONNX 开源格式进行支持的推理引擎或硬件。更多关于 Paddle2ONNX 的介绍,可以参考[Paddle2ONNX 代码仓库](https://github.com/PaddlePaddle/Paddle2ONNX)。
PaddleClas 提供了基于 Paddle2ONNX 来完成 inference 模型转换 ONNX 模型并作推理预测的示例,您可以参考[Paddle2ONNX 模型转换与预测](@shuilong)来完成相应的部署工作。
-
+
## 5. 引用
@@ -556,7 +556,7 @@ PaddleClas 提供了基于 Paddle2ONNX 来完成 inference 模型转换 ONNX 模
如果你的论文用到了 PP-LCNet 的方法,请添加如下 cite:
```
@misc{cui2021pplcnet,
- title={PP-LCNet: A Lightweight CPU Convolutional Neural Network},
+ title={PP-LCNet: A Lightweight CPU Convolutional Neural Network},
author={Cheng Cui and Tingquan Gao and Shengyu Wei and Yuning Du and Ruoyu Guo and Shuilong Dong and Bin Lu and Ying Zhou and Xueying Lv and Qiwen Liu and Xiaoguang Hu and Dianhai Yu and Yanjun Ma},
year={2021},
eprint={2109.15099},
diff --git a/docs/zh_CN/models/PP-LCNetV2.md b/docs/zh_CN/models/ImageNet1k/PP-LCNetV2.md
similarity index 100%
rename from docs/zh_CN/models/PP-LCNetV2.md
rename to docs/zh_CN/models/ImageNet1k/PP-LCNetV2.md
diff --git a/docs/zh_CN/models/PVTV2.md b/docs/zh_CN/models/ImageNet1k/PVTV2.md
similarity index 100%
rename from docs/zh_CN/models/PVTV2.md
rename to docs/zh_CN/models/ImageNet1k/PVTV2.md
diff --git a/docs/zh_CN/others/paddle_mobile_inference.md b/docs/zh_CN/models/ImageNet1k/PaddleLite_benchmark.md
similarity index 100%
rename from docs/zh_CN/others/paddle_mobile_inference.md
rename to docs/zh_CN/models/ImageNet1k/PaddleLite_benchmark.md
diff --git a/docs/zh_CN/models/ImageNet1k/README.md b/docs/zh_CN/models/ImageNet1k/README.md
new file mode 120000
index 0000000000000000000000000000000000000000..068a5873fdad63f32e3d2acf65b8f81a29464291
--- /dev/null
+++ b/docs/zh_CN/models/ImageNet1k/README.md
@@ -0,0 +1 @@
+model_list.md
\ No newline at end of file
diff --git a/docs/zh_CN/models/ReXNet.md b/docs/zh_CN/models/ImageNet1k/ReXNet.md
similarity index 100%
rename from docs/zh_CN/models/ReXNet.md
rename to docs/zh_CN/models/ImageNet1k/ReXNet.md
diff --git a/docs/zh_CN/models/RedNet.md b/docs/zh_CN/models/ImageNet1k/RedNet.md
similarity index 97%
rename from docs/zh_CN/models/RedNet.md
rename to docs/zh_CN/models/ImageNet1k/RedNet.md
index 2f750608514daab26c30ba627d5c10cd8d5ea3a9..bc6a367ade376e220f4c2602ecaf73b2f1681697 100644
--- a/docs/zh_CN/models/RedNet.md
+++ b/docs/zh_CN/models/ImageNet1k/RedNet.md
@@ -32,4 +32,4 @@
| RedNet38 | 224 | 256 | 6.24 | 21.39 | 41.26 |
| RedNet50 | 224 | 256 | 8.04 | 27.71 | 53.73 |
| RedNet101 | 224 | 256 | 13.07 | 44.12 | 83.28 |
-| RedNet152 | 224 | 256 | 18.66 | 63.27 | 119.48 |
\ No newline at end of file
+| RedNet152 | 224 | 256 | 18.66 | 63.27 | 119.48 |
diff --git a/docs/zh_CN/models/RepVGG.md b/docs/zh_CN/models/ImageNet1k/RepVGG.md
similarity index 100%
rename from docs/zh_CN/models/RepVGG.md
rename to docs/zh_CN/models/ImageNet1k/RepVGG.md
diff --git a/docs/zh_CN/models/ResNeSt_RegNet.md b/docs/zh_CN/models/ImageNet1k/ResNeSt_RegNet.md
similarity index 100%
rename from docs/zh_CN/models/ResNeSt_RegNet.md
rename to docs/zh_CN/models/ImageNet1k/ResNeSt_RegNet.md
diff --git a/docs/zh_CN/models/ResNet.md b/docs/zh_CN/models/ImageNet1k/ResNet.md
similarity index 97%
rename from docs/zh_CN/models/ResNet.md
rename to docs/zh_CN/models/ImageNet1k/ResNet.md
index 7a3f4f6335cab1fff2a4e46555af5e1461c41429..677dc43f2b1bede4a0cb73e9fdebf373d17a41ba 100644
--- a/docs/zh_CN/models/ResNet.md
+++ b/docs/zh_CN/models/ImageNet1k/ResNet.md
@@ -126,12 +126,12 @@ PaddleClas 提供的 ResNet 系列的模型包括 ResNet50,ResNet50_vd,ResNe
**备注:** 推理过程使用 TensorRT。
-
-
+
+
## 2. 模型快速体验
-
-
+
+
### 2.1 安装 paddlepaddle
- 您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
@@ -157,26 +157,26 @@ python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
```
pip3 install paddleclas
```
-
-
+
+
### 2.3 预测
* 在命令行中使用 ResNet50 的权重快速预测
-
+
```bash
paddleclas --model_name=ResNet50 --infer_imgs="docs/images/inference_deployment/whl_demo.jpg"
```
-
+
结果如下:
```
>>> result
class_ids: [8, 7, 86, 82, 80], scores: [0.97968, 0.02028, 3e-05, 1e-05, 0.0], label_names: ['hen', 'cock', 'partridge', 'ruffed grouse, partridge, Bonasa umbellus', 'black grouse'], filename: docs/images/inference_deployment/whl_demo.jpg
Predict complete!
```
-
-**备注**: 更换 ResNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `ResNet18` 时,只需要将 `--model_name=ResNet50` 改为 `--model_name=ResNet18` 即可。
-
+**备注**: 更换 ResNet 的其他 scale 的模型时,只需替换 `model_name`,如将此时的模型改为 `ResNet18` 时,只需要将 `--model_name=ResNet50` 改为 `--model_name=ResNet18` 即可。
+
+
* 在 Python 代码中预测
```python
from paddleclas import PaddleClas
@@ -195,17 +195,17 @@ print(next(result))
```
-
-
+
+
## 3. 模型训练、评估和预测
-
+
### 3.1 环境配置
* 安装:请先参考 [Paddle 安装教程](../installation/install_paddle.md) 以及 [PaddleClas 安装教程](../installation/install_paddleclas.md) 配置 PaddleClas 运行环境。
-
+
### 3.2 数据准备
@@ -234,15 +234,15 @@ cd path_to_PaddleClas
```
其中 `train/` 和 `val/` 分别为训练集和验证集。`train_list.txt` 和 `val_list.txt` 分别为训练集和验证集的标签文件。
-
-**备注:**
+
+**备注:**
* 关于 `train_list.txt`、`val_list.txt`的格式说明,可以参考[PaddleClas分类数据集格式说明](../data_preparation/classification_dataset.md#1-数据集格式说明) 。
-
+
-### 3.3 模型训练
+### 3.3 模型训练
在 `ppcls/configs/ImageNet/ResNet/ResNet50.yaml` 中提供了 ResNet50 训练配置,可以通过如下脚本启动训练:
@@ -252,11 +252,11 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 -m paddle.distributed.launch \
--gpus="0,1,2,3" \
tools/train.py \
- -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
+ -c ppcls/configs/ImageNet/ResNet/ResNet50.yaml
```
-**备注:**
+**备注:**
* 当前精度最佳的模型会保存在 `output/ResNet50/best_model.pdparams`
@@ -283,7 +283,7 @@ python3 tools/eval.py \
```python
python3 tools/infer.py \
-c ppcls/configs/ImageNet/ResNet/ResNet50.yaml \
- -o Global.pretrained_model=output/ResNet50/best_model
+ -o Global.pretrained_model=output/ResNet50/best_model
```
输出结果如下:
@@ -292,30 +292,30 @@ python3 tools/infer.py \
[{'class_ids': [8, 7, 86, 82, 80], 'scores': [0.97968, 0.02028, 3e-05, 1e-05, 0.0], 'file_name': 'docs/images/inference_deployment/whl_demo.jpg', 'label_names': ['hen', 'cock', 'partridge', 'ruffed grouse, partridge, Bonasa umbellus', 'black grouse']}]
```
-**备注:**
+**备注:**
* 这里`-o Global.pretrained_model="output/ResNet50/best_model"` 指定了当前最佳权重所在的路径,如果指定其他权重,只需替换对应的路径即可。
-
+
* 默认是对 `docs/images/inference_deployment/whl_demo.jpg` 进行预测,此处也可以通过增加字段 `-o Infer.infer_imgs=xxx` 对其他图片预测。
-
+
* 默认输出的是 Top-5 的值,如果希望输出 Top-k 的值,可以指定`-o Infer.PostProcess.topk=k`,其中,`k` 为您指定的值。
-
+
## 4. 模型推理部署
-
+
### 4.1 推理模型准备
Paddle Inference 是飞桨的原生推理库, 作用于服务器端和云端,提供高性能的推理能力。相比于直接基于预训练模型进行预测,Paddle Inference可使用MKLDNN、CUDNN、TensorRT 进行预测加速,从而实现更优的推理性能。更多关于Paddle Inference推理引擎的介绍,可以参考[Paddle Inference官网教程](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/infer/inference/inference_cn.html)。
-
+
当使用 Paddle Inference 推理时,加载的模型类型为 inference 模型。本案例提供了两种获得 inference 模型的方法,如果希望得到和文档相同的结果,请选择[直接下载 inference 模型](#6.1.2)的方式。
-
-
+
+
### 4.1.1 基于训练得到的权重导出 inference 模型
@@ -337,7 +337,7 @@ python3 tools/export_model.py \
```
-
+
### 4.1.2 直接下载 inference 模型
@@ -358,7 +358,7 @@ wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/inference/ResNet5
│ └── inference.pdmodel
```
-
+
### 4.2 基于 Python 预测引擎推理
@@ -409,32 +409,32 @@ ILSVRC2012_val_00030010.jpeg: class id(s): [80, 23, 83, 93, 136], score(s): [1.0
```
-
+
### 4.3 基于 C++ 预测引擎推理
PaddleClas 提供了基于 C++ 预测引擎推理的示例,您可以参考[服务器端 C++ 预测](../inference_deployment/cpp_deploy.md)来完成相应的推理部署。如果您使用的是 Windows 平台,可以参考[基于 Visual Studio 2019 Community CMake 编译指南](../inference_deployment/cpp_deploy_on_windows.md)完成相应的预测库编译和模型预测工作。
-
+
### 4.4 服务化部署
Paddle Serving 提供高性能、灵活易用的工业级在线推理服务。Paddle Serving 支持 RESTful、gRPC、bRPC 等多种协议,提供多种异构硬件和多种操作系统环境下推理解决方案。更多关于Paddle Serving 的介绍,可以参考[Paddle Serving 代码仓库](https://github.com/PaddlePaddle/Serving)。
-
+
PaddleClas 提供了基于 Paddle Serving 来完成模型服务化部署的示例,您可以参考[模型服务化部署](../inference_deployment/paddle_serving_deploy.md)来完成相应的部署工作。
-
+
### 4.5 端侧部署
Paddle Lite 是一个高性能、轻量级、灵活性强且易于扩展的深度学习推理框架,定位于支持包括移动端、嵌入式以及服务器端在内的多硬件平台。更多关于 Paddle Lite 的介绍,可以参考[Paddle Lite 代码仓库](https://github.com/PaddlePaddle/Paddle-Lite)。
-
+
PaddleClas 提供了基于 Paddle Lite 来完成模型端侧部署的示例,您可以参考[端侧部署](../inference_deployment/paddle_lite_deploy.md)来完成相应的部署工作。
-
+
### 4.6 Paddle2ONNX 模型转换与预测
-
+
Paddle2ONNX 支持将 PaddlePaddle 模型格式转化到 ONNX 模型格式。通过 ONNX 可以完成将 Paddle 模型到多种推理引擎的部署,包括TensorRT/OpenVINO/MNN/TNN/NCNN,以及其它对 ONNX 开源格式进行支持的推理引擎或硬件。更多关于 Paddle2ONNX 的介绍,可以参考[Paddle2ONNX 代码仓库](https://github.com/PaddlePaddle/Paddle2ONNX)。
PaddleClas 提供了基于 Paddle2ONNX 来完成 inference 模型转换 ONNX 模型并作推理预测的示例,您可以参考[Paddle2ONNX 模型转换与预测](@shuilong)来完成相应的部署工作。
diff --git a/docs/zh_CN/models/ResNet_and_vd.md b/docs/zh_CN/models/ImageNet1k/ResNet_and_vd.md
similarity index 100%
rename from docs/zh_CN/models/ResNet_and_vd.md
rename to docs/zh_CN/models/ImageNet1k/ResNet_and_vd.md
diff --git a/docs/zh_CN/models/SEResNext_and_Res2Net.md b/docs/zh_CN/models/ImageNet1k/SEResNext_and_Res2Net.md
similarity index 100%
rename from docs/zh_CN/models/SEResNext_and_Res2Net.md
rename to docs/zh_CN/models/ImageNet1k/SEResNext_and_Res2Net.md
diff --git a/docs/zh_CN/models/SwinTransformer.md b/docs/zh_CN/models/ImageNet1k/SwinTransformer.md
similarity index 100%
rename from docs/zh_CN/models/SwinTransformer.md
rename to docs/zh_CN/models/ImageNet1k/SwinTransformer.md
diff --git a/docs/zh_CN/models/TNT.md b/docs/zh_CN/models/ImageNet1k/TNT.md
similarity index 100%
rename from docs/zh_CN/models/TNT.md
rename to docs/zh_CN/models/ImageNet1k/TNT.md
diff --git a/docs/zh_CN/models/Twins.md b/docs/zh_CN/models/ImageNet1k/Twins.md
similarity index 100%
rename from docs/zh_CN/models/Twins.md
rename to docs/zh_CN/models/ImageNet1k/Twins.md
diff --git a/docs/zh_CN/models/ViT_and_DeiT.md b/docs/zh_CN/models/ImageNet1k/ViT_and_DeiT.md
similarity index 100%
rename from docs/zh_CN/models/ViT_and_DeiT.md
rename to docs/zh_CN/models/ImageNet1k/ViT_and_DeiT.md
diff --git a/docs/zh_CN/algorithm_introduction/ImageNet_models.md b/docs/zh_CN/models/ImageNet1k/model_list.md
similarity index 100%
rename from docs/zh_CN/algorithm_introduction/ImageNet_models.md
rename to docs/zh_CN/models/ImageNet1k/model_list.md
diff --git a/docs/zh_CN/PPShiTu/PPShiTuV2_introduction.md b/docs/zh_CN/models/PP-ShiTu/introduction.md
similarity index 99%
rename from docs/zh_CN/PPShiTu/PPShiTuV2_introduction.md
rename to docs/zh_CN/models/PP-ShiTu/introduction.md
index bac4f8acbaf6da54e1bb15a44d151a9a37a20769..cde702f5de6e814b4e218fae45a6cf1466bf15e8 100644
--- a/docs/zh_CN/PPShiTu/PPShiTuV2_introduction.md
+++ b/docs/zh_CN/models/PP-ShiTu/introduction.md
@@ -70,10 +70,10 @@ PP-ShiTuV2 是基于 PP-ShiTuV1 改进的一个实用轻量级通用图像识别
```shell
# 如果您的机器安装的是 CUDA9 或 CUDA10,请运行以下命令安装
python3.7 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
-
+
# 如果您的机器是CPU,请运行以下命令安装
python3.7 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
-
+
# 安装 faiss 库
python3.7 -m pip install faiss-cpu==1.7.1post2
```
@@ -82,7 +82,7 @@ PP-ShiTuV2 是基于 PP-ShiTuV1 改进的一个实用轻量级通用图像识别
```shell
# 进入到PaddleClas根目录下
cd PaddleClas
-
+
# 安装paddleclas
python3.7 setup.py install
```
@@ -92,7 +92,7 @@ PP-ShiTuV2 是基于 PP-ShiTuV1 改进的一个实用轻量级通用图像识别
```shell
# 下载并解压demo数据
wget -nc https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/data/drink_dataset_v2.0.tar && tar -xf drink_dataset_v2.0.tar
-
+
# 执行识别命令
paddleclas \
--model_name=PP-ShiTuV2 \
diff --git a/docs/zh_CN/PULC/PULC_car_exists.md b/docs/zh_CN/models/PULC/PULC_car_exists.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_car_exists.md
rename to docs/zh_CN/models/PULC/PULC_car_exists.md
diff --git a/docs/zh_CN/PULC/PULC_language_classification.md b/docs/zh_CN/models/PULC/PULC_language_classification.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_language_classification.md
rename to docs/zh_CN/models/PULC/PULC_language_classification.md
diff --git a/docs/zh_CN/PULC/PULC_person_attribute.md b/docs/zh_CN/models/PULC/PULC_person_attribute.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_person_attribute.md
rename to docs/zh_CN/models/PULC/PULC_person_attribute.md
diff --git a/docs/zh_CN/PULC/PULC_person_exists.md b/docs/zh_CN/models/PULC/PULC_person_exists.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_person_exists.md
rename to docs/zh_CN/models/PULC/PULC_person_exists.md
diff --git a/docs/zh_CN/PULC/PULC_safety_helmet.md b/docs/zh_CN/models/PULC/PULC_safety_helmet.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_safety_helmet.md
rename to docs/zh_CN/models/PULC/PULC_safety_helmet.md
diff --git a/docs/zh_CN/PULC/PULC_text_image_orientation.md b/docs/zh_CN/models/PULC/PULC_text_image_orientation.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_text_image_orientation.md
rename to docs/zh_CN/models/PULC/PULC_text_image_orientation.md
diff --git a/docs/zh_CN/PULC/PULC_textline_orientation.md b/docs/zh_CN/models/PULC/PULC_textline_orientation.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_textline_orientation.md
rename to docs/zh_CN/models/PULC/PULC_textline_orientation.md
diff --git a/docs/zh_CN/PULC/PULC_traffic_sign.md b/docs/zh_CN/models/PULC/PULC_traffic_sign.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_traffic_sign.md
rename to docs/zh_CN/models/PULC/PULC_traffic_sign.md
diff --git a/docs/zh_CN/PULC/PULC_vehicle_attribute.md b/docs/zh_CN/models/PULC/PULC_vehicle_attribute.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_vehicle_attribute.md
rename to docs/zh_CN/models/PULC/PULC_vehicle_attribute.md
diff --git a/docs/zh_CN/models/PULC/README.md b/docs/zh_CN/models/PULC/README.md
new file mode 120000
index 0000000000000000000000000000000000000000..068a5873fdad63f32e3d2acf65b8f81a29464291
--- /dev/null
+++ b/docs/zh_CN/models/PULC/README.md
@@ -0,0 +1 @@
+model_list.md
\ No newline at end of file
diff --git a/docs/zh_CN/PULC/PULC_model_list.md b/docs/zh_CN/models/PULC/model_list.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_model_list.md
rename to docs/zh_CN/models/PULC/model_list.md
diff --git a/docs/zh_CN/models/index.rst b/docs/zh_CN/models/index.rst
deleted file mode 100644
index 7873e3a5ae86ae99cc62c87b5d65c20494823d16..0000000000000000000000000000000000000000
--- a/docs/zh_CN/models/index.rst
+++ /dev/null
@@ -1,29 +0,0 @@
-模型库
-================================
-
-.. toctree::
- :maxdepth: 2
-
- DPN_DenseNet.md
- models_intro.md
- RepVGG.md
- EfficientNet_and_ResNeXt101_wsl.md
- ViT_and_DeiT.md
- SwinTransformer.md
- Others.md
- SEResNext_and_Res2Net.md
- ESNet.md
- HRNet.md
- ReXNet.md
- Inception.md
- TNT.md
- RedNet.md
- DLA.md
- ResNeSt_RegNet.md
- PP-LCNet.md
- HarDNet.md
- ResNet_and_vd.md
- LeViT.md
- Mobile.md
- MixNet.md
- Twins.md
diff --git a/docs/zh_CN/models_training/index.rst b/docs/zh_CN/models_training/index.rst
deleted file mode 100644
index 41ea472967e72399df0b3498b0e9d194c3424898..0000000000000000000000000000000000000000
--- a/docs/zh_CN/models_training/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-模型训练
-================================
-
-.. toctree::
- :maxdepth: 2
-
- config_description.md
- classification.md
- recognition.md
- train_strategy.md
diff --git a/docs/zh_CN/others/index.rst b/docs/zh_CN/others/index.rst
deleted file mode 100644
index 1141b41b26085cefb3509ac872432c64517a13f3..0000000000000000000000000000000000000000
--- a/docs/zh_CN/others/index.rst
+++ /dev/null
@@ -1,20 +0,0 @@
-其他
-================================
-
-.. toctree::
- :maxdepth: 2
-
- transfer_learning.md
- train_with_DALI.md
- VisualDL.md
- train_on_xpu.md
- feature_visiualization.md
- paddle_mobile_inference.md
- course_link.md
- competition_support.md
- update_history.md
- versions.md
-
-
-
-
diff --git a/docs/zh_CN/others/versions.md b/docs/zh_CN/others/versions.md
deleted file mode 100644
index 7399bdcb75d129fdec0e9961b998a627a137e051..0000000000000000000000000000000000000000
--- a/docs/zh_CN/others/versions.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# 版本更新信息
-----------
-## 目录
-* [1. v2.3](#1)
-* [2. v2.2](#2)
-
-
-
-## 1. v2.3
-
-- 模型更新
- - 添加轻量化模型预训练权重,包括检测模型、特征模型
- - 发布 PP-LCNet 系列模型,此系列模型是专门在 CPU 上设计运行的自研模型
- - SwinTransformer、Twins、Deit 支持从 scrach 直接训练,达到论文精度
-- 框架基础能力
- - 添加 DeepHash 模块,支持特征模型直接输出二值特征
- - 添加 PKSampler,特征模型不能多机多卡的训练的问题
- - 支持 PaddleSlim:支持分类模型、特征模型的量化、裁剪训练及离线量化功能
- - Legendary models 支持模型中间结果输出
- - 支持多标签分类训练
-- 预测部署
- - 使用 Faiss 替换原有特征检索库,提升平台适配性
- - 支持 PaddleServing:支持分类模型、图像识别流程的部署
-
-- 推荐库版本
- - python 版本:3.7
- - PaddlePaddle 版本:2.1.3
- - PaddleSlim 版本:2.2.0
- - PaddleServing 版本:0.6.1
-
-
-
-## 2. v2.2
-
-- 模型更新
- - 添加 LeViT、Twins、TNT、DLA、HardNet、RedNet、SwinTransfomer 模型
-- 框架基础能力
- - 将分类模型分为两类
- - legendary models:引入 TheseusLayer 基类,及增加了修改网络功能接口,同时支持网络截断输出功能
- - model zoo:其他普通分类模型
- - 添加 Metric Learning 算法支持
- - 添加多种相关 Loss 算法,及基础网络模块 gears(支持与 backbone、loss 组合)方便使用
- - 同时支持普通分类及 metric learning 相关任务训练
- - 支持静态图训练
- - 分类训练支持 dali 加速
- - 支持 fp16 训练
-- 应用更新
- - 添加商品识别、车辆识别(车辆细粒度分类、车辆 ReID)、logo 识别、动漫人物识别应用具体案例及相关模型
- - 添加图像识别完整 pipeline,包含检测模块、特征提取模块、向量检索模块
-- 预测部署
- - 添加百度自研向量检索模块 Mobius,支持图像识别系统预测部署
- - 图像识别,建立特征库支持 batch_size>1
-- 文档更新
- - 添加图像识别相关文档
- - 修复之前文档 bug
-- 推荐库版本
- - python 版本:3.7
- - PaddlePaddle:2.1.2
diff --git a/docs/zh_CN/PULC/PULC_quickstart.md b/docs/zh_CN/quick_start/PULC.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_quickstart.md
rename to docs/zh_CN/quick_start/PULC.md
diff --git a/docs/zh_CN/quick_start/index.rst b/docs/zh_CN/quick_start/index.rst
deleted file mode 100644
index 50af4716038a06c8b4bd02263aa5ac501e049b38..0000000000000000000000000000000000000000
--- a/docs/zh_CN/quick_start/index.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-快速开始
-================================
-
-.. toctree::
- :maxdepth: 2
-
- quick_start_classification_new_user.md
- quick_start_classification_professional.md
- quick_start_recognition.md
- quick_start_multilabel_classification.md
diff --git a/docs/zh_CN/advanced_tutorials/code_overview.md b/docs/zh_CN/quick_start/overview.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/code_overview.md
rename to docs/zh_CN/quick_start/overview.md
diff --git a/docs/zh_CN/algorithm_introduction/action_rec_by_classification.md b/docs/zh_CN/samples/action_rec_by_classification.md
similarity index 99%
rename from docs/zh_CN/algorithm_introduction/action_rec_by_classification.md
rename to docs/zh_CN/samples/action_rec_by_classification.md
index bf8272be99128eef40a4bdbfbc6a0273b2f51c8e..6028b342060045844ced5bc2caefe1dbfd245db1 100644
--- a/docs/zh_CN/algorithm_introduction/action_rec_by_classification.md
+++ b/docs/zh_CN/samples/action_rec_by_classification.md
@@ -88,9 +88,9 @@
完成上述内容后,放置于`dataset`目录下,文件结构如下:
```
-data/
+data/
├── images # 放置所有图片
-├── phone_label_list.txt # 标签文件
+├── phone_label_list.txt # 标签文件
├── phone_train_list.txt # 训练列表,包含图片及其对应类型
└── phone_val_list.txt # 测试列表,包含图片及其对应类型
```
@@ -104,7 +104,7 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 -m paddle.distributed.launch \
--gpus="0,1,2,3" \
tools/train.py \
- -c ./ppcls/configs/practical_models/PPHGNet_tiny_calling_halfbody.yaml \
+ -c ./ppcls/configs/practical_models/PPHGNet_tiny_calling_halfbody.yaml \
-o Arch.pretrained=True
```
其中 `Arch.pretrained` 为 `True`表示使用预训练权重帮助训练。
diff --git a/docs/zh_CN/image_recognition_pipeline/deep_hashing.md b/docs/zh_CN/training/PP-ShiTu/deep_hashing.md
similarity index 96%
rename from docs/zh_CN/image_recognition_pipeline/deep_hashing.md
rename to docs/zh_CN/training/PP-ShiTu/deep_hashing.md
index 03413dac84e4b9974d03ad230a04e13171d8c01f..7c10e65886d0c32b8a48efa5d12c3e6375898079 100644
--- a/docs/zh_CN/image_recognition_pipeline/deep_hashing.md
+++ b/docs/zh_CN/training/PP-ShiTu/deep_hashing.md
@@ -10,8 +10,8 @@
## 目录
- [1. 特征模型二值特征训练](#1)
- - [1.1 PP-ShiTu特征提取模型二值训练](#1.1)
- - [1.2 其他特征模型二值训练](#1.2)
+ - [1.1 PP-ShiTu特征提取模型二值训练](#1.1)
+ - [1.2 其他特征模型二值训练](#1.2)
- [2. 检索算法配置](#2)
diff --git a/docs/zh_CN/image_recognition_pipeline/feature_extraction.md b/docs/zh_CN/training/PP-ShiTu/feature_extraction.md
similarity index 100%
rename from docs/zh_CN/image_recognition_pipeline/feature_extraction.md
rename to docs/zh_CN/training/PP-ShiTu/feature_extraction.md
diff --git a/docs/zh_CN/image_recognition_pipeline/mainbody_detection.md b/docs/zh_CN/training/PP-ShiTu/mainbody_detection.md
similarity index 100%
rename from docs/zh_CN/image_recognition_pipeline/mainbody_detection.md
rename to docs/zh_CN/training/PP-ShiTu/mainbody_detection.md
diff --git a/docs/zh_CN/PULC/PULC_train.md b/docs/zh_CN/training/PULC.md
similarity index 100%
rename from docs/zh_CN/PULC/PULC_train.md
rename to docs/zh_CN/training/PULC.md
diff --git a/docs/zh_CN/others/feature_visiualization.md b/docs/zh_CN/training/advanced/feature_visiualization.md
similarity index 100%
rename from docs/zh_CN/others/feature_visiualization.md
rename to docs/zh_CN/training/advanced/feature_visiualization.md
diff --git a/docs/zh_CN/advanced_tutorials/knowledge_distillation.md b/docs/zh_CN/training/advanced/knowledge_distillation.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/knowledge_distillation.md
rename to docs/zh_CN/training/advanced/knowledge_distillation.md
diff --git a/docs/zh_CN/advanced_tutorials/model_prune_quantization.md b/docs/zh_CN/training/advanced/prune_quantization.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/model_prune_quantization.md
rename to docs/zh_CN/training/advanced/prune_quantization.md
diff --git a/docs/zh_CN/advanced_tutorials/ssld.md b/docs/zh_CN/training/advanced/ssld.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/ssld.md
rename to docs/zh_CN/training/advanced/ssld.md
diff --git a/docs/zh_CN/advanced_tutorials/theseus_layer.md b/docs/zh_CN/training/advanced/theseus_layer.md
similarity index 100%
rename from docs/zh_CN/advanced_tutorials/theseus_layer.md
rename to docs/zh_CN/training/advanced/theseus_layer.md
diff --git a/docs/zh_CN/others/train_on_xpu.md b/docs/zh_CN/training/advanced/train_on_xpu.md
similarity index 94%
rename from docs/zh_CN/others/train_on_xpu.md
rename to docs/zh_CN/training/advanced/train_on_xpu.md
index 429119b588a53ecbaa29a7d71485a7d47308c871..09fb3a61e84937e17ebce50b9359191967217535 100644
--- a/docs/zh_CN/others/train_on_xpu.md
+++ b/docs/zh_CN/training/advanced/train_on_xpu.md
@@ -3,10 +3,10 @@
## 目录
* [1. 前言](#1)
* [2. 昆仑训练](#2)
- * [2.1 ResNet50](#2.1)
- * [2.2 MobileNetV3](#2.2)
- * [2.3 HRNet](#2.3)
- * [2.4 VGG16/19](#2.4)
+ * [2.1 ResNet50](#2.1)
+ * [2.2 MobileNetV3](#2.2)
+ * [2.3 HRNet](#2.3)
+ * [2.4 VGG16/19](#2.4)
diff --git a/docs/zh_CN/others/VisualDL.md b/docs/zh_CN/training/config_discription/VisualDL.md
similarity index 100%
rename from docs/zh_CN/others/VisualDL.md
rename to docs/zh_CN/training/config_discription/VisualDL.md
diff --git a/docs/zh_CN/models_training/config_description.md b/docs/zh_CN/training/config_discription/basic.md
similarity index 99%
rename from docs/zh_CN/models_training/config_description.md
rename to docs/zh_CN/training/config_discription/basic.md
index 8c51d7abcfe5baeb19cad1043f73df10832dcada..4b758715426af90eb43a2044ac79caec0e0c5939 100644
--- a/docs/zh_CN/models_training/config_description.md
+++ b/docs/zh_CN/training/config_discription/basic.md
@@ -30,7 +30,7 @@
- [3. 识别模型](#3)
- [3.1 结构(Arch)](#3.1)
- [3.2 评估指标(Metric)](#3.2)
-
+
### 1.分类模型
diff --git a/docs/zh_CN/advanced_tutorials/DataAugmentation.md b/docs/zh_CN/training/config_discription/data_augmentation.md
similarity index 99%
rename from docs/zh_CN/advanced_tutorials/DataAugmentation.md
rename to docs/zh_CN/training/config_discription/data_augmentation.md
index 7097ff637b9f204f19d596445b2d0376e7b52d3b..6414b2a446d3b1f3643bcf70ffdd2291c0581127 100644
--- a/docs/zh_CN/advanced_tutorials/DataAugmentation.md
+++ b/docs/zh_CN/training/config_discription/data_augmentation.md
@@ -147,7 +147,7 @@ PaddleClas 中集成了上述所有的数据增强策略,每种数据增强策
`AotoAugment` 的图像增广方式的配置如下。`AutoAugment` 是在 uint8 的数据格式上转换的,所以其处理过程应该放在归一化操作(`NormalizeImage`)之前。
-```yaml
+```yaml
transform_ops:
- DecodeImage:
to_rgb: True
@@ -192,7 +192,7 @@ PaddleClas 中集成了上述所有的数据增强策略,每种数据增强策
`RandAugment` 的图像增广方式的配置如下,其中用户需要指定其中的参数 `num_layers` 与 `magnitude`,默认的数值分别是 `2` 和 `5`。`RandAugment` 是在 uint8 的数据格式上转换的,所以其处理过程应该放在归一化操作(`NormalizeImage`)之前。
-```yaml
+```yaml
transform_ops:
- DecodeImage:
to_rgb: True
@@ -229,7 +229,7 @@ PaddleClas 中集成了上述所有的数据增强策略,每种数据增强策
`TimmAutoAugment` 的图像增广方式的配置如下,其中用户需要指定其中的参数 `config_str`、`interpolation`、`img_size`,默认的数值分别是 `rand-m9-mstd0.5-inc1`、`bicubic`、`224`。`TimmAutoAugment` 是在 uint8 的数据格式上转换的,所以其处理过程应该放在归一化操作(`NormalizeImage`)之前。
-```yaml
+```yaml
transform_ops:
- DecodeImage:
to_rgb: True
@@ -604,14 +604,14 @@ Mixup 是最先提出的图像混叠增广方案,其原理简单、方便实
## 2. 模型训练、评估和预测
-
+
### 2.1 环境配置
* 安装:请先参考 [Paddle 安装教程](../installation/install_paddle.md) 以及 [PaddleClas 安装教程](../installation/install_paddleclas.md) 配置 PaddleClas 运行环境。
-
+
### 2.2 数据准备
@@ -640,15 +640,15 @@ cd path_to_PaddleClas
```
其中 `train/` 和 `val/` 分别为训练集和验证集。`train_list.txt` 和 `val_list.txt` 分别为训练集和验证集的标签文件。
-
-**备注:**
+
+**备注:**
* 关于 `train_list.txt`、`val_list.txt`的格式说明,可以参考[PaddleClas分类数据集格式说明](../data_preparation/classification_dataset.md#1-数据集格式说明) 。
-
+
-### 2.3 模型训练
+### 2.3 模型训练
在 `ppcls/configs/ImageNet/DataAugment` 中提供了基于 ResNet50 的不同的数据增强的训练配置,这里以使用 `AutoAugment` 为例,介绍数据增强的使用方法。可以通过如下脚本启动训练:
@@ -658,11 +658,11 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 -m paddle.distributed.launch \
--gpus="0,1,2,3" \
tools/train.py \
- -c ppcls/configs/ImageNet/DataAugment/ResNet50_AutoAugment.yaml
+ -c ppcls/configs/ImageNet/DataAugment/ResNet50_AutoAugment.yaml
```
-**备注:**
+**备注:**
* 1.当前精度最佳的模型会保存在 `output/ResNet50/best_model.pdparams`。
* 2.如需更改数据增强类型,只需要替换`ppcls/configs/ImageNet/DataAugment`中的其他的配置文件即可。
@@ -695,7 +695,7 @@ python3 tools/eval.py \
```python
python3 tools/infer.py \
-c ppcls/configs/ImageNet/DataAugment/ResNet50_AutoAugment.yaml \
- -o Global.pretrained_model=output/ResNet50/best_model
+ -o Global.pretrained_model=output/ResNet50/best_model
```
输出结果如下:
@@ -704,12 +704,12 @@ python3 tools/infer.py \
[{'class_ids': [8, 7, 86, 81, 85], 'scores': [0.91347, 0.03779, 0.0036, 0.00117, 0.00112], 'file_name': 'docs/images/inference_deployment/whl_demo.jpg', 'label_names': ['hen', 'cock', 'partridge', 'ptarmigan', 'quail']}]
```
-**备注:**
+**备注:**
* 这里`-o Global.pretrained_model="output/ResNet50/best_model"` 指定了当前最佳权重所在的路径,如果指定其他权重,只需替换对应的路径即可。
-
+
* 默认是对 `docs/images/inference_deployment/whl_demo.jpg` 进行预测,此处也可以通过增加字段 `-o Infer.infer_imgs=xxx` 对其他图片预测。
-
+
* 默认输出的是 Top-5 的值,如果希望输出 Top-k 的值,可以指定`-o Infer.PostProcess.topk=k`,其中,`k` 为您指定的值。
diff --git a/docs/zh_CN/others/train_with_DALI.md b/docs/zh_CN/training/config_discription/train_with_DALI.md
similarity index 100%
rename from docs/zh_CN/others/train_with_DALI.md
rename to docs/zh_CN/training/config_discription/train_with_DALI.md
diff --git a/docs/zh_CN/data_preparation/recognition_dataset.md b/docs/zh_CN/training/metric_learning/dataset.md
similarity index 100%
rename from docs/zh_CN/data_preparation/recognition_dataset.md
rename to docs/zh_CN/training/metric_learning/dataset.md
diff --git a/docs/zh_CN/models_training/recognition.md b/docs/zh_CN/training/metric_learning/training.md
similarity index 100%
rename from docs/zh_CN/models_training/recognition.md
rename to docs/zh_CN/training/metric_learning/training.md
diff --git a/docs/zh_CN/data_preparation/classification_dataset.md b/docs/zh_CN/training/single_label_classification/dataset.md
similarity index 100%
rename from docs/zh_CN/data_preparation/classification_dataset.md
rename to docs/zh_CN/training/single_label_classification/dataset.md
diff --git a/docs/zh_CN/models_training/distributed_training.md b/docs/zh_CN/training/single_label_classification/distributed_training.md
similarity index 100%
rename from docs/zh_CN/models_training/distributed_training.md
rename to docs/zh_CN/training/single_label_classification/distributed_training.md
diff --git a/docs/zh_CN/models_training/classification.md b/docs/zh_CN/training/single_label_classification/training.md
similarity index 100%
rename from docs/zh_CN/models_training/classification.md
rename to docs/zh_CN/training/single_label_classification/training.md
diff --git a/docs/zh_CN/models_training/train_strategy.md b/docs/zh_CN/training/single_label_classification/training_strategy.md
similarity index 100%
rename from docs/zh_CN/models_training/train_strategy.md
rename to docs/zh_CN/training/single_label_classification/training_strategy.md
diff --git a/docs/zh_CN/others/update_history.md b/docs/zh_CN/version_history.md
similarity index 62%
rename from docs/zh_CN/others/update_history.md
rename to docs/zh_CN/version_history.md
index 0e88a51362d7d04db960c966db72a5ec3a0ee787..b9120782ba6d999f408ed63e2b6b9df035f7f90b 100644
--- a/docs/zh_CN/others/update_history.md
+++ b/docs/zh_CN/version_history.md
@@ -1,3 +1,62 @@
+# 版本更新信息
+----------
+## 目录
+* [1. v2.3](#1)
+* [2. v2.2](#2)
+
+
+
+## 1. v2.3
+
+- 模型更新
+ - 添加轻量化模型预训练权重,包括检测模型、特征模型
+ - 发布 PP-LCNet 系列模型,此系列模型是专门在 CPU 上设计运行的自研模型
+ - SwinTransformer、Twins、Deit 支持从 scrach 直接训练,达到论文精度
+- 框架基础能力
+ - 添加 DeepHash 模块,支持特征模型直接输出二值特征
+ - 添加 PKSampler,特征模型不能多机多卡的训练的问题
+ - 支持 PaddleSlim:支持分类模型、特征模型的量化、裁剪训练及离线量化功能
+ - Legendary models 支持模型中间结果输出
+ - 支持多标签分类训练
+- 预测部署
+ - 使用 Faiss 替换原有特征检索库,提升平台适配性
+ - 支持 PaddleServing:支持分类模型、图像识别流程的部署
+
+- 推荐库版本
+ - python 版本:3.7
+ - PaddlePaddle 版本:2.1.3
+ - PaddleSlim 版本:2.2.0
+ - PaddleServing 版本:0.6.1
+
+
+
+## 2. v2.2
+
+- 模型更新
+ - 添加 LeViT、Twins、TNT、DLA、HardNet、RedNet、SwinTransfomer 模型
+- 框架基础能力
+ - 将分类模型分为两类
+ - legendary models:引入 TheseusLayer 基类,及增加了修改网络功能接口,同时支持网络截断输出功能
+ - model zoo:其他普通分类模型
+ - 添加 Metric Learning 算法支持
+ - 添加多种相关 Loss 算法,及基础网络模块 gears(支持与 backbone、loss 组合)方便使用
+ - 同时支持普通分类及 metric learning 相关任务训练
+ - 支持静态图训练
+ - 分类训练支持 dali 加速
+ - 支持 fp16 训练
+- 应用更新
+ - 添加商品识别、车辆识别(车辆细粒度分类、车辆 ReID)、logo 识别、动漫人物识别应用具体案例及相关模型
+ - 添加图像识别完整 pipeline,包含检测模块、特征提取模块、向量检索模块
+- 预测部署
+ - 添加百度自研向量检索模块 Mobius,支持图像识别系统预测部署
+ - 图像识别,建立特征库支持 batch_size>1
+- 文档更新
+ - 添加图像识别相关文档
+ - 修复之前文档 bug
+- 推荐库版本
+ - python 版本:3.7
+ - PaddlePaddle:2.1.2
+
# 更新日志
- 2022.4.21 新增 CVPR2022 oral论文 [MixFormer](https://arxiv.org/pdf/2204.02557.pdf) 相关[代码](https://github.com/PaddlePaddle/PaddleClas/pull/1820/files)。