UFineBench: Towards Text-based Person Retrieval with Ultra-fine Granularity

Jialong Zuo, Hanyu Zhou, Ying Nie, Feng Zhang, Tianyu Guo, Nong Sang, Yunhe Wang, Changxin Gao

TL;DR

UFineBench introduces a new benchmark for text-based person retrieval that shifts the focus from coarse attribute matching to ultra-fine-grained semantic understanding. By providing a massive new dataset (UFine6926) with descriptions four times longer than previous standards and a novel retrieval framework (CFAM), the authors demonstrate that fine-grained training is essential for models to generalize to complex, real-world search scenarios.

What Problem Does This Paper Address?

Text-based person retrieval—finding a specific person in a gallery of images based on a text description—is a critical task for surveillance and forensic search. However, existing benchmarks suffer from "coarse granularity." Descriptions like "a man in a black shirt" are too vague, often matching multiple different people in a dataset (ambiguity) and reducing the task to simple attribute matching.

In real-world scenarios, search queries are often highly detailed, and the environment (lighting, resolution, camera angle) varies wildly. Current models trained on brief descriptions struggle to understand the subtle, unique features that distinguish one person from another. Furthermore, standard evaluation metrics like mean Average Precision (mAP) fail to capture how well a model separates true matches from "near-miss" distractors in terms of actual similarity scores.

Methods

The authors propose a multi-pronged solution:

  1. UFine6926 Dataset: A high-quality dataset featuring 6,926 identities and over 52,000 manually crafted descriptions. Each image has two detailed descriptions averaging 80.8 words, capturing fine details like specific patterns on clothing, accessories, and subtle physical traits.
  2. CFAM Framework: The Cross-modal Fine-grained Aligning and Matching framework. It builds on a CLIP backbone but adds a specialized Cross-modal Granularity Decoder. This shared decoder uses "Granularity Queries" to interact with both visual and textual embeddings, extracting and aligning local, fine-grained information that global embeddings might miss. Overview of the proposed CFAM framework
  3. Hard Negative Matching: To improve discriminative power, the model employs a strategy that specifically samples the most similar "incorrect" image-text pairs during training, forcing the model to learn the subtle differences between them.
  4. mSD Metric: The mean Similarity Distribution metric. Unlike mAP, which only looks at the discrete rank of results, mSD uses continuous similarity values. It rewards models that create a large, clear gap between the similarity scores of true matches and negative samples. A toy example showing how mSD distinguishes between different similarity distributions that mAP treats as identical.
Figure 3. Overview of the proposed CFAM framwork.
Figure 2. A toy example of the difference between SD and AP metrics. Green and red boxes mean true and false matches, re- spectively. For these three rank lists, the AP remains 0.833. But SD = 0.536, 0.744 and 0.697, respectively.

Datasets

  • UFine6926 (New): The core training and testing set for ultra-fine-grained retrieval.
  • UFine3C (New): A challenging evaluation set designed for "cross-settings": cross-domain (different scenes/lighting), cross-granularity (queries ranging from short to long), and cross-style (using LLMs like Llama2 to vary language expression).
  • Existing Benchmarks: The authors compare against and evaluate on CUHK-PEDES, ICFG-PEDES, and RSTPReid. As shown in the table below, UFine6926 significantly exceeds these in textual detail. Comparison of text statistics across datasets, highlighting the superior granularity of UFine6926.
Comparison of text statistics across datasets, highlighting the superior granularity of UFine6926.

Key Insights and Ideas

  • Fine-Grained is a "Superset": A key finding is that models trained on fine-grained data (UFine6926) generalize well to coarse-grained datasets, but the reverse is not true. Training on "easy" coarse data leaves models blind to the subtle clues needed for real-world retrieval.
  • Ambiguity is a Training Killer: Coarse descriptions lead to one-to-many mappings that confuse models during training. Fine-grained descriptions provide the unique "fingerprint" needed for accurate cross-modal alignment.
  • LLMs as Style Augmentors: The use of LLMs to rephrase descriptions for the UFine3C set proves that models need to be robust not just to what is said, but how it is said.
  • Similarity Matters More Than Rank: The mSD metric highlights that a "good" retrieval isn't just about getting the right image at Rank-1; it's about the model being confident that the match is correct and the distractors are not.

Key Results

  • State-of-the-Art Performance: CFAM achieves a Rank-1 accuracy of 88.51% on the UFine6926 test set and 75.60% on CUHK-PEDES, outperforming existing SOTA methods like IRRA and PLIP.
  • Superior Generalization: When evaluated on the "real-world" UFine3C set, models trained on UFine6926 significantly outperformed those trained on other datasets, achieving 62.84% Rank-1 compared to just 53.80% for the next best (CUHK-PEDES). Performance comparisons on the UFine3C evaluation dataset showing UFine6926's superior generalization.

  • Qualitative Success: Qualitative results show that CFAM can identify specific items like a "black watch" or "black glasses" mentioned in long queries, whereas models trained on coarse data often fail to distinguish between similar-looking individuals. Qualitative comparison showing CFAM's ability to perceive fine-grained clues.

Table 2. Performance comparisons on the UFine3C evaluation dataset. The models are trained on the training sets of CUHK-PEDES, ICFG-PEDES, RSTPReid and our UFine6926, and then are directly evaluated on the UFine3C dataset. Although the training samples in UFine6926 is less than that in other datasets, training on it still achieves state-of-the-art performance. The bold results indicate the best.
Figure 4. Comparison of rank-10 retrieval results on UFine3C between CFAM trained on UFine6926 [17] (the first row) and CUHK-PEDES (the second raw) for each textual description. The images that fully match the text are marked in green, and the un- matched ones are marked in red.

Limitations and Future Work

While the paper demonstrates the power of fine-grained retrieval, the authors acknowledge the high cost of manual annotation required to build such datasets (hiring 58 unique workers for UFine6926). Future work could explore using automated or semi-automated methods (perhaps leveraging multi-modal LLMs) to generate ultra-fine-grained descriptions at scale. Additionally, while CFAM is efficient, the computational overhead of local alignment decoders compared to simple global alignment is a trade-off that could be further optimized for real-time applications.

Summary updated

Abstract

Existing text-based person retrieval datasets often have relatively coarse-grained text annotations. This hinders the model to comprehend the fine-grained semantics of query texts in real scenarios. To address this problem, we contribute a new benchmark named \textbf{UFineBench} for text-based person retrieval with ultra-fine granularity. Firstly, we construct a new \textbf{dataset} named UFine6926. We collect a large number of person images and manually annotate each image with two detailed textual descriptions, averaging 80.8 words each. The average word count is three to four times that of the previous datasets. In addition of standard in-domain evaluation, we also propose a special \textbf{evaluation paradigm} more representative of real scenarios. It contains a new evaluation set with cross domains, cross textual granularity and cross textual styles, named UFine3C, and a new evaluation metric for accurately measuring retrieval ability, named mean Similarity Distribution (mSD). Moreover, we propose CFAM, a more efficient \textbf{algorithm} especially designed for text-based person retrieval with ultra fine-grained texts. It achieves fine granularity mining by adopting a shared cross-modal granularity decoder and hard negative match mechanism. With standard in-domain evaluation, CFAM establishes competitive performance across various datasets, especially on our ultra fine-grained UFine6926. Furthermore, by evaluating on UFine3C, we demonstrate that training on our UFine6926 significantly improves generalization to real scenarios compared with other coarse-grained datasets. The dataset and code will be made publicly available at \url{https://github.com/Zplusdragon/UFineBench}.
BibTeX
@inproceedings{zuo2023ufinebench,
  author = {Jialong Zuo and Hanyu Zhou and Ying Nie and Feng Zhang and Tianyu Guo and Nong Sang and Yunhe Wang and Changxin Gao},
  title = {{UFineBench: Towards Text-based Person Retrieval with Ultra-fine Granularity}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure