Papers › TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation

TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation

8 Feb 2021arXiv:2102.04306archive 2025-07-28

Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L. Yuille, Yuyin Zhou

Medical image segmentation is an essential prerequisite for developing healthcare systems, especially for disease diagnosis and treatment planning. On various medical image segmentation tasks, the u-shaped architecture, also known as U-Net, has become the de-facto standard and achieved tremendous success. However, due to the intrinsic locality of convolution operations, U-Net generally demonstrates limitations in explicitly modeling long-range dependency. Transformers, designed for sequence-to-sequence prediction, have emerged as alternative architectures with innate global self-attention mechanisms, but can result in limited localization abilities due to insufficient low-level details. In this paper, we propose TransUNet, which merits both Transformers and U-Net, as a strong alternative for medical image segmentation. On one hand, the Transformer encodes tokenized image patches from a convolution neural network (CNN) feature map as the input sequence for extracting global contexts. On the other hand, the decoder upsamples the encoded features which are then combined with the high-resolution CNN feature maps to enable precise localization. We argue that Transformers can serve as strong encoders for medical image segmentation tasks, with the combination of U-Net to enhance finer details by recovering localized spatial information. TransUNet achieves superior performances to various competing methods on different medical applications including multi-organ segmentation and cardiac segmentation. Code and models are available at https://github.com/Beckschen/TransUNet.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2102.04306")

Code

Syntology Ran 6 of 7 code samples harvested from 2 repositories linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: community (archive-listed): 6 samples from 2 repositories, 5 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

22 repositories listed; official and paper-mentioned ones first.

Beckschen/TransUNet officialmentioned in papermentioned on GitHubpytorch report
04RR/SOTA-Vision mentioned on GitHubpytorch report
KenzaB27/TransUnet mentioned on GitHubtf report
MargeryLab/TransUNet mentioned on GitHubpytorch report
aris-mukherjee/TransUNet-modified mentioned on GitHubpytorch report
awsaf49/TransUnet-tf mentioned on GitHubtf report
gail-yxie/adawac mentioned on GitHubpytorch report
hendraet/synthesis-in-style mentioned on GitHubpytorch report
hongkunsun/paratranscnn mentioned on GitHubpytorch report
ljollans/trunet mentioned on GitHubpytorch report
maloadba/mgenseg_2d mentioned on GitHubjax report
mirthai/csa-net mentioned on GitHubpytorch report
mkara44/transunet_pytorch mentioned on GitHubpytorch report
yykzjh/pmfsnet mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 6 ran; 2 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
1unverified

Licence: 7 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

conv1x1 maloadba/mgenseg_2d/model/configs/mbrats/Transunet.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · b0f916df39e78ae5 · report
conv3x3 maloadba/mgenseg_2d/model/configs/mbrats/Transunet.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 4e5bf13dbdc4f008 · report
dice_score ljollans/trunet/TRUNet_network/trunet_train.py community (archive-listed) ran · honoured contract fingerprinted GPL-3.0 (copyleft) · pointer only · 991bd6a9b4b39241 · report
one_hot_encoder ljollans/trunet/TRUNet_network/trunet_train.py community (archive-listed) ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 7e0f38dc41fa04e1 · report
to_one_arr_encoding ljollans/trunet/TRUNet_network/trunet_train.py community (archive-listed) ran · honoured contract fingerprinted GPL-3.0 (copyleft) · pointer only · 492de094e1db0458 · report
run maloadba/mgenseg_2d/mbrats_segmentation_transunet.py community (archive-listed) unverified no licence file found · pointer only · 879df9465f2b5e0f · report
np2th identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 7d8eaf5537f699e4 · report

Tasks

Cardiac SegmentationDecoderImage SegmentationMedical Image SegmentationOrgan SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Medical Image Segmentation ACDC TransUNet Dice Score 0.8971 #6 of 6 Archive leaderboard report
Medical Image Segmentation Automatic Cardiac Diagnosis Challenge (ACDC) TransUNet Avg DSC 89.71 #17 of 20 Archive leaderboard report
Medical Image Segmentation Automatic Cardiac Diagnosis Challenge (ACDC) R50-ViT-CUP Avg DSC 87.57 #19 of 20 Archive leaderboard report
Medical Image Segmentation Automatic Cardiac Diagnosis Challenge (ACDC) R50-AttnUNet Avg DSC 86.75 #20 of 20 Archive leaderboard report
Medical Image Segmentation Synapse multi-organ CT TransUNet Avg DSC 77.48 #23 of 23 Archive leaderboard report
Medical Image Segmentation Synapse multi-organ CT TransUNet Avg HD 31.69 #23 of 23 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEConcatenated Skip ConnectionConvolutionDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMax PoolingMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual ConnectionSoftmaxTransformerU-Net

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections