A Review of Uncertainty Calibration in Pretrained Object Detectors

Denis Huseljic, Marek Herde, Mehmet Muejde, Bernhard SickarXiv 2022 · DOI

Abstract

Modern object detectors, while highly accurate, often suffer from poor uncertainty calibration—their predicted probabilities do not accurately reflect their true success rates. This paper presents a modular framework for evaluating calibration across all classes, revealing that architectural choices like Non-Maximum Suppression (NMS) significantly impact reliability. The authors demonstrate that simple adjustments to background class weighting during finetuning can substantially improve a detector's calibration without sacrificing accuracy.

Introduction

In safety-critical domains such as autonomous driving or medical imaging, the reliability of an object detector is as crucial as its accuracy. A well-calibrated model ensures that a predicted probability of 0.8 corresponds to an 80% likelihood of the prediction being correct. However, while modern architectures like Faster-RCNN and DETR achieve high mean Average Precision (mAP), they frequently exhibit "overconfidence," where their internal confidence scores far exceed their actual performance.

The Calibration Gap in Object Detection

Most research into uncertainty calibration has historically focused on image classification. Object detection introduces unique complexities: a variable number of objects per image, the dominance of a "background" class, and the use of post-processing heuristics like Non-Maximum Suppression (NMS).

Calibration examples and top-label plot showing model overconfidence.

Current evaluation methods often focus solely on the "top-label" (the highest probability class), ignoring the rich information contained in the full probability distribution, including the model's assessment of the background.

A Modular Evaluation Framework

To address these challenges, the authors propose a three-step modular framework designed to provide a comprehensive and fair comparison across different detector architectures.

The three-step modular framework for evaluating detector calibration.
  1. Post-Processing: This stage analyzes how operations like NMS, which prune overlapping bounding boxes, alter the underlying probability distributions.
  2. Evaluation Set Creation: Predictions are matched to ground-truth objects using Intersection over Union (IoU) thresholds. This step is critical for including false negatives and background predictions, ensuring an unbiased evaluation.
  3. Metric Evaluation: The framework moves beyond simple accuracy to utilize Proper Scoring Rules such as Negative Log-Likelihood (NLL) and Brier Score, alongside Marginal Calibration Error (MCE), which evaluates calibration across all possible classes.

Comparative Analysis: Faster-RCNN vs. DETR

The study compares two dominant paradigms: the two-stage Faster-RCNN and the set-based DETR. A key finding is that NMS acts as a "calibration killer" for Faster-RCNN. While the raw network outputs may be underconfident, the filtering process of NMS removes low-probability candidates, leaving a set of predictions that appear significantly overconfident.

In contrast, DETR is naturally better calibrated. Because DETR is designed to avoid duplicate predictions during training, it bypasses the need for NMS. On the COCO ANIMALS dataset, DETR achieved a Top-label Calibration Error (TCE) of 0.019, significantly lower than Faster-RCNN’s 0.061.

Key Insights: Background Bias and OOD Blindness

The research highlights a significant interdependency between object classes and the background. Models tend to be underconfident about the background while remaining overconfident about specific objects. Furthermore, current detectors exhibit "OOD Blindness"; when presented with out-of-distribution (OOD) objects, they rarely signal high uncertainty (entropy). Instead, they typically classify unknown objects as "background" with high certainty, failing to identify them as novel or unknown.

Improving Reliability through Finetuning

A practical contribution of this work is the discovery that calibration can be improved through a simple finetuning strategy. By increasing the loss-weight of the background class (e.g., from 0.1 to 8.0) during a brief secondary training phase, the authors significantly reduced MCE and NLL. Notably, this adjustment often resulted in a slight improvement in overall detection accuracy (mAP), suggesting that better calibration and higher accuracy are not necessarily mutually exclusive.

Conclusion and Future Directions

While this study provides a robust framework for evaluating calibration, it focuses on Faster-RCNN and DETR, leaving one-stage detectors for future investigation. Future work should also explore box-dependent calibration—examining if confidence correlates with localization precision—and develop more sophisticated methods for detectors to explicitly signal out-of-distribution objects.

Summary updated

BibTeX
@misc{huseljic2022review,
  author = {Denis Huseljic and Marek Herde and Mehmet Muejde and Bernhard Sick},
  title = {{A Review of Uncertainty Calibration in Pretrained Object Detectors}},
  year = {2022},
  eprint = {2210.02935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.02935},
}
Figure