{"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/resformer-scaling-vits-with-multi-resolution","title":"ResFormer: Scaling ViTs with Multi-Resolution Training","arxiv_id":"2212.00776","date":"2022-12-01","proceeding":"CVPR 2023 1","authors":["Rui Tian","Zuxuan Wu","Qi Dai","Han Hu","Yu Qiao","Yu-Gang Jiang"],"abstract":"Vision Transformers (ViTs) have achieved overwhelming success, yet they suffer from vulnerable resolution scalability, i.e., the performance drops drastically when presented with input resolutions that are unseen during training. We introduce, ResFormer, a framework that is built upon the seminal idea of multi-resolution training for improved performance on a wide spectrum of, mostly unseen, testing resolutions. In particular, ResFormer operates on replicated images of different resolutions and enforces a scale consistency loss to engage interactive information across different scales. More importantly, to alternate among varying resolutions effectively, especially novel ones in testing, we propose a global-local positional embedding strategy that changes smoothly conditioned on input sizes. We conduct extensive experiments for image classification on ImageNet. The results provide strong quantitative evidence that ResFormer has promising scaling abilities towards a wide range of resolutions. For instance, ResFormer-B-MR achieves a Top-1 accuracy of 75.86% and 81.72% when evaluated on relatively low and high resolutions respectively (i.e., 96 and 640), which are 48% and 7.49% better than DeiT-B. We also demonstrate, moreover, ResFormer is flexible and can be easily extended to semantic segmentation, object detection and video action recognition. Code is available at https://github.com/ruitian12/resformer.","url_abs":"https://arxiv.org/abs/2212.00776v2","url_pdf":"https://arxiv.org/pdf/2212.00776v2.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":"resformer-scaling-vits-with-multi-resolution","repo_url":"https://github.com/ruitian12/resformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"action-recognition-in-videos","task_name":"Action Recognition"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"action-recognition","task_name":"Temporal Action Localization"},{"task_slug":"image-classification","task_name":"image-classification"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.00776","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.00776"}},"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/ruitian12/resformer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":2,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":"bd3578806ecf5ac2","entry":"adjust_learning_rate","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/utils.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd3578806ecf5ac2"}},{"code_sha256_prefix":"8733e0d87f232d11","entry":"mixup_target","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/mix.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/mix.py","link_basis":"harvester_set","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":"8733e0d87f232d11"}},{"code_sha256_prefix":"4728dc2025227bba","entry":"one_hot","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/mix.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/mix.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4728dc2025227bba"}},{"code_sha256_prefix":"3913c620f6926f42","entry":"rand_bbox","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/mix.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/mix.py","link_basis":"harvester_set","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":"3913c620f6926f42"}},{"code_sha256_prefix":"0b4de2aa27a5231b","entry":"build_transform","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/datasets.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/datasets.py","link_basis":"harvester_set","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":"0b4de2aa27a5231b"}},{"code_sha256_prefix":"78ae1a4b51b5b7e6","entry":"img_from_base64","repo":"ruitian12/resformer","repo_kind":"official","path":"image_classification/datasets.py","file_url":"https://github.com/ruitian12/resformer/blob/HEAD/image_classification/datasets.py","link_basis":"harvester_set","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":"78ae1a4b51b5b7e6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}