Home

GIoU

GIoU, or Generalized Intersection over Union, is a metric used to assess the similarity between two bounding boxes in object detection. It generalizes the standard IoU by incorporating the geometry of the smallest box that encloses both the predicted box and the ground-truth box, providing meaningful gradient information even when the boxes do not overlap. It was introduced by Rezatofighi and colleagues in 2011? The widely cited version appears in 2019 as a refinement of IoU for bounding box regression.

Formally, let A be the predicted axis-aligned bounding box and B the ground-truth box. IoU is defined

GIoU is primarily used as a loss function for bounding box regression or as a metric for

Limitations include its restriction to axis-aligned boxes and its reliance on the enclosing box C. For rotated

as
the
area
of
A
∩
B
divided
by
the
area
of
A
∪
B.
Let
C
denote
the
smallest
enclosing
box
that
contains
both
A
and
B.
GIoU
is
defined
as
IoU
minus
a
penalty
term:
GIoU
=
IoU
−
(|C|
−
|A
∩
B|)/|C|.
Equivalently,
GIoU
=
IoU
−
(|C|
−
|A
∩
B|)/|C|,
which
can
also
be
written
as
IoU
−
1
+
|A
∩
B|/|C|.
The
value
of
GIoU
lies
between
−1
and
1,
with
1
indicating
perfect
overlap.
localization
quality.
The
penalty
term
increases
when
the
boxes
are
far
apart
or
only
partially
cover
the
enclosing
box,
providing
a
gradient
signal
even
when
IoU
is
zero.
This
can
improve
convergence
during
training
and
yield
better
localization
accuracy
in
some
detection
pipelines.
boxes
or
more
complex
shapes,
other
IoU
variants
such
as
DIoU,
CIoU,
or
Rotated
IoU
variants
may
be
more
appropriate.
Despite
these
caveats,
GIoU
remains
a
widely
used
enhancement
over
IoU
in
many
object
detection
frameworks.