{"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/detrs-with-hybrid-matching","title":"DETRs with Hybrid Matching","arxiv_id":"2207.13080","date":"2022-07-26","proceeding":"CVPR 2023 1","authors":["Ding Jia","Yuhui Yuan","Haodi He","Xiaopei Wu","Haojun Yu","WeiHong Lin","Lei Sun","Chao Zhang","Han Hu"],"abstract":"One-to-one set matching is a key design for DETR to establish its end-to-end capability, so that object detection does not require a hand-crafted NMS (non-maximum suppression) to remove duplicate detections. This end-to-end signature is important for the versatility of DETR, and it has been generalized to broader vision tasks. However, we note that there are few queries assigned as positive samples and the one-to-one set matching significantly reduces the training efficacy of positive samples. We propose a simple yet effective method based on a hybrid matching scheme that combines the original one-to-one matching branch with an auxiliary one-to-many matching branch during training. Our hybrid strategy has been shown to significantly improve accuracy. In inference, only the original one-to-one match branch is used, thus maintaining the end-to-end merit and the same inference efficiency of DETR. The method is named H-DETR, and it shows that a wide range of representative DETR methods can be consistently improved across a wide range of visual tasks, including DeformableDETR, PETRv2, PETR, and TransTrack, among others. The code is available at: https://github.com/HDETR","url_abs":"https://arxiv.org/abs/2207.13080v3","url_pdf":"https://arxiv.org/pdf/2207.13080v3.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":"detrs-with-hybrid-matching","repo_url":"https://github.com/HDETR/H-Deformable-DETR","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/HDETR/H-Deformable-DETR-mmdet","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/HDETR/H-Detic-LVIS","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/HDETR/H-PETR-3D","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/HDETR/H-PETR-Pose","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/2023-MindSpore-1/ms-code-211/tree/main/detr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/IDEA-Research/detrex/blob/main/projects/h_deformable_detr/README.md","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"detrs-with-hybrid-matching","repo_url":"https://github.com/MindSpore-MS-Code2/code0/tree/main/detr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"set-matching","task_name":"set matching"}],"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":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.13080","atlas_url":"https://app.syntology.ai/?focus=2207.13080","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.13080"}},"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/HDETR/H-Deformable-DETR-mmdet","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-211/tree/main/detr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HDETR/H-PETR-Pose","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HDETR/H-Detic-LVIS","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HDETR/H-PETR-3D","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-MS-Code2/code0/tree/main/detr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IDEA-Research/detrex/blob/main/projects/h_deformable_detr/README.md","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HDETR/H-Deformable-DETR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"ran_honours":2,"ran_violates":2,"ran_draft_wrong":5,"ran":4,"unverified":3},"by_repo_kind":{"official":{"samples":17,"ran":14,"repositories":3},"listed":{"samples":1,"ran":1,"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":"144d10b49baeb8a6","entry":"window_partition","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"models/swin_transformer.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/models/swin_transformer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"144d10b49baeb8a6"}},{"code_sha256_prefix":"f31a58bf6457ced5","entry":"convert_to_xywh","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"datasets/coco_eval.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/datasets/coco_eval.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f31a58bf6457ced5"}},{"code_sha256_prefix":"ac8fe530cdad4d8c","entry":"dice_loss","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"models/segmentation.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/models/segmentation.py","link_basis":"harvester_set","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":"fe0ddcc2d420c9a0","entry":"evaluate","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"datasets/coco_eval.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/datasets/coco_eval.py","link_basis":"harvester_set","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":"fe0ddcc2d420c9a0"}},{"code_sha256_prefix":"1f211df98dc51cee","entry":"get_clip_embeddings","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/predictor.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/predictor.py","link_basis":"harvester_set","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":"1f211df98dc51cee"}},{"code_sha256_prefix":"bb583e07209fe58b","entry":"get_fed_loss_inds","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/modeling/utils.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/modeling/utils.py","link_basis":"harvester_set","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":"bb583e07209fe58b"}},{"code_sha256_prefix":"08bf7ecdb2fffe84","entry":"get_vit_lr_decay_rate","repo":"IDEA-Research/detrex","repo_kind":"listed","path":"detrex/modeling/backbone/eva.py","file_url":"https://github.com/IDEA-Research/detrex/blob/HEAD/detrex/modeling/backbone/eva.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"08bf7ecdb2fffe84"}},{"code_sha256_prefix":"1f6e4c3da7b82979","entry":"load_class_freq","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/modeling/utils.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/modeling/utils.py","link_basis":"harvester_set","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":"1f6e4c3da7b82979"}},{"code_sha256_prefix":"c15434906f804d7f","entry":"match_name_keywords","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/custom_solver.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/custom_solver.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c15434906f804d7f"}},{"code_sha256_prefix":"718ca707584a0928","entry":"pos2posemb3d","repo":"HDETR/H-PETR-3D","repo_kind":"official","path":"projects/mmdet3d_plugin/models/dense_heads/hybrid_petrv2_head.py","file_url":"https://github.com/HDETR/H-PETR-3D/blob/HEAD/projects/mmdet3d_plugin/models/dense_heads/hybrid_petrv2_head.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":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"718ca707584a0928"}},{"code_sha256_prefix":"5c0711aada67957e","entry":"sigmoid_focal_loss","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"models/segmentation.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/models/segmentation.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c0711aada67957e"}},{"code_sha256_prefix":"8cc99e95f95cb562","entry":"train_hybrid","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"engine.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/engine.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8cc99e95f95cb562"}},{"code_sha256_prefix":"f9fd6241d935f07b","entry":"window_partition","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/modeling/backbone/swintransformer.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/modeling/backbone/swintransformer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f9fd6241d935f07b"}},{"code_sha256_prefix":"61bf152e6a42a184","entry":"window_reverse","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"models/swin_transformer.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/models/swin_transformer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"61bf152e6a42a184"}},{"code_sha256_prefix":"fb32094c6dbece71","entry":"window_reverse","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/modeling/backbone/swintransformer.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/modeling/backbone/swintransformer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fb32094c6dbece71"}},{"code_sha256_prefix":"2e0a799ccbd489e7","entry":"compute_average_precision","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/evaluation/oideval.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/evaluation/oideval.py","link_basis":"harvester_set","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":"2e0a799ccbd489e7"}},{"code_sha256_prefix":"3634f2208a0255d7","entry":"create_timm_resnet","repo":"HDETR/H-Detic-LVIS","repo_kind":"official","path":"detic/modeling/backbone/timm.py","file_url":"https://github.com/HDETR/H-Detic-LVIS/blob/HEAD/detic/modeling/backbone/timm.py","link_basis":"harvester_set","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":"3634f2208a0255d7"}},{"code_sha256_prefix":"3e5d34f155e97585","entry":"measure_average_inference_time","repo":"HDETR/H-Deformable-DETR","repo_kind":"official","path":"benchmark.py","file_url":"https://github.com/HDETR/H-Deformable-DETR/blob/HEAD/benchmark.py","link_basis":"harvester_set","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":"3e5d34f155e97585"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}