{"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/slicing-aided-hyper-inference-and-fine-tuning","title":"Slicing Aided Hyper Inference and Fine-tuning for Small Object Detection","arxiv_id":"2202.06934","date":"2022-02-14","proceeding":null,"authors":["Fatih Cagatay Akyon","Sinan Onur Altinuc","Alptekin Temizel"],"abstract":"Detection of small objects and objects far away in the scene is a major challenge in surveillance applications. Such objects are represented by small number of pixels in the image and lack sufficient details, making them difficult to detect using conventional detectors. In this work, an open-source framework called Slicing Aided Hyper Inference (SAHI) is proposed that provides a generic slicing aided inference and fine-tuning pipeline for small object detection. The proposed technique is generic in the sense that it can be applied on top of any available object detector without any fine-tuning. Experimental evaluations, using object detection baselines on the Visdrone and xView aerial object detection datasets show that the proposed inference method can increase object detection AP by 6.8%, 5.1% and 5.3% for FCOS, VFNet and TOOD detectors, respectively. Moreover, the detection accuracy can be further increased with a slicing aided fine-tuning, resulting in a cumulative increase of 12.7%, 13.4% and 14.5% AP in the same order. Proposed technique has been integrated with Detectron2, MMDetection and YOLOv5 models and it is publicly available at https://github.com/obss/sahi.git .","url_abs":"https://arxiv.org/abs/2202.06934v5","url_pdf":"https://arxiv.org/pdf/2202.06934v5.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":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/fcakyon/sahi-benchmark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/obss/sahi","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/Kazuhito00/sahi-yolox-onnx-sample","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/smalldet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null},{"paper_slug":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/Resham-Sundar/sahi-yolox","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"slicing-aided-hyper-inference-and-fine-tuning","repo_url":"https://github.com/airctic/icevision","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"small-object-detection","task_name":"Small Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"fcos","method_name":"FCOS"},{"method_slug":"fpn","method_name":"FPN"},{"method_slug":"non-maximum-suppression","method_name":"Non Maximum Suppression"},{"method_slug":"varifocalnet","method_name":"VFNet"},{"method_slug":"varifocal-loss","method_name":"Varifocal Loss"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.06934","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.06934"}},"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/Resham-Sundar/sahi-yolox","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Kazuhito00/sahi-yolox-onnx-sample","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/airctic/icevision","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fcakyon/sahi-benchmark","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/obss/sahi","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/smalldet","reach":null}],"summary":{"ran_fixture":1,"unverified":18},"by_repo_kind":{"official":{"samples":3,"ran":1,"repositories":2},"listed":{"samples":16,"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":"52989f234436027c","entry":"annotation_inside_slice","repo":"obss/sahi","repo_kind":"official","path":"sahi/slicing.py","file_url":"https://github.com/obss/sahi/blob/HEAD/sahi/slicing.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52989f234436027c"}},{"code_sha256_prefix":"e257047ab1fda46c","entry":"annotation_inside_slice","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/slicing.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/slicing.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":"e257047ab1fda46c"}},{"code_sha256_prefix":"b54053e66ee738d8","entry":"batched_greedy_nmm","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/combine.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/combine.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":"b54053e66ee738d8"}},{"code_sha256_prefix":"8ed0517756dd1b38","entry":"batched_nms","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/combine.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/combine.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":"8ed0517756dd1b38"}},{"code_sha256_prefix":"686cde694bfeddb7","entry":"calculate_box_union","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/utils.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/utils.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":"686cde694bfeddb7"}},{"code_sha256_prefix":"4b5d7326bb4f1646","entry":"fix_full_shape_list","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/compatibility.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/compatibility.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":"4b5d7326bb4f1646"}},{"code_sha256_prefix":"abc6663a9ae9fce0","entry":"fix_shift_amount_list","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/compatibility.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/compatibility.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":"abc6663a9ae9fce0"}},{"code_sha256_prefix":"d0520a0e6473e8cc","entry":"get_ordered_image_name_list","repo":"fcakyon/sahi-benchmark","repo_kind":"official","path":"xview/xview_to_coco.py","file_url":"https://github.com/fcakyon/sahi-benchmark/blob/HEAD/xview/xview_to_coco.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":"d0520a0e6473e8cc"}},{"code_sha256_prefix":"7fc4f6b132018cc2","entry":"get_slice_bboxes","repo":"obss/sahi","repo_kind":"official","path":"sahi/slicing.py","file_url":"https://github.com/obss/sahi/blob/HEAD/sahi/slicing.py","link_basis":"first_harvest_node","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":"7fc4f6b132018cc2"}},{"code_sha256_prefix":"0e3c82c0dee22fd7","entry":"get_slice_bboxes","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/slicing.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/slicing.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":"0e3c82c0dee22fd7"}},{"code_sha256_prefix":"4d47f766c74c1466","entry":"merge","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/coco.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/coco.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":"4d47f766c74c1466"}},{"code_sha256_prefix":"4ab401060d4dd491","entry":"merge_from_list","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/coco.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/coco.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":"4ab401060d4dd491"}},{"code_sha256_prefix":"272238bc5ffeef61","entry":"nms","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/combine.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/combine.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":"272238bc5ffeef61"}},{"code_sha256_prefix":"1c10c8ef13619529","entry":"object_prediction_list_to_numpy","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/utils.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/utils.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":"1c10c8ef13619529"}},{"code_sha256_prefix":"2de419bb83449d6e","entry":"object_prediction_list_to_torch","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/postprocess/utils.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/postprocess/utils.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":"2de419bb83449d6e"}},{"code_sha256_prefix":"7a2ae5c4bf39dd82","entry":"read_image","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/cv.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/cv.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":"7a2ae5c4bf39dd82"}},{"code_sha256_prefix":"c8c3e5a8345b053a","entry":"read_image_as_pil","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/cv.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/cv.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":"c8c3e5a8345b053a"}},{"code_sha256_prefix":"91ba8065c40815aa","entry":"read_large_image","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/cv.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/cv.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":"91ba8065c40815aa"}},{"code_sha256_prefix":"ece1ba05d166226f","entry":"update_categories","repo":"Resham-Sundar/sahi-yolox","repo_kind":"listed","path":"sahi/utils/coco.py","file_url":"https://github.com/Resham-Sundar/sahi-yolox/blob/HEAD/sahi/utils/coco.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":"ece1ba05d166226f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}