{"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/dab-detr-dynamic-anchor-boxes-are-better-1","title":"DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR","arxiv_id":"2201.12329","date":"2022-01-28","proceeding":"ICLR 2022 4","authors":["Shilong Liu","Feng Li","Hao Zhang","Xiao Yang","Xianbiao Qi","Hang Su","Jun Zhu","Lei Zhang"],"abstract":"We present in this paper a novel query formulation using dynamic anchor boxes for DETR (DEtection TRansformer) and offer a deeper understanding of the role of queries in DETR. This new formulation directly uses box coordinates as queries in Transformer decoders and dynamically updates them layer-by-layer. Using box coordinates not only helps using explicit positional priors to improve the query-to-feature similarity and eliminate the slow training convergence issue in DETR, but also allows us to modulate the positional attention map using the box width and height information. Such a design makes it clear that queries in DETR can be implemented as performing soft ROI pooling layer-by-layer in a cascade manner. As a result, it leads to the best performance on MS-COCO benchmark among the DETR-like detection models under the same setting, e.g., AP 45.7\\% using ResNet50-DC5 as backbone trained in 50 epochs. We also conducted extensive experiments to confirm our analysis and verify the effectiveness of our methods. Code is available at \\url{https://github.com/SlongLiu/DAB-DETR}.","url_abs":"https://arxiv.org/abs/2201.12329v4","url_pdf":"https://arxiv.org/pdf/2201.12329v4.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":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/slongliu/dab-detr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/IDEA-Research/detrex","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/Tajamul21/Detection-Classification-and-Semantic_Segmentation-of-apples","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/helq2612/biadt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/horrible-dong/teamdetr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/idea-research/dab-detr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/idea-research/dn-detr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dab-detr-dynamic-anchor-boxes-are-better-1","repo_url":"https://github.com/alibaba/EasyCV","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"2d-object-detection","task_name":"2D Object Detection"},{"task_slug":"object-detection","task_name":"Object Detection"}],"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":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"DAB-DETR-DC5-R101","rank_in_archive_order":102,"of":220,"metrics":{"AP50":"67","AP75":"50.2","APL":"64.1","APM":"50.5","APS":"28.1","Params (M)":"63","box AP":"46.6"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"DAB-DETR-R101","rank_in_archive_order":135,"of":220,"metrics":{"AP50":"64.7","AP75":"47.2","APL":"62.9","APM":"48.2","APS":"24.1","Params (M)":"63","box AP":"44.1"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2201.12329","atlas_url":"https://app.syntology.ai/?focus=2201.12329","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.12329"}},"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/horrible-dong/teamdetr","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/slongliu/dab-detr","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idea-research/dab-detr","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IDEA-Research/detrex","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alibaba/EasyCV","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idea-research/dn-detr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/helq2612/biadt","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Tajamul21/Detection-Classification-and-Semantic_Segmentation-of-apples","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"listed":{"samples":11,"ran":6,"repositories":3}},"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":"764f03e6f6c10909","entry":"GradientReversal","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_deformable_detr.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":"764f03e6f6c10909"}},{"code_sha256_prefix":"6e1a6cc4327acf17","entry":"GradientReversalFunction","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_deformable_detr.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":"6e1a6cc4327acf17"}},{"code_sha256_prefix":"79c4cf758452c514","entry":"Mutual_loss","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_deformable_detr.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":"79c4cf758452c514"}},{"code_sha256_prefix":"d336c6095b11629a","entry":"NestedTensor","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_deformable_detr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d336c6095b11629a"}},{"code_sha256_prefix":"6442da4f34dd152c","entry":"nested_tensor_from_tensor_list","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6442da4f34dd152c"}},{"code_sha256_prefix":"5c0711aada67957e","entry":"sigmoid_focal_loss","repo":"IDEA-Research/DAB-DETR","repo_kind":"listed","path":"models/DAB_DETR/DABDETR.py","file_url":"https://github.com/IDEA-Research/DAB-DETR/blob/HEAD/models/DAB_DETR/DABDETR.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5c0711aada67957e"}},{"code_sha256_prefix":"530114cee9263694","entry":"DABDETR","repo":"idea-research/dn-detr","repo_kind":"listed","path":"models/DN_DAB_DETR/DABDETR.py","file_url":"https://github.com/idea-research/dn-detr/blob/HEAD/models/DN_DAB_DETR/DABDETR.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":"530114cee9263694"}},{"code_sha256_prefix":"fe79de37d598acb3","entry":"DABDeformableDETR","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fe79de37d598acb3"}},{"code_sha256_prefix":"50ec3e702e11eebb","entry":"_onnx_nested_tensor_from_tensor_list","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"50ec3e702e11eebb"}},{"code_sha256_prefix":"af4a2db04af02c0a","entry":"prepare_for_dn","repo":"helq2612/biadt","repo_kind":"listed","path":"models/dn_dab_deformable_detr/dab_deformable_detr.py","file_url":"https://github.com/helq2612/biadt/blob/HEAD/models/dn_dab_deformable_detr/dab_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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af4a2db04af02c0a"}},{"code_sha256_prefix":"daa15d8205b6349a","entry":"prepare_for_dn","repo":"idea-research/dn-detr","repo_kind":"listed","path":"models/DN_DAB_DETR/DABDETR.py","file_url":"https://github.com/idea-research/dn-detr/blob/HEAD/models/DN_DAB_DETR/DABDETR.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":"daa15d8205b6349a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}