How to use from the
Use from the
timm library
import timm

model = timm.create_model("hf-hub:MABERAMABERA/EndoMet-Net", pretrained=True)

EndoMet-Net: endometriosis vs no-pathology classifier for laparoscopic frames (GLENDA v1.0)

Research use only. This is not a medical device and must not be used for clinical decisions.

Given a single laparoscopic video frame, the model estimates whether visible endometriosis is present. It is an ensemble of three ConvNeXt-Tiny models (one per cross-validation fold), initialised from timm/convnext_tiny.fb_in22k_ft_in1k (ImageNet-22k pretraining) and fine-tuned on GLENDA v1.0.

  • Author: MARTIN MAATI MABERA
  • Classes: no_endometriosis, endometriosis
  • Input: RGB frame resized to 384x384, ImageNet normalisation
  • Output: probability per class (mean of the 3 fold models, each averaged with a horizontal flip)

Quick start

pip install timm safetensors torch torchvision pillow
python inference.py frame.jpg

Training data

GLENDA v1.0 (Leibetseder et al., 2020): 5,049 frames used (302 lesion sequences labelled from expert masks, 27 no-pathology sequences; at most 40 evenly spaced frames per sequence), from an estimated 156 surgeries.

Evaluation protocol

  • 3-fold cross-validation, stratified by class and grouped by surgery, so no surgery contributes frames to both training and held-out data within a fold.
  • GLENDA does not provide patient identifiers. Surgeries were approximated as groups of videos with consecutive IDs, merged further when they shared an identical frame (perceptual hash) or a near-identical frame (cosine similarity of ImageNet-pretrained ConvNeXt-T embeddings > 0.95).
  • Metrics are frame-level unless stated; sequence-level scores average predictions over each video sequence.

Results (held-out surgeries, ConvNeXt-T, 3 folds)

Metric (%) Mean ± SD Fold 0 Fold 1 Fold 2
AUC 96.1 ± 4.1 91.3 98.5 98.4
Sensitivity 93.5 ± 4.2 88.8 97.0 94.8
Specificity 89.0 ± 8.6 79.4 96.1 91.6
Macro-F1 89.7 ± 6.3 82.4 94.2 92.3
Balanced accuracy 91.3 ± 6.4 84.1 96.5 93.2
Accuracy 92.5 ± 5.3 86.6 96.9 94.0
Sequence-level macro-F1 84.8 ± 7.5 78.9 93.3 82.2

Each fold model is scored on its own held-out surgeries. The released ensemble averages the three fold models; its performance on new patients is estimated by these cross-validation results and was not measured separately.

Disclosures and limitations

  • Near-duplicate analysis. After grouping, we measured each held-out frame's highest similarity to any training frame (fold 0): 0.0% of held-out frames had a training match above 0.95, 0.4% above 0.93 and 9.2% above 0.90 (median nearest-neighbour similarity 0.862). Visual inspection of the most similar pairs (about 0.94) suggested that a small number of held-out frames may still depict the same surgical scene as training frames under different video IDs. A sensitivity analysis with a stricter threshold (0.92) was not performed for this release, so the reported performance may be slightly optimistic.
  • Model selection. The training epoch was chosen by early stopping on each fold's held-out data, which can also make the reported scores slightly optimistic.
  • Shortcut checks. All frames share one resolution (640x360), and no-pathology video IDs fall within the range of lesion video IDs (no separate recording batch).
  • Shortcut probe and Grad-CAM: not yet performed. We have not yet verified with saliency maps that predictions rely on lesion regions rather than other scene content.
  • Small healthy class. No-pathology frames come from about 18 surgeries, so the specificity estimate rests on few patients.
  • Single source. All data come from one dataset; performance on other hospitals, cameras or populations is unknown. No external validation was performed.
  • Frame labels. Sequence frames inherit the label of the sequence's expert-annotated keyframe; a lesion may be partly hidden or out of view in some frames.

License

CC BY-NC 4.0, following the GLENDA dataset license (non-commercial use only, attribution required). Check the license of the initial weights (timm/convnext_tiny.fb_in22k_ft_in1k) on its model card before reuse.

Citations

  • A. Leibetseder, S. Kletz, K. Schoeffmann, S. Keckstein, J. Keckstein. GLENDA: Gynecologic Laparoscopy Endometriosis Dataset. MultiMedia Modeling (MMM) 2020.
  • Z. Liu et al. A ConvNet for the 2020s. CVPR 2022.
  • R. Wightman. PyTorch Image Models (timm). https://github.com/huggingface/pytorch-image-models
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support