Home

Awesome

<!-- #region -->

Polyp-DDPM: Diffusion-Based Semantic Polyp Synthesis for Enhanced Segmentation

Polyp-DDPM comparison

Overview

Welcome to the official PyTorch implementation of our recent study, "Polyp-DDPM: Diffusion-Based Semantic Polyp Synthesis for Enhanced Segmentation". Building on our previous research, "Med-DDPM: Conditional Diffusion Models for Semantic 3D Brain MRI Synthesis", we extend our methodology to the semantic synthesis of 2D colored medical images. We introduce Polyp-DDPM, a novel diffusion-based method specifically designed to generate images of gastrointestinal (GI) tract polyps from segmentation masks. This method seeks to enhance polyp segmentation by addressing the significant challenges of data scarcity, high annotation costs, and privacy issues commonly encountered in medical imaging.

Getting Started

Prerequisites

Training

Our training script is highly flexible, offering a variety of parameters to customize your training process:

Example Command

Start training with default parameters by running: python3 train.py

Or customize your training setup with your preferred parameters.

Model Weights

Download our pretrained model weights using the link below:
Download Model Weights

Once downloaded, place the file in the models directory.

Inference

Customize your inference process with these command-line arguments:

Example Command

For default parameter inference, execute: python3 inference.py To tailor the inference process, adjust the flags accordingly, for example: python3 inference.py -i dataset/custom_test/masks -e custom_exports -w models/custom_model.pt --input_size 256

References

If you find our work useful for your research, please consider citing our papers:

@misc{dorjsembe2024polypddpm,
title={Polyp-DDPM: Diffusion-Based Semantic Polyp Synthesis for Enhanced Segmentation},
author={Zolnamar Dorjsembe and Hsing-Kuo Pao and Furen Xiao},
year={2024},
eprint={2402.04031},
archivePrefix={arXiv},
primaryClass={cs.CV}
}

@ARTICLE{10493074,
author={Dorjsembe, Zolnamar and Pao, Hsing-Kuo and Odonchimed, Sodtavilan and Xiao, Furen},
journal={IEEE Journal of Biomedical and Health Informatics},
title={Conditional Diffusion Models for Semantic 3D Brain MRI Synthesis},
year={2024},
volume={28},
number={7},
pages={4084-4093},
doi={10.1109/JBHI.2024.3385504}
}

Our code is based on our previous work: Med-DDPM. For more details, see the paper https://arxiv.org/abs/2305.18453 and the repository https://github.com/mobaidoctor/med-ddpm.

Acknowledgement:

Our initial source code is based on denoising-diffusion-pytorch and guided-diffusion.

<!-- #endregion -->