{"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/the-kfiou-loss-for-rotated-object-detection-1","title":"The KFIoU Loss for Rotated Object Detection","arxiv_id":"2201.12558","date":"2022-01-29","proceeding":null,"authors":["Xue Yang","Yue Zhou","Gefan Zhang","Jirui Yang","Wentao Wang","Junchi Yan","Xiaopeng Zhang","Qi Tian"],"abstract":"Differing from the well-developed horizontal object detection area whereby the computing-friendly IoU based loss is readily adopted and well fits with the detection metrics. In contrast, rotation detectors often involve a more complicated loss based on SkewIoU which is unfriendly to gradient-based training. In this paper, we propose an effective approximate SkewIoU loss based on Gaussian modeling and Gaussian product, which mainly consists of two items. The first term is a scale-insensitive center point loss, which is used to quickly narrow the distance between the center points of the two bounding boxes. In the distance-independent second term, the product of the Gaussian distributions is adopted to inherently mimic the mechanism of SkewIoU by its definition, and show its alignment with the SkewIoU loss at trend-level within a certain distance (i.e. within 9 pixels). This is in contrast to recent Gaussian modeling based rotation detectors e.g. GWD loss and KLD loss that involve a human-specified distribution distance metric which require additional hyperparameter tuning that vary across datasets and detectors. The resulting new loss called KFIoU loss is easier to implement and works better compared with exact SkewIoU loss, thanks to its full differentiability and ability to handle the non-overlapping cases. We further extend our technique to the 3-D case which also suffers from the same issues as 2-D. Extensive results on various public datasets (2-D/3-D, aerial/text/face images) with different base detectors show the effectiveness of our approach.","url_abs":"https://arxiv.org/abs/2201.12558v6","url_pdf":"https://arxiv.org/pdf/2201.12558v6.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":"the-kfiou-loss-for-rotated-object-detection-1","repo_url":"https://github.com/Jittor/JDet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"the-kfiou-loss-for-rotated-object-detection-1","repo_url":"https://github.com/yangxue0827/RotationDetection","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"the-kfiou-loss-for-rotated-object-detection-1","repo_url":"https://github.com/open-mmlab/mmrotate","is_official":0,"mentioned_in_paper":1,"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":"object-detection-in-aerial-images","task_name":"Object Detection In Aerial Images"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2201.12558","atlas_url":"https://app.syntology.ai/?focus=2201.12558","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.12558"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/yangxue0827/RotationDetection","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jittor/JDet","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmrotate","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":3,"ran_fixture":1,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"repositories":2}},"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":"0699e01c78ee6d82","entry":"Loss","repo":"yangxue0827/RotationDetection","repo_kind":"official","path":"alpharotate/libs/models/losses/losses_kfiou.py","file_url":"https://github.com/yangxue0827/RotationDetection/blob/HEAD/alpharotate/libs/models/losses/losses_kfiou.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0699e01c78ee6d82"}},{"code_sha256_prefix":"421c2975cdf18aa1","entry":"LossKF","repo":"yangxue0827/RotationDetection","repo_kind":"official","path":"alpharotate/libs/models/losses/losses_kfiou.py","file_url":"https://github.com/yangxue0827/RotationDetection/blob/HEAD/alpharotate/libs/models/losses/losses_kfiou.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"421c2975cdf18aa1"}},{"code_sha256_prefix":"da84e065b468cfe0","entry":"iou_rotate_calculate2","repo":"yangxue0827/RotationDetection","repo_kind":"official","path":"alpharotate/libs/models/losses/losses_kfiou.py","file_url":"https://github.com/yangxue0827/RotationDetection/blob/HEAD/alpharotate/libs/models/losses/losses_kfiou.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da84e065b468cfe0"}},{"code_sha256_prefix":"3516103014b49aca","entry":"to_2tuple","repo":"Jittor/JDet","repo_kind":"official","path":"python/jdet/models/backbones/lsknet.py","file_url":"https://github.com/Jittor/JDet/blob/HEAD/python/jdet/models/backbones/lsknet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3516103014b49aca"}},{"code_sha256_prefix":"b5addcc393d1386e","entry":"backward_convert","repo":"yangxue0827/RotationDetection","repo_kind":"official","path":"alpharotate/libs/models/losses/losses_kfiou.py","file_url":"https://github.com/yangxue0827/RotationDetection/blob/HEAD/alpharotate/libs/models/losses/losses_kfiou.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b5addcc393d1386e"}},{"code_sha256_prefix":"61ebb77db4a0968f","entry":"coordinate_present_convert","repo":"yangxue0827/RotationDetection","repo_kind":"official","path":"alpharotate/libs/models/losses/losses_kfiou.py","file_url":"https://github.com/yangxue0827/RotationDetection/blob/HEAD/alpharotate/libs/models/losses/losses_kfiou.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"61ebb77db4a0968f"}},{"code_sha256_prefix":"54f118f70ca040f9","entry":"get_classes_by_name","repo":"Jittor/JDet","repo_kind":"official","path":"python/jdet/config/constant.py","file_url":"https://github.com/Jittor/JDet/blob/HEAD/python/jdet/config/constant.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54f118f70ca040f9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}