Code repository for the paper:
Mossina L. & Friedrich L. (2025). Conformal Prediction for Image Segmentation Using Morphological Prediction Sets. arXiv preprint arXiv:2503.05618.
- Lab: DEEL, at IRT Saint Exupéry, Toulouse, France.
- Lab's open source software and papers
Use morphological operations (dilation) to add a margin around a predicted (binary) segmentation mask, such that the ground-truth mask is covered with high probability via conformal prediction.
In the synthetic example below, the red pixels (bold contours) are false negatives, that is, they belong to the ground truth but were not predicted. The animation shows five sequential dilations by a (3X3) cross structuring element, which expand the margin of the predicted mask (darker blue). Three iterations is the minimal number of iterations needed, i.e. the nonconformity score: all missing pixels are recovered (shown in orange).
The directory notebooks contains complete examples for the datasets:
- WBC and OASIS, using the UniverSeg segmentation model
- polyps tumors dataset, using PraNet (we use precomputed predictions as distributed by A. Angelopoulos.
Starting points for datasets:
Models used:
@article{Mossina_2025_conformal,
title={Conformal Prediction for Image Segmentation Using Morphological Prediction Sets},
author={Mossina, Luca and Friedrich, Corentin},
journal={arXiv preprint arXiv:2503.05618},
year={2025}
}