Downloads · 30 days
9
18% of all-time downloads
saadaamir14/polyp-unet-r34-baseline
polyp-unet-r34-baseline is a image segmentation model from saadaamir14. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
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.
Downloads · 30 days
9
18% of all-time downloads
All-time downloads
51
Public
Parameters
24.5M
97.8 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors97.8 MB · 100%
From the Hugging Face model README
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.
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.
| 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.
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
This model is a research artifact. It is not a medical device and must not be used for clinical decisions.
Full protocol, statistics and the complete limitations list: https://github.com/saad-aamir/polyp-segmentation
Datasets belong to their original authors. Please cite Kvasir-SEG, CVC-ClinicDB, CVC-ColonDB, CVC-300 and ETIS-Larib if you use them.