{"about":{"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.","site":"https://codewithpapers.app","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","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/revisiting-foreground-background-imbalance-in","title":"Is Heuristic Sampling Necessary in Training Deep Object Detectors?","arxiv_id":"1909.04868","date":"2019-09-11","proceeding":null,"authors":["Joya Chen","Dong Liu","Tong Xu","Shiwei Wu","Yifei Cheng","Enhong Chen"],"abstract":"To train accurate deep object detectors under the extreme foreground-background imbalance, heuristic sampling methods are always necessary, which either re-sample a subset of all training samples (hard sampling methods, \\eg biased sampling, OHEM), or use all training samples but re-weight them discriminatively (soft sampling methods, \\eg Focal Loss, GHM). In this paper, we challenge the necessity of such hard/soft sampling methods for training accurate deep object detectors. While previous studies have shown that training detectors without heuristic sampling methods would significantly degrade accuracy, we reveal that this degradation comes from an unreasonable classification gradient magnitude caused by the imbalance, rather than a lack of re-sampling/re-weighting. Motivated by our discovery, we propose a simple yet effective \\emph{Sampling-Free} mechanism to achieve a reasonable classification gradient magnitude by initialization and loss scaling. Unlike heuristic sampling methods with multiple hyperparameters, our Sampling-Free mechanism is fully data diagnostic, without laborious hyperparameters searching. We verify the effectiveness of our method in training anchor-based and anchor-free object detectors, where our method always achieves higher detection accuracy than heuristic sampling methods on COCO and PASCAL VOC datasets. Our Sampling-Free mechanism provides a new perspective to address the foreground-background imbalance. Our code is released at \\url{https://github.com/ChenJoya/sampling-free}.","url_abs":"https://arxiv.org/abs/1909.04868v8","url_pdf":"https://arxiv.org/pdf/1909.04868v8.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":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/ChenJoya/objnessdet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/ChenJoya/sampling-free","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/facebookresearch/maskrcnn-benchmark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/FluteXu/ms-project","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/GuoLiuFang/maskrcnn-benchmark-lfs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/SilvioGiancola/maskrcnn-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/Zhang-Jing-Xuan/MaskRCNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/banben/maskrcnn-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/basaltzhang/maskrcnn-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/ccchang1023/maskrcnn-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/cyctrung/DPnet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/jonvthvn90/Project","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/markson14/WheatDet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-foreground-background-imbalance-in","repo_url":"https://github.com/ryota2425/maskrcnn-benchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"diagnostic","task_name":"Diagnostic"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"object","task_name":"Object"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"focal-loss","method_name":"Focal Loss"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers","held":null,"reason":"arxiv_id_not_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"by_repo":[{"repo":"ChenJoya/objnessdet","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"ChenJoya/sampling-free","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"facebookresearch/maskrcnn-benchmark","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["1703.06870"],"harvested_for_calls":[{"arxiv_id":"1703.06870","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1703.06870"},"call":"get_harvested_code_for_paper(arxiv_id=\"1703.06870\")"}]},{"repo":"FluteXu/ms-project","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["1904.01355"],"harvested_for_calls":[{"arxiv_id":"1904.01355","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1904.01355"},"call":"get_harvested_code_for_paper(arxiv_id=\"1904.01355\")"}]},{"repo":"GuoLiuFang/maskrcnn-benchmark-lfs","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"SilvioGiancola/maskrcnn-benchmark","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"Zhang-Jing-Xuan/MaskRCNN","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"banben/maskrcnn-benchmark","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"basaltzhang/maskrcnn-benchmark","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"ccchang1023/maskrcnn-benchmark","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"cyctrung/DPnet","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"jonvthvn90/Project","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"markson14/WheatDet","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["1904.01355"],"harvested_for_calls":[{"arxiv_id":"1904.01355","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"1904.01355"},"call":"get_harvested_code_for_paper(arxiv_id=\"1904.01355\")"}]},{"repo":"ryota2425/maskrcnn-benchmark","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"8c320da3e8333a49809d07919bdffa6238aa1ff778cbe1f3e9d848b8e7a5e037","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}