Open-source project
MrGiovanni/UNetPlusPlus avatar
MrGiovanni/UNetPlusPlus

UNet++ from MrGiovanni/UNetPlusPlus: what the official Keras and PyTorch code gives you

[IEEE TMI Best Paper Award] Official Implementation for UNet++

2,697 stars563 forksPythonNOASSERTION

At a glance

What is it?
UNet++ is a nested U-Net for medical image segmentation. The repository ships two official implementations, one in Keras and one in PyTorch, and the README points elsewhere for training pipelines.
Who is it for?
Adopt UNet++ when you are segmenting medical images and want the architecture the IEEE TMI paper describes, in Keras or PyTorch, from the authors' own repository. Skip it if you need a packaged training pipeline, since the README documents only the architecture and points to third-party repositories for more.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 91 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • MrGiovanni/UNetPlusPlus2,697 ★ · +10
Star history
Repository2026-10-012026-11-24
MrGiovanni/UNetPlusPlus2.7k2.7k

10 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The two U-Net limitations UNet++ was built to remove

A plain U-Net has one encoder, one decoder and a single skip connection at each resolution. Two things follow from that. The depth is fixed by whoever wrote the code, and nobody knows in advance whether four downsampling steps or five is the right number for a given dataset. The skip connections are also blunt: a decoder block receives the encoder feature map at the same resolution and nothing else, so features produced at other scales reach the decoder only after passing through the bottleneck.

UNet++ attacks both. The README describes it as "U-Nets of varying depths whose decoders are densely connected at the same resolution through redesigned skip pathways." The nested structure means you are not choosing one depth at design time; the sub-networks of different depths sit inside the same graph. This matters most in medical imaging, where annotated volumes are scarce and the difference between a three-level and a five-level model is often the difference between usable and not. The repository is aimed at researchers and engineers working on CT, MRI and similar segmentation tasks who are comfortable reading a model definition file and adapting it.

How the nested decoder and the redesigned skip pathways fit together

The mechanism is a grid. Nodes are indexed by depth along the encoder and by position along the skip pathway, and each decoder node at a given resolution receives the outputs of every earlier node at that same resolution, plus the upsampled output of the node below it. That dense connection at one resolution is what the README means by "densely connected at the same resolution."

Two consequences follow from the layout. First, gradients reach the encoder through many short paths rather than one long one, because each intermediate node has its own route back. Second, the deep supervision that the papers describe lets the intermediate nodes produce their own segmentation maps, which is how the varying-depth sub-networks are trained together.

The repository keeps the two frameworks apart. The top-level entries are keras/ and pytorch/, with no shared training script between them, so the architecture is the deliverable and the training loop is yours. The README lists other implementations by Pavel Yakubovskiy, 4ui_iurz1, ZJUGiveLab and Siddhartha, plus a deprecated one by MontaEllis, which tells you the authors expect people to look beyond this repository for end-to-end pipelines.

Getting the code and building a first model

There are no install instructions in the README beyond the directory names. The repository is a source checkout, not a package on an index, so the first step is cloning it and working inside the folder for your framework.

bash
git clone https://github.com/MrGiovanni/UNetPlusPlus.git
cd UNetPlusPlus
ls keras pytorch

The listing should show the model files for each framework. From there the README gives no runnable entry point, no argument parser and no example dataset, so the first real use is importing the model definition into your own script and feeding it tensors shaped for your data. Because the README does not document the expected input shape, the number of output classes or the naming of the constructor arguments, read the model file itself before wiring it up; that file is the only specification the repository provides.

If you want a training pipeline rather than an architecture, the README points to the third-party repositories listed under "Other implementation." That is the honest boundary of this project: it gives you the network, and the surrounding code is somebody else's.

Where UNet++ is the wrong choice

The clearest limitation is the one the repository does not address: there is no training code, no data loader, no loss function and no evaluation script in the README. If your goal is to segment a dataset this week, this repository is a component, not a solution, and you will spend your time on plumbing that the third-party implementations have already written.

The second limitation is memory and compute. Dense connections at each resolution mean every node at a given level consumes the feature maps of all its predecessors at that level. For a fixed input size the graph is larger than a plain U-Net of comparable depth, and the cost grows with the number of nested levels you keep. On small 2D slices this is manageable; on 3D volumes it is the constraint that decides your batch size.

Third, the depth question the architecture was designed to answer is answered at training time, not for free. The README describes the design, not a procedure for pruning the nested levels after training, so the practical benefit of having several depths in one graph depends on how you supervise and select them. Treat the nested structure as capacity you have to manage, not as an automatic improvement over U-Net.

UNet++ against a plain U-Net and against Attention U-Net

The comparison the README invites is with the original U-Net, and the difference is structural rather than a matter of tuning. A U-Net decoder node sees one encoder feature map at the same resolution. A UNet++ decoder node sees the encoder map plus every decoder node already computed at that resolution. If your segmentation targets vary in size and the boundary between structures is thin, that extra context at each level is the reason to pick the nested version.

Attention U-Net takes a different route to a similar goal. Instead of adding decoder nodes, it adds attention gates that weight the encoder features before they cross the skip connection, so the network learns which regions to pass forward. That keeps the graph close to a standard U-Net and adds parameters at the gates. UNet++ changes the topology and keeps the connections unweighted. Neither is strictly better; the choice comes down to whether you want more nodes or more selective connections, and the README does not run that comparison for you.

The README also lists segmentation_models.pytorch, which wraps UNet++ as one option among several segmentation architectures. If you want a library with a consistent API across models, that is a different starting point from this repository, which is the reference implementation.

Maintenance, licence and what upgrading costs

The repository is not archived, and the last push was on 2026-08-25, so it is current. There are no releases in the repository, which means there is no versioned artefact to pin and no changelog to read before you update. Upgrading therefore means pulling the master branch and diffing the model files yourself. If you have forked the code and modified it, budget for that reconciliation each time you sync.

The licence is the part to read carefully. The repository has a LICENSE file at the top level, but the licence identifier is NOASSERTION, meaning GitHub could not classify it automatically. The README adds that the work was supported by NIH awards and that "This is a patent-pending technology." That combination is unusual for a research repository and is worth a conversation with whoever handles licensing at your organisation before you ship anything built on it. Nothing here is legal advice, and the LICENSE file is the document that governs your use.

Editorial conclusion

Adopt UNet++ when you are segmenting medical images and want the architecture the IEEE TMI paper describes, in Keras or PyTorch, from the authors' own repository. Skip it if you need a packaged training pipeline, since the README documents only the architecture and points to third-party repositories for more. Before committing, open keras/ and pytorch/ and check which layers each one defines, then read the LICENSE file at the repository root, because the README states the technology is patent-pending and the licence identifier is NOASSERTION.

Frequently asked questions

What are the key differences between U-Net and UNet++?

U-Net has a single skip connection at each resolution and a fixed depth. UNet++ nests U-Nets of varying depths and densely connects the decoders at the same resolution through redesigned skip pathways, which the README says addresses the unknown optimal depth and the restrictive skip connection design.

What is UNet++ used for?

It is a nested U-Net architecture for medical image segmentation, covering modalities such as CT and MRI according to the repository topics. The README frames it as a fix for two limitations of the original U-Net rather than as a general-purpose vision model.

Is there an official UNet++ PyTorch implementation?

Yes. The repository contains a pytorch/ directory alongside keras/, and the README calls both the official implementations of UNet++ from the authors' papers. Other PyTorch versions by third parties are also listed under "Other implementation."

How do I install UNet++ from this repository?

There is no install step documented. The repository is a source checkout with keras/ and pytorch/ directories, so you clone it and import the model definition from the folder for your framework. The README gives no package name or pip command.

Can I use UNet++ for commercial products?

The licence identifier is NOASSERTION and the README states the technology is patent-pending, so the terms are not something the README settles. Read the LICENSE file at the repository root and raise the patent statement with your organisation's licensing contact.

Official sources

  1. Issues
  2. MrGiovanni/UNetPlusPlus on GitHub
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mrgiovanni-unetplusplus.svg)](https://hysenlabs.com/projects/mrgiovanni-unetplusplus)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/mrgiovanni-unetplusplus.svg)](https://hysenlabs.com/projects/mrgiovanni-unetplusplus)

Was this useful?