[Paper Review] Cal-DETR: Calibrated Detection Transformer
Cal-DETR proposes a train-time calibration method for vision transformer-based object detectors (Deformable-DETR, UP-DETR, DINO) using uncertainty-guided logit modulation and logit mixing as a regularizer. It improves both in-domain and out-of-domain calibration while maintaining or boosting detection accuracy, outperforming existing calibration methods on MS-COCO and Cityscapes benchmarks.
Albeit revealing impressive predictive performance for several computer vision tasks, deep neural networks (DNNs) are prone to making overconfident predictions. This limits the adoption and wider utilization of DNNs in many safety-critical applications. There have been recent efforts toward calibrating DNNs, however, almost all of them focus on the classification task. Surprisingly, very little attention has been devoted to calibrating modern DNN-based object detectors, especially detection transformers, which have recently demonstrated promising detection performance and are influential in many decision-making systems. In this work, we address the problem by proposing a mechanism for calibrated detection transformers (Cal-DETR), particularly for Deformable-DETR, UP-DETR and DINO. We pursue the train-time calibration route and make the following contributions. First, we propose a simple yet effective approach for quantifying uncertainty in transformer-based object detectors. Second, we develop an uncertainty-guided logit modulation mechanism that leverages the uncertainty to modulate the class logits. Third, we develop a logit mixing approach that acts as a regularizer with detection-specific losses and is also complementary to the uncertainty-guided logit modulation technique to further improve the calibration performance. Lastly, we conduct extensive experiments across three in-domain and four out-domain scenarios. Results corroborate the effectiveness of Cal-DETR against the competing train-time methods in calibrating both in-domain and out-domain detections while maintaining or even improving the detection performance. Our codebase and pre-trained models can be accessed at \url{https://github.com/akhtarvision/cal-detr}.
Motivation & Objective
- To address the lack of calibration methods for modern transformer-based object detectors, especially in safety-critical applications.
- To improve model calibration for both in-domain and out-of-domain detection scenarios, where distribution shifts are common.
- To develop a train-time calibration approach that does not require architectural changes and imposes minimal computational overhead.
- To enhance detection performance alongside calibration by introducing complementary regularization techniques in the logit space.
- To provide a plug-and-play solution for improving confidence calibration in state-of-the-art detection transformers.
Proposed method
- Proposes a novel uncertainty quantification method in transformer-based detectors using query-wise attention maps, without architectural modifications.
- Introduces uncertainty-guided logit modulation that dynamically adjusts class logits based on predicted uncertainty scores.
- Develops a logit mixing strategy that combines predictions from positive queries via a learnable mixing coefficient α, acting as a regularizer with detection-specific losses.
- Employs a hybrid training objective combining standard detection losses (e.g., box and classification loss) with a calibration regularizer loss, weighted by λ.
- Uses a single hyperparameter α₁ ∈ [0.6, 0.9] for logit mixing, with α₁ = 0.9 found optimal on validation sets.
- Applies beta distribution sampling (β = 0.3) for logit mixing to improve generalization and calibration.

Experimental results
Research questions
- RQ1Can uncertainty estimation be effectively integrated into transformer-based object detectors without architectural changes?
- RQ2Does uncertainty-guided logit modulation improve confidence calibration in object detection models?
- RQ3Can logit mixing act as a complementary regularizer to enhance both calibration and detection performance?
- RQ4How does Cal-DETR perform under distribution shift (out-of-domain) compared to existing calibration methods?
- RQ5What hyperparameter settings (α, λ, β) yield optimal trade-offs between calibration and detection accuracy?
Key findings
- Cal-DETR reduces D-ECE from 13.8 (baseline D-DETR) to 8.4 on Cityscapes (in-domain), demonstrating significant calibration improvement.
- On the out-of-domain Foggy Cityscapes benchmark, Cal-DETR reduces D-ECE from 19.5 to 11.9, showing robustness to distribution shift.
- The method maintains or improves AP (28.4 vs. 26.8) and AP₀.₅ (51.4 vs. 49.5) on Cityscapes, indicating no performance drop despite calibration gains.
- The ablation study confirms that both uncertainty-guided logit modulation and logit mixing contribute independently and synergistically to calibration.
- The optimal logit mixing weight α₁ = 0.9 achieves the best balance between detection accuracy and calibration, with α₁ = 0.9 outperforming other values.
- The method with a single α (Cal-DETR) outperforms the sampling-based variant (Cal-DETR S), suggesting more stable and effective mixing in logit space.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.