Skip to content

Commit 47dce2c

Browse files
authored
fix docs on Release/1.0.1 (PaddlePaddle#208)
* change default homepage to chinese version
1 parent 368eeb5 commit 47dce2c

File tree

4 files changed

+171
-71
lines changed

4 files changed

+171
-71
lines changed

README.md

+56-65
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,98 @@
1-
[中文](README_cn.md) | English
1+
中文 | [English](README_en.md)
22

3-
Documentshttps://paddlepaddle.github.io/PaddleSlim
3+
文档https://paddlepaddle.github.io/PaddleSlim
44

55
# PaddleSlim
66

7-
PaddleSlim is a toolkit for model compression. It contains a collection of compression strategies, such as pruning, fixed point quantization, knowledge distillation, hyperparameter searching and neural architecture search.
7+
PaddleSlim是一个模型压缩工具库,包含模型剪裁、定点量化、知识蒸馏、超参搜索和模型结构搜索等一系列模型压缩策略。
88

9-
PaddleSlim provides solutions of compression on computer vision models, such as image classification, object detection and semantic segmentation. Meanwhile, PaddleSlim Keeps exploring advanced compression strategies for language model. Furthermore, benckmark of compression strategies on some open tasks is available for your reference.
9+
对于业务用户,PaddleSlim提供完整的模型压缩解决方案,可用于图像分类、检测、分割等各种类型的视觉场景。
10+
同时也在持续探索NLP领域模型的压缩方案。另外,PaddleSlim提供且在不断完善各种压缩策略在经典开源任务的benchmark,
11+
以便业务用户参考。
1012

11-
PaddleSlim also provides auxiliary and primitive API for developer and researcher to survey, implement and apply the method in latest papers. PaddleSlim will support developer in ability of framework and technology consulting.
13+
对于模型压缩算法研究者或开发者,PaddleSlim提供各种压缩策略的底层辅助接口,方便用户复现、调研和使用最新论文方法。
14+
PaddleSlim会从底层能力、技术咨询合作和业务场景等角度支持开发者进行模型压缩策略相关的创新工作。
1215

13-
## Features
1416

15-
### Pruning
17+
## 功能
1618

17-
- Uniform pruning of convolution
18-
- Sensitivity-based prunning
19-
- Automated pruning based evolution search strategy
20-
- Support pruning of various deep architectures such as VGG, ResNet, and MobileNet.
21-
- Support self-defined range of pruning, i.e., layers to be pruned.
19+
- 模型剪裁
20+
- 卷积通道均匀剪裁
21+
- 基于敏感度的卷积通道剪裁
22+
- 基于进化算法的自动剪裁
2223

23-
### Fixed Point Quantization
24+
- 定点量化
25+
- 在线量化训练(training aware)
26+
- 离线量化(post training)
2427

25-
- **Training aware**
26-
- Dynamic strategy: During inference, we quantize models with hyperparameters dynamically estimated from small batches of samples.
27-
- Static strategy: During inference, we quantize models with the same hyperparameters estimated from training data.
28-
- Support layer-wise and channel-wise quantization.
29-
- **Post training**
28+
- 知识蒸馏
29+
- 支持单进程知识蒸馏
30+
- 支持多进程分布式知识蒸馏
3031

31-
### Knowledge Distillation
32+
- 神经网络结构自动搜索(NAS)
33+
- 支持基于进化算法的轻量神经网络结构自动搜索
34+
- 支持One-Shot网络结构自动搜索
35+
- 支持 FLOPS / 硬件延时约束
36+
- 支持多平台模型延时评估
37+
- 支持用户自定义搜索算法和搜索空间
3238

33-
- **Naive knowledge distillation:** transfers dark knowledge by merging the teacher and student model into the same Program
34-
- **Paddle large-scale scalable knowledge distillation framework Pantheon:** a universal solution for knowledge distillation, more flexible than the naive knowledge distillation, and easier to scale to the large-scale applications.
39+
## 安装
3540

36-
- Decouple the teacher and student models --- they run in different processes in the same or different nodes, and transfer knowledge via TCP/IP ports or local files;
37-
- Friendly to assemble multiple teacher models and each of them can work in either online or offline mode independently;
38-
- Merge knowledge from different teachers and make batch data for the student model automatically;
39-
- Support the large-scale knowledge prediction of teacher models on multiple devices.
40-
41-
### Neural Architecture Search
42-
43-
- Neural architecture search based on evolution strategy.
44-
- Support distributed search.
45-
- One-Shot neural architecture search.
46-
- Support FLOPs and latency constrained search.
47-
- Support the latency estimation on different hardware and platforms.
48-
49-
## Install
50-
51-
Requires:
41+
依赖:
5242

5343
Paddle >= 1.7.0
5444

5545
```bash
5646
pip install paddleslim -i https://pypi.org/simple
5747
```
5848

59-
## Usage
49+
## 使用
6050

61-
- [QuickStart](docs/zh_cn/quick_start): Introduce how to use PaddleSlim by simple examples.
62-
- [Advanced Tutorials](docs/zh_cn/tutorials):Tutorials about advanced usage of PaddleSlim.
63-
- [Model Zoo](docs/zh_cn/model_zoo.md):Benchmark and pretrained models.
64-
- [API Documents](https://paddlepaddle.github.io/PaddleSlim/api_cn/index.html)
65-
- [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/master/slim): Introduce how to use PaddleSlim in PaddleDetection library.
66-
- [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop/slim): Introduce how to use PaddleSlim in PaddleSeg library.
67-
- [PaddleLite](https://paddlepaddle.github.io/Paddle-Lite/): How to use PaddleLite to deploy models generated by PaddleSlim.
51+
- [快速开始](docs/zh_cn/quick_start):通过简单示例介绍如何快速使用PaddleSlim。
52+
- [进阶教程](docs/zh_cn/tutorials):PaddleSlim高阶教程。
53+
- [模型库](docs/zh_cn/model_zoo.md):各个压缩策略在图像分类、目标检测和图像语义分割模型上的实验结论,包括模型精度、预测速度和可供下载的预训练模型。
54+
- [API文档](https://paddlepaddle.github.io/PaddleSlim/api_cn/index.html)
55+
- [算法原理](https://paddlepaddle.github.io/PaddleSlim/algo/algo.html): 介绍量化、剪枝、蒸馏、NAS的基本知识背景。
56+
- [Paddle检测库](https://github.com/PaddlePaddle/PaddleDetection/tree/master/slim):介绍如何在检测库中使用PaddleSlim。
57+
- [Paddle分割库](https://github.com/PaddlePaddle/PaddleSeg/tree/develop/slim):介绍如何在分割库中使用PaddleSlim。
58+
- [PaddleLite](https://paddlepaddle.github.io/Paddle-Lite/):介绍如何使用预测库PaddleLite部署PaddleSlim产出的模型。
6859

69-
## Performance
60+
## 部分压缩策略效果
7061

71-
### Image Classification
62+
### 分类模型
7263

73-
Dataset: ImageNet2012; Model: MobileNetV1;
64+
数据: ImageNet2012; 模型: MobileNetV1;
7465

75-
|Method |Accuracy(baseline: 70.91%) |Model Size(baseline: 17.0M)|
66+
|压缩策略 |精度收益(baseline: 70.91%) |模型大小(baseline: 17.0M)|
7667
|:---:|:---:|:---:|
77-
| Knowledge Distillation(ResNet50)| [+1.06%]() |-|
78-
| Knowledge Distillation(ResNet50) + int8 quantization |[+1.10%]()| [-71.76%]()|
79-
| Pruning(FLOPs-50%) + int8 quantization|[-1.71%]()|[-86.47%]()|
68+
| 知识蒸馏(ResNet50)| [+1.06%]() |-|
69+
| 知识蒸馏(ResNet50) + int8量化训练 |[+1.10%]()| [-71.76%]()|
70+
| 剪裁(FLOPs-50%) + int8量化训练|[-1.71%]()|[-86.47%]()|
8071

8172

82-
### Object Detection
73+
### 图像检测模型
8374

84-
#### Dataset: Pascal VOC; Model: MobileNet-V1-YOLOv3
75+
#### 数据:Pascal VOC;模型:MobileNet-V1-YOLOv3
8576

86-
| Method | mAP(baseline: 76.2%) | Model Size(baseline: 94MB) |
77+
| 压缩方法 | mAP(baseline: 76.2%) | 模型大小(baseline: 94MB) |
8778
| :---------------------: | :------------: | :------------:|
88-
| Knowledge Distillation(ResNet34-YOLOv3) | [+2.8%]() | - |
89-
| Pruning(FLOPs -52.88%) | [+1.4%]() | [-67.76%]() |
90-
|Knowledge DistillationResNet34-YOLOv3)+Pruning(FLOPs-69.57%)| [+2.6%]()|[-67.00%]()|
79+
| 知识蒸馏(ResNet34-YOLOv3) | [+2.8%](#) | - |
80+
| 剪裁 FLOPs -52.88% | [+1.4%]() | [-67.76%]() |
81+
|知识蒸馏(ResNet34-YOLOv3)+剪裁(FLOPs-69.57%)| [+2.6%]()|[-67.00%]()|
9182

9283

93-
#### Dataset: COCO; Model: MobileNet-V1-YOLOv3
84+
#### 数据:COCO;模型:MobileNet-V1-YOLOv3
9485

95-
| Method | mAP(baseline: 29.3%) | Model Size|
86+
| 压缩方法 | mAP(baseline: 29.3%) | 模型大小|
9687
| :---------------------: | :------------: | :------:|
97-
| Knowledge Distillation(ResNet34-YOLOv3) | [+2.1%]() |-|
98-
| Knowledge Distillation(ResNet34-YOLOv3)+Pruning(FLOPs-67.56%) | [-0.3%]() | [-66.90%]()|
88+
| 知识蒸馏(ResNet34-YOLOv3) | [+2.1%]() |-|
89+
| 知识蒸馏(ResNet34-YOLOv3)+剪裁(FLOPs-67.56%) | [-0.3%]() | [-66.90%]()|
9990

100-
### NAS
91+
### 搜索
10192

102-
Dataset: ImageNet2012; Model: MobileNetV2
93+
数据:ImageNet2012; 模型:MobileNetV2
10394

104-
|Device | Infer time cost | Top1 accuracy(baseline:71.90%) |
95+
|硬件环境 | 推理耗时 | Top1准确率(baseline:71.90%) |
10596
|:---------------:|:---------:|:--------------------:|
10697
| RK3288 | [-23%]() | +0.07% |
10798
| Android cellphone | [-20%]() | +0.16% |

README_en.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
[中文](README.md) | English
2+
3+
Documents:https://paddlepaddle.github.io/PaddleSlim
4+
5+
# PaddleSlim
6+
7+
PaddleSlim is a toolkit for model compression. It contains a collection of compression strategies, such as pruning, fixed point quantization, knowledge distillation, hyperparameter searching and neural architecture search.
8+
9+
PaddleSlim provides solutions of compression on computer vision models, such as image classification, object detection and semantic segmentation. Meanwhile, PaddleSlim Keeps exploring advanced compression strategies for language model. Furthermore, benckmark of compression strategies on some open tasks is available for your reference.
10+
11+
PaddleSlim also provides auxiliary and primitive API for developer and researcher to survey, implement and apply the method in latest papers. PaddleSlim will support developer in ability of framework and technology consulting.
12+
13+
## Features
14+
15+
### Pruning
16+
17+
- Uniform pruning of convolution
18+
- Sensitivity-based prunning
19+
- Automated pruning based evolution search strategy
20+
- Support pruning of various deep architectures such as VGG, ResNet, and MobileNet.
21+
- Support self-defined range of pruning, i.e., layers to be pruned.
22+
23+
### Fixed Point Quantization
24+
25+
- **Training aware**
26+
- Dynamic strategy: During inference, we quantize models with hyperparameters dynamically estimated from small batches of samples.
27+
- Static strategy: During inference, we quantize models with the same hyperparameters estimated from training data.
28+
- Support layer-wise and channel-wise quantization.
29+
- **Post training**
30+
31+
### Knowledge Distillation
32+
33+
- **Naive knowledge distillation:** transfers dark knowledge by merging the teacher and student model into the same Program
34+
- **Paddle large-scale scalable knowledge distillation framework Pantheon:** a universal solution for knowledge distillation, more flexible than the naive knowledge distillation, and easier to scale to the large-scale applications.
35+
36+
- Decouple the teacher and student models --- they run in different processes in the same or different nodes, and transfer knowledge via TCP/IP ports or local files;
37+
- Friendly to assemble multiple teacher models and each of them can work in either online or offline mode independently;
38+
- Merge knowledge from different teachers and make batch data for the student model automatically;
39+
- Support the large-scale knowledge prediction of teacher models on multiple devices.
40+
41+
### Neural Architecture Search
42+
43+
- Neural architecture search based on evolution strategy.
44+
- Support distributed search.
45+
- One-Shot neural architecture search.
46+
- Support FLOPs and latency constrained search.
47+
- Support the latency estimation on different hardware and platforms.
48+
49+
## Install
50+
51+
Requires:
52+
53+
Paddle >= 1.7.0
54+
55+
```bash
56+
pip install paddleslim -i https://pypi.org/simple
57+
```
58+
59+
## Usage
60+
61+
- [QuickStart](docs/zh_cn/quick_start): Introduce how to use PaddleSlim by simple examples.
62+
- [Advanced Tutorials](docs/zh_cn/tutorials):Tutorials about advanced usage of PaddleSlim.
63+
- [Model Zoo](docs/zh_cn/model_zoo.md):Benchmark and pretrained models.
64+
- [API Documents](https://paddlepaddle.github.io/PaddleSlim/api_cn/index.html)
65+
- [Algorithm Background](https://paddlepaddle.github.io/PaddleSlim/algo/algo.html): Introduce the background of quantization, pruning, distillation, NAS.
66+
- [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/master/slim): Introduce how to use PaddleSlim in PaddleDetection library.
67+
- [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop/slim): Introduce how to use PaddleSlim in PaddleSeg library.
68+
- [PaddleLite](https://paddlepaddle.github.io/Paddle-Lite/): How to use PaddleLite to deploy models generated by PaddleSlim.
69+
70+
## Performance
71+
72+
### Image Classification
73+
74+
Dataset: ImageNet2012; Model: MobileNetV1;
75+
76+
|Method |Accuracy(baseline: 70.91%) |Model Size(baseline: 17.0M)|
77+
|:---:|:---:|:---:|
78+
| Knowledge Distillation(ResNet50)| [+1.06%]() |-|
79+
| Knowledge Distillation(ResNet50) + int8 quantization |[+1.10%]()| [-71.76%]()|
80+
| Pruning(FLOPs-50%) + int8 quantization|[-1.71%]()|[-86.47%]()|
81+
82+
83+
### Object Detection
84+
85+
#### Dataset: Pascal VOC; Model: MobileNet-V1-YOLOv3
86+
87+
| Method | mAP(baseline: 76.2%) | Model Size(baseline: 94MB) |
88+
| :---------------------: | :------------: | :------------:|
89+
| Knowledge Distillation(ResNet34-YOLOv3) | [+2.8%]() | - |
90+
| Pruning(FLOPs -52.88%) | [+1.4%]() | [-67.76%]() |
91+
|Knowledge DistillationResNet34-YOLOv3)+Pruning(FLOPs-69.57%)| [+2.6%]()|[-67.00%]()|
92+
93+
94+
#### Dataset: COCO; Model: MobileNet-V1-YOLOv3
95+
96+
| Method | mAP(baseline: 29.3%) | Model Size|
97+
| :---------------------: | :------------: | :------:|
98+
| Knowledge Distillation(ResNet34-YOLOv3) | [+2.1%]() |-|
99+
| Knowledge Distillation(ResNet34-YOLOv3)+Pruning(FLOPs-67.56%) | [-0.3%]() | [-66.90%]()|
100+
101+
### NAS
102+
103+
Dataset: ImageNet2012; Model: MobileNetV2
104+
105+
|Device | Infer time cost | Top1 accuracy(baseline:71.90%) |
106+
|:---------------:|:---------:|:--------------------:|
107+
| RK3288 | [-23%]() | +0.07% |
108+
| Android cellphone | [-20%]() | +0.16% |
109+
| iPhone 6s | [-17%]() | +0.32% |

docs/en/model_zoo_en.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ PaddleLite version: v2.3
6969
| MobileNetV1 | sensitive -50% | 69.8% / 88.9% (-1.19%/-0.78%) | 9 | 0.56 |37.9892\20.7882\11.3144|-| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/MobileNetV1_sensitive-50.tar) |
7070
| MobileNetV2 | - | 72.15%/90.65% | 15 | 0.59 |41.7874\23.375\13.3998|-| [download](https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV2_pretrained.tar) |
7171
| MobileNetV2 | uniform -50% | 65.79%/86.11% (-6.35%/-4.47%) | 11 | 0.296 |23.8842\13.8698\8.5572|-| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/MobileNetV2_uniform-50.tar) |
72-
| ResNet34 | - | 72.15%/90.65% | 84 | 7.36 |217.808\139.943\96.7504|342.32| [download](https://paddle-imagenet-models-name.bj.bcebos.com/ResNet34_pretrained.tar) |
73-
| ResNet34 | uniform -50% | 70.99%/89.95% (-1.36%/-0.87%) | 41 | 3.67 |114.787\75.0332\51.8438|452.41| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_uniform-50.tar) |
74-
| ResNet34 | auto -55.05% | 70.24%/89.63% (-2.04%/-1.06%) | 33 | 3.31 |105.924\69.3222\48.0246|457.25| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_auto-55.tar) |
72+
| ResNet34 | - | 74.57%/92.14% | 84 | 7.36 |217.808\139.943\96.7504|342.32| [download](https://paddle-imagenet-models-name.bj.bcebos.com/ResNet34_pretrained.tar) |
73+
| ResNet34 | uniform -50% | 70.99%/89.95% (-3.58%/-2.19%) | 41 | 3.67 |114.787\75.0332\51.8438|452.41| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_uniform-50.tar) |
74+
| ResNet34 | auto -55.05% | 70.24%/89.63% (-4.33%/-2.51%) | 33 | 3.31 |105.924\69.3222\48.0246|457.25| [download](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_auto-55.tar) |
7575

7676
### 1.3 Distillation
7777

docs/zh_cn/model_zoo.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ PaddleLite版本: v2.3
7474
| MobileNetV1 | sensitive -50% | 69.8% / 88.9% (-1.19%/-0.78%) | 9 | 0.56 |37.9892\20.7882\11.3144|-| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/MobileNetV1_sensitive-50.tar) |
7575
| MobileNetV2 | - | 72.15%/90.65% | 15 | 0.59 |41.7874\23.375\13.3998|-| [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/MobileNetV2_pretrained.tar) |
7676
| MobileNetV2 | uniform -50% | 65.79%/86.11% (-6.35%/-4.47%) | 11 | 0.296 |23.8842\13.8698\8.5572|-| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/MobileNetV2_uniform-50.tar) |
77-
| ResNet34 | - | 72.15%/90.65% | 84 | 7.36 |217.808\139.943\96.7504|342.32| [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/ResNet34_pretrained.tar) |
78-
| ResNet34 | uniform -50% | 70.99%/89.95% (-1.36%/-0.87%) | 41 | 3.67 |114.787\75.0332\51.8438|452.41| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_uniform-50.tar) |
79-
| ResNet34 | auto -55.05% | 70.24%/89.63% (-2.04%/-1.06%) | 33 | 3.31 |105.924\69.3222\48.0246|457.25| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_auto-55.tar) |
77+
| ResNet34 | - | 74.57%/92.14% | 84 | 7.36 |217.808\139.943\96.7504|342.32| [下载链接](https://paddle-imagenet-models-name.bj.bcebos.com/ResNet34_pretrained.tar) |
78+
| ResNet34 | uniform -50% | 70.99%/89.95% (-3.58%/-2.19%) | 41 | 3.67 |114.787\75.0332\51.8438|452.41| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_uniform-50.tar) |
79+
| ResNet34 | auto -55.05% | 70.24%/89.63% (-4.33%/-2.51%) | 33 | 3.31 |105.924\69.3222\48.0246|457.25| [下载链接](https://paddlemodels.bj.bcebos.com/PaddleSlim/ResNet34_auto-55.tar) |
8080

8181

8282
### 1.3 蒸馏

0 commit comments

Comments
 (0)