{"url":"/method/ohem","slug":"ohem","name":"OHEM","full_name":"Online Hard Example Mining","full_name_withheld":false,"description_markdown":"Some object detection datasets contain an overwhelming number of easy examples and a small number of hard examples. Automatic selection of these hard examples can make training more\r\neffective and efficient. **OHEM**, or **Online Hard Example Mining**, is a bootstrapping technique that modifies [SGD](https://paperswithcode.com/method/sgd) to sample from examples in a non-uniform way depending on the current loss of each example under consideration. The method takes advantage of detection-specific problem structure in which each SGD mini-batch consists of only one or two images, but thousands of candidate examples. The candidate examples are subsampled according to a distribution\r\nthat favors diverse, high loss instances.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Training Region-based Object Detectors with Online Hard Example Mining","paper":"/paper/training-region-based-object-detectors-with","first_author":"Abhinav Shrivastava","n_authors":3,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/training-region-based-object-detectors-with"},"source":{"url":"http://arxiv.org/abs/1604.03540v1","title":"Training Region-based Object Detectors with Online Hard Example Mining","url_on_a_paper_host":true},"code_snippet_url":"https://github.com/abhi2610/ohem/blob/1f07dd09b50c8c21716ae36aede92125fe437579/lib/roi_data_layer/minibatch.py#L146","code_snippet_url_on_a_code_host":true,"categories":[{"area":"General","area_id":"general","collection":"Prioritized Sampling","url":"/methods/category/prioritized-sampling","pwc_aliases":[]}],"n_papers_tagged":8,"archive_num_papers":8,"papers_newest_first":[{"paper":null,"title":"MoMBS: Mixed-order minibatch sampling enhances model training from diverse-quality images","date":"2025-05-24","arxiv_id":"2505.18741","n_code_links":0,"syntology":null},{"paper":null,"title":"A systematic study of the foreground-background imbalance problem in deep learning for object detection","date":"2023-06-28","arxiv_id":"2306.16539","n_code_links":0,"syntology":null},{"paper":"/paper/prime-sample-attention-in-object-detection","title":"Prime Sample Attention in Object Detection","date":"2019-04-09","arxiv_id":"1904.04821","n_code_links":1,"syntology":null},{"paper":"/paper/thundernet-towards-real-time-generic-object","title":"ThunderNet: Towards Real-time Generic Object Detection","date":"2019-03-28","arxiv_id":"1903.11752","n_code_links":3,"syntology":null},{"paper":"/paper/deep-extreme-cut-from-extreme-points-to","title":"Deep Extreme Cut: From Extreme Points to Object Segmentation","date":"2017-11-24","arxiv_id":"1711.09081","n_code_links":2,"syntology":null},{"paper":null,"title":"S-OHEM: Stratified Online Hard Example Mining for Object Detection","date":"2017-05-05","arxiv_id":"1705.02233","n_code_links":0,"syntology":null},{"paper":null,"title":"Improving Object Detection with Region Similarity Learning","date":"2017-03-01","arxiv_id":"1703.00234","n_code_links":0,"syntology":null},{"paper":"/paper/training-region-based-object-detectors-with","title":"Training Region-based Object Detectors with Online Hard Example Mining","date":"2016-04-12","arxiv_id":"1604.03540","n_code_links":5,"syntology":null}],"papers_shown":8,"tasks":[{"task":"/task/object-detection","name":"Object Detection","papers":6},{"task":"/task/object-detection-1","name":"object-detection","papers":6},{"task":"/task/object","name":"Object","papers":5},{"task":"/task/diversity","name":"Diversity","papers":1},{"task":"/task/image-classification","name":"Image Classification","papers":1},{"task":"/task/instance-segmentation","name":"Instance Segmentation","papers":1},{"task":"/task/interactive-segmentation","name":"Interactive Segmentation","papers":1},{"task":"/task/lesion-detection","name":"Lesion Detection","papers":1},{"task":"/task/multi-task-learning","name":"Multi-Task Learning","papers":1},{"task":"/task/segmentation","name":"Segmentation","papers":1},{"task":"/task/semantic-segmentation","name":"Semantic Segmentation","papers":1},{"task":null,"name":"Triplet","papers":1},{"task":"/task/video-object-segmentation","name":"Video Object Segmentation","papers":1},{"task":"/task/image-classification","name":"image-classification","papers":1}],"tasks_shown":14,"n_tasks":14,"usage_by_year":[{"year":"2016","papers":1},{"year":"2017","papers":3},{"year":"2019","papers":2},{"year":"2023","papers":1},{"year":"2025","papers":1}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/ohem"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}