Abstract
Image retrieval systems typically face a trade-off between the efficiency of global descriptors and the precision of local feature matching. This paper presents a unified framework that tokenizes deep local features into a compact set of discriminative visual tokens. By refining these tokens through attention mechanisms, the proposed method achieves state-of-the-art accuracy on benchmark datasets while maintaining significantly lower memory and latency requirements compared to traditional local aggregation techniques.
Introduction
The field of image retrieval is divided between two primary approaches: compact global features and complex local feature aggregation. Global features are computationally efficient but struggle with small or partially occluded objects. Conversely, local feature methods like HOW or DELG offer high accuracy through regional matching but are hindered by high complexity and large memory footprints. This work introduces a "tokenizer" that bridges this gap, producing a representation that is as compact as a global feature yet retains the regional matching power of local features.
Methodology
The proposed framework operates in four stages:
- Feature Extraction: A CNN backbone extracts local features, which are then enhanced by a Local Feature Self-Attention (LFSA) module to incorporate spatial context.
- Tokenization: The core innovation involves a tokenizer that uses spatial attention to group local features into a small set of $L=4$ visual tokens. This process is mathematically equivalent to a learnable, simplified Gaussian Mixture Model (GMM), where tokens learn to represent specific visual patterns (e.g., architectural textures).
- Refinement: Tokens communicate via self-attention and extract further details from original local features through cross-attention.
- Global Descriptor Generation: Refined tokens are concatenated and compressed into a final descriptor, trained end-to-end using ArcFace margin loss.
Experimental Results
The model was trained on the Google Landmarks Dataset V2 (GLDv2-clean) and evaluated on Revisited Oxford (ROxf) and Revisited Paris (RPar).
Performance and Efficiency
On the ROxf-Hard benchmark, the method achieved a Mean Average Precision (mAP) of 66.57%, significantly outperforming previous global methods like SOLAR (59.99%) and local aggregation methods like HOW-ASMK (62.51%).
In large-scale testing on the R1M dataset, the efficiency gains were substantial:
- Memory: 3.9 GB (vs. 14.3 GB for HOW-ASMK and 485 GB for DELG+SP).
- Latency: ~0.28 seconds for retrieval across one million images.
Discussion
The success of this approach stems from treating tokens as "soft" clusters, allowing for flexible, on-the-fly feature grouping. This sparsity (using only 4 tokens compared to thousands of visual words in traditional methods) drives the efficiency. Furthermore, the learned tokens implicitly align similar regions across images, facilitating robust matching despite viewpoint changes or partial occlusions.
Conclusion
This research demonstrates that token-based representations can effectively unify the strengths of global and local features. Future work will explore dynamic token counts and the aggregation of pre-trained local features to further enhance retrieval performance.
Summary updated