All models

LeViT-UNet

A U-Net for medical image segmentation with a LeViT transformer encoder and a convolutional decoder.

Medical imaging · 553 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (39 KB)

Open in a new tab

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

Parameters
19.9M
Operations
553
Framework
PyTorch
Recurrent
No
Published
Lecture Notes in Computer Science (arXiv 2021)
Cited by
262 (as of 4 November 2026)
Authors
Guoping Xu, Xingrong Wu, Xuan Zhang, Xinwei He
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m17887
Graph hash
018c025c9e7a32c61627bb98ad6055e8e115f9cc3afd27e30054c469a65b14ad
Skeleton hash
be9261d202f8040ebcf4b54668ff4932576fe818ec1eab305909d1f022033a6b
Architecture hash
ea531ddf3504a611b1eb9b6653c9d5a252bdcb5c7cf202135b25218632926904
Diagram SHA-256
185d5662fdc2e0a1b455d0f4a7e4fdc20db376800baa6eb7ae3f615ce0749a1a
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

What it is

LeViT-UNet is a medical image segmentation network that places a LeViT Transformer module inside the U-Net architecture. The paper argues that CNN encoder-decoders such as U-Net are limited in learning global context and long-range spatial relations because convolution is local. It adds that Transformer-based segmentation methods need a lot of computation, which keeps them out of real-time applications.

The encoder is built from LeViT transformer blocks and the decoder from convolution blocks. Feature maps at several scales, from both the transformer blocks and the convolutional blocks of LeViT, reach the decoder through skip connections. The decoder recovers full resolution with cascaded upsampling blocks, each made of two 3x3 convolution layers, a batch normalization layer, a ReLU layer and an upsampling layer. The paper designs three variants, LeViT-UNet-128s, LeViT-UNet-192 and LeViT-UNet-384, named for the number of channels fed to the first transformer block.

On the Synapse multi-organ CT dataset the paper reports 78.53% mean DSC and 16.84mm mean HD for LeViT-UNet-384. The LeViT transformer backbones were pretrained on ImageNet-1k. The authors note that the input is down-scaled to 1/16 resolution before the Transformer blocks to reduce computation, which may affect segmentation performance.

Key idea. The paper builds a U-Net whose encoder is LeViT, passing multi-scale transformer and convolutional features to a convolutional decoder through skip connections.

  • LeViT-UNet
  • LeViT_UNet
  • medical image segmentation
  • transformer U-Net
  • fast segmentation
  • Synapse multi-organ segmentation
  • ACDC cardiac segmentation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{xu2021levitunetmakefasterencoders,
      title={LeViT-UNet: Make Faster Encoders with Transformer for Medical Image Segmentation}, 
      author={Guoping Xu and Xingrong Wu and Xuan Zhang and Xinwei He},
      year={2021},
      eprint={2107.08623},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2107.08623}, 
}