CIoULoss
classkeras_cv.losses.CIoULoss(bounding_box_format, eps=1e-07, **kwargs)
Implements the Complete IoU (CIoU) Loss
CIoU loss is an extension of GIoU loss, which further improves the IoU optimization for object detection. CIoU loss not only penalizes the bounding box coordinates but also considers the aspect ratio and center distance of the boxes. The length of the last dimension should be 4 to represent the bounding boxes.
Arguments
References
Example
y_true = np.random.uniform(
size=(5, 10, 5),
low=0,
high=10)
y_pred = np.random.uniform(
(5, 10, 4),
low=0,
high=10)
loss = keras_cv.losses.CIoULoss()
loss(y_true, y_pred).numpy()
Usage with the compile()
API:
model.compile(optimizer='adam', loss=CIoULoss())