Home

DistanceIoU

DistanceIoU, commonly abbreviated DIoU, is a bounding box regression loss and evaluation metric used in object detection. It extends the traditional Intersection over Union (IoU) by incorporating the spatial relationship between the predicted box and the ground-truth box, specifically penalizing the distance between their centers in addition to their overlap. This helps improve localization accuracy and training efficiency, especially when boxes have similar IoU but different center positions.

Formally, for a predicted box B and a ground-truth box G, let IoU(B, G) be their intersection

DistanceIoU is often used as a drop-in replacement for IoU-based regression losses in object detectors to achieve

over
union,
ρ(B,
G)
be
the
Euclidean
distance
between
their
center
points,
and
c
be
the
diagonal
length
of
the
smallest
enclosing
box
that
covers
both
B
and
G.
The
DistanceIoU
loss
is
defined
as
L_DIoU
=
1
−
IoU(B,
G)
+
[ρ(B,
G)]^2
/
c^2.
The
first
term
incentivizes
large
overlaps,
while
the
second
term
punishes
center
misalignment,
promoting
boxes
that
are
both
overlapping
and
well-centered
with
respect
to
the
ground-truth.
faster
convergence
and
better
localization.
It
is
related
to,
but
distinct
from,
Complete
IoU
(CIoU),
which
adds
a
term
accounting
for
aspect
ratio
differences
between
boxes.
DIoU
is
primarily
applicable
to
axis-aligned
bounding
boxes;
for
rotated
boxes,
other
metrics
are
typically
employed.
Overall,
DIoU
provides
a
simple,
effective
way
to
improve
bounding
box
regression
during
model
training.