Cal-DETR: Calibrated Detection Transformer

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}.

Paper

References (53)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer Gc9J7/10 · confidence 5/52023-06-29

Summary

The paper proposes a method to improve the calibration performance of transformer-based object detectors. In their approach, they first present a way to quantify the uncertainty of each logit using the variance of the outputs of different transformer decoder layers. Then, with the motivation that a higher uncertainty generally implies a poor calibration, they downscale the logits with high uncertainty. Second, they introduce a mixup based approach that is applied to the queries that match with the objects. Specifically, they create a prototype as the mean of the logits of the positive queries and mix it up with the logits of the foreground objects. They incorporate their method on Deformable DETR and UP-DETR, and observed notable improvements across different datasets.

Strengths

- The proposed method is a training time approach, hence does not require an extra hold-out validation set. - The improvement in the calibration performance is notable and outperforms existing approaches consistently in several datasets. - While the reilabiility of the estimated uncertainties are not investigated, the proposed approach to do so is intuitive and does not introduce an additional burden on the detection architecture. - The paper is written clearly and it is easy to follow.

Weaknesses

- I think the logit mixup strategy that the authors introduce is quite related to a cited work [36]. The main differences are that the authors apply mixup in the logit space (which is again special case of manifold mixup), they use a fixed mixing coefficient instead of sampling it and the method is applied for object detection. I haven't seen in the paper (especially in related work or in Section 3.3.2) such a clarification. Therefore, I'd see the contribution of the authors in logit mixup as the extension of the regularized mixup [36] to object detection. I think this is still an important contribution but I'd like to see an explicit discussion with the prior related work. - Recently [A] showed that the number of detections that are input to the calibration measure has a clear effect on the calibration performance. Specifically, such measures are easy to be misleading due to the maximum number of allowed detections, which is for example 100 for COCO dataset. For example, a detector that outputs 100 detection has more advantage to achieve lower calibration error compared to a detector that outputs less and does not fill the quota of 100. So, I wonder whether such a case exists here. Specifically for example for Table 1, how many detections per image on average do Baseline D-DETR, temp scaling, TCD (as the closest counterpart) and Cal-DETR output (which are then used as the inputs to estimate Detection ECE)? Or is there any thresholding of the top-100 detections while estimating the DECE? If so, how? Related to this, a minor suggestion (that I am not considering in my rating as a weakness as [A] came out in CVPR in June) can be to include a comparison in terms of Localisation-aware ECE in the way that [A] suggests to avoid such a doubt in the final version if the paper is accepted. - The authors claim that they propose a method to quantify the uncertainty for each logit. However, further insight on these uncertainties are not provided. For example, there is no evidence that the estimated uncertainties are reliable and can be used for different purposes. [A] Towards Building Self-Aware Object Detectors via Reliable Uncertainty Quantification and Calibration, CVPR 2023

Questions

- Specifically for example for Table 1, how many detections per image on average do Baseline D-DETR, temp scaling, TCD (as the closest counterpart) and Cal-DETR output (which are then used as the inputs to estimate Detection ECE)? Or is there any thresholding of the top-100 detections while estimating the DECE? - Can you please confirm that you obtain the prototypical representation query for each iteration during training? And I'd recommend making this explicit in the paper (L217-221). Also I'd recommend making it more explicit that you compute the mean of the logits across all positive queries (L217-218). - In constrast to several mixup strategies that sample mixing coefficient (\alpha in Eq.(4)) from a distribution, why did you choose a single \alpha value? - How do you obtain the labels after smoothing ( `c_i in L225). I think this should be explicitly defined.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Briefly mentioned

Reviewer co8a6/10 · confidence 2/52023-07-05

Summary

This paper proposing a mechanism for calibrated detection transformers (Cal-DETR), particularly for Deformable-DETR and UP-DETR, which consists of quantifying uncertainty, an uncertainty-guided logit modulation and a logit mixing approach. Results show the method improves the baselines in calibrating both in-domain and out-domain detections while maintaining or even improving the detection performance.

Strengths

I'm familiar with object detection and DETR, but not Model calibration. It seems that the model calibration is a valuable problem, and the proposed method does improve it without performance drop.

Weaknesses

It seems the performance of selected baselines is relatively low, e.g. the performance of Deformable-DETR is only 44.0 in COCO as mentioned in Table 1. Will the method still be effective when using a strong or even a sota model, like [DINO](https://github.com/IDEA-Research/DINO)?

Questions

Will the method still be effective when using a strong or even a sota model?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The authors may try more baselines and report results.

Reviewer 95V65/10 · confidence 3/52023-07-07

Summary

This paper focuses on performing calibration for DETR, particularly for Deformable-DETR and UP-DETR. The authors first propose an approach for quantifying uncertainty in DETRs, which is built from the variation in the output of decoder layers. Then they develop an uncertainty-guided logit modulation mechanism and a logit mixing approach as regularizers. Experiments on three in-domain and four out-domain scenarios show the effectiveness of the proposed method in calibrating.

Strengths

The results of D-ECE are good in both in-domain and out-domain scenarios. The experiments are extensive across various datasets and settings.

Weaknesses

1. The proposed method has limited novelty. Although the authors claim that they do calibrate on object detection, the proposed method also performs the logits and shares large similarities with the methods in classification. 2. The way to quantify uncertainty in the DETR pipeline using the variation in the output of decoder layers is a straightforward idea, which may not be propriety to claim as a contribution. Moreover, the relationship between the proposed uncertainty-guided logit modulation mechanism and the logit mixing approach is not clear. It is more like a combination of two techniques, lacking deep insights. 3. When introducing D-ECE in Sec3.2, it would be better to cite [22] to indicate that the used measures follow previous works.

Questions

1. I am confused that what benefits can we get when the D-ECE is lower. It seems that the box AP does not show clear differences between Cal-DETR and the baseline model in both in-domain and out-domain scenarios. If the calibration can not bring benefits in detecting objects, then what benefits can we get by performing calibration? 2. It seems that the proposed uncertainty-guided logit modulation and the logit mixing approach only perform on the output logits of the last decoder layer. Do the authors try to implement them into all decoder layers' output logits? 3. In Table 1 and Table 4, it seems that the D-ECE of the out-domain is lower than the D-ECE of the in-domain scenarios. Why? Does this phenomenon have a further explanation?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

See the above sections.

Reviewer wX9Z5/10 · confidence 4/52023-07-27

Summary

This paper proposes a calibrated detection transformer model, which equips the DETR variants with an uncertainty-guided logit modulator and a mixup augmentation for the classification branch of the detector. Specifically, the authors first quantify the uncertainty with the variance among the predicted logits from different decoder layers. Then logits with more uncertainty are suppressed. For mixup, it is similar to the common mixup used in detectors except the mix is between the average of the batch and each sample. Through experiments on various benchmarks, the authors demonstrate the effectiveness of the proposed method.

Strengths

1. This paper studies an important but underexplored problem, calibration in object detectors. 2. The proposed method is lightweight and does not require any network modifications, which makes it more likely to be generalized to more architecture and application scenarios. 3. The authors perform very comprehensive experiments and the results show the effectiveness of the proposed method.

Weaknesses

1. It is unclear why the variation in the output of decoder layers can measure the uncertainty of the class prediction. Is it based on intuition? And is there any experimental support? 2. As one of the two major contributions, logit mixing for confidence calibration is not technically novel enough. First, applying mixup for the classification branch of the object detector is considered a well-known technique [1][2]. Second, in [1], the mixup is considered a trick instead of a technical contribution. Finally, the difference in mixup between [1] and this paper is subtle. [1] Zhang, Zhi, et al. "Bag of freebies for training object detection neural networks." [2] Ge, Zheng, et al. "Yolox: Exceeding yolo series in 2021.

Questions

Please refer to the weakness section.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

N/A

Authorsrebuttal2023-08-18

Dear Reviewer 95V6, Thanks again for your effort in reviewing our paper and giving us a helpful chance to improve the paper's quality. We hope that our response can address your concerns. Considering that the discussion period will end on August 21, we would like to know if you have any other questions about our paper, and we are glad to have a discussion with you in the following days. If our response has addressed your concerns, would you mind considering re-evaluating our work based on the updated information? Best regards, Authors

Reviewer 95V62023-08-20

Thanks for the authors' responses. I am not directly working on the model calibration, but part of my concerns are well addressed. I raised my score to borderline acceptance.

Reviewer Gc9J2023-08-20

I thank the authors for their time and efforts to address my concerns. I am mostly satisfied with the rebuttal. My only point is: I do not agree that measuring the calibration error using 0.3 as a fixed confidence threshold provides a fair comparison. I can understand that this is the approach used in some repositories. However, - Reporting AP with top-100 detections (a potentially very low threshold) and DECE with 0.3 result in two configurations for object detector in a practical application. As a single setting can be used to get the detections in the application, I think this (using two settings, one for AP and one for DECE) is not a realistic way of comparing models. - A choice of 0.3 is also arbitrary. I am not sure if this threshold promotes or demotes some detectors. Just to make sure, if possible, could you please at least compute AP or LRP Errors of some models from 0.3 confidence score as well? This can make sure that the detector is not only calibrated but also it is accurate in the same setting compared to other methods.

Authorsrebuttal2023-08-20

We thank you for reading our rebuttal and providing insightful comments. We report AP on top-100 detections, to avoid any confusion of performance drop when comparing with the standard settings. However, for the sake of completeness and as suggested, we report the AP/mAP on COCO (in-domain and out-domain) with same threshold (of 0.3) used for D-ECE. We observe that, even using the higher threshold, our Cal-DETR delivers the best detection performance with no drop across both in-domain and out-domain scenarios. | | In Domain | | Out Domain | | |----------|-----------|------|------------|------| | Methods | AP | mAP | AP | mAP | | Baseline$_{D-DETR}$ | 39.9 | 56.2 | 20.6 | 30.0 | | TCD | 40.0 | 56.3 | 20.7 | 30.1 | | **Cal-DETR** | 40.6 | 57.9 | 21.1 | 31.3 |

Reviewer Gc9J2023-08-20

Thank you for your time. Given these results, I am happy to increase my score. I’d recommend the authors to consider additionally including in the camera ready version the following: - the methods evaluated as suggested in [A], i.e. using the best possible threshold for all models in terms of LRP Error and reporting LRP Error and DECE (and/or LaECE) with that confidence score threshold - the AP and DECE from 0.30 threshold (as reported above) I believe this type of evaluation will also lead the following works on calibration properly and increase the value of this paper.

Authorsrebuttal2023-08-20

We sincerely appreciate the constructive discussion. Thank you for the suggestions towards improving our submission.

Reviewer wX9Z2023-08-22

Thanks for the detailed response. Most of my concerns are addressed and I decided to keep my initial rating (5 borderline accept).

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC