{"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/detreg-unsupervised-pretraining-with-region","title":"DETReg: Unsupervised Pretraining with Region Priors for Object Detection","arxiv_id":"2106.04550","date":"2021-06-08","proceeding":"CVPR 2022 1","authors":["Amir Bar","Xin Wang","Vadim Kantorov","Colorado J Reed","Roei Herzig","Gal Chechik","Anna Rohrbach","Trevor Darrell","Amir Globerson"],"abstract":"Recent self-supervised pretraining methods for object detection largely focus on pretraining the backbone of the object detector, neglecting key parts of detection architecture. Instead, we introduce DETReg, a new self-supervised method that pretrains the entire object detection network, including the object localization and embedding components. During pretraining, DETReg predicts object localizations to match the localizations from an unsupervised region proposal generator and simultaneously aligns the corresponding feature embeddings with embeddings from a self-supervised image encoder. We implement DETReg using the DETR family of detectors and show that it improves over competitive baselines when finetuned on COCO, PASCAL VOC, and Airbus Ship benchmarks. In low-data regimes DETReg achieves improved performance, e.g., when training with only 1% of the labels and in the few-shot learning settings.","url_abs":"https://arxiv.org/abs/2106.04550v5","url_pdf":"https://arxiv.org/pdf/2106.04550v5.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":"detreg-unsupervised-pretraining-with-region","repo_url":"https://github.com/amirbar/detreg","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"few-shot-object-detection","task_name":"Few-Shot Object Detection"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"object-localization","task_name":"Object Localization"},{"task_slug":"region-proposal","task_name":"Region Proposal"},{"task_slug":"semi-supervised-object-detection","task_name":"Semi-Supervised Object Detection"},{"task_slug":"unsupervised-instance-segmentation","task_name":"Unsupervised Instance Segmentation"},{"task_slug":"object-detection-1","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":"deformable-attention-module","method_name":"Deformable Attention Module"},{"method_slug":"deformable-detr","method_name":"Deformable DETR"},{"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":"selective-search","method_name":"Selective Search"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-object-detection-on-coco-2017","task":"Few-Shot Object Detection","dataset":"COCO 2017","model":"DETReg (ours)","rank_in_archive_order":1,"of":1,"metrics":{"AP":"30"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-object-detection-on-ms-coco-10-shot","task":"Few-Shot Object Detection","dataset":"MS-COCO (10-shot)","model":"DETReg-ft-full DDETR","rank_in_archive_order":6,"of":33,"metrics":{"AP":"25"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-object-detection-on-ms-coco-30-shot","task":"Few-Shot Object Detection","dataset":"MS-COCO (30-shot)","model":"DETReg-ft-full DDETR","rank_in_archive_order":7,"of":25,"metrics":{"AP":"30"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-pascal-voc-10","task":"Object Detection","dataset":"PASCAL VOC 10%","model":"DETReg (ours)","rank_in_archive_order":2,"of":2,"metrics":{"AP":"51.4","AP50":"72.2","AP75":"56.6"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-object-detection-on-coco-1","task":"Semi-Supervised Object Detection","dataset":"COCO 1% labeled data","model":"DETReg","rank_in_archive_order":21,"of":22,"metrics":{"mAP":"14.58 ± 0.3"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-object-detection-on-coco-10","task":"Semi-Supervised Object Detection","dataset":"COCO 10% labeled data","model":"DETReg","rank_in_archive_order":25,"of":27,"metrics":{"mAP":"29.12±0.2"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-object-detection-on-coco-2","task":"Semi-Supervised Object Detection","dataset":"COCO 2% labeled data","model":"DETReg","rank_in_archive_order":16,"of":19,"metrics":{"mAP":"18.69±0.2"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-object-detection-on-coco-5","task":"Semi-Supervised Object Detection","dataset":"COCO 5% labeled data","model":"DETReg","rank_in_archive_order":22,"of":23,"metrics":{"mAP":"24.80±0.2"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-instance-segmentation-on-coco","task":"Unsupervised Instance Segmentation","dataset":"COCO val2017","model":"DETReg","rank_in_archive_order":4,"of":5,"metrics":{"AP":"3.3","AP50":"8.8","AP75":"1.9"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2106.04550","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.04550"}},"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/amirbar/detreg","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":3,"ran_violates":1,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"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":"d9def42110729a85","entry":"conv1x1","repo":"amirbar/detreg","repo_kind":"official","path":"models/swav_resnet50.py","file_url":"https://github.com/amirbar/detreg/blob/HEAD/models/swav_resnet50.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"amirbar/detreg","repo_kind":"official","path":"models/swav_resnet50.py","file_url":"https://github.com/amirbar/detreg/blob/HEAD/models/swav_resnet50.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"160bb14bd76201b4"}},{"code_sha256_prefix":"ac8fe530cdad4d8c","entry":"dice_loss","repo":"amirbar/detreg","repo_kind":"official","path":"models/segmentation.py","file_url":"https://github.com/amirbar/detreg/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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac8fe530cdad4d8c"}},{"code_sha256_prefix":"5c0711aada67957e","entry":"sigmoid_focal_loss","repo":"amirbar/detreg","repo_kind":"official","path":"models/segmentation.py","file_url":"https://github.com/amirbar/detreg/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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5c0711aada67957e"}},{"code_sha256_prefix":"0a4ff4be91725b8b","entry":"build_swav_backbone","repo":"amirbar/detreg","repo_kind":"official","path":"models/backbone.py","file_url":"https://github.com/amirbar/detreg/blob/HEAD/models/backbone.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":"0a4ff4be91725b8b"}},{"code_sha256_prefix":"ccd0edc0cca7b92e","entry":"build_transformer","repo":"amirbar/detreg","repo_kind":"official","path":"models/transformer.py","file_url":"https://github.com/amirbar/detreg/blob/HEAD/models/transformer.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":"ccd0edc0cca7b92e"}},{"code_sha256_prefix":"3e5d34f155e97585","entry":"measure_average_inference_time","repo":"amirbar/detreg","repo_kind":"official","path":"benchmark.py","file_url":"https://github.com/amirbar/detreg/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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3e5d34f155e97585"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}