{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/unetformer-a-unified-vision-transformer-model","title":"UNetFormer: A Unified Vision Transformer Model and Pre-Training Framework for 3D Medical Image Segmentation","arxiv_id":"2204.00631","date":"2022-04-01","proceeding":null,"authors":["Ali Hatamizadeh","Ziyue Xu","Dong Yang","Wenqi Li","Holger Roth","Daguang Xu"],"abstract":"Vision Transformers (ViT)s have recently become popular due to their outstanding modeling capabilities, in particular for capturing long-range information, and scalability to dataset and model sizes which has led to state-of-the-art performance in various computer vision and medical image analysis tasks. In this work, we introduce a unified framework consisting of two architectures, dubbed UNetFormer, with a 3D Swin Transformer-based encoder and Convolutional Neural Network (CNN) and transformer-based decoders. In the proposed model, the encoder is linked to the decoder via skip connections at five different resolutions with deep supervision. The design of proposed architecture allows for meeting a wide range of trade-off requirements between accuracy and computational cost. In addition, we present a methodology for self-supervised pre-training of the encoder backbone via learning to predict randomly masked volumetric tokens using contextual information of visible tokens. We pre-train our framework on a cohort of $5050$ CT images, gathered from publicly available CT datasets, and present a systematic investigation of various components such as masking ratio and patch size that affect the representation learning capability and performance of downstream tasks. We validate the effectiveness of our pre-training approach by fine-tuning and testing our model on liver and liver tumor segmentation task using the Medical Segmentation Decathlon (MSD) dataset and achieve state-of-the-art performance in terms of various segmentation metrics. To demonstrate its generalizability, we train and test the model on BraTS 21 dataset for brain tumor segmentation using MRI images and outperform other methods in terms of Dice score. Code: https://github.com/Project-MONAI/research-contributions","url_abs":"https://arxiv.org/abs/2204.00631v2","url_pdf":"https://arxiv.org/pdf/2204.00631v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"unetformer-a-unified-vision-transformer-model","repo_url":"https://github.com/project-monai/research-contributions","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"brain-tumor-segmentation","task_name":"Brain Tumor Segmentation"},{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"medical-image-analysis","task_name":"Medical Image Analysis"},{"task_slug":"medical-image-segmentation","task_name":"Medical Image Segmentation"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"tumor-segmentation","task_name":"Tumor Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2204.00631","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.00631"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/project-monai/research-contributions","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":1,"ran_fixture":1,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":7,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"7b0ecad70df7f175","entry":"dice","repo":"project-monai/research-contributions","repo_kind":"official","path":"DAE/BTCV_Finetune/trainer.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/DAE/BTCV_Finetune/trainer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7b0ecad70df7f175"}},{"code_sha256_prefix":"80ada9d6ef99fa0d","entry":"window_partition","repo":"project-monai/research-contributions","repo_kind":"official","path":"DAE/BTCV_Finetune/swin_unetr.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/DAE/BTCV_Finetune/swin_unetr.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"80ada9d6ef99fa0d"}},{"code_sha256_prefix":"68a071c415424018","entry":"window_reverse","repo":"project-monai/research-contributions","repo_kind":"official","path":"DAE/BTCV_Finetune/swin_unetr.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/DAE/BTCV_Finetune/swin_unetr.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"68a071c415424018"}},{"code_sha256_prefix":"e186c61286fe7b7a","entry":"flatten_sequential","repo":"project-monai/research-contributions","repo_kind":"official","path":"lamp-automated-model-parallelism/unet_pipe.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/lamp-automated-model-parallelism/unet_pipe.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e186c61286fe7b7a"}},{"code_sha256_prefix":"5ccfd39a745a171a","entry":"get_filenames","repo":"project-monai/research-contributions","repo_kind":"official","path":"lamp-automated-model-parallelism/data_utils.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/lamp-automated-model-parallelism/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5ccfd39a745a171a"}},{"code_sha256_prefix":"272fb8446c14a27c","entry":"load_data_and_mask","repo":"project-monai/research-contributions","repo_kind":"official","path":"lamp-automated-model-parallelism/data_utils.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/lamp-automated-model-parallelism/data_utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"272fb8446c14a27c"}},{"code_sha256_prefix":"46dd11eb3cbc8668","entry":"trunc_normal_","repo":"project-monai/research-contributions","repo_kind":"official","path":"DAE/BTCV_Finetune/patchembedding.py","file_url":"https://github.com/project-monai/research-contributions/blob/HEAD/DAE/BTCV_Finetune/patchembedding.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"46dd11eb3cbc8668"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}