This repository contains the official implementation of LGPS, a lightweight GAN-based framework for polyp segmentation in colonoscopy images. LGPS achieves state-of-the-art performance with only 1.07 million parameters, making it highly suitable for real-time clinical applications.
Colorectal cancer (CRC) is a major global cause of cancer-related deaths, with early polyp detection and removal during colonoscopy being crucial for prevention. LGPS is a lightweight GAN-based framework designed to address challenges such as:
- High computational costs.
- Difficulty in segmenting small or low-contrast polyps.
- Limited generalizability across datasets.
LGPS incorporates:
- A MobileNetV2 backbone enhanced with modified residual blocks and Squeeze-and-Excitation (SE) modules.
- Convolutional Conditional Random Fields (ConvCRF) for precise boundary refinement.
- A hybrid loss function combining Binary Cross-Entropy, Weighted IoU Loss, and Dice Loss.
For more details, please refer to our paper.
- Lightweight Design: Only 1.07 million parameters, making it 17x smaller than the smallest existing model.
- State-of-the-Art Performance: Achieves a Dice coefficient of 0.7299 and an IoU of 0.7867 on the challenging PolypGen dataset.
- Robust Generalization: Validated on five benchmark datasets, including Kvasir-SEG, CVC-ClinicDB, ETIS, CVC-300, and PolypGen.
- Real-Time Applicability: Suitable for deployment on resource-constrained devices.
- Clone this repository:
git clone https://github.com/Falmi/LGPS.git
- Install dependencies:
pip install -r requirements.txt
- Kvasir-SEG: Download
- CVC-ClinicDB: Download
- ETIS: Download Download
- CVC-300: Download
- PolypGen: Download
Place the datasets in the data/ directory.
- Preprocess your dataset.
cd data python Preprocess_SEG.py python Preprocess_CVC_CliniCDB.py
- Train the model:
python train.py
- Evaluate the model:download the pretrained model from here
python Test.py --data_path "data/CVC-ClinicDB" --model_path "XXX.h5"
- @misc{tesema2025lgpslightweightganbasedapproach, title={LGPS: A Lightweight GAN-Based Approach for Polyp Segmentation in Colonoscopy Images}, author={Fiseha B. Tesema and Alejandro Guerra Manzanares and Tianxiang Cui and Qian Zhang and Moses Solomon and Sean He}, year={2025}, eprint={2503.18294}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2503.18294}, }
- Submited to IEEE Transactions on Medical Imaging.