未验证 提交 5287ee8b 编写于 作者: T Tingquan Gao 提交者: GitHub

[Release/2.0 rc1] Fix some description of documentations (#474)

* Fix serial number error

* Fix the environment description of running PaddleClas

* Add the overview of other models

* Modify the pretrained models to dygraph
上级 f6e025d5
......@@ -65,6 +65,7 @@ PaddleClas is a toolset for image classification tasks prepared for the industry
- [Inception series](#Inception_series)
- [EfficientNet and ResNeXt101_wsl series](#EfficientNet_and_ResNeXt101_wsl_series)
- [ResNeSt and RegNet series](#ResNeSt_and_RegNet_series)
- [Others](#Others)
- HS-ResNet: arxiv link: [https://arxiv.org/pdf/2010.07621.pdf](https://arxiv.org/pdf/2010.07621.pdf). Code and models are coming soon!
- Model training/evaluation
- [Data preparation](./docs/en/tutorials/data_en.md)
......@@ -315,6 +316,25 @@ Accuracy and inference time metrics of ResNeSt and RegNet series models are show
| RegNetX_4GF | 0.785 | 0.9416 | 6.46478 | 11.19862 | 8 | 22.1 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RegNetX_4GF_pretrained.pdparams) |
<a name="Others"></a>
### Others
Accuracy and inference time metrics of AlexNet, SqueezeNet series, VGG series and DarkNet53 models are shown as follows. More detailed information can be refered to [Others](./docs/en/models/Others_en.md).
| Model | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | Flops(G) | Params(M) | Download Address |
|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------|
| AlexNet | 0.567 | 0.792 | 1.44993 | 2.46696 | 1.370 | 61.090 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/AlexNet_pretrained.pdparams) |
| SqueezeNet1_0 | 0.596 | 0.817 | 0.96736 | 2.53221 | 1.550 | 1.240 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_0_pretrained.pdparams) |
| SqueezeNet1_1 | 0.601 | 0.819 | 0.76032 | 1.877 | 0.690 | 1.230 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_1_pretrained.pdparams) |
| VGG11 | 0.693 | 0.891 | 3.90412 | 9.51147 | 15.090 | 132.850 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG11_pretrained.pdparams) |
| VGG13 | 0.700 | 0.894 | 4.64684 | 12.61558 | 22.480 | 133.030 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG13_pretrained.pdparams) |
| VGG16 | 0.720 | 0.907 | 5.61769 | 16.40064 | 30.810 | 138.340 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG16_pretrained.pdparams) |
| VGG19 | 0.726 | 0.909 | 6.65221 | 20.4334 | 39.130 | 143.650 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG19_pretrained.pdparams) |
| DarkNet53 | 0.780 | 0.941 | 4.10829 | 12.1714 | 18.580 | 41.600 | [Download link](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DarkNet53_pretrained.pdparams) |
<a name="License"></a>
## License
......
......@@ -67,6 +67,7 @@
- [Inception系列](#Inception系列)
- [EfficientNet与ResNeXt101_wsl系列](#EfficientNet与ResNeXt101_wsl系列)
- [ResNeSt与RegNet系列](#ResNeSt与RegNet系列)
- [其他模型](#其他模型)
- HS-ResNet: arxiv文章链接: [https://arxiv.org/pdf/2010.07621.pdf](https://arxiv.org/pdf/2010.07621.pdf)。 代码和预训练模型即将开源,敬请期待。
- 模型训练/评估
- [数据准备](./docs/zh_CN/tutorials/data.md)
......@@ -317,8 +318,26 @@ ResNeSt与RegNet系列模型的精度、速度指标如下表所示,更多关
| ResNeSt50 | 0.8083 | 0.9542 | 6.69042 | 8.01664 | 10.78 | 27.5 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNeSt50_pretrained.pdparams) |
| RegNetX_4GF | 0.785 | 0.9416 | 6.46478 | 11.19862 | 8 | 22.1 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/RegNetX_4GF_pretrained.pdparams) |
<a name="其他模型"></a>
### 其他模型
关于AlexNet、SqueezeNet系列、VGG系列、DarkNet53等模型的精度、速度指标如下表所示,更多介绍可以参考:[其他模型文档](./docs/zh_CN/models/Others.md)
| 模型 | Top-1 Acc | Top-5 Acc | time(ms)<br>bs=1 | time(ms)<br>bs=4 | Flops(G) | Params(M) | 下载地址 |
|------------------------|-----------|-----------|------------------|------------------|----------|-----------|------------------------------------------------------------------------------------------------------|
| AlexNet | 0.567 | 0.792 | 1.44993 | 2.46696 | 1.370 | 61.090 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/AlexNet_pretrained.pdparams) |
| SqueezeNet1_0 | 0.596 | 0.817 | 0.96736 | 2.53221 | 1.550 | 1.240 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_0_pretrained.pdparams) |
| SqueezeNet1_1 | 0.601 | 0.819 | 0.76032 | 1.877 | 0.690 | 1.230 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/SqueezeNet1_1_pretrained.pdparams) |
| VGG11 | 0.693 | 0.891 | 3.90412 | 9.51147 | 15.090 | 132.850 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG11_pretrained.pdparams) |
| VGG13 | 0.700 | 0.894 | 4.64684 | 12.61558 | 22.480 | 133.030 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG13_pretrained.pdparams) |
| VGG16 | 0.720 | 0.907 | 5.61769 | 16.40064 | 30.810 | 138.340 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG16_pretrained.pdparams) |
| VGG19 | 0.726 | 0.909 | 6.65221 | 20.4334 | 39.130 | 143.650 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/VGG19_pretrained.pdparams) |
| DarkNet53 | 0.780 | 0.941 | 4.10829 | 12.1714 | 18.580 | 41.600 | [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/DarkNet53_pretrained.pdparams) |
<a name="许可证书"></a>
## 许可证书
本项目的发布受<a href="https://github.com/PaddlePaddle/PaddleCLS/blob/master/LICENSE">Apache 2.0 license</a>许可认证。
......
......@@ -2,7 +2,6 @@ mode: 'train'
ARCHITECTURE:
name: 'MobileNetV3_large_x1_0'
pretrained_model: "./pretrained/MobileNetV3_large_x1_0_pretrained"
load_static_weights: True
model_save_dir: "./output/"
classes_num: 102
total_images: 1020
......
......@@ -4,10 +4,7 @@ ARCHITECTURE:
pretrained_model:
- "./pretrained/flowers102_R50_vd_final/ppcls"
- "./pretrained/MobileNetV3_large_x1_0_pretrained/"
load_static_weights:
- False
- True
- "./pretrained/MobileNetV3_large_x1_0_pretrained"
model_save_dir: "./output/"
classes_num: 102
total_images: 7169
......
......@@ -4,7 +4,6 @@ ARCHITECTURE:
checkpoints: ""
pretrained_model: ""
load_static_weights: True
model_save_dir: "./output/"
classes_num: 102
total_images: 1020
......
......@@ -2,7 +2,6 @@ mode: 'train'
ARCHITECTURE:
name: 'ResNet50_vd'
pretrained_model: "./pretrained/ResNet50_vd_pretrained"
load_static_weights: true
model_save_dir: "./output/"
classes_num: 102
total_images: 1020
......
......@@ -4,7 +4,6 @@ ARCHITECTURE:
params:
lr_mult_list: [0.1, 0.1, 0.2, 0.2, 0.3]
pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained"
load_static_weights: True
model_save_dir: "./output/"
classes_num: 102
total_images: 1020
......
......@@ -4,7 +4,6 @@ ARCHITECTURE:
params:
lr_mult_list: [0.1, 0.1, 0.2, 0.2, 0.3]
pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained"
load_static_weights: True
model_save_dir: "./output/"
classes_num: 102
total_images: 1020
......
......@@ -8,7 +8,7 @@ This document introduces how to install PaddleClas and its requirements.
## Install PaddlePaddle
Python 3.6, CUDA 9.0, CUDNN7.0 nccl2.1.2 and later version are required at first, For now, PaddleClas only support training on the GPU device. Please follow the instructions in the [Installation](http://www.paddlepaddle.org.cn/install/quick) if the PaddlePaddle on the device is lower than v1.7
Python 3.6, CUDA 9.0, CUDNN7.6.4 nccl2.1.2 and later version are required at first, For now, PaddleClas only support training on the GPU device. Please follow the instructions in the [Installation](http://www.paddlepaddle.org.cn/install/quick) if the PaddlePaddle on the device is lower than v1.7
Install PaddlePaddle
......@@ -34,6 +34,7 @@ python -c "import paddle; print(paddle.__version__)"
Note:
- Make sure the compiled version is later than PaddlePaddle2.0rc.
- Indicate **WITH_DISTRIBUTE=ON** when compiling, Please refer to [Instruction](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#id3) for more details.
- When running in docker, in order to ensure that the container has enough shared memory for data read acceleration of Paddle, please set the parameter `--shm_size=8g` at creating a docker container, if conditions permit, you can set it to a larger value.
## Install PaddleClas
......
......@@ -47,16 +47,14 @@ You can use the following commands to downdload the pretrained models.
```bash
mkdir pretrained
cd pretrained
wget https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_large_x1_0_pretrained.tar
tar -xf ResNet50_vd_pretrained.tar
tar -xf ResNet50_vd_ssld_pretrained.tar
tar -xf MobileNetV3_large_x1_0_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_pretrained.pdparams
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_pretrained.pdparams
cd ../
```
**Note**: If you want to download the pretrained models on Windows environment, you can copy the links to the browser and download, then use the the thirdparty tools such as `7Zip` to uncompress the tar files.
**Note**: If you want to download the pretrained models on Windows environment, you can copy the links to the browser and download.
## Training
......@@ -165,7 +163,7 @@ cp -r output/ResNet50_vd/19/ ./pretrained/flowers102_R50_vd_final/
### Distillation
* Use extra_list.txt as unlabeled data, Note:
* Use `extra_list.txt` as unlabeled data, Note:
* Samples in the `extra_list.txt` and `val_list.txt` don't have intersection
* Because of in the source code, label information is unused, This is still unlabeled distillation
* Teacher model use the pretrained_model trained on the flowers102 dataset, and student model use the MobileNetV3_large_x1_0 pretrained model(Acc 75.32\%) trained on the ImageNet1K dataset
......
......@@ -34,13 +34,14 @@ python -c "import paddle; print(paddle.__version__)"
注意:
- 从源码编译的PaddlePaddle版本号为0.0.0,请确保使用了PaddlePaddle 2.0rc及之后的源码编译。
- PaddleClas基于PaddlePaddle高性能的分布式训练能力,若您从源码编译,请确保打开编译选项,**WITH_DISTRIBUTE=ON**。具体编译选项参考[编译选项表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#id3)
- PaddleClas基于PaddlePaddle高性能的分布式训练能力,若您从源码编译,请确保打开编译选项,**WITH_DISTRIBUTE=ON**。具体编译选项参考[编译选项表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/install/Tables.html#id3)
- 在docker中运行时,为保证docker容器有足够的共享内存用于Paddle的数据读取加速,在创建docker容器时,请设置参数`--shm_size=8g`,条件允许的话可以设置为更大的值。
**运行环境需求:**
- Python3 (当前只支持Linux系统)
- CUDA >= 9.0
- cuDNN >= 5.0
- cuDNN >= 7.6.4
- nccl >= 2.1.2
......
......@@ -47,16 +47,14 @@ cd ../../
```bash
mkdir pretrained
cd pretrained
wget https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV3_large_x1_0_pretrained.tar
tar -xf ResNet50_vd_pretrained.tar
tar -xf ResNet50_vd_ssld_pretrained.tar
tar -xf MobileNetV3_large_x1_0_pretrained.tar
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_pretrained.pdparams
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/ResNet50_vd_ssld_pretrained.pdparams
wget https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/MobileNetV3_large_x1_0_pretrained.pdparams
cd ../
```
**注意**:如果是在windows中下载预训练模型的话,需要将地址拷贝到浏览器中并下载,然后使用`7Zip`等工具进行解压
**注意**:如果是在windows中下载预训练模型的话,需要将地址拷贝到浏览器中下载
### 2.2 环境说明
......@@ -164,7 +162,7 @@ cp -r output/ResNet50_vd/best_model/ ./pretrained/flowers102_R50_vd_final/
### 3.6 知识蒸馏小试牛刀
* 使用flowers102数据集进行模型蒸馏,为了进一步提提升模型的精度,使用extra_list.txt充当无标签数据,在这里有几点需要注意:
* 使用flowers102数据集进行模型蒸馏,为了进一步提提升模型的精度,使用`extra_list.txt`充当无标签数据,在这里有几点需要注意:
* `extra_list.txt``val_list.txt`的样本没有重复,因此可以用于扩充知识蒸馏任务的训练数据。
* 即使引入了有标签的extra_list.txt中的图像,但是代码中没有使用标签信息,因此仍然可以视为无标签的模型蒸馏。
* 蒸馏过程中,教师模型使用的预训练模型为flowers102数据集上的训练结果,学生模型使用的是ImageNet1k数据集上精度为75.32\%的MobileNetV3_large_x1_0预训练模型。
......@@ -196,7 +194,7 @@ python -m paddle.distributed.launch \
最终flowers102验证集上的精度为0.9647,结合更多的无标签数据,使用教师模型进行知识蒸馏,MobileNetV3的精度涨幅高达6.47\%
### 3.6 精度一览
### 3.7 精度一览
* 下表给出了不同训练yaml文件对应的精度。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册