Focus, Distinguish, and Prompt: Unleashing CLIP for Efficient and Flexible Scene Text Retrieval
Gangyan Zeng, Yuan Zhang, Jin Wei, Dongbao Yang, Peng Zhang, Yiwen Gao, Xugong Qin, Yu Zhou
TL;DR
This work tackles scene text retrieval without OCR by leveraging CLIP and identifying two core challenges: limited text perceptual scale and entanglement between visual and semantic concepts. It proposes FDP, a three-stage framework that focuses CLIP on text regions, distinguishes query words into content and function categories, and applies semantic-aware prompting, complemented by a distracted-queries training signal. Empirical results across IIIT-STR, SVT, TotalText, and a new PSTR benchmark show that FDP delivers a strong speed–accuracy balance, surpassing CLIP baselines and competitive STR methods, with notable gains in phrase-level and attribute-aware retrieval. The approach demonstrates practical OCR-free retrieval with broad applicability and is supported by ablations and implementation details, making it suitable for real-world deployment and future research in cross-modal text retrieval.
Abstract
Scene text retrieval aims to find all images containing the query text from an image gallery. Current efforts tend to adopt an Optical Character Recognition (OCR) pipeline, which requires complicated text detection and/or recognition processes, resulting in inefficient and inflexible retrieval. Different from them, in this work we propose to explore the intrinsic potential of Contrastive Language-Image Pre-training (CLIP) for OCR-free scene text retrieval. Through empirical analysis, we observe that the main challenges of CLIP as a text retriever are: 1) limited text perceptual scale, and 2) entangled visual-semantic concepts. To this end, a novel model termed FDP (Focus, Distinguish, and Prompt) is developed. FDP first focuses on scene text via shifting the attention to the text area and probing the hidden text knowledge, and then divides the query text into content word and function word for processing, in which a semantic-aware prompting scheme and a distracted queries assistance module are utilized. Extensive experiments show that FDP significantly enhances the inference speed while achieving better or competitive retrieval accuracy compared to existing methods. Notably, on the IIIT-STR benchmark, FDP surpasses the state-of-the-art model by 4.37% with a 4 times faster speed. Furthermore, additional experiments under phrase-level and attribute-aware scene text retrieval settings validate FDP's particular advantages in handling diverse forms of query text. The source code will be publicly available at https://github.com/Gyann-z/FDP.
