# box_detection_assembler

Python API: `depthai_nodes.node.box_detector.box_detection_assembler`

Pair tracklets with segmented detections into one BoxDetections per frame.

## Classes

### BoxDetectionAssembler

Emit one box detection per new or tracked box with a non-empty segmentation.

#### Methods

##### init

```python
def __init__(self):
```

Initialize the assembler with a placeholder mask size.

##### build

```python
def build(tracklets: dai.Node.Output, detections: dai.Node.Output, maskSize: tuple[int, int]) -> BoxDetectionAssembler:
```

Link the tracker and detection streams.

Parameters

 * `tracklets` (`dai.Node.Output`): Output producing `dai.Tracklets`.
 * `detections` (`dai.Node.Output`): Output producing `dai.ImgDetections` with an instance mask.
 * `maskSize` (`tuple[int, int]`): `(width, height)` of the network input, used for the mask of frames that carry none.

Returns

 * `BoxDetectionAssembler`: This node.

##### process

```python
def process(tracklets: dai.Buffer, detections: dai.Buffer):
```

Assemble and emit the box detections of one frame.

Parameters

 * `tracklets` (`dai.Buffer`): Tracker output for the frame.
 * `detections` (`dai.Buffer`): Detections of the frame with their instance mask.

Raises

 * `TypeError`: If the inputs are not `dai.Tracklets` and `dai.ImgDetections`.

#### Attributes

##### out

Output stream of `BoxDetections` carrying the timestamps and sequence number of the input detections.

## Attributes

### CURRENT_STATUSES
