oa::vision::box_iou

Compute every pairwise intersection-over-union for center-coordinate boxes. boxes_a and boxes_b must be nonempty FP32 matrices shaped [N, 4] and [M, 4]. Each row is [center_x, center_y, width, height]; negative widths and heights are clamped to zero, matching donor OA. A pair with no positive finite union produces zero. The returned matrix has shape [N, M]. The call records asynchronously and returns its output immediately. Reading the result is an explicit submission and observation point. Errors Returns an error when an input has the wrong rank, extent, dtype, or engine, a shader-ABI size overflows, allocation fails, or runtime recording fails.

FnRust public API

Function Documentation

pub fn box_iou( boxes_a: &Matrix, boxes_b: &Matrix ) -> Result<Matrix>
Compute every pairwise intersection-over-union for center-coordinate boxes. boxes_a and boxes_b must be nonempty FP32 matrices shaped [N, 4] and [M, 4]. Each row is [center_x, center_y, width, height]; negative widths and heights are clamped to zero, matching donor OA. A pair with no positive finite union produces zero. The returned matrix has shape [N, M]. The call records asynchronously and returns its output immediately. Reading the result is an explicit submission and observation point. Errors Returns an error when an input has the wrong rank, extent, dtype, or engine, a shader-ABI size overflows, allocation fails, or runtime recording fails.