← all repositories
4uiiurz1/pytorch-nested-unet

UNet++ in PyTorch: slightly better, much more nested

A straightforward PyTorch reimplementation of the UNet++ paper for medical image segmentation, with training scripts and a modest IoU bump on a classic nuclei dataset.

1k stars Python Computer VisionML Frameworks
pytorch-nested-unet
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

This repo implements UNet++ (Nested U-Net), a denser variant of the classic U-Net for image segmentation. It ships with training and evaluation scripts for the 2018 Data Science Bowl nuclei dataset, plus support for custom multi-class datasets with arbitrary image and mask extensions.

The interesting bit

The “nested” part means dense skip connections between encoder and decoder at multiple scales — the paper’s bet is that this helps gradients flow and features reuse better than plain U-Net. Whether that translates to real gains is debatable: on the README’s own DSB2018 numbers, vanilla U-Net hits 0.839 IoU while Nested U-Net reaches 0.842, and deep supervision nudges it to 0.843. The architecture is more complex; the improvement is incremental.

Key highlights

  • Supports PyTorch 1.x and multi-class segmentation (recent additions per the README)
  • Optional Lovász hinge loss for boundary-sensitive segmentation tasks
  • Simple CLI: train.py --arch NestedUNet with dataset and loss flags
  • Includes preprocessing script for DSB2018 data structure
  • MIT licensed

Caveats

  • README benchmarks are on 96×96 crops only; no full-resolution or other dataset results shown
  • Deep supervision gives the best IoU (0.843) but worse loss (0.362) than without — the tradeoff isn’t discussed
  • Installation instructions pin Python 3.6 and CUDA 10.1, which are fairly dated

Verdict

Worth a look if you need a working UNet++ baseline to compare against, or if you’re reproducing medical segmentation papers. Skip it if you already have a tuned U-Net and don’t need the extra skip-connection complexity for a ~0.5% IoU gain.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.