{"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/d-fine-redefine-regression-task-in-detrs-as","title":"D-FINE: Redefine Regression Task in DETRs as Fine-grained Distribution Refinement","arxiv_id":"2410.13842","date":"2024-10-17","proceeding":null,"authors":["Yansong Peng","Hebei Li","Peixi Wu","Yueyi Zhang","Xiaoyan Sun","Feng Wu"],"abstract":"We introduce D-FINE, a powerful real-time object detector that achieves outstanding localization precision by redefining the bounding box regression task in DETR models. D-FINE comprises two key components: Fine-grained Distribution Refinement (FDR) and Global Optimal Localization Self-Distillation (GO-LSD). FDR transforms the regression process from predicting fixed coordinates to iteratively refining probability distributions, providing a fine-grained intermediate representation that significantly enhances localization accuracy. GO-LSD is a bidirectional optimization strategy that transfers localization knowledge from refined distributions to shallower layers through self-distillation, while also simplifying the residual prediction tasks for deeper layers. Additionally, D-FINE incorporates lightweight optimizations in computationally intensive modules and operations, achieving a better balance between speed and accuracy. Specifically, D-FINE-L / X achieves 54.0% / 55.8% AP on the COCO dataset at 124 / 78 FPS on an NVIDIA T4 GPU. When pretrained on Objects365, D-FINE-L / X attains 57.1% / 59.3% AP, surpassing all existing real-time detectors. Furthermore, our method significantly enhances the performance of a wide range of DETR models by up to 5.3% AP with negligible extra parameters and training costs. Our code and pretrained models: https://github.com/Peterande/D-FINE.","url_abs":"https://arxiv.org/abs/2410.13842v1","url_pdf":"https://arxiv.org/pdf/2410.13842v1.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":"d-fine-redefine-regression-task-in-detrs-as","repo_url":"https://github.com/Peterande/D-FINE","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"d-fine-redefine-regression-task-in-detrs-as","repo_url":"https://github.com/open-edge-platform/geti","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"d-fine-redefine-regression-task-in-detrs-as","repo_url":"https://github.com/shihuahuang95/deim","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"d-fine-redefine-regression-task-in-detrs-as","repo_url":"https://github.com/huggingface/transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"d-fine-redefine-regression-task-in-detrs-as","repo_url":"https://github.com/open-edge-platform/training_extensions","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"real-time-object-detection","task_name":"Real-Time Object Detection"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"detr","method_name":"Detr"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"speed","method_name":"SPEED"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-X+","rank_in_archive_order":2,"of":82,"metrics":{"FPS (V100, b=1)":"78 (T4)","box AP":"59.3"},"uses_additional_data":false},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-X","rank_in_archive_order":11,"of":82,"metrics":{"FPS (V100, b=1)":"78 (T4)","box AP":"55.8"},"uses_additional_data":false},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-M+","rank_in_archive_order":15,"of":82,"metrics":{"FPS (V100, b=1)":"178 (T4)","box AP":"55.1"},"uses_additional_data":true},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-L","rank_in_archive_order":26,"of":82,"metrics":{"FPS (V100, b=1)":"124 (T4)","box AP":"54.0"},"uses_additional_data":false},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-M","rank_in_archive_order":45,"of":82,"metrics":{"FPS (V100, b=1)":"178 (T4)","box AP":"52.3"},"uses_additional_data":false},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-S+","rank_in_archive_order":54,"of":82,"metrics":{"FPS (V100, b=1)":"287 (T4)","box AP":"50.7"},"uses_additional_data":true},{"leaderboard":"/sota/real-time-object-detection-on-coco","task":"Real-Time Object Detection","dataset":"COCO (Common Objects in Context)","model":"D-FINE-S","rank_in_archive_order":61,"of":82,"metrics":{"FPS (V100, b=1)":"287 (T4)","box AP":"48.5"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.13842","atlas_url":"https://app.syntology.ai/?focus=2410.13842","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.13842"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huggingface/transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Peterande/D-FINE","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shihuahuang95/deim","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-edge-platform/training_extensions","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-edge-platform/geti","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":10,"unverified":4},"by_repo_kind":{"official":{"samples":14,"ran":10,"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":0,"samples":[{"code_sha256_prefix":"55ac89cb59e7fe93","entry":"dictify","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/yaml_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/yaml_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"55ac89cb59e7fe93"}},{"code_sha256_prefix":"f032fa04460c4fc9","entry":"elementwise_box_iou","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/box_ops.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/box_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f032fa04460c4fc9"}},{"code_sha256_prefix":"96986c2e89b1597c","entry":"elementwise_generalized_box_iou","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/box_ops.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/box_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"96986c2e89b1597c"}},{"code_sha256_prefix":"1202e5e128785814","entry":"extract_schema","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/workspace.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/workspace.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1202e5e128785814"}},{"code_sha256_prefix":"2f52077940b53c42","entry":"generalized_box_iou","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/box_ops.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/box_ops.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f52077940b53c42"}},{"code_sha256_prefix":"024f9ddd58b25511","entry":"load_config","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/yaml_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/yaml_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"024f9ddd58b25511"}},{"code_sha256_prefix":"288efb4f48e3358a","entry":"merge_dict","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/yaml_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/yaml_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"288efb4f48e3358a"}},{"code_sha256_prefix":"2a50c87f96494841","entry":"register","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/workspace.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/workspace.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2a50c87f96494841"}},{"code_sha256_prefix":"a65eab71a65df60e","entry":"setup_distributed","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/dist_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/dist_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a65eab71a65df60e"}},{"code_sha256_prefix":"18349a0bf298c043","entry":"warp_model","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/dist_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/dist_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18349a0bf298c043"}},{"code_sha256_prefix":"0216311af005f21f","entry":"all_gather","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/logger.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/logger.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0216311af005f21f"}},{"code_sha256_prefix":"eb5e01d60557539c","entry":"create","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/core/workspace.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/core/workspace.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eb5e01d60557539c"}},{"code_sha256_prefix":"8c4ff9fb866ea191","entry":"de_model","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/dist_utils.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/dist_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8c4ff9fb866ea191"}},{"code_sha256_prefix":"e6c2f1b16c9d4813","entry":"reduce_dict","repo":"Peterande/D-FINE","repo_kind":"official","path":"src/misc/logger.py","file_url":"https://github.com/Peterande/D-FINE/blob/HEAD/src/misc/logger.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e6c2f1b16c9d4813"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}