{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/bridging-precision-and-confidence-a-train","title":"Bridging Precision and Confidence: A Train-Time Loss for Calibrating Object Detection","arxiv_id":"2303.14404","date":"2023-03-25","proceeding":"CVPR 2023 1","authors":["Muhammad Akhtar Munir","Muhammad Haris Khan","Salman Khan","Fahad Shahbaz Khan"],"abstract":"Deep neural networks (DNNs) have enabled astounding progress in several vision-based problems. Despite showing high predictive accuracy, recently, several works have revealed that they tend to provide overconfident predictions and thus are poorly calibrated. The majority of the works addressing the miscalibration of DNNs fall under the scope of classification and consider only in-domain predictions. However, there is little to no progress in studying the calibration of DNN-based object detection models, which are central to many vision-based safety-critical applications. In this paper, inspired by the train-time calibration methods, we propose a novel auxiliary loss formulation that explicitly aims to align the class confidence of bounding boxes with the accurateness of predictions (i.e. precision). Since the original formulation of our loss depends on the counts of true positives and false positives in a minibatch, we develop a differentiable proxy of our loss that can be used during training with other application-specific loss functions. We perform extensive experiments on challenging in-domain and out-domain scenarios with six benchmark datasets including MS-COCO, Cityscapes, Sim10k, and BDD100k. Our results reveal that our train-time loss surpasses strong calibration baselines in reducing calibration error for both in and out-domain scenarios. Our source code and pre-trained models are available at https://github.com/akhtarvision/bpc_calibration","url_abs":"https://arxiv.org/abs/2303.14404v1","url_pdf":"https://arxiv.org/pdf/2303.14404v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"bridging-precision-and-confidence-a-train","repo_url":"https://github.com/akhtarvision/bpc_calibration","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.14404","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.14404"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/akhtarvision/bpc_calibration","reach":null}],"summary":{"ran_fixture":3,"ran_draft_wrong":5,"ran_honours":3,"ran_violates":1,"unverified":6},"by_repo_kind":{"official":{"samples":17,"ran":11,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"7aa4e421ee805f42","entry":"_compute_ap_recall","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7aa4e421ee805f42"}},{"code_sha256_prefix":"3311eefa83dfc00b","entry":"_evaluate_image","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3311eefa83dfc00b"}},{"code_sha256_prefix":"2910190caab7b66c","entry":"_get_area","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2910190caab7b66c"}},{"code_sha256_prefix":"b871b728fb3bca2a","entry":"_group_detections","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b871b728fb3bca2a"}},{"code_sha256_prefix":"48bbfd6a17032332","entry":"_jaccard","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"48bbfd6a17032332"}},{"code_sha256_prefix":"ce749f837424dd8c","entry":"box_iou","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce749f837424dd8c"}},{"code_sha256_prefix":"ac8fe530cdad4d8c","entry":"dice_loss","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ac8fe530cdad4d8c"}},{"code_sha256_prefix":"6097d6378e7d3046","entry":"generalized_box_iou","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6097d6378e7d3046"}},{"code_sha256_prefix":"9f4690f675176640","entry":"get_coco_metrics","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9f4690f675176640"}},{"code_sha256_prefix":"9705264816e566d9","entry":"interpolate","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9705264816e566d9"}},{"code_sha256_prefix":"07a415e6bef6b5cf","entry":"nested_tensor_from_tensor_list","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"07a415e6bef6b5cf"}},{"code_sha256_prefix":"5c0711aada67957e","entry":"sigmoid_focal_loss","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"5c0711aada67957e"}},{"code_sha256_prefix":"72d9dc8fd5fb3ce4","entry":"BBFormat","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72d9dc8fd5fb3ce4"}},{"code_sha256_prefix":"c7b3326fb084b72d","entry":"BBType","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7b3326fb084b72d"}},{"code_sha256_prefix":"29cf19c6e7a43150","entry":"PostProcess_grad","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29cf19c6e7a43150"}},{"code_sha256_prefix":"62b1926bc1824609","entry":"SetCriterion","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"62b1926bc1824609"}},{"code_sha256_prefix":"ada48ab6a8e8dd76","entry":"_compute_ious","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ada48ab6a8e8dd76"}},{"code_sha256_prefix":"9724d55577f6ca2c","entry":"accuracy","repo":"akhtarvision/bpc_calibration","repo_kind":"official","path":"models/deformable_detr.py","file_url":"https://github.com/akhtarvision/bpc_calibration/blob/HEAD/models/deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9724d55577f6ca2c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}