Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation

Swin-Unet replaces convolutions with Transformer blocks for medical image segmentation

  • Problem CNN U-shaped networks struggle with long-range context. Each convolution sees only a small neighbourhood, so distant parts of an image are hard to relate.
  • Method Swin-Unet keeps the U-shape and skip connections but builds it from Swin Transformer blocks. Images are cut into 4 by 4 patches, and shifted-window attention lets each stage relate tokens across the image.
  • Results Swin-Unet scored 79.13 DSC on Synapse CT, compared to 77.48 for TransUnet. Its Hausdorff distance was 21.55, against 31.69 for TransUnet.

Why CNN segmenters miss global context

U-Net pairs a convolutional encoder that goes deeper with a decoder that climbs back to the input resolution. Skip connections carry encoder features across to the decoder, and this design spawned many variants such as Res-UNet, U-Net++ and UNet3+. The weak point is locality: a convolution only sees a small neighbourhood at each step, so relating distant parts of an image is hard.

Atrous convolutions, self-attention and image pyramids try to fix this, but they still have limits on long-range dependencies.

Transformers model long-range relations through attention, which is why researchers brought them into vision. ViT applied a Transformer to image patches, but it needed pre-training on a large dataset, and DeiT made training on ImageNet practical. The Swin Transformer then offered a hierarchical backbone that reached strong results on several vision tasks.

What remained open was whether a pure Transformer could serve as the full U-shape for segmentation, and that is the question this paper takes up.

Swin Transformer blocks as the building unit

The core idea is to build the whole U-shape, including the bottleneck, out of Swin Transformer blocks, so every stage attends over tokens instead of convolving. Before any block runs, the image is cut into non-overlapping 4 × 4 patches, and each patch holds 4 × 4 × 3 = 48 values. A linear embedding maps each patch to dimension C, so each patch becomes one token that the encoder can process.

Each Swin Transformer block has a LayerNorm layer, a multi-head self-attention module, residual connections and a two-layer MLP with GELU. Blocks come in pairs: the first applies window-based attention (W-MSA), and the second applies shifted-window attention (SW-MSA), which moves the window grid. Each pair runs as \( \hat{z}_l = \text{W-MSA}(\text{LN}(z_{l-1})) + z_{l-1} \) and \( z_l = \text{MLP}(\text{LN}(\hat{z}_l)) + \hat{z}_l \), followed by the same two steps with SW-MSA.

Inside each window, attention is \( \text{Attention}(Q,K,V)=\text{SoftMax}(QK^{T}/\sqrt{d}+B)V \), where Q, K and V hold the patches of one window and B is a bias matrix added before the softmax.

Encoder, bottleneck and decoder shapes

The merging layer gathers the four patches of each 2 × 2 neighbourhood, concatenates them, and applies a linear layer that brings the dimension to twice the original. The bottleneck has only two Swin blocks at unchanged size, because the authors note that a very deep Transformer is hard to converge.

The decoder mirrors the encoder, but it swaps merging for patch expanding layers that double the resolution. Encoder features at matching scales are concatenated with the decoder features, and a linear layer keeps the width equal to the up-sampled features. A final 4× patch expanding layer restores W × H, and a linear projection turns the features into per-pixel predictions.

Synapse results compared with TransUnet and U-Net

On the Synapse CT data, Swin-Unet scored 79.13 DSC and a 21.55 Hausdorff distance. The closest rival in the table, TransUnet, scored 77.48 DSC and 31.69 HD. So the overlap score is higher, and the boundary error drops from 31.69 to 21.55.

The authors ran their own U-Net and Att-UNet, and the table places Swin-Unet's DSC above the 77.77 of Att-UNet. They say the DSC gain over Att-UNet and TransUnet is small, but the HD improvement of about 4% and 10% points to better edge predictions. The evaluation uses 18 training and 12 testing samples, with averages over eight abdominal organs.

ACDC cardiac MRI results

On ACDC, Swin-Unet reached 90.00 average DSC, compared to 89.71 for TransUnet. The ACDC split is 70 training, 10 validation and 20 testing samples, and only average DSC is reported. The authors read this as evidence of good generalization to MR input, but the result is a single averaged score with no boundary metric.

Which design choices carry the gains

Skip connections were varied from 0 to 3, placed at the 1/4, 1/8 and 1/16 resolution scales. DSC rose from 72.46 with no skip connections to 79.13 with three. The authors kept three, which indicates that skip connections help a pure Transformer as well.

The patch expanding layer scored 79.13, compared to 77.63 for transposed convolution and 76.15 for bilinear interpolation. So the learned rearrangement beats both convolutional and interpolated up-sampling in this single Synapse comparison.

Testing at 384 × 384 input raised DSC from 79.13 to 81.12, with patch size kept at 4. The authors judged the extra computation too costly and kept 224 × 224 inputs. The base-scale model reached 79.25, compared to 79.13 for tiny, so the tiny model was adopted for the accuracy-speed trade-off.

Limitations

The encoder and decoder start from Swin Transformer weights pre-trained on ImageNet, which the authors call a possibly suboptimal scheme. The experiments use 2D images only, while most medical image data is 3D, so 3D segmentation is left to future work. The ablations were run on Synapse only, and ACDC was evaluated with average DSC alone.

Paper info

Authors
Hu Cao, Yueyue Wang, Joy Chen, Dongsheng Jiang, Xiaopeng Zhang, Qi Tian, Manning Wang
Venue
arXiv · Preprint
First published
2021-5-12
Added
2026-11-11
Updated
2021-5-12
Version
v1
arXiv
2105.05537
Category
eess.IV · cs.CV
Original paper terms
CC BY 4.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Hu Cao, Yueyue Wang, Joy Chen, Dongsheng Jiang, Xiaopeng Zhang, Qi Tian, Manning Wang (2021). Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation. arXiv:2105.05537v1. https://arxiv.org/abs/2105.05537v1

BibTeX
@misc{cao2021swin,
  title = {{Swin-Unet: Unet-like Pure Transformer for Medical Image Segmentation}},
  author = {Hu Cao and Yueyue Wang and Joy Chen and Dongsheng Jiang and Xiaopeng Zhang and Qi Tian and Manning Wang},
  year = {2021},
  eprint = {2105.05537},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.05537v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up