Skip to content

[SDK][Agreement] Add Intersection over Union to agreement package. #1577

@simulacrum6

Description

@simulacrum6

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions