---
title: Optimal LRP (oLRP) Metric
url: https://www.emergentmind.com/topics/optimal-lrp-olrp
type: topic
---

# Optimal LRP (oLRP) Metric

Optimal LRP (oLRP) is a metric-theoretic object detection error that integrates localization error, false positives, and false negatives with respect to an optimally chosen confidence score threshold. Acting as a unified scalar error metric in $[0,1]$, oLRP provides both a quantitative summary of detection performance and guidance on threshold selection, addressing limitations of metrics such as Average Precision (AP) by offering enhanced discrimination power and interpretability for modern visual detectors [1807.01696].

## 1. Foundations: LRP Error Definition

Localization Recall Precision (LRP) error evaluates object detection quality by combining three core error sources: bounding-box localization, false positives, and false negatives. For a given object class, denote the set of ground-truth boxes as $X$ and the set of detections (with confidence scores) as $Y$. Given Intersection-over-Union (IoU) threshold $\tau$ and confidence threshold $s$, detections with scores below $s$ are discarded. The usual IoU-based matching assigns detections to ground truths, yielding counts $N_{TP}$ (true positives), $N_{FP}$ (false positives), and $N_{FN}$ (false negatives).

The LRP error at threshold $s$ is computed via three normalized terms:
- **Localization error:**
  $$
  E_{loc}(s) = \frac{1}{N_{TP}} \sum_{i=1}^{N_{TP}} \frac{1 - \mathrm{IoU}(x_i, y_{x_i})}{1 - \tau}
  $$
  where $(x_i, y_{x_i})$ denotes the matched ground-truth and detection pairs.

- **False-positive rate:**
  $$
  E_{FP}(s) = 1 - \mathrm{Precision}(s) = \frac{N_{FP}}{|Y_s|}
  $$

- **False-negative rate:**
  $$
  E_{FN}(s) = 1 - \mathrm{Recall}(s) = \frac{N_{FN}}{|X|}
  $$

The combined LRP error is given by:
$$
\mathrm{LRP}(s) = \frac{N_{TP} \cdot E_{loc}(s) + |Y_s| \cdot E_{FP}(s) + |X| \cdot E_{FN}(s)}{N_{TP} + N_{FP} + N_{FN}}
$$

This formulation ensures LRP $(s) \in [0, 1]$, with lower values indicating better performance. All terms admit a clear operational interpretation, and the metric remains well-defined whenever genuine detections or ground truths are present.

## 2. Definition and Computation of Optimal LRP

Optimal LRP (oLRP) for a given class searches for the threshold $s^*$ minimizing the LRP error:
$$
\mathrm{oLRP} = \min_{s \in [0,1]} \mathrm{LRP}(s)
$$

The optimization is typically performed over a discretized grid $S = \{0.00, 0.01, ..., 1.00\}$ by exhaustive search. For each $s \in S$, the error components $E_{loc}(s)$, $E_{FP}(s)$, and $E_{FN}(s)$ are evaluated. The threshold $s^*$ achieving
$$
\mathrm{oLRP} = \mathrm{LRP}(s^*)
$$
is selected, and its auxiliary components $\mathrm{oLRP}_{IoU} = E_{loc}(s^*)$, $\mathrm{oLRP}_{FP} = E_{FP}(s^*)$, and $\mathrm{oLRP}_{FN} = E_{FN}(s^*)$ quantify the optimal breakdown of localization and classification errors.

A mean over classes (moLRP) is defined analogously to mean Average Precision (mAP):
$$
\mathrm{moLRP} = \frac{1}{|C|} \sum_{c \in C} \mathrm{oLRP}_c
$$
where $C$ is the set of evaluated classes.

## 3. Algorithmic Structure and Practical Computation

Core computation proceeds via the following for each class and IoU threshold:
1. For each $s \in S$:
   - Select detections $Y_s$.
   - Assign detections to ground-truths using one-to-one IoU matching ($\mathrm{IoU} \geq \tau$).
   - Compute $N_{TP}$, $N_{FP}$, $N_{FN}$.
   - Derive $E_{loc}$, $E_{FP}$, $E_{FN}$ as above.
   - Calculate $\mathrm{LRP}(s)$.
   - If $\mathrm{LRP}(s)$ is the minimum so far, store $s^*$ and corresponding error components.
2. Report $\mathrm{oLRP}$ and the values at $s^*$.

This process applies independently per class. The exhaustive thresholding, performed at a grid resolution of 0.01, is computationally modest given contemporary resources.

## 4. Comparison with AP and Other Evaluation Metrics

Average Precision (AP) computes the area under the precision-recall (PR) curve by integrating performance over all confidence thresholds. AP, however, is insensitive to PR-curve shapes that yield identical areas and disregards bounding-box localization accuracy, except for the IoU binary qualification of a match. oLRP, in contrast, reports the single best operating point on the PR curve, directly characterizes the operational trade-off at deployment, and incorporates localization error as a primary component.

Distinctive theoretical properties include:
- oLRP reports separate components for localization, false positive, and false negative errors at $s^*$.
- LRP satisfies the triangle inequality and is a bounded metric in $[0, 1]$.
- oLRP remains valid even in degenerate cases with no true positives, so long as ground-truth or detected objects exist.

Unlike Panoptic Quality (PQ)—which combines recognition and segmentation quality but is specialized for panoptic segmentation—oLRP generalizes to all detection tasks and offers a principled means of threshold selection.

## 5. Empirical Findings and Deployment Implications

Empirical analysis on detection benchmarks (e.g., MS COCO-val2017) encompassing diverse contemporary detectors (e.g., SSD-300, SSD-512, Faster R-CNN + FPN, RetinaNet + FPN with ResNet-50/101) demonstrates:
- moLRP correlates closely with mAP rankings but often discriminates detectors with identical mAP by revealing differences in PR-curve sharpness or localization fidelity.
- Class-specific optimal thresholds $s^*_c$ exhibit high variability (from $\approx 0.05$ to $\approx 0.94$), indicating the suboptimality of a global threshold.
- In video object detection, switching from a general default threshold ($0.5$) to class-specific $s^*_c$ improved oLRP and mAP, especially in classes with very low/high optimal thresholds.

## 6. Limitations and Considerations

Potential limitations of oLRP include:
- Threshold discretization: Optimization over $s$ is performed on a discretized grid, introducing small approximation error.
- Single IoU threshold: oLRP is computed at a fixed $\tau$ (e.g., $0.5$), though evaluation at multiple thresholds is straightforward.
- Summary at one operating point: Collapsing performance onto $s^*$ may obscure detector behavior elsewhere on the PR curve.

Nevertheless, oLRP delivers a practical, interpretable single-value metric that unifies localization and classification error, provides actionable deployment thresholds, and supports nuanced comparative analysis of detection systems [1807.01696].

Source: https://www.emergentmind.com/topics/optimal-lrp-olrp