Learning Granularity-Unified Representations for Text-to-Image Person Re-identification

Zhiyin Shao, Xinyu Zhang, Meng Fang, Zhifeng Lin, Jian Wang, Changxing Ding · DOI

Introduction

Text-to-image person re-identification (ReID) is a critical computer vision task that involves retrieving a specific person from a large-scale image gallery based on a natural language description. Unlike standard ReID, which matches images to images, text-to-image ReID must bridge the semantic gap between two fundamentally different modalities.

A primary obstacle in this field is the granularity gap. Pedestrian images are inherently fine-grained, containing high-resolution visual details such as textures, lighting variations, and background noise. Conversely, textual descriptions are abstract and coarse, focusing on high-level attributes like "black jacket" or "blue jeans." Most existing methods struggle to align these disparate levels of detail. Furthermore, many state-of-the-art models rely on heavy cross-modal attention mechanisms that compare queries against every gallery image individually, leading to computational bottlenecks that prevent real-time deployment.

This paper introduces the Learning Granularity-Unified Representations (LGUR) framework, designed to resolve the granularity gap by mapping both modalities into a unified representation space while maintaining high inference efficiency.

Methodology

The LGUR framework is built around two core components: Dictionary-based Granularity Alignment (DGA) and Prototype-based Granularity Unification (PGU). Together, these modules ensure that visual and textual features are processed into a compatible, abstract format before matching.

Dictionary-based Granularity Alignment (DGA)

To address the mismatch in detail, the authors propose a Multi-modality Shared Dictionary (MSD). This dictionary consists of a set of learnable "atoms" that represent common features across both modalities.

During the DGA phase, visual and textual features are reconstructed using these shared atoms. This process serves a dual purpose: it forces visual features to become more abstract by filtering out "visual noise" (like background clutter) that lacks a textual counterpart, and it encourages textual features to become more concrete. To further refine the visual side, the model employs a foreground mask to ensure the reconstruction focuses strictly on the pedestrian's body rather than the environment.

Prototype-based Granularity Unification (PGU)

Following alignment, the features pass through the PGU module. This module utilizes a set of shared learnable prototypes that function as "semantic probes" within a transformer-style architecture. These prototypes extract specific, discriminative information from both the image and the text, condensing them into a strictly unified representation format.

Computational Efficiency

A significant advantage of LGUR is its decoupling of the feature extraction and matching phases. Because the representations are unified into a common space before the search begins, image features for the entire gallery can be pre-calculated. During inference, the system only needs to compute the cosine similarity between the query text vector and the stored image vectors. This avoids the "heavy" cross-modal attention required by other models during the search phase, significantly reducing latency.

Experimental Results

The LGUR framework was evaluated on two benchmark datasets: CUHK-PEDES (the industry standard) and ICFG-PEDES (a more challenging dataset with complex descriptions).

Performance Metrics

LGUR established new state-of-the-art (SOTA) benchmarks across both datasets:

  • CUHK-PEDES: Using a DeiT-Small backbone, the model achieved a 65.25% Rank-1 accuracy, significantly outperforming previous methods.
  • ICFG-PEDES: The model reached 59.02% Rank-1 accuracy, representing a 4.79% improvement over the previous best method, SSAN.

Inference Speed

The efficiency of the LGUR architecture is evident in its processing times. On the CUHK-PEDES dataset, LGUR requires only 26ms per query. In comparison, the SSAN model takes 76ms, and models utilizing dense cross-modal attention, such as NAFS, can exceed 110ms. This makes LGUR nearly three to four times faster than many competing high-accuracy models.

Discussion and Insights

The success of LGUR suggests that abstraction is an advantage in cross-modal retrieval. Rather than attempting to force textual descriptions to match the hyper-detail of images, the framework demonstrates that making images as abstract as text—by filtering out non-descriptive visual noise—leads to more robust matching. The Multi-modality Shared Dictionary acts as the essential bridge, ensuring that a "black jacket" in text and a black jacket in an image are reconstructed using the same underlying semantic atoms.

Furthermore, the model demonstrated strong Domain Generalization capabilities. When trained on one dataset and tested on another, LGUR maintained high performance, suggesting that the granularity unification process helps the model learn universal human attributes rather than over-fitting to dataset-specific nuances.

Conclusion and Future Work

LGUR provides a scalable and accurate solution for text-to-image person ReID by resolving the granularity gap through shared dictionaries and prototypes. While the model shows some sensitivity to the choice of backbone (performing better with Vision Transformers like DeiT than with ResNet-50), its ability to maintain SOTA accuracy without the computational burden of cross-modal attention is a significant step forward.

Future research may explore making the number of prototypes dynamic to accommodate more complex scenes or extending the granularity-unified representation approach to other tasks, such as general image-text retrieval and video-based person search.

Summary updated

BibTeX
@inproceedings{shao2022learning,
  author = {Zhiyin Shao and Xinyu Zhang and Meng Fang and Zhifeng Lin and Jian Wang and Changxing Ding},
  title = {{Learning Granularity-Unified Representations for Text-to-Image Person Re-identification}},
  booktitle = {ACM Multimedia},
  year = {2022},
  url = {https://openreview.net/forum?id=1kZhAw3t0c},
}
Figure