
TransUNet_R50_ViT_B_16
Medical imaging200 ops3.3M params
A medical image segmentation model that pairs a Transformer encoder with a U-Net style upsampling decoder.
Medical imaging · 171 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.
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.
How this diagram was made
menagerie.classics.ri_transunet_seg:build_transunet_vit: build({}) This model uses the pure Transformer encoder, for which the paper adopts ViT with 12 Transformer layers.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.