This repository contains the implementation of our MICCAI 2023 submission "Certification of Deep Learning Models for Medical Image Segmentation".
We evaluated our method on five medical image segmentation datasets. Three lung datasets comprising both single and multi-class segmentation, one dermatology dataset and one polyp dataset. Follow the instructions below to download the required data:
The dataset is obtained from the ISIC 2018 challenge and can be downloaded here.
Download the training and validation input and GT for Task 1 and extract the folders as follows:
datasets/
lesion/
ISIC2018_Task1-2_Validation_Input/
ISIC2018_Task1-2_Training_Input/
ISIC2018_Task1_Validation_GroundTruth/
ISIC2018_Task1_Training_GroundTruth/
Then, navigate to datasets/lesion
and run python make_dataset.py
.
The data is obtained from the CVC-ClinicDB challenge. Processed png images can be found here.
Download the dataset and add it as follows:
datasets/
polyp/
CVC-ClinicDB/
Original/
612.png
...
Ground Truth/
...
Then run python datasets/polyp/split_dataset.py
.
Download the three lung datasets by following the links provided below:
Place them in the project as follows:
datasets/
jsrt/
train/
input/
...
label/
...
valid/
input/
...
label/
...
test/
input/
...
label/
...
shen/
...
mount/
...
Follow the same hierarchy for folder mount
and shen
which will contain respectively Montgomery and Shenzhen datastets.
The Denoising Diffusion Probabilistic Models used in the paper is based on openai/guided-diffusion.
Download the class unconditional pretrained model here and place it in the models
directory.
First start by installing the requirements of the segmentation by using the environment.yml
.
If you don't want to use conda, the main requirements for the project are:
- PyTorch 1.7.1
- PyTorch ignite 0.4.3
- segmentation_models_pytorch 0.1.3
- Albumentations 0.5.2
- OpenCV 4.5.1.48
python -u test_certify_jsrt.py --weights weights/jsrt_deeplab/best_model.pt --model deeplab --dataset jsrt --multi --sigma 0.25 --denoise
python -u test_certify_jsrt.py --weights weights/jsrt_deeplab/best_model.pt --model deeplab --dataset jsrt --multi --sigma 0.25
python -u test_certify.py --weights weights/lesion_unet/best_model.pt --model unet --dataset lesion --sigma 0.25 --denoise
python -u test_certify.py --weights weights/lesion_unet/best_model.pt --model unet --dataset lesion --sigma 0.25
python -u test_certify.py --weights weights/polyp_resunetpp/best_model.pt --model resunetpp --dataset polyp --sigma 0.25 --denoise
python -u test_certify.py --weights weights/polyp_resunetpp/best_model.pt --model resunetpp --dataset polyp --sigma 0.25
Similar commands can be used for single-class lung segmentation (montgomery and shenzhen datasets).
If you find this work useful, please consider citing it:
@InProceedings{laousy23miccai,
author="Laousy, Othmane and Araujo, Alexandre and Chassagnon, Guillaume and Paragios, Nikos and Revel, Marie-Pierre and Vakalopoulou, Maria",
editor="Greenspan, Hayit and Madabhushi, Anant and Mousavi, Parvin and Salcudean, Septimiu and Duncan, James and Syeda-Mahmood, Tanveer and Taylor, Russell",
title="Certification of Deep Learning Models for Medical Image Segmentation",
booktitle="Medical Image Computing and Computer Assisted Intervention -- MICCAI 2023",
year="2023",
publisher="Springer Nature Switzerland",
address="Cham",
pages="611--621",
isbn="978-3-031-43901-8"
}