Papers › BoQ: A Place is Worth a Bag of Learnable Queries

BoQ: A Place is Worth a Bag of Learnable Queries

12 May 2024CVPR 2024 1arXiv:2405.07364archive 2025-07-28

Amar Ali-bey, Brahim Chaib-Draa, Philippe Giguère

In visual place recognition, accurately identifying and matching images of locations under varying environmental conditions and viewpoints remains a significant challenge. In this paper, we introduce a new technique, called Bag-of-Queries (BoQ), which learns a set of global queries designed to capture universal place-specific attributes. Unlike existing methods that employ self-attention and generate the queries directly from the input features, BoQ employs distinct learnable global queries, which probe the input features via cross-attention, ensuring consistent information aggregation. In addition, our technique provides an interpretable attention mechanism and integrates with both CNN and Vision Transformer backbones. The performance of BoQ is demonstrated through extensive experiments on 14 large-scale benchmarks. It consistently outperforms current state-of-the-art techniques including NetVLAD, MixVPR and EigenPlaces. Moreover, as a global retrieval technique (one-stage), BoQ surpasses two-stage retrieval methods, such as Patch-NetVLAD, TransVPR and R2Former, all while being orders of magnitude faster and more efficient. The code and model weights are publicly available at https://github.com/amaralibey/Bag-of-Queries.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.07364")

Code

Syntology Ran 2 of 2 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 2 ran with no contract checked.

By repository: official repository: 2 samples from 1 repository, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

amaralibey/bag-of-queries officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

2 samples harvested; 2 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran

Licence: 0 of the 2 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from amaralibey/bag-of-queries. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

BoQ amaralibey/bag-of-queries/src/boq.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 559bbe02d4c7c4f3 · report
BoQBlock amaralibey/bag-of-queries/src/boq.py official repository ran · metamorphic tier: deterministic MIT (permissive) · b4440ab34ed79c8d · report

Tasks

Image Similarity SearchRetrievalVisual Place Recognition

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Visual Place Recognition AmsterTime BoQ Recall@1 63.0 #5 of 8 Archive leaderboard report
Visual Place Recognition AmsterTime BoQ Recall@10 85.1 #5 of 8 Archive leaderboard report
Visual Place Recognition AmsterTime BoQ Recall@5 81.6 #5 of 8 Archive leaderboard report
Visual Place Recognition AmsterTime BoQ (ResNet-50) Recall@1 52.2 #7 of 8 Archive leaderboard report
Visual Place Recognition Eynsham BoQ Recall@1 92.2 #3 of 7 Archive leaderboard report
Visual Place Recognition Eynsham BoQ Recall@10 96.4 #3 of 7 Archive leaderboard report
Visual Place Recognition Eynsham BoQ Recall@5 95.6 #3 of 7 Archive leaderboard report
Visual Place Recognition Eynsham BoQ (ResNet-50) Recall@1 91.3 #5 of 7 Archive leaderboard report
Visual Place Recognition Mapillary test BoQ Recall@1 79 #4 of 12 Archive leaderboard report
Visual Place Recognition Mapillary test BoQ Recall@10 92 #4 of 12 Archive leaderboard report
Visual Place Recognition Mapillary test BoQ Recall@5 90.3 #4 of 12 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ Recall@1 93.8 #3 of 18 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ Recall@10 97 #3 of 18 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ Recall@5 96.8 #3 of 18 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ (ResNet-50) Recall@1 91.2 #9 of 18 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ (ResNet-50) Recall@10 96.1 #9 of 18 Archive leaderboard report
Visual Place Recognition Mapillary val BoQ (ResNet-50) Recall@5 95.3 #9 of 18 Archive leaderboard report
Visual Place Recognition Nordland BoQ Recall@1 90.6 #4 of 13 Archive leaderboard report
Visual Place Recognition Nordland BoQ Recall@10 97.5 #4 of 13 Archive leaderboard report
Visual Place Recognition Nordland BoQ Recall@5 96.0 #4 of 13 Archive leaderboard report
Visual Place Recognition Nordland BoQ (ResNet-50) Recall@1 83.1 #8 of 13 Archive leaderboard report
Visual Place Recognition Nordland* (2760 queries) BoQ Recall@1 81.3 #3 of 4 Archive leaderboard report
Visual Place Recognition Nordland* (2760 queries) BoQ Recall@10 94.8 #3 of 4 Archive leaderboard report
Visual Place Recognition Nordland* (2760 queries) BoQ Recall@5 92.5 #3 of 4 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ Recall@1 96.6 #2 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ Recall@10 99.5 #2 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ Recall@5 99.1 #2 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ (ResNet-50) Recall@1 95 #7 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ (ResNet-50) Recall@10 99.1 #7 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-250k-test BoQ (ResNet-50) Recall@5 98.5 #7 of 13 Archive leaderboard report
Visual Place Recognition Pittsburgh-30k-test BoQ Recall@1 93.7 #7 of 22 Archive leaderboard report
Visual Place Recognition Pittsburgh-30k-test BoQ Recall@10 97.9 #7 of 22 Archive leaderboard report
Visual Place Recognition Pittsburgh-30k-test BoQ Recall@5 97.1 #7 of 22 Archive leaderboard report
Visual Place Recognition Pittsburgh-30k-test BoQ (ResNet-50) Recall@1 92.4 #12 of 22 Archive leaderboard report
Visual Place Recognition SPED BoQ Recall@1 92.5 #1 of 7 Archive leaderboard report
Visual Place Recognition SPED BoQ Recall@10 96.7 #1 of 7 Archive leaderboard report
Visual Place Recognition SPED BoQ Recall@5 95.9 #1 of 7 Archive leaderboard report
Visual Place Recognition SPED BoQ (ResNet-50) Recall@1 86.5 #6 of 7 Archive leaderboard report
Visual Place Recognition SPED BoQ (ResNet-50) Recall@10 95.7 #6 of 7 Archive leaderboard report
Visual Place Recognition SPED BoQ (ResNet-50) Recall@5 93.4 #6 of 7 Archive leaderboard report
Visual Place Recognition SVOX-Night BoQ (ResNet-50) Recall@1 87.1 #4 of 4 Archive leaderboard report
Visual Place Recognition SVOX-Overcast BoQ (ResNet-50) Recall@1 97.8 #4 of 4 Archive leaderboard report
Visual Place Recognition SVOX-Rain BoQ (ResNet-50) Recall@1 96.2 #4 of 4 Archive leaderboard report
Visual Place Recognition SVOX-Snow BoQ (ResNet-50) Recall@1 98.7 #4 of 4 Archive leaderboard report
Visual Place Recognition SVOX-Sun BoQ (ResNet-50) Recall@1 95.9 #4 of 4 Archive leaderboard report
Visual Place Recognition San Francisco Landmark Dataset BoQ Recall@1 93.6 #1 of 3 Archive leaderboard report
Visual Place Recognition San Francisco Landmark Dataset BoQ Recall@10 96.5 #1 of 3 Archive leaderboard report
Visual Place Recognition San Francisco Landmark Dataset BoQ Recall@5 95.8 #1 of 3 Archive leaderboard report
Visual Place Recognition St Lucia BoQ (DINOv2) Recall@1 100.0 #2 of 14 Archive leaderboard report
Visual Place Recognition St Lucia BoQ (DINOv2) Recall@5 100 #2 of 14 Archive leaderboard report
Visual Place Recognition St Lucia BoQ Recall@10 100 #14 of 14 Archive leaderboard report
Visual Place Recognition St Lucia BoQ Recall@5 100 #14 of 14 Archive leaderboard report
Visual Place Recognition Tokyo247 BoQ Recall@1 98.1 #6 of 14 Archive leaderboard report
Visual Place Recognition Tokyo247 BoQ Recall@10 98.7 #6 of 14 Archive leaderboard report
Visual Place Recognition Tokyo247 BoQ Recall@5 98.1 #6 of 14 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AttentionDense ConnectionsDropoutLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSETSoftmaxTransformerVision Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections