iou
function iou(a, b): number;
Intersection over Union (IoU), how much two masks overlap as a fraction of either's total. 1.0 = perfect match, 0 = no overlap. Used for stable, robust tracking of the main person between frames, especially with bystander removal and temporal instance switching.
Parameters
| Parameter | Type |
|---|---|
a | Uint8Array |
b | Uint8Array |
Returns
number