{"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/beyond-max-margin-class-margin-equilibrium","title":"Beyond Max-Margin: Class Margin Equilibrium for Few-shot Object Detection","arxiv_id":"2103.04612","date":"2021-03-08","proceeding":"CVPR 2021 1","authors":["Bohao Li","Boyu Yang","Chang Liu","Feng Liu","Rongrong Ji","Qixiang Ye"],"abstract":"Few-shot object detection has made substantial progressby representing novel class objects using the feature representation learned upon a set of base class objects. However,an implicit contradiction between novel class classification and representation is unfortunately ignored. On the one hand, to achieve accurate novel class classification, the distributions of either two base classes must be far away fromeach other (max-margin). On the other hand, to precisely represent novel classes, the distributions of base classes should be close to each other to reduce the intra-class distance of novel classes (min-margin). In this paper, we propose a class margin equilibrium (CME) approach, with the aim to optimize both feature space partition and novel class reconstruction in a systematic way. CME first converts the few-shot detection problem to the few-shot classification problem by using a fully connected layer to decouple localization features. CME then reserves adequate margin space for novel classes by introducing simple-yet-effective class margin loss during feature learning. Finally, CME pursues margin equilibrium by disturbing the features of novel class instances in an adversarial min-max fashion. Experiments on Pascal VOC and MS-COCO datasets show that CME significantly improves upon two baseline detectors (up to $3\\sim 5\\%$ in average), achieving state-of-the-art performance. Code is available at https://github.com/Bohao-Lee/CME .","url_abs":"https://arxiv.org/abs/2103.04612v3","url_pdf":"https://arxiv.org/pdf/2103.04612v3.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":"beyond-max-margin-class-margin-equilibrium","repo_url":"https://github.com/Bohao-Lee/CME","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"beyond-max-margin-class-margin-equilibrium","repo_url":"https://github.com/yangyucheng000/CME","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"unanswered"}},{"paper_slug":"beyond-max-margin-class-margin-equilibrium","repo_url":"https://github.com/MindCode-4/code-10/tree/main/CME","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"beyond-max-margin-class-margin-equilibrium","repo_url":"https://github.com/pwc-1/Paper-9/tree/main/6/CME","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"few-shot-object-detection","task_name":"Few-Shot Object Detection"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-object-detection-on-ms-coco-10-shot","task":"Few-Shot Object Detection","dataset":"MS-COCO (10-shot)","model":"CME","rank_in_archive_order":17,"of":33,"metrics":{"AP":"15.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2103.04612","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.04612"}},"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":"deterministic:regex_extraction","url":"https://github.com/Bohao-Lee/CME","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pwc-1/Paper-9/tree/main/6/CME","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindCode-4/code-10/tree/main/CME","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yangyucheng000/CME","reach":{"status":"unanswered"}}],"summary":{"ran_fixture":2,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":3,"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":6,"samples":[{"code_sha256_prefix":"e175b754bea158f6","entry":"bbox_iou","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e175b754bea158f6"}},{"code_sha256_prefix":"26001f003027c89d","entry":"bbox_ious","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"26001f003027c89d"}},{"code_sha256_prefix":"3688017099995ec9","entry":"convert2cpu","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3688017099995ec9"}},{"code_sha256_prefix":"f714a871d3dd3ab7","entry":"RegionLossV3","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f714a871d3dd3ab7"}},{"code_sha256_prefix":"1066673e5d36cae4","entry":"build_targets","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1066673e5d36cae4"}},{"code_sha256_prefix":"12b836c6ff36d260","entry":"neg_filter","repo":"Bohao-Lee/CME","repo_kind":"official","path":"core/region_loss.py","file_url":"https://github.com/Bohao-Lee/CME/blob/HEAD/core/region_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"12b836c6ff36d260"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}