Luna-CT_scanes — model weights
Trained weights for the lung-nodule segmentation experiments in github.com/ganiesenov/Luna-CT_scanes. Training code, metrics and the full protocol live in that repo; this repo only holds the checkpoints.
All files are the best-validation-Dice checkpoints, saved as plain PyTorch
state_dicts (no optimizer state).
Files
| Path | Model | Input |
|---|---|---|
seed{1,2,42}/UNet_ResNet34_best.pth |
smp.Unet, ResNet34 encoder |
1×512×512 |
seed{1,2,42}/UNetPP_ResNet34_best.pth |
smp.UnetPlusPlus, ResNet34 encoder |
1×512×512 |
seed{1,2,42}/MANet_ResNet34_best.pth |
smp.MAnet, ResNet34 encoder |
1×512×512 |
seed{1,2,42}/AttentionUNet_scratch_best.pth |
Attention U-Net (custom, models.py) |
1×512×512 |
seed{1,2,42}/VanillaUNet_scratch_best.pth |
Vanilla U-Net (custom, models.py) |
1×512×512 |
cascade/cascade_unet_best.pth |
smp.Unet, ResNet34 — ROI model of the detect→segment cascade |
1×256×256 |
seedN = the seed of the patient-level train/val/test split (70/15/15) and weight init.
Everything else (data, architecture, hyper-parameters) is identical across seeds.
The cascade model was trained once, on the seed-42 split.
Test Dice (LIDC consensus masks, TTA)
| Model | seed 1 | seed 2 | seed 42 | mean ± std |
|---|---|---|---|---|
| UNetPP_ResNet34 | 0.744 | 0.664 | 0.688 | 0.699 ± 0.041 |
| UNet_ResNet34 | 0.723 | 0.664 | 0.703 | 0.697 ± 0.030 |
| AttentionUNet_scratch | 0.709 | 0.654 | 0.683 | 0.682 ± 0.028 |
| VanillaUNet_scratch | 0.717 | 0.607 | 0.634 | 0.652 ± 0.057 |
| MANet_ResNet34 | 0.200 | 0.216 | 0.189 | 0.202 ± 0.013 |
MANet_ResNet34 did not converge on any seed (
lr=3e-4, constant prediction). Its weights are included for completeness only — do not use them as a working model.
Cascade ROI model, per-nodule Dice on the test set (1293 nodules, ground-truth box localization): 0.888 vs 0.728 for the full-slice U-Net in the same window.
Usage
from huggingface_hub import hf_hub_download
import models # models.py from this repo
path = hf_hub_download("ganiesen/Luna-CT_scanes-weights", "seed42/UNet_ResNet34_best.pth")
model = models.load("UNet_ResNet34", path) # or "cascade" for cascade/cascade_unet_best.pth
Requires torch and segmentation-models-pytorch (trained with smp 0.5.0, torch 2.11).
Preprocessing (must match training): single-channel axial CT slice, HU clipped to
[-1000, 400] and scaled to 0–255 (uint8), resized to 512×512, then divided by 255 →
float tensor of shape (N, 1, 512, 512). The models output logits; apply sigmoid
and threshold at 0.5. For the cascade model the input is a square crop of 1.6× the
nodule bounding box, resized to 256×256.
Data
Trained on LIDC-IDRI / LUNA16 scans; a pixel is positive if ≥2 of up to 4 radiologists outlined it. Research use only — not a medical device.