monai.UNETR
A U-shaped 3D segmentation network with a vision transformer encoder and a convolutional decoder.
Medical imaging · 388 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Medical imaging
- Parameters
- 121.1M
- Operations
- 388
- Framework
- PyTorch
- Recurrent
- No
- Published
- WACV 2022
- Cited by
- 3,548 (as of 19 October 2026)
- Authors
- Ali Hatamizadeh, Yucheng Tang, Vishwesh Nath and others
- Source
- monai 1.5.2
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m7464
- Graph hash
- db48086385855928e6ffbaed7e1b3226056a5e95476b96ac9d80376d7075d158
- Skeleton hash
- fca106071adddd71128e46dd64d5ed6f89b864f17571fe5efc874fcee233227a
- Architecture hash
- 00826d544f0e06654786a1e9128f7da589fd3137d4ecd016c92b47a53836b3fe
- Diagram SHA-256
- f8a7e4447a817e9eea4d9bf5781352a9903e2cc842534cf6e9694ab8e71a24e3
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
monai.networks.nets.unetr.UNETR(in_channels=1, out_channels=14, img_size=[96, 96, 96], feature_size=16, hidden_size=768, mlp_dim=3072, num_heads=12, proj_type='perceptron', norm_name='instance', conv_block=True, res_block=True, dropout_rate=0.0, spatial_dims=3)
What it is
UNETR, short for UNEt TRansformers, uses a transformer as the encoder to learn sequence representations of a 3D volume while keeping the U-shaped encoder-decoder layout. The motivation is that the locality of convolutional layers in the usual fully convolutional networks limits their ability to learn long-range spatial dependencies. Inspired by transformers in natural language processing, the paper reformulates volumetric segmentation as a sequence-to-sequence prediction problem.
A linear layer projects the flattened 3D patches into a K-dimensional embedding space that stays constant throughout the transformer layers. No class token is added, since the transformer backbone is designed for semantic segmentation rather than classification. The decoder is convolutional rather than transformer-based because, the authors argue, transformers learn global information well but cannot properly capture localized information. Intermediate transformer representations are merged with that decoder through skip connections at multiple resolutions to predict the segmentation.
The paper validates the model on the Beyond The Cranial Vault (BTCV) dataset for multi-organ segmentation and on the Medical Segmentation Decathlon (MSD) brain tumor and spleen tasks. At the time, the authors reported UNETR leading the BTCV leaderboard and outperforming competing approaches on MSD. The paper reports 92.58M parameters and 41.19G FLOPs for its BTCV model.
Key idea. UNETR connects a pure transformer encoder over 3D patches to a convolutional decoder through skip connections at several resolutions to segment volumetric medical images.
- unetr
- unet transformers
- transformer segmentation
- 3d medical image segmentation
- btcv
- monai
- vit encoder
- multi-organ segmentation
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{hatamizadeh2021unetrtransformers3dmedical,
title={UNETR: Transformers for 3D Medical Image Segmentation},
author={Ali Hatamizadeh and Yucheng Tang and Vishwesh Nath and Dong Yang and Andriy Myronenko and Bennett Landman and Holger Roth and Daguang Xu},
year={2021},
eprint={2103.10504},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2103.10504},
}