{"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/hrformer-high-resolution-transformer-for","title":"HRFormer: High-Resolution Transformer for Dense Prediction","arxiv_id":"2110.09408","date":"2021-10-18","proceeding":null,"authors":["Yuhui Yuan","Rao Fu","Lang Huang","WeiHong Lin","Chao Zhang","Xilin Chen","Jingdong Wang"],"abstract":"We present a High-Resolution Transformer (HRFormer) that learns high-resolution representations for dense prediction tasks, in contrast to the original Vision Transformer that produces low-resolution representations and has high memory and computational cost. We take advantage of the multi-resolution parallel design introduced in high-resolution convolutional networks (HRNet), along with local-window self-attention that performs self-attention over small non-overlapping image windows, for improving the memory and computation efficiency. In addition, we introduce a convolution into the FFN to exchange information across the disconnected image windows. We demonstrate the effectiveness of the High-Resolution Transformer on both human pose estimation and semantic segmentation tasks, e.g., HRFormer outperforms Swin transformer by $1.3$ AP on COCO pose estimation with $50\\%$ fewer parameters and $30\\%$ fewer FLOPs. Code is available at: https://github.com/HRNet/HRFormer.","url_abs":"https://arxiv.org/abs/2110.09408v3","url_pdf":"https://arxiv.org/pdf/2110.09408v3.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":"hrformer-high-resolution-transformer-for","repo_url":"https://github.com/HRNet/HRFormer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"multi-person-pose-estimation","task_name":"Multi-Person Pose Estimation"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"high","task_name":"Vocal Bursts Intensity Prediction"}],"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":"convolution","method_name":"Convolution"},{"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":"stochastic-depth","method_name":"Stochastic Depth"},{"method_slug":"swin-transformer","method_name":"Swin Transformer"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"HRFormer-B","rank_in_archive_order":503,"of":1060,"metrics":{"GFLOPs":"13.7","Number of params":"50.3M","Top 1 Accuracy":"82.8%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"HRFormer-T","rank_in_archive_order":827,"of":1060,"metrics":{"GFLOPs":"1.8","Number of params":"8.0M","Top 1 Accuracy":"78.5%"},"uses_additional_data":false},{"leaderboard":"/sota/multi-person-pose-estimation-on-crowdpose","task":"Multi-Person Pose Estimation","dataset":"CrowdPose","model":"HRFormer-B","rank_in_archive_order":7,"of":28,"metrics":{"AP Easy":"80.0","AP Hard":"62.4","AP Medium":"73.5","mAP @0.5:0.95":"72.4"},"uses_additional_data":false},{"leaderboard":"/sota/multi-person-pose-estimation-on-ochuman","task":"Multi-Person Pose Estimation","dataset":"OCHuman","model":"HRFormer-B","rank_in_archive_order":4,"of":8,"metrics":{"AP50":"81.4","AP75":"67.1","Validation AP":"62.1"},"uses_additional_data":false},{"leaderboard":"/sota/pose-estimation-on-aic","task":"Pose Estimation","dataset":"AIC","model":"HRFormer (HRFomer-B)","rank_in_archive_order":3,"of":10,"metrics":{"AP":"34.4","AP50":"78.3","AP75":"24.8","AR":"38.7","AR50":"80.9"},"uses_additional_data":false},{"leaderboard":"/sota/pose-estimation-on-aic","task":"Pose Estimation","dataset":"AIC","model":"HRFormer (HRFomer-S)","rank_in_archive_order":7,"of":10,"metrics":{"AP":"31.6","AP75":"20.9","AR":"35.8","AR50":"78.0"},"uses_additional_data":false},{"leaderboard":"/sota/pose-estimation-on-coco-test-dev","task":"Pose Estimation","dataset":"COCO test-dev","model":"HRFormer-B","rank_in_archive_order":17,"of":47,"metrics":{"AP":"76.2","AP50":"92.7","AP75":"83.8","APL":"82.3","APM":"72.5","AR":"81.2"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.09408","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.09408"}},"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/HRNet/HRFormer","reach":null}],"summary":{"ran":7,"unverified":4},"by_repo_kind":{"official":{"samples":11,"ran":7,"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":"70a3b60f25883442","entry":"Bottleneck","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"70a3b60f25883442"}},{"code_sha256_prefix":"25d275a698577c77","entry":"BottleneckDWP","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"25d275a698577c77"}},{"code_sha256_prefix":"dc476e7863dfa60a","entry":"HighResolutionTransformerModule","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dc476e7863dfa60a"}},{"code_sha256_prefix":"f3ae82b7f0fa5762","entry":"LocalPermuteModule","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"f3ae82b7f0fa5762"}},{"code_sha256_prefix":"7511c8343dacb63e","entry":"MlpDWBN","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7511c8343dacb63e"}},{"code_sha256_prefix":"7f956321be67f123","entry":"MultiheadAttention","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f956321be67f123"}},{"code_sha256_prefix":"f1a2da4545324be4","entry":"PadBlock","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"f1a2da4545324be4"}},{"code_sha256_prefix":"174ded5efb8d90bb","entry":"GeneralTransformerBlock","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"174ded5efb8d90bb"}},{"code_sha256_prefix":"a219e0495156d384","entry":"HighResolutionTransformer","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"a219e0495156d384"}},{"code_sha256_prefix":"77bb6724a9d5ee58","entry":"MultiheadAttentionRPE","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"77bb6724a9d5ee58"}},{"code_sha256_prefix":"dd8ca007aa495f2f","entry":"MultiheadISAAttention","repo":"HRNet/HRFormer","repo_kind":"official","path":"cls/models/hrt.py","file_url":"https://github.com/HRNet/HRFormer/blob/HEAD/cls/models/hrt.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":"dd8ca007aa495f2f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}