Learning Spatial-context-aware Global Visual Feature Representation for Instance Image Retrieval

Zhong-Duo Zhang, Lei Wang, Luping Zhou, Piotr Koniusz
2/14/2026

Abstract

In instance image retrieval, considering local spatial information within an image has proven effective to boost retrieval performance, as demonstrated by local visual descriptor based geometric verification. Nevertheless, it will be highly valuable to make ordinary global image representations spatial-context-aware because global representation based image retrieval is appealing thanks to its algorithmic simplicity, low memory cost, and being friendly to sophisticated data structures. To this end, we propose a novel feature learning framework for instance image retrieval, which embeds local spatial context information into the learned global feature representations. Specifically, in parallel to the visual feature branch in a CNN backbone, we design a spatial context branch that consists of two modules called online token learning and distance encoding. For each local descriptor learned in CNN, the former module is used to indicate the types of its surrounding descriptors, while their spatial distribution information is captured by the latter module. After that, the visual feature branch and the spatial context branch are fused to produce a single global feature representation per image. As experimentally demonstrated, with the spatial-context-aware characteristic, we can well improve the performance of global representation based image retrieval while maintaining all of its appealing properties. Our code is available at https://github.com/Zy-Zhang/SpCa.

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{zhang2026learning,
  title  = {Learning Spatial-context-aware Global Visual Feature Representation for Instance Image Retrieval},
  author = {Zhong-Duo Zhang and Lei Wang and Luping Zhou and Piotr Koniusz},
  year   = {2026},
  doi    = {10.1109/ICCV51070.2023.01033},
  url    = {https://doi.org/10.1109/ICCV51070.2023.01033},
  journal = {ICCV 2023 2023}
}

Discussion