SEResNeXt and Res2Net series

December 7, 2021 ยท View on GitHub


Catalogue

1. Overview

ResNeXt, one of the typical variants of ResNet, was presented at the CVPR conference in 2017. Prior to this, the methods to improve the model accuracy mainly focused on deepening or widening the network, which increased the number of parameters and calculation, and slowed down the inference speed accordingly. The concept of cardinality was proposed in ResNeXt structure. The author found that increasing the number of channel groups was more effective than increasing the depth and width through experiments. It can improve the accuracy without increasing the parameter complexity and reduce the number of parameters at the same time, so it is a more successful variant of ResNet.

SENet is the winner of the 2017 ImageNet classification competition. It proposes a new SE structure that can be migrated to any other network. It controls the scale to enhance the important features between each channel, and weaken the unimportant features. So that the extracted features are more directional.

Res2Net is a brand-new improvement of ResNet proposed in 2019. The solution can be easily integrated with other excellent modules. Without increasing the amount of calculation, the performance on ImageNet, CIFAR-100 and other data sets exceeds ResNet. Res2Net, with its simple structure and superior performance, further explores the multi-scale representation capability of CNN at a more fine-grained level. Res2Net reveals a new dimension to improve model accuracy, called scale, which is an essential and more effective factor in addition to the existing dimensions of depth, width, and cardinality. The network also performs well in other visual tasks such as object detection and image segmentation.

The FLOPs, parameters, and inference time on the T4 GPU of this series of models are shown in the figure below.

At present, there are a total of 24 pretrained models of the three categories open sourced by PaddleClas, and the indicators are shown in the figure. It can be seen from the diagram that under the same Flops and Params, the improved model tends to have higher accuracy, but the inference speed is often inferior to the ResNet series. On the other hand, Res2Net performed better. Compared with group operation in ResNeXt and SE structure operation in SEResNet, Res2Net tended to have better accuracy in the same Flops, Params and inference speed.

2. Accuracy, FLOPs and Parameters

ModelsTop1Top5Reference
top1
Reference
top5
FLOPs
(G)
Parameters
(M)
Res2Net50_26w_4s0.7930.9460.7800.9368.52025.700
Res2Net50_vd_26w_4s0.7980.9498.37025.060
Res2Net50_vd_26w_4s_ssld0.8310.9668.37025.060
Res2Net50_14w_8s0.7950.9470.7810.9399.01025.720
Res2Net101_vd_26w_4s0.8060.95216.67045.220
Res2Net101_vd_26w_4s_ssld0.8390.97116.67045.220
Res2Net200_vd_26w_4s0.8120.95731.49076.210
Res2Net200_vd_26w_4s_ssld0.8510.97431.49076.210
ResNeXt50_32x4d0.7780.9380.7788.02023.640
ResNeXt50_vd_32x4d0.7960.9468.50023.660
ResNeXt50_64x4d0.7840.94115.06042.360
ResNeXt50_vd_64x4d0.8010.94915.54042.380
ResNeXt101_32x4d0.7870.9420.78815.01041.540
ResNeXt101_vd_32x4d0.8030.95115.49041.560
ResNeXt101_64x4d0.7840.9450.79629.05078.120
ResNeXt101_vd_64x4d0.8080.95229.53078.140
ResNeXt152_32x4d0.7900.94322.01056.280
ResNeXt152_vd_32x4d0.8070.95222.49056.300
ResNeXt152_64x4d0.7950.94743.030107.570
ResNeXt152_vd_64x4d0.8110.95343.520107.590
SE_ResNet18_vd0.7330.9144.14011.800
SE_ResNet34_vd0.7650.9327.84021.980
SE_ResNet50_vd0.7950.9488.67028.090
SE_ResNeXt50_32x4d0.7840.9400.7890.9458.02026.160
SE_ResNeXt50_vd_32x4d0.8020.94910.76026.280
SE_ResNeXt101_32x4d0.79390.94430.7930.95015.02046.280
SENet154_vd0.8140.95545.830114.290

3. Inference speed based on V100 GPU

ModelsCrop SizeResize Short SizeFP32
Batch Size=1
(ms)
Res2Net50_26w_4s2242564.148
Res2Net50_vd_26w_4s2242564.172
Res2Net50_14w_8s2242565.113
Res2Net101_vd_26w_4s2242567.327
Res2Net200_vd_26w_4s22425612.806
ResNeXt50_32x4d22425610.964
ResNeXt50_vd_32x4d2242567.566
ResNeXt50_64x4d22425613.905
ResNeXt50_vd_64x4d22425614.321
ResNeXt101_32x4d22425614.915
ResNeXt101_vd_32x4d22425614.885
ResNeXt101_64x4d22425628.716
ResNeXt101_vd_64x4d22425628.398
ResNeXt152_32x4d22425622.996
ResNeXt152_vd_32x4d22425622.729
ResNeXt152_64x4d22425646.705
ResNeXt152_vd_64x4d22425646.395
SE_ResNet18_vd2242561.694
SE_ResNet34_vd2242562.786
SE_ResNet50_vd2242563.749
SE_ResNeXt50_32x4d2242568.924
SE_ResNeXt50_vd_32x4d2242569.011
SE_ResNeXt101_32x4d22425619.204
SENet154_vd22425650.406

4. Inference speed based on T4 GPU

ModelsCrop SizeResize Short SizeFP16
Batch Size=1
(ms)
FP16
Batch Size=4
(ms)
FP16
Batch Size=8
(ms)
FP32
Batch Size=1
(ms)
FP32
Batch Size=4
(ms)
FP32
Batch Size=8
(ms)
Res2Net50_26w_4s2242563.560676.6182711.415664.471889.6572217.54535
Res2Net50_vd_26w_4s2242563.692216.9441911.924414.527129.9324718.16928
Res2Net50_14w_8s2242564.457457.6984712.309355.402610.6027318.01234
Res2Net101_vd_26w_4s2242566.5312210.8189518.943958.0872917.3120831.95762
Res2Net200_vd_26w_4s22425611.6667118.9395333.1918814.6780632.3503263.65899
ResNeXt50_32x4d2242567.610878.8891812.996747.5632710.613418.46915
ResNeXt50_vd_32x4d2242567.690658.9401413.40887.6204411.0338519.15339
ResNeXt50_64x4d22425613.7868815.8465521.7953713.8096218.471233.49843
ResNeXt50_vd_64x4d22425613.7953815.2220122.2704513.9444918.8875934.28889
ResNeXt101_32x4d22425616.5977717.9315321.3654116.2150319.9656833.76831
ResNeXt101_vd_32x4d22425616.3690917.4568122.1021616.2810320.2561134.37152
ResNeXt101_64x4d22425630.1235532.4682338.4190130.478836.2980168.85559
ResNeXt101_vd_64x4d22425630.3402232.2786938.7252330.4045636.7732469.66021
ResNeXt152_32x4d22425625.2641726.5700130.6783424.8629929.3676452.09426
ResNeXt152_vd_32x4d22425625.1119626.7051531.7263625.0325830.0898752.64429
ResNeXt152_64x4d22425646.5829348.3456356.9796146.756456.34108106.11736
ResNeXt152_vd_64x4d22425647.6844748.9140657.2932947.1863857.16257107.26288
SE_ResNet18_vd2242561.618233.13914.602821.76914.198777.5331
SE_ResNet34_vd2242562.675185.046947.189462.885597.0329112.73502
SE_ResNet50_vd2242563.653947.56812.527934.2839310.3884618.33154
SE_ResNeXt50_32x4d2242569.0695711.3789818.862828.7412113.56323.01954
SE_ResNeXt50_vd_32x4d2242569.2501611.8504525.570049.1713414.7619219.914
SE_ResNeXt101_32x4d22425619.3445520.610432.2043218.8260425.3181441.97758
SENet154_vd22425649.8573354.3726774.7044753.7979466.31684121.59885