MKIoU Loss: Towards Accurate Oriented Object Detection in Aerial Images

Xinyi Yu, Jiangping Lu, Mi Lin, Linlin Ou

Abstract

Oriented object detection in aerial imagery faces significant challenges due to the arbitrary orientation of objects, leading to boundary discontinuities and inconsistencies between training loss functions and evaluation metrics. This paper proposes a two-pronged solution: Modulated Kalman IoU (MKIoU) loss and Gaussian Angle (GA) loss. MKIoU introduces a modulation factor to sharpen the loss curve near the ground truth, enhancing high-precision detection. GA loss addresses the "square problem" inherent in Gaussian-based modeling, where orientation information is lost as objects approach a 1:1 aspect ratio. Evaluations on DOTA, UCAS-AOD, and HRSC2016 datasets demonstrate that these methods achieve state-of-the-art performance, particularly in high-precision detection scenarios.

Introduction

Detecting objects in aerial images—such as planes, ships, and vehicles—requires Oriented Bounding Boxes (OBB) to accurately capture their geometry. However, OBB regression is plagued by three primary issues:

  1. The Boundary Problem: The periodicity of angles (e.g., -90° vs. 90°) causes sudden jumps in loss functions.
  2. Metric Inconsistency: Standard regression losses (like Smooth L1) often do not correlate well with the Intersection over Union (IoU) metric used for evaluation. While Gaussian modeling helps with boundaries, it often lacks the sensitivity required for high-precision results.
  3. The Square Problem: When an object is square-like, its Gaussian representation becomes circular, causing the model to lose orientation gradients.

Methodology

Modulated Kalman IoU (MKIoU)

Building upon Kalman Filter-based IoU (KFIoU) which approximates the intersection of Gaussian-modeled boxes, the authors identified that the loss curve becomes too flat as the prediction approaches the ground truth. To counteract this, they introduced a modulation factor ($\alpha$). This factor adjusts the sensitivity of the loss to minor deviations in angle and scale. By tuning $\alpha$, the loss function more closely mimics the behavior of the SkewIoU metric, forcing the model to achieve higher precision during the final stages of convergence.

Gaussian Angle (GA) Loss

Gaussian modeling typically represents a bounding box as a 2D Gaussian distribution. For square objects, this distribution is a circle, which is rotationally invariant. Consequently, the model cannot learn orientation for square-like targets. The GA Loss introduces a supplementary sine-based term weighted by the object's aspect ratio. As the aspect ratio approaches 1:1, the GA Loss provides the necessary gradient to maintain orientation learning, effectively bridging the gap between Gaussian modeling and geometric reality.

Experimental Results

The proposed framework was integrated into several popular detectors, including Rotated RetinaNet and RoI Transformer, and tested on major benchmarks:

  • DOTA 1.0: Achieved 80.83% mAP using multi-scale training.
  • HRSC2016: Reached 90.45% mAP, outperforming other Gaussian-based methods like GWD and KLD.
  • High Precision Gains: On the UCAS-AOD dataset, the addition of GA Loss to the MKIoU framework improved the $AP_{75}$ metric for RetinaNet from 36.49% to 55.59%.
Visual comparison of detection results between standard Gaussian-based loss (top) and the proposed method with GA loss (bottom). The GA loss significantly improves orientation accuracy for various aircraft configurations.

Conclusion

The MKIoU and GA loss functions provide a robust solution for oriented object detection by aligning training objectives with evaluation metrics and solving the orientation ambiguity of square-like objects. While the method excels at precision, future work will focus on improving classification accuracy in complex backgrounds and stabilizing regression for objects with extreme aspect ratios.

Summary updated

Abstract

Oriented bounding box regression is crucial for oriented object detection. However, regression-based methods often suffer from boundary problems and the inconsistency between loss and evaluation metrics. In this paper, a modulated Kalman IoU loss of approximate SkewIoU is proposed, named MKIoU. To avoid boundary problems, we convert the oriented bounding box to Gaussian distribution, then use the Kalman filter to approximate the intersection area. However, there exists significant difference between the calculated and actual intersection areas. Thus, we propose a modulation factor to adjust the sensitivity of angle deviation and width-height offset to loss variation, making the loss more consistent with the evaluation metric. Furthermore, the Gaussian modeling method avoids the boundary problem but causes the angle confusion of square objects simultaneously. Thus, the Gaussian Angle Loss (GA Loss) is presented to solve this problem by adding a corrected loss for square targets. The proposed GA Loss can be easily extended to other Gaussian-based methods. Experiments on three publicly available aerial image datasets, DOTA, UCAS-AOD, and HRSC2016, show the effectiveness of the proposed method.
BibTeX
@misc{yu2022mkiou,
  author = {Xinyi Yu and Jiangping Lu and Mi Lin and Linlin Ou},
  title = {{MKIoU Loss: Towards Accurate Oriented Object Detection in Aerial Images}},
  year = {2022},
  eprint = {2206.15109},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.15109},
}
Figure