We investigate a hybrid semantic network (HSNet) that adopts both the advantages of transformer and convolutional neural networks (CNN), aiming to improve polyp segmentation. The HSNet contains a cross-semantic attention module (CSA), a hybrid semantic complementary module (HSC), and a multi-scale prediction module (MSP).
The details of this project are presented in the following paper:
HSNet: A Hybrid Semantic Network for Polyp Segmentation [CIBM'22]
Wenchao Zhang, Chong Fu, Yu Zheng, Fangyuan Zhang, Yanli Zhao, and Chiu-Wing Sham
Python 3.8
Pytorch 1.7.1
torchvision 0.8.2
Download the training and test datasets and move them into ./dataset/
, see Google Drive/Baidu Drive [code:dr1h].
Download the pre-trained model from Google Drive/Baidu Drive [code:w4vk], and then put it in the ./pretrained_pth
folder for initialization.
Clone the repository
git clone https://github.com/baiboat/HSNet.git
cd HSNet
bash train.sh
cd HSNet
bash test.sh
cd HSNet
python Eval.py
Baidu Drive [code:hsnt] and put the model in directory ./model_pth
.
The source code is free for research and education use only. Any commercial use should get formal permission first.
Any advice is welcomed ^.^; please get in touch with sylgzwc@163.com or pull the question.
Thanks PraNet, EAGRNet, MSEG and Polyp-PVT for serving as building blocks of HSNet.
If you find our work/code interesting, welcome to cite our paper >^.^<
@article{zhang2022hsnet,
title={HSNet: A hybrid semantic network for polyp segmentation},
author={Zhang, Wenchao and Fu, Chong and Zheng, Yu and Zhang, Fangyuan and Zhao, Yanli and Sham, Chiu-Wing},
journal={Computers in Biology and Medicine},
volume={150},
pages={106173},
year={2022},
publisher={Elsevier}
}