All models

TransUNet_R50_ViT_B_16

A medical image segmentation model that pairs a Transformer encoder with a U-Net style upsampling decoder.

Medical imaging · 200 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 (22 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
3.3M
Operations
200
Framework
PyTorch
Recurrent
No
Published
2021
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
m3189
Graph hash
8ce07441a7fcb71c298557a6b8548871f6cbe65becec1f3ffc8012f0fc0e67ac
Skeleton hash
f45d4e2128ca1c8e71944416c02a1b844309dd7493e14b3ab19f634675dbfacb
Architecture hash
be73ca2021d980cc37a4e4f6003720dd60f32800dbda7ba52e8a77b56953b4e0
Diagram SHA-256
fb686b7e7e69cfa6905c4d82166194caf68f6cbdb34dc758deb23b079ed84f6a
TorchLens version
2.35.3
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

menagerie.classics.ri_transunet_seg:build_transunet_r50: build({})

What it is

This model uses the hybrid encoder, which combines ResNet-50 and ViT and which the paper denotes R50-ViT.

About this model's family

TransUNet is a medical image segmentation model that combines Transformers and U-Net. The paper starts from two limits: U-Net, because convolution operations are local, has trouble modeling long-range dependency, while Transformers can localize poorly because they lack low-level details.

In the proposed design a Transformer encodes tokenized image patches from a CNN feature map to extract global context, and a decoder upsamples the encoded features and combines them with high-resolution CNN feature maps for precise localization. The decoder is a cascaded upsampler (CUP), which consists of multiple upsampling steps that decode the hidden feature into the final segmentation mask. The paper builds the encoder two ways: a pure Transformer encoder that adopts ViT with 12 Transformer layers, and a hybrid encoder that combines ResNet-50 and ViT.

On the Synapse multi-organ CT dataset, the paper reports that the hybrid encoder with CUP improves on the ViT encoder with CUP by a further 3.43% in DSC and 3.24 mm in Hausdorff distance.

Key idea. TransUNet encodes patches of a CNN feature map with a Transformer for global context and decodes them with high-resolution CNN features for precise localization in medical image segmentation.

  • transunet
  • medical image segmentation
  • multi-organ segmentation
  • cardiac segmentation
  • cascaded upsampler
  • cnn-transformer hybrid
  • skip connections
  • transunet r50-vit-b_16
  • transunet vit-b_16

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