Luca Mossina,¹ Corentin Friedrich¹
¹ IRT Saint Exupéry, Toulouse, France.
- Research Lab: DEEL, Dependable, Explainable & Embeddable Learning for trustworthy AI.
- Lab's open-source software and papers
We use morphological operations (dilation, sequences of dilations, etc.) to add a margin
To make this statistically rigorous, we use conformal prediction: using calibration data, we find the minimal number of dilations
This gives us a prediction set
This is a nonparametric method, which does not require any training or hyperparameter tuning, and is model-agnostic: it can be applied to any segmentation model, including deep learning models, classical methods, or even human annotators.
-
requirement: having a set of (previously unseen) annotated calibration pairs
$(X_i, Y_i)_{i=1}^n$ , that are i.i.d. samples from the same distribution as the test data.
The following example illustrates the idea of conformal prediction with morphological operations.
In the following image, we have a ground truth mask (in red) and a predicted mask (in blue). In purple, we have the pixels that were correctly predicted. The remaining red ones, are false negatives, i.e. pixels that belong to the ground truth but were not predicted.
The animation shows a sequence of four dilations by a
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}
}