Home

Awesome

SKNet: Selective Kernel Networks <sub>(paper)</sub>

By Xiang Li<sup>[1,2]</sup>, Wenhai Wang<sup>[3,2]</sup>, Xiaolin Hu<sup>[4]</sup> and Jian Yang<sup>[1]</sup>

[PCALab, Nanjing University of Science and Technology]<sup>[1]</sup> Momenta<sup>[2]</sup> [Nanjing University]<sup>[3]</sup> [Tsinghua University]<sup>[4]</sup>.

Approach

<div align="center"> <img src="https://github.com/implus/SKNet/blob/master/figures/sknet.jpg"> </div> <p align="center"> Figure 1: The Diagram of a Selective Kernel Convolution module. </p>

Implementation

In this repository, all the models are implemented by Caffe.

We use the data augmentation strategies with SENet.

There are two new layers introduced for efficient training and inference, these are Axpy and CuDNNBatchNorm layers.

Trained Models

Table 2. Single crop validation error on ImageNet-1k (center 224x224/320x320 crop from resized image with shorter side = 256).

ModelTop-1 224xTop-1 320x#PGFLOPs
ResNeXt-5022.2321.0525.0M4.24
AttentionNeXt-5621.7631.9M6.32
InceptionV321.2027.1M5.73
ResNeXt-50 + BAM21.7020.1525.4M4.31
ResNeXt-50 + CBAM21.4020.3827.7M4.25
SENet-5021.1219.7127.7M4.25
SKNet-5020.7919.3227.5M4.47
ResNeXt-10121.1119.8644.3M7.99
Attention-9219.5051.3M10.43
DPN-9220.7019.3037.7M6.50
DPN-9820.2018.9061.6M11.70
InceptionV420.0042.0M12.31
Inception-ResNetV219.9055.0M13.22
ResNeXt-101 + BAM20.6719.1544.6M8.05
ResNeXt-101 + CBAM20.6019.4249.2M8.00
SENet-10120.5818.6149.2M8.00
SKNet-10120.1918.4048.9M8.46

Download:

Modelcaffe model
SKNet-50GoogleDrive
SKNet-101GoogleDrive

20190323_Update: SKNet-101 model is deleted by mistake. We are retraining a model and it will come soon in 2-3 days. 20190326_Update: SKNet-101 model is ready.

Attention weights correspond to object scales in low/middle layers

We look deep into the selection distributions from the perspective of classes on SK_2_3 (low), SK_3_4 (middle), SK_5_3 (high) layers:

<div align="center"> <img src="https://github.com/implus/SKNet/blob/master/figures/cls_attention_diff.jpg"> </div> <p align="center"> Figure 2: Average mean attention difference (mean attention value of kernel 5x5 minus that of kernel 3x3) on SK units of SKNet-50, for each of 1,000 categories using all validation samples on ImageNet. On low or middle level SK units (e.g., SK\_2\_3, SK\_3\_4), 5x5 kernels are clearly imposed with more emphasis if the target object becomes larger (1.0x -> 1.5x). </p>

More details of attention distributions on specific images are as follows:

<div align="center"> <img src="https://github.com/implus/SKNet/blob/master/figures/pics_attention_3_scales.png"> </div>

Citation

If you use Selective Kernel Convolution in your research, please cite the paper:

@inproceedings{li2019selective,
  title={Selective Kernel Networks},
  author={Li, Xiang and Wang, Wenhai and Hu, Xiaolin and Yang, Jian},
  journal={IEEE Conference on Computer Vision and Pattern Recognition},
  year={2019}
}