SegFormer-MiT-B2 β€” Real vs. Synthetic-Augmented (Step-Matched Comparison)

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).

What's in this repo

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).

Usage

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.

License

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).

Not intended for clinical use

Research artifacts from a benchmark measurement study. Do not use for diagnosis or any clinical decision-making.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support