Home

CIOU

CIoU, short for Complete Intersection over Union, is a loss function used in bounding box regression for object detection. It extends the idea of IoU-based losses by incorporating not only the overlap between predicted and ground-truth boxes but also the spatial relationship and shape similarity between boxes. By doing so, CIoU aims to provide more informative gradients during training, leading to faster convergence and more accurate box predictions.

The loss combines three components: a contact term for overlap, a distance term for the centers, and

The CIoU loss is commonly written as: L_CIoU = 1 - IoU + (ρ(b, bgt)^2 / c^2) + α · v. This formulation

See also: IoU, DIoU, GIoU, bounding box regression.

an
aspect-ratio
term
to
align
the
shapes.
Let
IoU
be
the
intersection
over
union
of
the
predicted
box
and
the
ground-truth
box.
Let
ρ(b,
bgt)
denote
the
Euclidean
distance
between
their
centers,
and
c
be
the
diagonal
length
of
the
smallest
enclosing
box
that
contains
both
boxes.
Let
w
and
h
be
the
width
and
height
of
the
predicted
box,
and
wgt
and
hgt
those
of
the
ground-truth
box.
Then
the
aspect-ratio
term
is
v
=
(4/π^2)
times
the
square
of
the
difference
between
arctan(wgt/hgt)
and
arctan(w/h).
The
scale
factor
α
is
defined
as
α
=
v
/
(1
-
IoU
+
v).
reduces
to
DIoU
when
the
aspect-ratio
term
is
negligible
and
further
improves
performance
when
boxes
differ
in
shape.
CIoU
is
used
in
various
object
detection
frameworks
to
enhance
bounding-box
regression
accuracy
and
training
stability.