Abstract
Standard Instance-Based Image Retrieval (IBIR) systems often fail when the target object is small and surrounded by clutter. This paper introduces Multi-Object Attention Optimization (MaO), a framework designed to enhance Small Object Image Retrieval (SoIR) by creating scalable, object-centric descriptors. By combining multi-object fine-tuning with a novel post-training attention optimization stage using explainability gradients, MaO ensures that global image descriptors represent all objects in a scene regardless of their size. Experimental results on new, challenging benchmarks like VoxDet-SoIR show that MaO significantly outperforms existing baselines in both accuracy and retrieval speed.
Introduction
In the field of computer vision, Instance-Based Image Retrieval (IBIR) has reached a high level of maturity for scenarios where the query object is prominent. However, "Small Object Image Retrieval" (SoIR) remains a significant challenge. In SoIR, the target object may occupy less than 1% of the total image area, hidden among dozens of distracting "clutter" objects.
Existing models suffer from a "large object bias," where global descriptors are dominated by the background or the most visually salient items. While local feature matching and re-ranking methods can mitigate this, they are computationally expensive and do not scale well to massive databases. This paper proposes Multi-Object Attention Optimization (MaO), a method that produces a single, compact vector per image that remains sensitive to the "needles" in the haystack.
Methodology
The MaO framework operates in two distinct stages to ensure that every object in an image contributes to the final descriptor.
Stage A: Multi-Object Fine-Tuning
Rather than training on whole images, the authors utilize an Open-Vocabulary Detector (OVD) to identify and crop individual objects within a scene. A vision backbone (such as CLIP or DINOv2) is then fine-tuned to align the average of these object-level features with a single query. This process teaches the model to treat every detected object as a relevant component of the scene's identity, preventing small items from being ignored during the initial encoding.
Stage B: Post-Training Attention Optimization
To further refine the descriptor, the authors introduce a "secret sauce" involving gradient-based explainability. Using LeGrad, a method for generating high-quality attention maps, the model optimizes a single image token so that its internal attention maps align perfectly with the masks of the detected objects. By forcing the model’s attention to "lock onto" specific object masks during the encoding process, the resulting global descriptor becomes a dense summary of every item in the image, effectively bypassing the resolution limits of standard vision transformers.
Benchmarking SoIR
The authors observed that existing retrieval benchmarks were insufficiently challenging for SoIR. Consequently, they introduced several new datasets:
- VoxDet-SoIR: Derived from the VoxDet dataset, featuring synthetic but complex scenes with over 14 objects per image and targets as small as 0.1% of the frame.
- INSTRE-XS & INSTRE-XXS: Subsets of the INSTRE dataset specifically filtered to include only images where the target object is extremely small.
- PerMiR: A dataset designed to evaluate retrieval performance in scenes containing multiple instances of the same object category.
Key Insights
- Object-Centricity: The core innovation is moving away from image-centric global pooling. By isolating objects and re-encoding them via attention optimization, the model preserves the signal of small objects that would otherwise be lost.
- Optimization via Explainability: While heatmaps like Grad-CAM are typically used for post-hoc analysis, MaO uses them as a loss function during the encoding process to guide the model's focus.
- Scalability: MaO produces a single vector per image, allowing for standard approximate nearest neighbor (ANN) searches. This makes the method viable for billion-image datasets, unlike local-feature methods that require heavy per-query computation.
Results and Performance
MaO demonstrates substantial improvements over state-of-the-art baselines:
- Accuracy: On the VoxDet-SoIR benchmark, MaO-DINOv2 achieved a 70.20% mAP (mean Average Precision), compared to the 51.23% achieved by the baseline model.
- Zero-Shot Capability: The optimization process significantly boosts the performance of off-the-shelf models like CLIP even without domain-specific fine-tuning.
- Efficiency: MaO is highly efficient at search time. While re-ranking methods like AMES can take thousands of seconds to process a query batch, MaO performs the same task in 0.06 seconds because the complex attention optimization is performed offline during the indexing phase.
Limitations and Future Work
Despite its success, MaO is dependent on the quality of the initial Open-Vocabulary Detector; if an object is not detected, it cannot be optimized. The model also shows some domain bias toward inanimate objects and struggles with extreme occlusions. Future research will focus on integrating more robust detectors and improving performance in "in-the-wild" scenarios where objects are partially hidden or poorly illuminated.
Conclusion
Multi-Object Attention Optimization (MaO) represents a significant step forward for small object retrieval. By leveraging object-centric fine-tuning and gradient-based attention alignment, MaO provides a scalable and highly accurate solution for finding the smallest details in the most cluttered environments.
Summary updated