Abstract
In this work, we focus on text-based person retrieval, which aims to identify individuals based on textual descriptions. Given the significant privacy issues and the high cost associated with manual annotation, synthetic data has become a popular choice for pretraining models, leading to notable advancements. However, the considerable domain gap between synthetic pretraining datasets and real-world target datasets, characterized by differences in lighting, color, and viewpoint, remains a critical obstacle that hinders the effectiveness of the pretrain-finetune paradigm. To bridge this gap, we introduce a unified text-based person retrieval pipeline considering domain adaptation at both image and region levels. In particular, it contains two primary components, i.e., Domain-aware Diffusion (DaD) for image-level adaptation and Multi-granularity Relation Alignment (MRA) for region-level adaptation. Extensive experiments show that our dual-level adaptation method has achieved state-of-the-art results on the CUHK-PEDES, ICFG-PEDES, and RSTPReid datasets, outperforming existing methodologies.
The Challenge of the Domain Gap
Text-based person retrieval is a critical task for public safety, enabling the identification of specific individuals within large image databases using natural language descriptions (e.g., "a man in a green jacket and black pants"). While synthetic data has emerged as a solution to the scarcity and privacy concerns of real-world datasets, it introduces a significant "pretraining gap." Synthetic images often lack the noise, lighting variations, and stylistic nuances of real-world surveillance footage, leading to poor generalization when models are deployed in the field.
Methodology: Dual-Level Adaptation
To address these challenges, we propose a two-pronged approach that aligns domains at both the image and region levels.
1. Domain-aware Diffusion (DaD)
Instead of relying on generic synthetic data, we utilize a diffusion-based generation process. By fine-tuning a diffusion model (specifically ControlNet) on the target real-world domain, we generate the Synthetic Domain-Aligned (SDA) dataset. This dataset, containing roughly 1.3 million image-text pairs, maintains the structural content of synthetic sources but adopts the visual style—including lighting, texture, and sensor noise—of real-world surveillance data like CUHK-PEDES. This image-level adaptation ensures that the model is pretrained on data that closely mirrors its eventual target.
2. Multi-granularity Relation Alignment (MRA)
While global image-text matching is standard, it often overlooks fine-grained details essential for distinguishing similar-looking individuals. MRA introduces region-level alignment:
- Region-Phrase Contrastive (RPC) & Matching (RPM): We employ off-the-shelf detectors (Grounding DINO) to automatically label specific body regions (e.g., "blue jacket," "black shorts") in synthetic images. The model is then trained to explicitly align these visual regions with their corresponding textual phrases.
- Unified Training: This region-level focus is integrated with standard global objectives like Image-Text Contrastive (ITC) learning and Masked Language Modeling (MLM), creating a robust, multi-scale understanding of person descriptions.
Experimental Results
Our method was evaluated on three major benchmarks: CUHK-PEDES, ICFG-PEDES, and RSTPReid. The results demonstrate that the combination of DaD and MRA sets a new state-of-the-art (SOTA) for the field.
- CUHK-PEDES: Reached a 77.21% Rank-1 accuracy, outperforming the previous best (APTM) by 0.68%.
- ICFG-PEDES: Achieved 68.93% Rank-1, a significant jump over previous methodologies.
Beyond raw accuracy, our model shows exceptional domain generalization. In cross-dataset tests (e.g., training on CUHK and testing on ICFG), MRA achieved a Rank-1 accuracy of 50.01%, a massive improvement over the previous baseline of 34.25%. This indicates that the model has learned genuine, transferable features rather than dataset-specific artifacts.
Conclusion
By bridging the pretraining gap through image-level diffusion and region-level relation alignment, we have significantly advanced the performance and robustness of text-based person retrieval. The introduction of the SDA dataset provides a high-quality, domain-aligned resource for the community, paving the way for more effective real-world deployment of retrieval systems.
The dataset, model, and code are available at https://github.com/Shuyu-XJTU/MRA.
Summary updated