Explore and code with more than 6 million developers，Free private repositories ！：）
Notice: Creating folder will generate an empty file .keep, because not support in Git

## Introduction

PaddleClas is a toolset for image classification tasks prepared for the industry and academia. It helps users train better computer vision models and apply them in real scenarios.

Recent update

• 2021.01.08 Add support for whl package and its usage, Model inference can be done by simply install paddleclas using pip.
• 2020.12.16 Add support for TensorRT when using cpp inference to obain more obvious acceleration.
• 2020.12.06 Add SE_HRNet_W64_C_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 84.75%.
• 2020.11.23 Add GhostNet_x1_3_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 79.38%.
• 2020.11.09 Add InceptionV3 architecture and pretrained model, whose Top-1 Acc on ImageNet1k dataset reaches 79.1%.
• 2020.09.17 Add Res2Net50_vd_26w_4s_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 83.1%. Add Res2Net101_vd_26w_4s_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 83.9%.
• 2020.10.10 Add cpp inference demo and improve FAQ tutorial.
• 2020.09.17 Add HRNet_W48_C_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 83.62%. Add ResNet34_vd_ssld pretrained model, whose Top-1 Acc on ImageNet-1k dataset reaches 79.72%.
• more

## Features

• Rich model zoo. Based on the ImageNet-1k classification dataset, PaddleClas provides 29 series of classification network structures and training configurations, 133 models' pretrained weights and their evaluation metrics.

• SSLD Knowledge Distillation. Based on this SSLD distillation strategy, the top-1 acc of the distilled model is generally increased by more than 3%.

• Data augmentation: PaddleClas provides detailed introduction of 8 data augmentation algorithms such as AutoAugment, Cutout, Cutmix, code reproduction and effect evaluation in a unified experimental environment.

• Pretrained model with 100,000 categories: Based on ResNet50_vd model, Baidu open sourced the ResNet50_vd pretrained model trained on a 100,000-category dataset. In some practical scenarios, the accuracy based on the pretrained weights can be increased by up to 30%.

• A variety of training modes, including multi-machine training, mixed precision training, etc.

• A variety of inference and deployment solutions, including TensorRT inference, Paddle-Lite inference, model service deployment, model quantification, Paddle Hub, etc.

• Support Linux, Windows, macOS and other systems.

## Community

• Scan the QR code below with your Wechat and send the message 分类 out, then you will be invited into the official technical exchange group.
• You can also scan the QQ group QR code to enter the PaddleClas QQ group. Look forward to your participation.

## Tutorials

### Model zoo overview

Based on the ImageNet-1k classification dataset, the 29 classification network structures supported by PaddleClas and the corresponding 133 image classification pretrained models are shown below. Training trick, a brief introduction to each series of network structures, and performance evaluation will be shown in the corresponding chapters. The evaluation environment is as follows.

• CPU evaluation environment is based on Snapdragon 855 (SD855).
• The GPU evaluation speed is measured by running 500 times under the FP32+TensorRT configuration (excluding the warmup time of the first 10 times).

Curves of accuracy to the inference time of common server-side models are shown as follows.

Curves of accuracy to the inference time and storage size of common mobile-side models are shown as follows.

### SSLD pretrained models

Accuracy and inference time of the prtrained models based on SSLD distillation are as follows. More detailed information can be refered to SSLD distillation tutorial.

• Server-side distillation pretrained models
Model Top-1 Acc Reference
Top-1 Acc
Acc gain time(ms)
bs=1
time(ms)
bs=4
ResNet50_vd_
ssld
ResNet50_vd_
ssld_v2
ResNet101_vd_
ssld
Res2Net50_vd_
26w_4s_ssld
Res2Net101_vd_
26w_4s_ssld
Res2Net200_vd_
26w_4s_ssld
• Mobile-side distillation pretrained models
Model Top-1 Acc Reference
Top-1 Acc
Acc gain SD855 time(ms)
bs=1
MobileNetV1_
ssld
MobileNetV2_
ssld
MobileNetV3_
small_x0_35_ssld
MobileNetV3_
large_x1_0_ssld
MobileNetV3_small_
x1_0_ssld
GhostNet_
x1_3_ssld
• Note: Reference Top-1 Acc means accuracy of pretrained models which are trained on ImageNet1k dataset.

### ResNet and Vd series

Accuracy and inference time metrics of ResNet and Vd series models are shown as follows. More detailed information can be refered to ResNet and Vd series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4
ResNet50_vd_
ssld
ResNet50_vd_
ssld_v2
ResNet101_vd_
ssld

### Mobile series

Accuracy and inference time metrics of Mobile series models are shown as follows. More detailed information can be refered to Mobile series tutorial.

Model Top-1 Acc Top-5 Acc SD855 time(ms)
bs=1
MobileNetV1_
x0_25
MobileNetV1_
x0_5
MobileNetV1_
x0_75
MobileNetV1_
ssld
MobileNetV2_
x0_25
MobileNetV2_
x0_5
MobileNetV2_
x0_75
MobileNetV2_
x1_5
MobileNetV2_
x2_0
MobileNetV2_
ssld
MobileNetV3_
large_x1_25
MobileNetV3_
large_x1_0
MobileNetV3_
large_x0_75
MobileNetV3_
large_x0_5
MobileNetV3_
large_x0_35
MobileNetV3_
small_x1_25
MobileNetV3_
small_x1_0
MobileNetV3_
small_x0_75
MobileNetV3_
small_x0_5
MobileNetV3_
small_x0_35
MobileNetV3_
small_x0_35_ssld
MobileNetV3_
large_x1_0_ssld
MobileNetV3_small_
x1_0_ssld
ShuffleNetV2_
x0_25
ShuffleNetV2_
x0_33
ShuffleNetV2_
x0_5
ShuffleNetV2_
x1_5
ShuffleNetV2_
x2_0
ShuffleNetV2_
swish
GhostNet_
x0_5
GhostNet_
x1_0
GhostNet_
x1_3
GhostNet_
x1_3_ssld

### SEResNeXt and Res2Net series

Accuracy and inference time metrics of SEResNeXt and Res2Net series models are shown as follows. More detailed information can be refered to SEResNext and_Res2Net series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4
Res2Net50_
26w_4s
Res2Net50_vd_
26w_4s
Res2Net50_
14w_8s
Res2Net101_vd_
26w_4s
Res2Net200_vd_
26w_4s
Res2Net200_vd_
26w_4s_ssld
ResNeXt50_
32x4d
ResNeXt50_vd_
32x4d
ResNeXt50_
64x4d
ResNeXt50_vd_
64x4d
ResNeXt101_
32x4d
ResNeXt101_vd_
32x4d
ResNeXt101_
64x4d
ResNeXt101_vd_
64x4d
ResNeXt152_
32x4d
ResNeXt152_vd_
32x4d
ResNeXt152_
64x4d
ResNeXt152_vd_
64x4d
SE_ResNeXt50_
32x4d
SE_ResNeXt50_vd_
32x4d
SE_ResNeXt101_
32x4d

### DPN and DenseNet series

Accuracy and inference time metrics of DPN and DenseNet series models are shown as follows. More detailed information can be refered to DPN and DenseNet series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4

### HRNet series

Accuracy and inference time metrics of HRNet series models are shown as follows. More detailed information can be refered to Mobile series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4

### Inception series

Accuracy and inference time metrics of Inception series models are shown as follows. More detailed information can be refered to Inception series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4

### EfficientNet and ResNeXt101_wsl series

Accuracy and inference time metrics of EfficientNet and ResNeXt101_wsl series models are shown as follows. More detailed information can be refered to EfficientNet and ResNeXt101_wsl series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4
ResNeXt101_
32x8d_wsl
ResNeXt101_
32x16d_wsl
ResNeXt101_
32x32d_wsl
ResNeXt101_
32x48d_wsl
Fix_ResNeXt101_
32x48d_wsl
EfficientNetB0_
small

### ResNeSt and RegNet series

Accuracy and inference time metrics of ResNeSt and RegNet series models are shown as follows. More detailed information can be refered to ResNeSt and RegNet series tutorial.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4
ResNeSt50_
fast_1s1x64d

### 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.

Model Top-1 Acc Top-5 Acc time(ms)
bs=1
time(ms)
bs=4

## Contribution

Contributions are highly welcomed and we would really appreciate your feedback!!

• Thank nblib to fix bug of RandErasing.
• Thank chenpy228 to fix some typos PaddleClas.

Python and 5 more languages
Apache-2.0

No release