Minimizing the pretraining gap: Domain-aligned text-based person retrieval

Shuyu Yang, Yaxiong Wang, Yongrui Li, Li Zhu, Zhedong Zheng

TL;DR

This paper introduces a novel pipeline to bridge the "pretraining gap" in text-based person retrieval—the performance drop caused by the stylistic difference between synthetic pretraining data and real-world images. By combining Domain-aware Diffusion (DaD) to stylize synthetic images and Multi-granularity Relation Alignment (MRA) to link specific body regions to descriptive phrases, the authors achieve state-of-the-art results across major benchmarks.

What Problem Does This Paper Address?

Text-based person retrieval—finding a specific individual in a massive image database using only a sentence like "a woman in a blue shirt and black shorts"—is a high-stakes task for public safety. However, training these models is difficult. Real-world datasets are small due to privacy concerns and the high cost of manual annotation.

To solve this, researchers often use large-scale synthetic datasets for pretraining. The catch? Synthetic data usually looks "too perfect" or stylistically different from grainy, oddly-lit surveillance footage. This domain gap (differences in lighting, color, and viewpoint) prevents models from generalizing well to real-world scenarios. Furthermore, most models only look at the "global" match between an image and a sentence, often missing the fine-grained details (like the specific color of a pair of shoes) that are essential for identifying individuals.

Methods

The authors propose a two-pronged approach to align domains at both the image level and the region level:

  1. Domain-aware Diffusion (DaD): Instead of using generic synthetic images, the researchers fine-tuned a diffusion model (specifically using ControlNet) on the target real-world domain. This allows them to generate a new dataset, SDA (Synthetic Domain-Aligned), where the images maintain the "content" of the source but adopt the "style" (noise, lighting, texture) of real-world surveillance data.
  2. Multi-granularity Relation Alignment (MRA): This is the training framework. It uses three encoders (Vision, Text, and Fusion).
  3. Region-Phrase Contrastive (RPC) & Matching (RPM): Using off-the-shelf detectors (Grounding DINO), they automatically labeled specific regions in the synthetic images (e.g., a bounding box around a "blue jacket"). The model is then trained to specifically align these visual regions with their corresponding phrases.
  4. Standard Objectives: The model also utilizes standard tasks like Image-Text Contrastive (ITC) learning and Masked Language Modeling (MLM) to ensure robust global understanding.

Datasets

The model was evaluated on three primary real-world benchmarks:

  • CUHK-PEDES: The seminal and most widely used dataset for this task.
  • ICFG-PEDES: A dataset with longer, more complex descriptions.
  • RSTPReid: A dataset focused on diverse scenes and viewpoints.

New Contribution: The authors introduced the SDA (Synthetic Domain-Aligned) dataset, which contains roughly 1.3 million image-text pairs. Unlike previous synthetic sets, SDA includes fine-grained region-phrase annotations and matches the visual style of real-world pedestrian data.

Key Insights and Ideas

  • Style Trumps Volume: The authors found that their SDA dataset, despite being slightly smaller than previous synthetic datasets like MALS, led to better performance because its visual distribution was closer to the target domain.
  • The "Aha" of Region Alignment: Global image-text matching is often "lazy," focusing on easy cues like background color. By forcing the model to match specific phrases to specific bounding boxes (MRA), the model develops a much finer "eye" for detail, which is critical when many pedestrians look similar.
  • Diffusion as a Bridge: Using diffusion models not just for "data augmentation" but specifically for "domain migration" is a powerful way to make synthetic data useful for specialized, sensitive tasks like person re-identification.

Key Results

The proposed method achieved State-of-the-Art (SOTA) performance across the board:

  • 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.
  • Domain Generalization: In a "zero-shot" style test (training on one real dataset and testing on another), MRA outperformed existing methods by a massive margin (e.g., jumping from 34.25% to 50.01% Rank-1 on the CUHK to ICFG transfer task). This proves the model truly learned features, not just dataset-specific biases.

Limitations and Future Work

  • Computational Cost: Pretraining the model on the large SDA dataset takes approximately 4 days on 4 high-end GPUs, which may be a barrier for some researchers.
  • Reliance on External Tools: The quality of the region-phrase annotations depends on the accuracy of off-the-shelf tools like Grounding DINO and BLIP2. If these "teacher" models fail to identify a region correctly, the MRA training could be noisy.
  • Future Direction: The authors suggest that further refining the "quality assessment" of generated images (filtering out distorted or unrealistic "hallucinations" from the diffusion model) could further boost performance.

Summary updated

BibTeX
@article{yang2026minimizing,
  author = {Shuyu Yang and Yaxiong Wang and Yongrui Li and Li Zhu and Zhedong Zheng},
  title = {{Minimizing the pretraining gap: Domain-aligned text-based person retrieval}},
  journal = {Pattern Recognition},
  year = {2026},
  doi = {10.1016/j.patcog.2026.113511},
}

Loading related content...

Figure