Shortcuts

RepVGG

简介

RepVGG is a VGG-style convolutional architecture. It has the following advantages:

  1. The model has a VGG-like plain (a.k.a. feed-forward) topology 1 without any branches. I.e., every layer takes the output of its only preceding layer as input and feeds the output into its only following layer.

  2. The model’s body uses only 3 × 3 conv and ReLU.

  3. The concrete architecture (including the specific depth and layer widths) is instantiated with no automatic search, manual refinement, compound scaling, nor other heavy designs.

摘要

Show the paper's abstract
We present a simple but powerful architecture of convolutional neural network, which has a VGG-like inference-time body composed of nothing but a stack of 3x3 convolution and ReLU, while the training-time model has a multi-branch topology. Such decoupling of the training-time and inference-time architecture is realized by a structural re-parameterization technique so that the model is named RepVGG. On ImageNet, RepVGG reaches over 80% top-1 accuracy, which is the first time for a plain model, to the best of our knowledge. On NVIDIA 1080Ti GPU, RepVGG models run 83% faster than ResNet-50 or 101% faster than ResNet-101 with higher accuracy and show favorable accuracy-speed trade-off compared to the state-of-the-art models like EfficientNet and RegNet.

使用方式

from mmpretrain import inference_model, get_model

model = get_model('repvgg-A0_8xb32_in1k', pretrained=True)
model.backbone.switch_to_deploy()
predict = inference_model(model, 'demo/bird.JPEG')
print(predict['pred_class'])
print(predict['pred_score'])

Models and results

Image Classification on ImageNet-1k

模型

预训练

Params (M)

Flops (G)

Top-1 (%)

Top-5 (%)

配置文件

下载

repvgg-A0_8xb32_in1k

从头训练

8.31

1.36

72.37

90.56

config

model | log

repvgg-A1_8xb32_in1k

从头训练

12.79

2.36

74.23

91.80

config

model | log

repvgg-A2_8xb32_in1k

从头训练

25.50

5.12

76.49

93.09

config

model | log

repvgg-B0_8xb32_in1k

从头训练

3.42

15.82

75.27

92.21

config

model | log

repvgg-B1_8xb32_in1k

从头训练

51.83

11.81

78.19

94.04

config

model | log

repvgg-B1g2_8xb32_in1k

从头训练

41.36

8.81

77.87

93.99

config

model | log

repvgg-B1g4_8xb32_in1k

从头训练

36.13

7.30

77.81

93.77

config

model | log

repvgg-B2_8xb32_in1k

从头训练

80.32

18.37

78.58

94.23

config

model | log

repvgg-B2g4_8xb32_in1k

从头训练

55.78

11.33

79.44

94.72

config

model | log

repvgg-B3_8xb32_in1k

从头训练

110.96

26.21

80.58

95.33

config

model | log

repvgg-B3g4_8xb32_in1k

从头训练

75.63

16.06

80.26

95.15

config

model | log

repvgg-D2se_3rdparty_in1k*

从头训练

120.39

32.84

81.81

95.94

config

model

Models with * are converted from the official repo. The config files of these models are only for inference. We haven’t reproduce the training results.

引用

@inproceedings{ding2021repvgg,
  title={Repvgg: Making vgg-style convnets great again},
  author={Ding, Xiaohan and Zhang, Xiangyu and Ma, Ningning and Han, Jungong and Ding, Guiguang and Sun, Jian},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={13733--13742},
  year={2021}
}
Read the Docs v: latest
Versions
latest
stable
mmcls-1.x
mmcls-0.x
dev
Downloads
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.