Downloads · 30 days
0
mokshhere/skin-lesion-segformer-gate2
skin-lesion-segformer-gate2 is a image segmentation model from mokshhere. 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 other.
Two SegFormer-MiT-B2 checkpoints from a step-matched comparison of real-only vs. diffusion-augmented training for skin-lesion segmentation, on the official ISIC 2018 Task 1 test set (1000 images).
Downloads · 30 days
0
Access
Public
Updated Aug 14, 2026
Repo size
594 MB
Likes
0
Public
Click a slice to open those files.
.pt594 MB · 100%
From the Hugging Face model README
Two SegFormer-MiT-B2 checkpoints from a step-matched comparison of real-only vs. diffusion-augmented training for skin-lesion segmentation, on the official ISIC 2018 Task 1 test set (1000 images).
paper/paper_draft.md in the code repo, §4.2| Folder | Training data | Steps | Dice (native) | IoU | HD95@512 | NSD@2 |
|---|---|---|---|---|---|---|
real_only | 2594 real ISIC 2018 training images | 32,400 (100 epochs) | 90.39 | 83.79 | 32.27 | 22.0 |
hard_synthetic_augmented | real + quality-filtered hard-mask-conditioned synthetic pairs | 32,400 (step-matched) | 89.01 | 81.54 | 34.09 | 16.7 |
Both runs use identical optimiser steps (32,400 = 2594⁄8 × 100), so the 1.38-Dice gap is not confounded by the augmented run simply seeing more gradient updates. Real-only training wins — consistent with two prior negative results on this exact question earlier in the same project (U-Net and a custom decoder both also lost Dice from the same kind of synthetic augmentation). Seed 1337, single seed per configuration.
Each folder contains best.pt (checkpoint at the epoch with the best validation Dice,
used for the numbers above) and last.pt (final-epoch checkpoint).
import torch
import segmentation_models_pytorch as smp
model = smp.Segformer(encoder_name="mit_b2", classes=1)
state = torch.load("real_only/best.pt", map_location="cpu")
model.load_state_dict(state["model"] if "model" in state else state)
model.eval()
Check config.json / summary.json in each folder for the exact training configuration
and final metrics; loading code matches src/models/registry.py and
src/engine/trainer.py in the code repo.
Encoder pretrained via segmentation_models_pytorch's mit_b2 (SegFormer/MiT) ImageNet
weights — check that library's upstream licensing before commercial use. Trained and
fine-tuned on ISIC 2018 Task 1 (CC0 masks, publicly released dermoscopy images).
Research artifacts from a benchmark measurement study. Do not use for diagnosis or any clinical decision-making.