Source-linked AI summary

SIoU Loss: More Powerful Learning for Bounding Box Regression

Zhora Gevorgyan

arXiv:2205.12740v1cs.CVcs.AI

TL;DR

Object-detection box regression losses traditionally use distance, shape, and overlap but omit mismatch direction. The paper proposes SIoU with direction-aware penalties, reporting faster convergence and higher detection accuracy than CIoU in the evaluated tests.

  • Problem

    Existing bounding-box regression losses use distance, shape, and overlap metrics without accounting for mismatch direction.

  • Method

    SIoU redefines bounding-box penalty metrics to include mismatch direction and comprises four cost functions.

  • Results

    52.7% mAP@0.5:0.95 and 70% mAP@0.5 were achieved with SIoU, versus 50.3% and 66.4% with CIoU.

  • Takeaways & Limitations

    SIoU reached the ground truth in 495 epochs, whereas conventional CIoU did not find it within 1000 epochs.

  • Takeaways & Limitations

    The shape-cost parameter θ has a value unique to each dataset.

Abstract

from arXiv · show

The effectiveness of Object Detection, one of the central problems in computer vision tasks, highly depends on the definition of the loss function - a measure of how accurately your ML model can predict the expected outcome. Conventional object detection loss functions depend on aggregation of metrics of bounding box regression such as the distance, overlap area and aspect ratio of the predicted and ground truth boxes (i.e. GIoU, CIoU, ICIoU etc). However, none of the methods proposed and used to date considers the direction of the mismatch between the desired ground box and the predicted, "experimental" box. This shortage results in slower and less effective convergence as the predicted box can "wander around" during the training process and eventually end up producing a worse model. In this paper a new loss function SIoU was suggested, where penalty metrics were redefined considering the angle of the vector between the desired regression. Applied to conventional Neural Networks and datasets it is shown that SIoU improves both the speed of training and the accuracy of the inference. The effectiveness of the proposed loss function was revealed in a number of simulations and tests.

Introduction

Object detection loss functions penalize mismatches between predicted and ground-truth boxes using metrics such as center distance, overlap area, and aspect ratio. The proposed approach adds mismatch direction, helping predictions move quickly toward coordinate-aligned corrections while reducing regression degrees of freedom.

  • Background: Object detection is a key computer vision problem, and its loss function serves as a penalty minimized during training.The loss ideally makes the predicted bounding box match the corresponding ground-truth box.
  • Related work: Existing object-detection losses combine mismatch metrics including box-center distance, overlap area, and aspect ratio.GIoU was reported to outperform other standard loss functions in state-of-the-art object-detection methods.
  • Contribution: The proposed loss supplements distance, shape, and IoU penalties with the direction of the mismatch between ground-truth and predicted boxes.This directional term is presented as a way to improve beyond conventional mismatch metrics.
  • Novelty: Angular penalty cost quickly drives the prediction box toward the nearest axes, leaving regression of only one coordinate, X or Y.The resulting angular penalty reduces the total number of degrees of freedom.

Methods

The Methods section defines the metrics contributing to the SCYLLA-IoU (SIoU) loss function and states that it consists of four cost functions.

  • The method defines metrics that contribute to the SCYLLA-IoU (SIoU) loss function.
  • SIoU loss function consists of 4 cost functions.

Angle cost

The angle-aware LF component is designed to reduce distance-related wandering during bounding-box regression. It guides predictions toward the closer coordinate axis before continuing along the relevant axes.

  • Angle cost: The angle-aware LF component minimizes the number of variables involved in distance-related “wondering”.This component is introduced as part of the angle cost.
  • Angle cost: The model first moves the prediction toward whichever of the X or Y axes is closer, then continues along the relevant axes.This axis-oriented process is intended to achieve convergence.
  • Angle cost: The LF component was introduced and defined to implement the angle-cost contribution to the loss function.Figure 1 presents the scheme for calculating this contribution.
  • Angle cost: The angle-cost curve is displayed in Figure 2.The figure represents angle cost relative to angle.

Distance cost

The distance cost is redefined to incorporate the angle cost. As α approaches zero, its contribution is reduced and the cost becomes conventional, while increasing angle gives γ priority to distance.

  • The distance cost is redefined by incorporating the previously defined angle cost.
  • As α→0, the contribution of the distance cost is drastically reduced.
  • As the angle increases, γ gives priority to the distance value.
  • The distance cost becomes conventional when α→0.

Shape cost

The shape cost is controlled by θ, a dataset-specific parameter that determines how much attention is given to shape alignment. Setting θ to 1 prioritizes shape optimization immediately, while genetic-algorithm tuning typically selects values near 4 within the defined range of 2–6.

  • Shape cost: θ controls how much attention is paid to the shape cost in the loss formulation.Its value is unique for each dataset.
  • Shape cost: Setting θ to 1 immediately optimizes the shape, which can hinder free movement of the predicted shape.
  • Shape cost: A genetic algorithm is used experimentally for each dataset to determine θ.The authors report θ near 4 and define its range as 2 to 6.

Training

The proposed SIoU loss was evaluated by training a model on the COCO dataset and comparing it with the state-of-the-art CIoU loss. Training used 300 COCO-train epochs and evaluation on COCO-val.

  • Training: The model was trained on the COCO dataset to assess the effectiveness of the proposed loss function.COCO contains 200+K images labeled with 1.5 million object instances.
  • Training: Training effectiveness was compared between the proposed SIoU and state-of-the-art CIoU loss functions.The comparison used 300 epochs of training on COCO-train.
  • Training: The trained models were tested on the COCO-val set.Testing followed the 300-epoch COCO-train comparison.

Simulation Experiment

The simulation evaluated bounding-box regression across varied distances, scales, and aspect ratios using 1,715,000 regression cases. Training used Adam with a step learning-rate scheduler for 100 epochs, while genetic optimization determined loss weights and θ.

  • Error definition: Total final error was defined using the current box, its corresponding ground-truth box, and the error term E(i).The supplied passage identifies B_n as the current box, the corresponding ground-truth box, and E(i) as the i-th error term.
  • Training configuration: Adam optimization used an initial learning rate of 0.1, a step size of 80, and 100 training epochs.A step learning-rate scheduler was used.
  • Loss optimization: A genetic algorithm calculated the box and classification loss weights and θ using a training-set subset.The process stopped when fitness fell below the threshold or the maximum allowed iterations were exceeded.

Results and Discussion

SIoU improves convergence and reduces simulated regression error relative to CIoU. On Scylla-Net, SIoU also produces better monitored metrics and higher COCO validation mAP with low inference times.

  • Simulation convergence: SIoU converges to the ground truth in 495 epochs when the initial prediction box is away from the X/Y axes, whereas CIoU does not find it within 1000 epochs.The advantage is more obvious for boxes initially away from the axes.
  • Simulation error: SIoU’s maximum simulated error is almost two orders of magnitude lower than CIoU’s, with a smoother error surface and minimal total error across the simulations.The surface plot aggregates 1715000 regression cases, with box-center coordinates on the X and Y axes and error on Z.
  • Scylla-Net training: Across 300 training epochs on COCO-train, SIoU produces drastically better monitored metrics during training and better final values than CIoU.The comparison uses Scylla-Net, a convolution-based network whose architecture is defined by a genetic algorithm for a specific dataset.
  • COCO validation performance: The bigger SIoU-trained model achieves 57.1% mAP@0.5:0.95 at 12ms and 74.3% mAP@0.5, while comparison architectures reach at most 54.4% mAP@0.5:0.95.Efficient-Det-d7x, YOLO-V4, and YOLO-V5 report 54.4% (153ms), 47.1% (26.3ms), and 50.4% (6.1ms tests done with fp16), respectively.

Conclusion

The paper proposes a directionality-aware loss function for bounding box regression that accelerates convergence and improves inference performance compared with existing methods such as CIoU loss. The loss reduces regression degrees of freedom, has verified improvements, and can be integrated into object detection pipelines.

  • Conclusion: The proposed loss function introduces directionality into the loss cost, achieving faster convergence during training and better inference performance than existing methods such as CIoU loss.Its directionality addresses the regression mismatch through the angle of the vector between the desired and predicted boxes.
  • Conclusion: The improvement reduces regression degrees of freedom from two coordinates to one, making convergence faster and more accurate.The passage characterizes this as one coordinate versus two.
  • Conclusion: The claims were verified through comparisons with widely used state-of-the-art methodologies, with measured improvements reported.The conclusion states that the proposed loss was evaluated against established methods.
  • Conclusion: The proposed loss function can be easily included in any object detection pipeline and can help achieve superior results.This supports its practical applicability beyond the reported comparisons.
Loading 2205.12740v1…