{"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/teach-detr-better-training-detr-with-teachers","title":"Teach-DETR: Better Training DETR with Teachers","arxiv_id":"2211.11953","date":"2022-11-22","proceeding":null,"authors":["Linjiang Huang","Kaixin Lu","Guanglu Song","Liang Wang","Si Liu","Yu Liu","Hongsheng Li"],"abstract":"In this paper, we present a novel training scheme, namely Teach-DETR, to learn better DETR-based detectors from versatile teacher detectors. We show that the predicted boxes from teacher detectors are effective medium to transfer knowledge of teacher detectors, which could be either RCNN-based or DETR-based detectors, to train a more accurate and robust DETR model. This new training scheme can easily incorporate the predicted boxes from multiple teacher detectors, each of which provides parallel supervisions to the student DETR. Our strategy introduces no additional parameters and adds negligible computational cost to the original detector during training. During inference, Teach-DETR brings zero additional overhead and maintains the merit of requiring no non-maximum suppression. Extensive experiments show that our method leads to consistent improvement for various DETR-based detectors. Specifically, we improve the state-of-the-art detector DINO with Swin-Large backbone, 4 scales of feature maps and 36-epoch training schedule, from 57.8% to 58.9% in terms of mean average precision on MSCOCO 2017 validation set. Code will be available at https://github.com/LeonHLJ/Teach-DETR.","url_abs":"https://arxiv.org/abs/2211.11953v2","url_pdf":"https://arxiv.org/pdf/2211.11953v2.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":"teach-detr-better-training-detr-with-teachers","repo_url":"https://github.com/leonhlj/teach-detr","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"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"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2211.11953","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.11953"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/leonhlj/teach-detr","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran_honours":1,"ran_violates":1,"ran_draft_wrong":2,"unverified":6},"by_repo_kind":{"official":{"samples":11,"ran":5,"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":"144d10b49baeb8a6","entry":"window_partition","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/models/swin_transformer.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/datasets/coco_eval.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/models/segmentation.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/datasets/coco_eval.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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":"61bf152e6a42a184","entry":"window_reverse","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/models/swin_transformer.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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":"8ebfde287aa0e360","entry":"build_mask_rcnn","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/mask_rcnn/model.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/mask_rcnn/model.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":"8ebfde287aa0e360"}},{"code_sha256_prefix":"ddb9b0f4a2035653","entry":"ce_loss","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/models/deformable_detr.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/models/deformable_detr.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":"ddb9b0f4a2035653"}},{"code_sha256_prefix":"3e5d34f155e97585","entry":"measure_average_inference_time","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/benchmark.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/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"}},{"code_sha256_prefix":"155608ecaae7d2ec","entry":"sigmoid_focal_loss","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/models/segmentation.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/models/segmentation.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":"155608ecaae7d2ec"}},{"code_sha256_prefix":"28319df150180f5e","entry":"train_hybrid","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/engine.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/engine.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":"28319df150180f5e"}},{"code_sha256_prefix":"94e220e1d7c7cf37","entry":"train_single","repo":"leonhlj/teach-detr","repo_kind":"official","path":"H-Deformable-DETR/engine.py","file_url":"https://github.com/leonhlj/teach-detr/blob/HEAD/H-Deformable-DETR/engine.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":"94e220e1d7c7cf37"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}