This repo. is the official implementation of 'SPA: Self-Peripheral-Attention for Central-Peripheral Interactions in Endoscopic Image Classification and Segmentation'.
Authors: Xiangzuo Huo, Shengwei Tian, Yongxu Yang, Long Yu, Wendong Zhang, Aolun Li.
Enjoy the code and find its convenience to produce more awesome works!
- Requirements:
- python3
- pytorch 1.12.0
- torchvision 0.13.0
- Train:
- Prepare the required images and store them in categories, set up training image folders and validation image folders respectively
- Run
python train.py
- Resume train:
- Modify
parser.add_argument('--RESUME', type=bool, default=True)
inpython train.py
- Run
python train.py
- Test:
- Run
python test.py
- Predict:
- Run
python predict.py
Run tensorboard --logdir runs --port 6006
to view training progress
Some of the codes in this repo are borrowed from:
If you find our paper/code is helpful, please consider citing:
@article{huo2024spa,
title={SPA: Self-Peripheral-Attention for central--peripheral interactions in endoscopic image classification and segmentation},
author={Huo, Xiangzuo and Tian, Shengwei and Yang, Yongxu and Yu, Long and Zhang, Wendong and Li, Aolun},
journal={Expert Systems with Applications},
volume={245},
pages={123053},
year={2024},
publisher={Elsevier}
}