  Text-based person retrieval (TPR) aims to retrieve images of a person from an
extensive array of candidates based on a given textual description. The core
challenge lies in mapping visual and textual data into a unified latent space.
While existing TPR methods concentrate on recognizing explicit and positive
characteristics, they often neglect the critical influence of negative
descriptors, resulting in potential false positives that fulfill positive
criteria but could be excluded by negative descriptors. To alleviate these
issues, we introduce DualFocus, a unified framework for integrating positive
and negative descriptors to enhance the interpretative accuracy of
vision-language foundational models regarding textual queries. DualFocus
employs Dual (Positive/Negative) Attribute Prompt Learning (DAPL), which
integrates Dual Image-Attribute Contrastive (DIAC) Learning and Sensitive
Image-Attributes Matching (SIAM) Learning. This way DualFocus enhances the
detection of unseen attributes, thereby boosting retrieval precision. To
further achieve a balance between coarse and fine-grained alignment of visual
and textual embeddings, we propose the Dynamic Tokenwise Similarity (DTS) loss,
which refines the representation of both matching and non-matching
descriptions, thereby enhancing the matching process through a detailed and
adaptable similarity assessment. By focusing on token-level comparisons,
DualFocus significantly outperforms existing techniques in both precision and
robustness. The experiment results highlight DualFocus's superior performance
on CUHK-PEDES, ICFG-PEDES, and RSTPReid.
