---
title: 'FitAP: Confidence-Free AP for OV-RefOD'
url: https://www.emergentmind.com/topics/fitap
type: topic
---

# FitAP: Confidence-Free AP for OV-RefOD

Searching arXiv for FitAP and the cited paper to ground the article.
FitAP is a confidence-free Average Precision metric introduced for Open Vocabulary Referring Object Detection (OV-RefOD), a setting in which a model receives an image $I$ and a free-form referring expression $Q$ and returns a set of predicted boxes $P(I,Q)=\{b_1,\dots,b_{N_P}\}$, often without per-box confidence scores. FitAP preserves the standard AP precision-recall protocol by replacing learned confidence with a deterministic ranking score,
$$
s(b;I,Q)=A_{\mathrm{box}}(b;I)\cdot \mathrm{IoU}^\star(b),
$$
where $A_{\mathrm{box}}(b;I)=|b|/|I|$ is the normalized box area and $\mathrm{IoU}^\star(b)=\max_{g\in G(I,Q)} \mathrm{IoU}(b,g)$ is the best overlap with the ground-truth set $G(I,Q)=\{g_1,\dots,g_{N_G}\}$. FitAP is then defined as the mean AP over the ten COCO-style IoU thresholds $\{0.50,0.55,\dots,0.95\}$ [2507.19891].

## 1. Formal definition in OV-RefOD

For a prediction $b\in P(I,Q)$, FitAP first computes the standard intersection-over-union
$$
\mathrm{IoU}(b,g)=\frac{|b\cap g|}{|b\cup g|}\in[0,1],
$$
then identifies the best-overlap ground truth through
$$
\mathrm{IoU}^\star(b)=\max_{g\in G(I,Q)} \mathrm{IoU}(b,g), \qquad
\mathrm{idx}^\star(b)=\arg\max_{g\in G(I,Q)} \mathrm{IoU}(b,g).
$$
The confidence-free score used only for ranking is
$$
s(b;I,Q)=A_{\mathrm{box}}(b;I)\cdot \mathrm{IoU}^\star(b).
$$
This construction retains AP-style ranking and matching even when the VLM does not emit classifier scores or proposal confidences [2507.19891].

At a fixed IoU threshold $\Theta\in[0,1]$, all predictions from all $(I,Q)$ pairs are aggregated into a single list and sorted in descending order by $s(b;I,Q)$. Greedy one-to-one matching then follows standard detection practice: a prediction is a true positive if $\mathrm{IoU}^\star(b)\ge \Theta$ and the ground-truth indexed by $\mathrm{idx}^\star(b)$ has not yet been matched by any higher-ranked prediction from the same image-query pair; otherwise it is a false positive. With $N_G$ denoting the total number of ground-truth boxes across the evaluation set, cumulative precision and recall at rank $k$ are
$$
P(k;\Theta)=\frac{\mathrm{TP}(k;\Theta)}{\mathrm{TP}(k;\Theta)+\mathrm{FP}(k;\Theta)}, \qquad
R(k;\Theta)=\frac{\mathrm{TP}(k;\Theta)}{N_G}.
$$
The interpolated precision envelope is
$$
P_{\mathrm{interp}}(r;\Theta)=\max\{P(k;\Theta)\mid R(k;\Theta)\ge r\},
$$
and
$$
\mathrm{AP}(\Theta)=\int_0^1 P_{\mathrm{interp}}(r;\Theta)\,dr.
$$
Finally,
$$
\mathrm{FitAP}=\frac{1}{10}\sum_{i=1}^{10}\mathrm{AP}(\Theta_i), \qquad
\Theta_i=0.50+0.05(i-1).
$$

## 2. Ranking, matching, and metric mechanics

FitAP is global rather than per-image: it aggregates all predictions from all $(I,Q)$ pairs into one ranked list, then reuses that ranking for every IoU threshold. The metric therefore separates ranking from thresholding. IoU enters twice. First, it governs matching through the condition $\mathrm{IoU}^\star(b)\ge \Theta$. Second, it affects rank through the multiplicative score $A_{\mathrm{box}}(b;I)\cdot \mathrm{IoU}^\star(b)$. Box area enters only through the normalized area term, which is constrained to $(0,1]$ by division through image area $|I|$ [2507.19891].

The paper’s worked example makes the mechanics explicit. For one $(I,Q)$ pair with two ground-truth boxes and three predictions, the predictions are ranked by score as $p_3$, $p_1$, $p_2$ even though $p_3$ has the worst IoU, because its normalized area is largest. At $\Theta=0.50$, this yields one false positive followed by two true positives and an interpolated $\mathrm{AP}(0.50)\approx 0.667$. At $\Theta=0.75$, no prediction satisfies the threshold, so $\mathrm{AP}(0.75)=0$. Averaging only these two thresholds for illustration gives $0.3335$; in actual use, FitAP averages over all ten thresholds from $0.50$ to $0.95$ [2507.19891].

This construction penalizes duplicate or overlapping predictions in the same way as standard AP. The highest-ranked prediction matching a given ground-truth box receives the true positive, while later predictions hitting the same box become false positives. Multiple predicted boxes per referring expression are therefore allowed, but the one-to-one matching rule prevents overcounting.

## 3. Computation procedure and implementation details

The evaluation pipeline begins by precomputing, for every predicted box in every image-query pair, the full IoU vector against all ground-truth boxes, the best-overlap value $\mathrm{IoU}^\star(b)$, the corresponding index $\mathrm{idx}^\star(b)$, the normalized area $A_{\mathrm{box}}(b;I)$, and the ranking score $s(b)$. These per-prediction records are then pooled across the dataset and sorted in descending order by score. The same ordering is reused for all ten IoU thresholds, which makes the threshold sweep inexpensive once ranking has been fixed [2507.19891].

For each threshold $\Theta_i\in\{0.50,0.55,\dots,0.95\}$, all ground-truth boxes are initialized as unmatched. The evaluator traverses the globally sorted prediction list once, assigns TP or FP labels under greedy one-to-one matching, and accumulates precision-recall points. AP is computed by integrating the interpolated precision envelope, either by summation over recall-change points or on a fixed recall grid. The default settings given are the ten COCO-style IoU thresholds, area normalization $A_{\mathrm{box}}(b;I)=|b|/|I|$ with $|I|=H\times W$ in pixels, and a precision-envelope integral consistent with standard AP implementations [2507.19891].

The stated complexity is $O\!\left(\sum_u N_P(u)N_G(u)\right)$ for IoU computation over image-query pairs, $O(N\log N)$ for sorting the global prediction list with $N=\sum_u N_P(u)$, and $O(10N)$ for the ten threshold traversals. The implementation guidance is correspondingly concrete: vectorize IoU computation per image, cache image area, use a stable sort, and break score ties by higher $\mathrm{IoU}^\star(b)$, then larger $A_{\mathrm{box}}(b;I)$, then a deterministic index.

## 4. Design rationale and relation to standard AP

The defining motivation for FitAP is that many VLMs used in OV-RefOD do not emit per-box confidence scores. Standard AP and mAP require a confidence score per prediction for ranking and are therefore sensitive to score calibration and class priors. FitAP avoids confidence altogether by ranking detections with a deterministic, geometry-derived score. In the intended use case, this makes it especially suitable for prompt-based VLMs and OV-RefOD, where confidences are missing, inconsistent, or not comparable [2507.19891].

The metric is also presented as reducing dependence on uncalibrated textual or logit outputs and instruction-following idiosyncrasies. Instead, it emphasizes two interpretable geometric factors: alignment, through IoU, and sizing, through normalized box area. The paper reports strong empirical correlations with ground-truth area: Pearson $r\approx 0.90$ for $A_{\mathrm{box}}$ and $r\approx 0.92$ for $A_{\mathrm{box}}\times \mathrm{IoU}$. Precision-recall curves built from $s(b)=A_{\mathrm{box}}\times \mathrm{IoU}$ show the expected precision-recall trade-off, monotone AP decrease as $\Theta$ increases, and zigzag empirical PR curves with standard interpolation envelopes [2507.19891].

The stability and fairness arguments are correspondingly limited and explicit. Deterministic ranking from geometry is said to reduce metric variance due to decoding randomness in VLMs, and normalization by image area keeps $A_{\mathrm{box}}\in(0,1]$, making the score commensurate across varying resolutions and aspect ratios. At the same time, the metric’s ranking is evaluation-time and oracle-like, because $\mathrm{IoU}^\star(b)$ is computed against ground truth. A plausible implication is that FitAP is best understood as a confidence-free localization metric rather than a drop-in replacement for confidence-ranked mAP.

## 5. Empirical use with Reverse Contrast Attention

FitAP was introduced and evaluated on OV-RefOD using a novel split of COCO val2017 containing 2,064 $(I,Q)$ pairs. The paper reports FitAP as a single scalar, namely the average of $\mathrm{AP}(\Theta)$ over $\Theta\in\{0.50:0.05:0.95\}$, and applies Reverse Contrast Attention (RCA) at inference time to 15 open-source VLMs. The main result is that RCA improved FitAP in 11 of 15 models, with gains up to $+26.6\%$ [2507.19891].

| Model | FitAP post vs. pre | Change |
|---|---:|---:|
| Qwen2.5-VL-7B | 46.8535 vs 37.0005 | +26.6% |
| DeepSeek-VL2 | 3.99586 vs 3.38530 | +18.0% |
| SAIL-VL-1.6-8B | 5.67149 vs 4.84873 | +17.0% |
| Gemma3-27B | 3.01913 vs 2.74179 | +10.1% |
| PaliGemma2-3B-mix-448 | 41.1179 vs 38.7982 | +5.98% |

The broader result set also includes gains for Ovis2-34B, Kimi-VL-A3B, VARCO-VISION-14B, valley2_dpo, and Moondream2, while WeThink-Qwen2.5VL-7B, Ristretto-3B, POINTS1.5-Qwen2.5-7B, and Valley-Eagle show decreases. The paper relates these outcomes to attention sharpness and the timing and structure of vision-language fusion: late-fusion models benefit consistently, while DeepSeek-VL2, described as an early-fusion MoE, also improves, indicating that capacity and disentanglement matter. The accompanying analyses report negative correlations between the count of subthreshold hidden-state components and a central attention sharpness metric $m$ in models that improved with RCA, including Qwen2.5-VL-7B ($r=-0.09$) and DeepSeek-VL2 ($r=-0.73$), both statistically significant; WeThink’s correlation was insignificant and RCA did not help it [2507.19891].

## 6. Limitations, extensions, and nomenclature

FitAP has three explicit limitations. First, ranking uses $\mathrm{IoU}^\star(b)$ computed against ground truth, so evaluation uses an oracle ranking independent of model confidence. Second, multiplying by $A_{\mathrm{box}}$ introduces scale sensitivity: at equal $\mathrm{IoU}^\star$, larger boxes can be favored. Third, FitAP is box-based and therefore does not evaluate mask quality or fine-grained shape. These limitations are not hidden by the formulation; they are part of the metric’s definition and are central to interpreting results [2507.19891].

The edge-case behavior is similarly explicit. Multiple predicted boxes per referring expression are allowed; duplicates beyond the first correct match become false positives. If $|G(I,Q)|=0$ but predictions exist, these contribute only false positives. For benchmarks, such pairs can either be excluded from $N_G$ if the dataset guarantees no positives, or retained to test specificity. Small GT or prediction misalignments near the IoU threshold can flip TP and FP labels, but averaging over thresholds mitigates threshold brittleness. Ties in the ranking score should be broken deterministically, and the paper recommends stable sorting for reproducibility [2507.19891].

The proposed extensions retain the confidence-free principle while changing the ranking function or evaluation granularity. These include a scale-robust score
$$
s_{\alpha,\beta}(b)=[A_{\mathrm{box}}(b;I)]^\alpha\cdot[\mathrm{IoU}^\star(b)]^\beta,
$$
with $\alpha\in[0,1]$ and $\beta\ge 1$; an IoU-only baseline $s(b)=\mathrm{IoU}^\star(b)$; multi-scale reporting as FitAPs, FitAPm, and FitAPl; a segmentation-based “FitAP-mask”; and per-query analysis for multi-instance referring expressions. Finally, the label “FitAP” is not unique across arXiv. An unrelated use appears in cell-free massive MIMO-aided ISAC systems, where “FitAP” denotes joint Access Point activation and power allocation rather than a detection metric [2507.09425]. In the OV-RefOD literature, however, FitAP specifically denotes the confidence-free AP construction defined by $A_{\mathrm{box}}\times \mathrm{IoU}^\star$ and averaged over the standard ten IoU thresholds [2507.19891].

Source: https://www.emergentmind.com/topics/fitap