polyp-unet-r34-baseline

U-Net with a ResNet34 encoder, trained for polyp segmentation on the standard benchmark (900 Kvasir-SEG + 550 CVC-ClinicDB) and evaluated on five centres across three countries.

Training recipe: baseline. Random seed: 3.

This is the median seed, not the best

5 models were trained with this recipe, differing only in random seed. Their scores on ETIS-Larib ranged from 0.6258 to 0.6979. This checkpoint is the median of those 5, deliberately.

Publishing the best of 5 would contradict the finding the project reports: that seed variance on this benchmark is large enough to manufacture apparent improvements. A model card showing a cherry-picked run would be an example of the problem, not a result.

Performance

test set centre this checkpoint 5-seed mean ± std
Kvasir seen 0.8832 0.9014 ± 0.0132
CVC-ClinicDB seen 0.8836 0.8996 ± 0.0103
CVC-ColonDB unseen 0.7134 0.7291 ± 0.0155
CVC-300 unseen 0.8665 0.8768 ± 0.0179
ETIS-LaribPolypDB unseen 0.6839 0.6661 ± 0.0355

Dice, computed per image and averaged. "Seen" means the centre contributed images to training. Evaluation is at 352×352 rather than native resolution, which caps achievable Dice at roughly 0.97 and makes these numbers not exactly comparable to published results.

Usage

import torch
import segmentation_models_pytorch as smp
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file

path = hf_hub_download("saadaamir14/polyp-unet-r34-baseline", "model.safetensors")
model = smp.Unet("resnet34", encoder_weights=None, in_channels=3, classes=1)
model.load_state_dict(load_file(path))
model.eval()

# input: RGB, resized to 352x352, normalised with ImageNet statistics
# output: one logit per pixel; sigmoid then threshold at 0.5

Limitations

This model is a research artifact. It is not a medical device and must not be used for clinical decisions.

  • Trained on 1,305 images from two centres. Performance at a new hospital is not predictable from these numbers.
  • Drops roughly 0.2 Dice moving from centres seen in training to an unseen centre in another country.
  • Small polyps are the dominant failure mode. At 352×352 the smallest ETIS polyp occupies 133 pixels, and the network downsamples 32×.
  • CVC-ClinicDB scores are optimistic; that dataset's train and test frames come from overlapping colonoscopy videos.

Full protocol, statistics and the complete limitations list: https://github.com/saad-aamir/polyp-segmentation

Citation

Datasets belong to their original authors. Please cite Kvasir-SEG, CVC-ClinicDB, CVC-ColonDB, CVC-300 and ETIS-Larib if you use them.

Downloads last month
14
Safetensors
Model size
24.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using saadaamir14/polyp-unet-r34-baseline 1