Home

Awesome

SCNet

The official PyTorch implementation of CVPR 2020 paper "Improving Convolutional Networks with Self-Calibrated Convolutions"

Update

Introduction

we present a novel self-calibrated convolution that explicitly expands fields-of-view of each convolutional layer through internal communications and hence enriches the output features. In particular, unlike the standard convolutions that fuse spatial and channel-wise information using small kernels (e.g., 3 × 3), our self-calibrated convolution adaptively builds long-range spatial and inter-channel dependencies around each spatial location through a novel self-calibration operation. Thus, it can help CNNs generate more discriminative representations by explicitly incorporating richer information. Our self-calibrated convolution design is simple and generic, and can be easily applied to augment standard convolutional layers without introducing extra parameters and complexity. Extensive experiments demonstrate that when applying our self-calibrated convolution into different backbones, the baseline models can be significantly improved in a variety of vision tasks, including image recognition, object detection, instance segmentation, and keypoint detection, with no need to change network architectures.

<div align="center"> <img src="https://github.com/backseason/SCNet/blob/master/figures/SC-Conv.png"> </div> <p align="center"> Figure 1: Diagram of self-calibrated convolution. </p>

Useage

Requirement

PyTorch>=0.4.1

Examples

git clone https://github.com/backseason/SCNet.git

from scnet import scnet50
model = scnet50(pretrained=True)

Input image should be normalized as follows:

normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                  std=[0.229, 0.224, 0.225])

(The pretrained model should be downloaded automatically by default. You may also choose to download them manually by the links listed below.)

Pretrained models

model#ParamsMAddsFLOPstop-1 errortop-5 errorLink 1Link 2
SCNet-5025.56M4.0G7.9G22.196.08GoogleDriveBaiduYun pwd: 95p5
SCNet-50_v1d25.58M4.7G9.4G19.534.68GoogleDriveBaiduYun pwd: hmmt
SCNet-10144.57M7.2G14.4G21.065.75GoogleDriveBaiduYun pwd: 38oh

Applications (more coming soon...)

Object detection

We use Faster R-CNN architecture with feature pyramid networks (FPNs) as baselines. We adopt the widely used mmdetection framework to run all our experiments. Performances are reported on the COCO minival set.

backboneAPAP.5AP.75APsAPmAPl
ResNet-5037.659.440.421.941.248.4
SCNet-5040.862.744.524.444.853.1
SCNet-50_v1d41.862.945.524.845.354.8
ResNet-10139.961.243.523.543.951.7
SCNet-10142.063.745.524.446.354.6

Instance segmentation

We use Mask R-CNN architecture with feature pyramid networks (FPNs) as baselines. We adopt the widely used mmdetection framework to run all our experiments. Performances are reported on the COCO minival set.

backboneAPAP.5AP.75APsAPmAPl
esNet-5035.056.537.418.338.248.3
SCNet-5037.259.939.517.840.354.2
SCNet-50_v1d38.560.641.320.842.052.6
ResNet-10136.758.639.319.340.350.9
SCNet-10138.461.041.018.241.656.6

Other applications such as Instance segmentation, Object detection, Semantic segmentation, and Human keypoint detection can be found on https://mmcheng.net/scconv/.

Citation

If you find this work or code is helpful in your research, please cite:

@inproceedings{liu2020scnet,
 title={Improving Convolutional Networks with Self-Calibrated Convolutions},
 author={Jiang-Jiang Liu and Qibin Hou and Ming-Ming Cheng and Changhu Wang and Jiashi Feng},
 booktitle={IEEE CVPR},
 year={2020},
}

Contact

If you have any questions, feel free to contact me via: j04.liu(at)gmail.com.