{"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/part-aware-transformer-for-generalizable","title":"Part-Aware Transformer for Generalizable Person Re-identification","arxiv_id":"2308.03322","date":"2023-08-07","proceeding":"ICCV 2023 1","authors":["Hao Ni","Yuke Li","Lianli Gao","Heng Tao Shen","Jingkuan Song"],"abstract":"Domain generalization person re-identification (DG-ReID) aims to train a model on source domains and generalize well on unseen domains. Vision Transformer usually yields better generalization ability than common CNN networks under distribution shifts. However, Transformer-based ReID models inevitably over-fit to domain-specific biases due to the supervised learning strategy on the source domain. We observe that while the global images of different IDs should have different features, their similar local parts (e.g., black backpack) are not bounded by this constraint. Motivated by this, we propose a pure Transformer model (termed Part-aware Transformer) for DG-ReID by designing a proxy task, named Cross-ID Similarity Learning (CSL), to mine local visual information shared by different IDs. This proxy task allows the model to learn generic features because it only cares about the visual similarity of the parts regardless of the ID labels, thus alleviating the side effect of domain-specific biases. Based on the local similarity obtained in CSL, a Part-guided Self-Distillation (PSD) is proposed to further improve the generalization of global features. Our method achieves state-of-the-art performance under most DG ReID settings. Under the Market$\\to$Duke setting, our method exceeds state-of-the-art by 10.9% and 12.8% in Rank1 and mAP, respectively. The code is available at https://github.com/liyuke65535/Part-Aware-Transformer.","url_abs":"https://arxiv.org/abs/2308.03322v2","url_pdf":"https://arxiv.org/pdf/2308.03322v2.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":"part-aware-transformer-for-generalizable","repo_url":"https://github.com/liyuke65535/part-aware-transformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"generalizable-person-re-identification","task_name":"Generalizable Person Re-identification"},{"task_slug":"person-re-identification","task_name":"Person Re-Identification"}],"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":"csl","method_name":"CSL"},{"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=2308.03322","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.03322"}},"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/liyuke65535/part-aware-transformer","reach":null}],"summary":{"ran":6,"ran_fixture":2,"ran_honours":1,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":11,"ran":10,"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":11,"samples":[{"code_sha256_prefix":"2aa128c579ccd5db","entry":"HybridEmbed","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2aa128c579ccd5db"}},{"code_sha256_prefix":"7189d211c6b5f196","entry":"IBN","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7189d211c6b5f196"}},{"code_sha256_prefix":"bab7cbe90bb8e688","entry":"PatchEmbed_conv_stem","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bab7cbe90bb8e688"}},{"code_sha256_prefix":"e8bb8aca7955b6a2","entry":"PatchEmbed_overlap","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e8bb8aca7955b6a2"}},{"code_sha256_prefix":"9143fd74c66cf68d","entry":"_no_grad_trunc_normal_","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9143fd74c66cf68d"}},{"code_sha256_prefix":"497b3a8f87f729a0","entry":"generate_2d_mask","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"497b3a8f87f729a0"}},{"code_sha256_prefix":"a2cffb864424b936","entry":"part_Attention","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a2cffb864424b936"}},{"code_sha256_prefix":"61e1c40207443890","entry":"part_Attention_Block","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"61e1c40207443890"}},{"code_sha256_prefix":"ddb7a42a8f713424","entry":"resize_pos_embed_part_vit","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddb7a42a8f713424"}},{"code_sha256_prefix":"ba6277edefa610aa","entry":"trunc_normal_","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ba6277edefa610aa"}},{"code_sha256_prefix":"f81ae10aa60fc000","entry":"part_Attention_ViT","repo":"liyuke65535/part-aware-transformer","repo_kind":"official","path":"model/backbones/vit_pytorch.py","file_url":"https://github.com/liyuke65535/part-aware-transformer/blob/HEAD/model/backbones/vit_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f81ae10aa60fc000"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}