by Jun Wei, Yiwen Hu, Ruimao Zhang, Zhen Li, S.Kevin Zhou, Shuguang Cui
Accurate polyp segmentation is of great importance for colorectal cancer diagnosis. However, even with a powerful deep neural network, there still exists three big challenges that impede the development of polyp segmentation. (i) Samples collected under different conditions show inconsistent colors, causing the feature distribution gap and overfitting issue; (ii) Due to repeated feature downsampling, small polyps are easily degraded; (iii) Foreground and background pixels are imbalanced, leading to a biased training. To address the above issues, we propose the Shallow Attention Network (SANet) for polyp segmentation. Specifically, to eliminate the effects of color, we design the color exchange operation to decouple the image contents and colors, and force the model to focus more on the target shape and structure. Furthermore, to enhance the segmentation quality of small polyps, we propose the shallow attention module to filter out the background noise of shallow features. Thanks to the high resolution of shallow features, small polyps can be preserved correctly. In addition, to ease the severe pixel imbalance for small polyps, we propose a probability correction strategy (PCS) during the inference phase. Note that even though PCS is not involved in the training phase, it can still work well on a biased model and consistently improve the segmentation performance. Quantitative and qualitative experimental results on five challenging benchmarks confirm that our proposed SANet outperforms previous state-of-the-art methods by a large margin and achieves a speed about 72FPS.
git clone https://github.com/weijun88/SANet.git
cd SANet/
SANet
├─data
│ ├─test
│ │ ├─CVC-300
│ │ │ ├─image
│ │ │ └─mask
│ │ ├─CVC-ClinicDB
│ │ │ ├─image
│ │ │ └─mask
│ │ ├─CVC-ColonDB
│ │ │ ├─image
│ │ │ └─mask
│ │ ├─ETIS-LaribPolypDB
│ │ │ ├─image
│ │ │ └─mask
│ │ └─Kvasir
│ │ ├─image
│ │ └─mask
│ └─train
│ ├─image
│ └─mask
├─eval
│ └─prediction
│ └─SANet
│ ├─CVC-300
│ ├─CVC-ClinicDB
│ ├─CVC-ColonDB
│ ├─ETIS-LaribPolypDB
│ └─Kvasir
├─fig
├─res
└─src
└─out
The training and testing datasets come from PraNet. Download these datasets and unzip them into data
folder
- If you want to test the performance of SANet, please download our trained model (Baidu: km9q | Google) into
src/out
folder - If you want to train your own model, please download the pretrained model into
res
folder
cd src/
python3 train.py
cd src
python3 test.py
- After testing, predictions of testing dataset will be saved in
eval/SANet/
folder.
- To evaluate the performace of SANet, please use MATLAB to run
main.m
cd eval
matlab
main
-
trained model: Baidu: km9q | Google
-
predictions: Baidu:598i | Google
- If you find this work is helpful, please cite our paper
@inproceedings{SANet,
title = {Shallow Attention Network for Polyp Segmentation},
author = {Wei, Jun and Hu, Yiwen and Zhang, Ruimao and Li, Zhen and Zhou, S.Kevin and Cui, Shuguang},
booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
pages = {699--708},
year = {2021},
organization = {Springer}
}