Skip to main content
. 2023 Feb 10;23(4):2025. doi: 10.3390/s23042025
Algorithm 1: Generalised Intersection over Union [24]
input: Two arbitrary convex shapes: A, B ⊆ S ∈ Rn
output: GIoU
1 For A and B, find the smallest enclosing convex object C, where C ⊆ S ∈ Rn
IoU=|A∩B||A∪B|          (1)
GIoU=IoU−|C\(A∩B)||A∪B|   (2)