{"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/affine-medical-image-registration-with-coarse","title":"Affine Medical Image Registration with Coarse-to-Fine Vision Transformer","arxiv_id":"2203.15216","date":"2022-03-29","proceeding":"CVPR 2022 1","authors":["Tony C. W. Mok","Albert C. S. Chung"],"abstract":"Affine registration is indispensable in a comprehensive medical image registration pipeline. However, only a few studies focus on fast and robust affine registration algorithms. Most of these studies utilize convolutional neural networks (CNNs) to learn joint affine and non-parametric registration, while the standalone performance of the affine subnetwork is less explored. Moreover, existing CNN-based affine registration approaches focus either on the local misalignment or the global orientation and position of the input to predict the affine transformation matrix, which are sensitive to spatial initialization and exhibit limited generalizability apart from the training dataset. In this paper, we present a fast and robust learning-based algorithm, Coarse-to-Fine Vision Transformer (C2FViT), for 3D affine medical image registration. Our method naturally leverages the global connectivity and locality of the convolutional vision transformer and the multi-resolution strategy to learn the global affine registration. We evaluate our method on 3D brain atlas registration and template-matching normalization. Comprehensive results demonstrate that our method is superior to the existing CNNs-based affine registration methods in terms of registration accuracy, robustness and generalizability while preserving the runtime advantage of the learning-based methods. The source code is available at https://github.com/cwmok/C2FViT.","url_abs":"https://arxiv.org/abs/2203.15216v2","url_pdf":"https://arxiv.org/pdf/2203.15216v2.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":"affine-medical-image-registration-with-coarse","repo_url":"https://github.com/cwmok/C2FViT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-registration","task_name":"Image Registration"},{"task_slug":"medical-image-registration","task_name":"Medical Image Registration"},{"task_slug":"template-matching","task_name":"Template Matching"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.15216","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.15216"}},"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":"deterministic:regex_extraction","url":"https://github.com/cwmok/C2FViT","reach":null}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":"bf29ef6ce3743333","entry":"Attention","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf29ef6ce3743333"}},{"code_sha256_prefix":"ee31bd105e60acec","entry":"Block","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee31bd105e60acec"}},{"code_sha256_prefix":"f768b350c4d1889b","entry":"DWConv","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f768b350c4d1889b"}},{"code_sha256_prefix":"526bd04b3cf88443","entry":"Mlp","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"526bd04b3cf88443"}},{"code_sha256_prefix":"b2401b2776d0e143","entry":"OverlapPatchEmbed","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b2401b2776d0e143"}},{"code_sha256_prefix":"428a348bbc0b3ffc","entry":"AffineCOMTransform","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"428a348bbc0b3ffc"}},{"code_sha256_prefix":"a3a51457605805c3","entry":"C2F_ViT_stage","repo":"cwmok/C2FViT","repo_kind":"official","path":"Code/C2FViT_model.py","file_url":"https://github.com/cwmok/C2FViT/blob/HEAD/Code/C2FViT_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3a51457605805c3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}