Description
Add an implementation for Intersection over Union (IoU or Jaccard Index). It should be compatible with lines (1-dimension), rectangles (2-dimensions) and cuboids (3-dimensions). An implementation of the Generalised Intersection over Union (GIoU) should also be provided.
Motivation
IoU is a common similarity measure for various types of annotations that represent an area of interest. for instance segments of a text, audio recording or video (1-dimensional), bounding boxes in an image (2-dimensional) or bounding boxes in a 3d scene / pointcloud (3-dimensional).
Including IoU will enable the addition of derived measures, for instance Mean Average Precision for bounding box classification.
Implementation details
- IoU and GIoU should functions with two input parameters (one for each shape) and a single floating point output.
- The shapes may be represented as a numpy ndarray.
- The function should return a float between 0.0 and 1.0 for IoU and a float between -1.0 and 1.0 for GIoU. This should be ensured by appropriate tests.
Description
Add an implementation for Intersection over Union (IoU or Jaccard Index). It should be compatible with lines (1-dimension), rectangles (2-dimensions) and cuboids (3-dimensions). An implementation of the Generalised Intersection over Union (GIoU) should also be provided.
Motivation
IoU is a common similarity measure for various types of annotations that represent an area of interest. for instance segments of a text, audio recording or video (1-dimensional), bounding boxes in an image (2-dimensional) or bounding boxes in a 3d scene / pointcloud (3-dimensional).
Including IoU will enable the addition of derived measures, for instance Mean Average Precision for bounding box classification.
Implementation details