# detection

Python API: `depthai_nodes.node.parsers.utils.detection`

## Functions

### compute_detection_outputs

```python
def compute_detection_outputs(bboxes: np.ndarray, scores: np.ndarray, *, conf_threshold: float, iou_threshold: float, max_det: int) -> tuple[np.ndarray, np.ndarray]:
```

Suppress overlapping detections and convert retained boxes.

Parameters

 * `bboxes` (`np.ndarray`): Bounding boxes of shape `(N, 4)` in `[xmin, ymin, xmax, ymax]` format.
 * `scores` (`np.ndarray`): Confidence scores of shape `(N,)`.
 * `conf_threshold` (`float`): Minimum detection confidence used to filter candidates.
 * `iou_threshold` (`float`): Intersection-over-union threshold for non-maximum suppression.
 * `max_det` (`int`): Maximum number of detection candidates to retain or consider during suppression.

Returns

 * `tuple[np.ndarray, np.ndarray]`: Retained center-XY/width/height boxes and corresponding scores. Coordinates retain their input
   units. Both arrays are empty if no boxes survive.
