Source-linked AI summary
The KFIoU Loss for Rotated Object Detection
Xue Yang, Yue Zhou, Gefan Zhang, Jirui Yang, Wentao Wang, Junchi Yan, Xiaopeng Zhang, Qi Tian
TL;DR
Rotated detection suffers from a difficult-to-differentiate SkewIoU loss and mismatch with regression objectives. The paper proposes KFIoU, which uses Gaussian modeling, a center-point loss, and Gaussian products to approximate SkewIoU. It reports stronger trend-level alignment, competitive performance without hyperparameter tuning, improvements across 2-D and 3-D benchmarks, and better handling of non-overlapping cases.
Problem
Rotation detectors rely on complicated SkewIoU-based losses that are unfriendly to gradient-based training and difficult to implement.
Method
KFIoU converts rotated boxes into Gaussian distributions, optimizes their centers, and uses Gaussian products to approximate SkewIoU overlap.
Results
KFIoU shows better trend-level alignment with SkewIoU, outperforms best-tuned alternatives on extensive 2-D benchmarks, and improves 3-D detection over baselines.
Takeaways & Limitations
KFIoU provides a fully differentiable, easier-to-implement approximation that handles non-overlapping cases and avoids additional hyperparameter tuning.
Takeaways & Limitations
Gaussian modeling cannot be directly applied to quadrilateral or polygon detection, and square-like objects are unsuitable for heading detection.
Abstract
from arXiv · showhide
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.
1 INTRODUCTION
Rotation detection faces a mismatch between SkewIoU-driven evaluation and regression losses, while exact SkewIoU is difficult to differentiate and implement. KFIoU approximates SkewIoU through Gaussian modeling and Gaussian products, improving alignment, implementation, and benchmark performance across 2-D and 3-D detection.
- Rotated detection is challenging for arbitrary-oriented, dense, large-aspect-ratio objects, especially in aerial images and scene text.
- SkewIoU is highly sensitive to positional deviations in large-aspect-ratio objects, creating inconsistency with regression losses such as Smooth L1.
- Exact SkewIoU is difficult to apply because rotated-box intersections require custom operations whose derivatives are unavailable in common deep-learning frameworks.
- KFIoU converts boxes into Gaussian distributions, first narrows their centers with a center-point loss, then uses Gaussian products to approximate overlap and SkewIoU.
- Unlike GWD and KLD, KFIoU uses mechanism-level Gaussian products without additional hyperparameter tuning and achieves better trend-level alignment with SkewIoU.
- KFIoU extends Gaussian modeling and the loss from 2-D to 3-D rotation detection, with notable improvement compared with baselines.
2 RELATED WORK
Prior IoU-based losses address metric–regression inconsistency in horizontal detection, but rotated detection remains constrained by the difficulty of differentiable SkewIoU computation. Existing approximate approaches use box, polygon, projection, or polar representations to estimate overlap.
- Rotated detection extends horizontal detectors with rotated bounding boxes and is widely used for arbitrary-oriented, dense objects in aerial images and scene text.
- IoU-based losses such as Unitbox, GIoU, and DIoU address inconsistency between detection metrics and regression losses in horizontal detection.
- Their direct application to rotation detection is blocked by the difficulty of implementing differentiable SkewIoU.
- Approximate rotated-box losses include IoU-Smooth L1, projection-based intersection estimates, and Polar IoU loss.
3 BACKGROUND ON GAUSSIAN MODELING
The paper models arbitrary-oriented 2-D and 3-D bounding boxes as Gaussian distributions, while contrasting KFIoU’s Gaussian-product approach with distance-based Gaussian losses.
- Arbitrary-oriented 2-D/3-D bounding boxes are converted into Gaussian distributions G(µ, Σ).
- The covariance is parameterized through a rotation matrix R and a diagonal eigenvalue matrix Λ.
- Table 1 compares regression losses by properties and performance using RetinaNet as the base model.
- For 3-D boxes, l, w, and h denote length, width, and height, respectively.
- GWD and KLD approximate SkewIoU using nonlinear distribution-distance transformations that introduce additional hyperparameters.
4 PROPOSED METHOD
KFIoU approximates SkewIoU by converting boxes to Gaussians, aligning their centers, and using Gaussian products to derive overlap. The method is evaluated through behavioral consistency, implementation choices, and ablations across 2-D detection settings.
- 4.1 SKEWIOU BASED ON GAUSSIAN PRODUCT: The method converts each bounding box into a Gaussian, brings the centers closer, forms an overlapping-area distribution by Gaussian product, and converts it back into a rotated box.
- 4.1 SKEWIOU BASED ON GAUSSIAN PRODUCT: The Gaussian-product overlap covariance is independent of center distance, so center alignment is used before calculating the final overlap and SkewIoU loss.
- 4.1 SKEWIOU BASED ON GAUSSIAN PRODUCT: The Gaussian-product loss is compared with SkewIoU using EMean and EVar, where EVar measures trend-level consistency.
- 4.1 SKEWIOU BASED ON GAUSSIAN PRODUCT: EVar follows Lkfiou+Lc < Lkld < Lgwd < L1, indicating the combined KFIoU and center loss has the strongest reported trend consistency.
- 4.1 SKEWIOU BASED ON GAUSSIAN PRODUCT: Smaller EVar generally corresponds to better performance, while sufficiently consistent methods can have close performance differences.
- 4.2 THE PROPOSED KFIOU LOSS: KFIoU is trained within RetinaNet’s existing regression branch by decoding boxes, applying Gaussian transfer, and calculating center and KFIoU losses.
- 4.2 THE PROPOSED KFIOU LOSS: Angle regression is evaluated using direct angle-offset prediction and indirect prediction of sine and cosine vectors.
- 4.2 THE PROPOSED KFIOU LOSS: The regression loss is defined as Lreg = Lc + Lkf, with two provided alternatives for the center-point loss.
5 EXPERIMENTS
Experiments evaluate KFIoU across 2-D and 3-D detection benchmarks, datasets, and detector settings. The results report improvements over competing losses and strong overall performance, while noting that comparisons across some detectors are not absolutely fair.
- Datasets and implementation: KFIoU is evaluated on aerial, scene-text, face, 3-D detection, and BEV benchmarks using multiple detector settings.The experiments cover DOTA, scene-text datasets, FDDB, and KITTI.
- Ablation studies: KFIoU performs better than KLD after using the same center-point loss, attributed to a better center-point optimization mechanism.The ablation compares center-point loss choices across three DOTA versions.
- 2-D ablation: 9.90% improvement over Smooth L1 on HRSC2016 AP75 demonstrates KFIoU’s benefit for large-aspect-ratio ships.The comparison is reported in the 2-D ablation study.
- 3-D ablation: 2.43% improvement in moderate 3-D detection and a 1.98% BEV gain reaching 72.08% are reported on the KITTI validation split.These results use PointPillars as the baseline.
- Comparison with peer methods: Indirect angle regression avoids the boundary discontinuity affecting direct regression and brings a performance boost in the reported RetinaNet experiments.The experiments also compare horizontal versus rotating anchors and OpenCV versus Long Edge box definitions.
- Comparison with peer methods: The reported DOTA-v1.0 overall performance is approximately 77.35%/81.03%/80.93%, although cross-method comparisons are not absolutely fair.Methods differ in image resolution, network structure, training strategies, and other tricks.
6 DISCUSSION
The discussion identifies scope limitations of Gaussian modeling and summarizes KFIoU as a trend-level-consistent, differentiable approximation to SkewIoU. Results support its effectiveness across 2-D and 3-D settings.
- Limitations: Gaussian modeling cannot be directly applied to quadrilateral or polygon detection.This limits applicability in aerial-image and scene-text tasks that use those representations.
- Limitations: For square-like objects, the Gaussian distribution approaches an isotropic circle, making it unsuitable for object heading detection.The limitation concerns directional information for near-square objects.
- Conclusion: KFIoU uses Gaussian products to mimic SkewIoU’s computing mechanism and remains fully differentiable while handling non-overlapping cases.The conclusion contrasts this with distribution-distance losses requiring hyperparameter tuning.
- Conclusion: Experiments on 2-D and 3-D tasks across various datasets show the effectiveness of KFIoU.The conclusion summarizes evidence across the paper’s evaluated settings.
A PROOF OF KFIOU UPPER BOUND
The proof derives an upper bound for KFIoU by combining volume-related inequalities, yielding an upper bound of 1 for both two- and three-dimensional cases.
- The proof applies Minkowski’s inequality as part of the derivation of the KFIoU upper bound.
- The derivation combines simultaneous mean inequalities and then applies the resulting inequalities again.
- The proof obtains an explicit upper-bound expression for KFIoU.
- 1 is the stated upper bound when n = 2 and n = 3.
B SUPPLEMENTARY EXPERIMENT
Supplementary ablations examine KFIoU formulations, training strategies, and additional datasets, with KFIoU reported as the best loss on the tested datasets.
- KFIoU loss forms: Three KFIoU loss forms are ablated with two detectors on DOTA-v1.0.
- KFIoU loss forms: The log-based form can produce very large losses for low-SkewIoU predictions early in RetinaNet training, weakening model improvement.
- KFIoU loss forms: The selected experiments use KFIoU before non-expansion because consistency does not provide additional gains.
- Training strategies and tricks: Training-strategy ablations are reimplemented in MMRotate using specified detector-dependent optimization settings.
- More datasets: KFIoU remains the best-performing loss on ICDAR2015, UCAS-AOD, SSDD, and HRSID with RetinaNet as the base detector.
C VISUALIZATION
Visual comparisons evaluate Smooth L1-, GWD-, and KFIoU-based detectors across aerial, 3-D, and face-image datasets, with KFIoU reported as significantly better than Smooth L1.
- KFIoU loss is significantly better than Smooth L1 loss in the visual comparisons.
- Figure 4 compares Smooth L1, GWD, and KFIoU detectors on DOTA and KITTI.
- Figure 5 compares Smooth L1, GWD, and KFIoU detectors on FDDB.
D TREND CONSISTENCY SIMULATION
Simulation examines how center deviation and object scale affect loss-trend consistency, finding improved KFIoU consistency at smaller deviations and scale insensitivity for KLD and KFIoU.
- The simulation averages results over 1,000 random aspect-ratio and rotation-angle examples for each data point.
- KFIoU’s trend consistency improves as center deviation becomes smaller.
- KLD and KFIoU are insensitive to object-scale changes.