Papers
Topics
Authors
Recent
Search
2000 character limit reached

LocScore: Localization-Aware Retrieval Metric

Updated 16 December 2025
  • LocScore is a localization-aware metric that evaluates retrieval performance by combining ranked retrieval and spatial overlap (IoU) for patch-wise image queries.
  • It addresses limitations of traditional metrics by jointly considering accuracy in retrieval order and spatial alignment, providing nuanced insights into system performance.
  • Empirical studies show LocScore effectively differentiates between global and patch-wise methods, emphasizing precise object localization in image retrieval tasks.

LocScore is a localization-aware metric introduced for spatially grounded instance-level image retrieval systems, specifically designed for patch-wise retrieval scenarios where it is essential to assess both retrieval accuracy and the spatial correctness of the matched region. LocScore jointly considers the ranked retrieval position of a true positive and the spatial overlap between the predicted patch and the ground-truth bounding box, thereby providing a diagnostic tool for evaluating the ability of retrieval systems not merely to locate positive images but to accurately localize the target object within them (Choi et al., 14 Dec 2025).

1. Motivation and Conceptual Foundation

LocScore was developed to address the limitations of traditional retrieval metrics such as average precision (AP) and intersection-over-union (IoU) when applied independently. In patch-wise retrieval, AP quantifies the rank at which ground-truth positives appear but does not measure spatial alignment, while IoU captures the overlap between the predicted and ground-truth regions but is agnostic to retrieval ordering. LocScore integrates these two aspects, weighting each true-positive retrieval by both its precision (proportion of positives retrieved up to that rank) and its IoU with the ground-truth box. High LocScore values indicate both early retrieval and accurate spatial alignment, while degradations in either ranking or localization are penalized.

2. Mathematical Definition

LocScore is rigorously defined as follows. For query nn:

  • InI_n: Number of ground-truth positives for query nn.
  • Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^4: Ground-truth bounding box for the ii-th positive.
  • Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^4: Predicted bounding box for the highest-scoring patch of the ii-th positive.
  • rn,i∈Nr^{n,i}\in\mathbb{N}: Rank of the retrieved positive image.
  • hn,ih^{n,i}: Number of ground-truth positives among the top rn,ir^{n,i} retrieved slots.

The spatial overlap is quantified as: InI_n0

Per-query continuous LocScore:

InI_n1

Dataset-wide LocScore:

InI_n2

Thresholded LocScore at IoU InI_n3:

InI_n4

Mean-thresholded LocScore (InI_n5) over thresholds InI_n6:

InI_n7

3. Computation Workflow

For each query:

  1. Retrieve a ranked list of candidate images, each associated with a single top-scoring patch and bounding box.
  2. Identify all ground-truth positive images.
  3. For each positive image:
    • Record its retrieval rank InI_n8.
    • Compute spatial overlap InI_n9.
    • Compute the precision term nn0, where nn1 counts the number of positives retrieved up to rank nn2.
  4. Aggregate using the formula for nn3; average across all queries for nn4.
  5. For thresholded variants, replace the IoU factor by an indicator of IoU exceeding nn5.

Boxes are represented by nn6, and IoU is computed in nn7. Only the single highest-scoring patch per image is required. Vectorized implementation can accelerate nn8 computation by sorting ranks and applying cumulative sums.

4. Properties, Interpretative Range, and Metric Behavior

  • LocScore ranges in nn9 due to Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^40 and Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^41.
  • The sum Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^42 corresponds exactly to AP for query Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^43; thus, Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^44 since Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^45 always.
  • Patches with partial localization (e.g. Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^46) contribute proportionally less.
  • Sensitivity to misalignment is immediate: small spatial shifts that lower IoU reduce LocScore, even at optimal retrieval rank.
  • For thresholded Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^47, Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^48 is non-increasing in Bgtn,i∈R4B^{n,i}_{\mathrm{gt}}\in\mathbb{R}^49 by construction.

5. Empirical Performance and Comparative Assessment

LocScore enables finer discrimination between retrieval systems. Empirical results on the DINOv2 backbone demonstrate that global methods reach mAP ii0 but LocScore ii1, whereas patch-wise local DINOv2 achieves LocScore ii2. This highlights that global feature matching often correlates with background co-occurrence rather than actual object alignment. Case studies with perfect APii3 but differing LocScores further emphasize that AP alone cannot capture spatial correctness. Thresholded LocScore analyses show that sliding-window methods yield superior localization accuracy under stricter IoU compared to coarse grid patch selection (Choi et al., 14 Dec 2025).

6. Efficient Implementation Techniques

  • Compute IoU only for retrieved ground-truth positive images.
  • Pre-sort retrieved lists, mask positives, and apply cumulative summation for ii4 calculation.
  • For mLocScore across multiple thresholds, compute relevant binary masks in one batch and produce the aggregate.
  • For large-scale evaluation, only compute one patch per retrieved image, not all potential alignments.

7. Worked Example and Practical Interpretation

Consider a single query with ii5 positives:

  • Rank 1: Image A (ground-truth), ii6
  • Rank 2: Image X (false positive)
  • Rank 3: Image B (ground-truth), ii7

For Image A: ii8, ii9, contribution Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^40. For Image B: Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^41, Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^42, contribution Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^43.

Continuous LocScore:

Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^44

Thresholded LocScore at Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^45: only Image A passes, so

Bpredn,i∈R4B^{n,i}_{\mathrm{pred}}\in\mathbb{R}^46

This procedure operationalizes LocScore as both a benchmark and a diagnostic, making it widely applicable for spatially sensitive retrieval system development.


LocScore represents a metricically rigorous and empirically validated approach for quantifying both retrieval rank and localization fidelity within patch-wise retrieval frameworks, and offers interpretable, spatially structured insight beyond what is possible using standard precision metrics alone (Choi et al., 14 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to LocScore.