UDT IOU Error
Compute the intersection over union error of groups of polygons (UDT regions). Created primarily for use with the Universal Data Tool.
All x/y coordinates should be in a 1x1
area, anything outside of the 1x1
area won't be considered. (If you want to change this behavior to something more configurable, PRs are welcome!)
// install with npm install udt-iou-errorconst getIOU = const annotation1 = regionType: "bounding-box" centerX: 05 centerY: 05 width: 05 height: 05 const annotation2 = regionType: "polygon" points: x: 0 y: 0 x: 0 y: 1 x: 1 y: 1 // >> 0.2
Classifications
It's also smart enough to calculate IOU error with multiple classifications.
const getIOU = const annotation1 = regionType: "bounding-box" classification: "red" centerX: 05 centerY: 05 width: 05 height: 05 regionType: "bounding-box" classification: "blue" centerX: 01 centerY: 01 width: 02 height: 02 const annotation2 = regionType: "polygon" classification: "blue" points: x: 0 y: 0 x: 0 y: 1 x: 1 y: 1 // >> 0.259