{"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/learning-granularity-unified-representations","title":"Learning Granularity-Unified Representations for Text-to-Image Person Re-identification","arxiv_id":"2207.07802","date":"2022-07-16","proceeding":null,"authors":["Zhiyin Shao","Xinyu Zhang","Meng Fang","Zhifeng Lin","Jian Wang","Changxing Ding"],"abstract":"Text-to-image person re-identification (ReID) aims to search for pedestrian images of an interested identity via textual descriptions. It is challenging due to both rich intra-modal variations and significant inter-modal gaps. Existing works usually ignore the difference in feature granularity between the two modalities, i.e., the visual features are usually fine-grained while textual features are coarse, which is mainly responsible for the large inter-modal gaps. In this paper, we propose an end-to-end framework based on transformers to learn granularity-unified representations for both modalities, denoted as LGUR. LGUR framework contains two modules: a Dictionary-based Granularity Alignment (DGA) module and a Prototype-based Granularity Unification (PGU) module. In DGA, in order to align the granularities of two modalities, we introduce a Multi-modality Shared Dictionary (MSD) to reconstruct both visual and textual features. Besides, DGA has two important factors, i.e., the cross-modality guidance and the foreground-centric reconstruction, to facilitate the optimization of MSD. In PGU, we adopt a set of shared and learnable prototypes as the queries to extract diverse and semantically aligned features for both modalities in the granularity-unified feature space, which further promotes the ReID performance. Comprehensive experiments show that our LGUR consistently outperforms state-of-the-arts by large margins on both CUHK-PEDES and ICFG-PEDES datasets. Code will be released at https://github.com/ZhiyinShao-H/LGUR.","url_abs":"https://arxiv.org/abs/2207.07802v1","url_pdf":"https://arxiv.org/pdf/2207.07802v1.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":"learning-granularity-unified-representations","repo_url":"https://github.com/zhiyinshao-h/lgur","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"learning-granularity-unified-representations","repo_url":"https://github.com/Galaxfy/ReID-test1","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"person-re-identification","task_name":"Person Re-Identification"},{"task_slug":"nlp-based-person-retrival","task_name":"Text based Person Retrieval"},{"task_slug":"text-based-person-search","task_name":"Text based Person Search"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.07802","atlas_url":"https://app.syntology.ai/?focus=2207.07802","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.07802"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/zhiyinshao-h/lgur","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Galaxfy/ReID-test1","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":3,"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":3,"samples":[{"code_sha256_prefix":"070096906fcee351","entry":"calculate_similarity","repo":"zhiyinshao-h/lgur","repo_kind":"official","path":"train_mydecoder_pixelvit_txtimg_3_bert.py","file_url":"https://github.com/zhiyinshao-h/lgur/blob/HEAD/train_mydecoder_pixelvit_txtimg_3_bert.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"070096906fcee351"}},{"code_sha256_prefix":"fda2f974309660e0","entry":"calculate_similarity_part","repo":"zhiyinshao-h/lgur","repo_kind":"official","path":"train_mydecoder_pixelvit_txtimg_3_bert.py","file_url":"https://github.com/zhiyinshao-h/lgur/blob/HEAD/train_mydecoder_pixelvit_txtimg_3_bert.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fda2f974309660e0"}},{"code_sha256_prefix":"1f03bd2c57665daf","entry":"load_checkpoint","repo":"zhiyinshao-h/lgur","repo_kind":"official","path":"train_mydecoder_pixelvit_txtimg_3_bert.py","file_url":"https://github.com/zhiyinshao-h/lgur/blob/HEAD/train_mydecoder_pixelvit_txtimg_3_bert.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1f03bd2c57665daf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}