{"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/gradient-harmonized-single-stage-detector","title":"Gradient Harmonized Single-stage Detector","arxiv_id":"1811.05181","date":"2018-11-13","proceeding":null,"authors":["Buyu Li","Yu Liu","Xiaogang Wang"],"abstract":"Despite the great success of two-stage detectors, single-stage detector is\nstill a more elegant and efficient way, yet suffers from the two well-known\ndisharmonies during training, i.e. the huge difference in quantity between\npositive and negative examples as well as between easy and hard examples. In\nthis work, we first point out that the essential effect of the two disharmonies\ncan be summarized in term of the gradient. Further, we propose a novel gradient\nharmonizing mechanism (GHM) to be a hedging for the disharmonies. The\nphilosophy behind GHM can be easily embedded into both classification loss\nfunction like cross-entropy (CE) and regression loss function like smooth-$L_1$\n($SL_1$) loss. To this end, two novel loss functions called GHM-C and GHM-R are\ndesigned to balancing the gradient flow for anchor classification and bounding\nbox refinement, respectively. Ablation study on MS COCO demonstrates that\nwithout laborious hyper-parameter tuning, both GHM-C and GHM-R can bring\nsubstantial improvement for single-stage detector. Without any whistles and\nbells, our model achieves 41.6 mAP on COCO test-dev set which surpasses the\nstate-of-the-art method, Focal Loss (FL) + $SL_1$, by 0.8.","url_abs":"http://arxiv.org/abs/1811.05181v1","url_pdf":"http://arxiv.org/pdf/1811.05181v1.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":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/libuyu/GHM_Detection","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/ForrestPi/GHM_Loss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/GXYM/GHM_Loss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/JennyVanessa/Paddle-GHM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/peteryuX/tensorflow-GHM-loss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/thisisi3/Paddle-GHM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/tsdlrh/GHM_paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/xialuxi/GHMLoss-caffe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"gradient-harmonized-single-stage-detector","repo_url":"https://github.com/open-mmlab/mmdetection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"philosophy","task_name":"Philosophy"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"focal-loss","method_name":"Focal Loss"},{"method_slug":"ghm-c","method_name":"GHM-C"},{"method_slug":"ghm-a","method_name":"GHM-R"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"resnext","method_name":"ResNeXt"},{"method_slug":"resnext-block","method_name":"ResNeXt Block"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[{"slug":"ghm-c","name":"GHM-C","full_name":"Gradient Harmonizing Mechanism C"},{"slug":"ghm-a","name":"GHM-R","full_name":"Gradient Harmonizing Mechanism R"}],"results":[{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"GHM-C + GHM-R (RetinaNet-FPN-ResNet-50, M=30)","rank_in_archive_order":207,"of":220,"metrics":{"AP50":"55.5","AP75":"38.1","APL":"46.7","APM":"39.6","APS":"19.6","box AP":"35.8"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco","task":"Object Detection","dataset":"COCO test-dev","model":"GHM-C + GHM-R (RetinaNet-FPN-ResNeXt-101)","rank_in_archive_order":181,"of":225,"metrics":{"AP50":"62.8","AP75":"44.2","APL":"55.3","APM":"45.1","APS":"22.3","box mAP":"41.6"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1811.05181","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1811.05181"}},"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/ForrestPi/GHM_Loss","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JennyVanessa/Paddle-GHM","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tsdlrh/GHM_paddle","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/libuyu/GHM_Detection","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/GXYM/GHM_Loss","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/peteryuX/tensorflow-GHM-loss","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmdetection","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/thisisi3/Paddle-GHM","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xialuxi/GHMLoss-caffe","reach":{"status":"ok"}}],"summary":{"unverified":1},"by_repo_kind":{"listed":{"samples":1,"ran":0,"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":"82c7307b9b20ffee","entry":"get_ghm_weight","repo":"peteryuX/tensorflow-GHM-loss","repo_kind":"listed","path":"tf_ghm_loss.py","file_url":"https://github.com/peteryuX/tensorflow-GHM-loss/blob/HEAD/tf_ghm_loss.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":"82c7307b9b20ffee"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}