# batch_compose

Python API: `luxonis_ml.data.augmentations.batch_compose`

## Classes

| Name | Description |
| --- | --- |
|
[`BatchCompose`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/augmentations/batch_compose.md)
| Compose batch-aware Albumentations transforms. |

### class `BatchCompose`

```python
class BatchCompose(A.Compose)
```

Compose batch-aware Albumentations transforms.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `applied_params` | `dict[int, dict[str, Any]]` | Runtime parameters of the transformations that shaped the sample returned by
the latest call, keyed by transformation identity. Invocations on sub-batches that did not survive into that sample are not
reported; of those that did, the last one wins. |
| `batch_augmentation_indices` |  |  |
| `batch_size` | `int` | Product of nested transform batch sizes, ∏ibi. |
| `transforms` | `list[BatchTransform]` | Batch transformations in composition order. |

Methods

| Name | Description |
| --- | --- |
|
[`__init__`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/augmentations/batch_compose.md)
| Compose batch transforms. |

#### method `__init__`

```python
def __init__(
    transforms: TransformsSeqType,
    *,
    bbox_associations: dict[str, dict[str, str]] | None = None,
    **kwargs,
)
```

Compose batch transforms.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `transforms` | `TransformsSeqType` | Transformations to compose. | required |
| `bbox_associations` | `dict[str, dict[str, str]] | None` | Bbox fields mapped to their associated target fields and target
types. Fields listed here must carry the index column appended by
[luxonis_ml.data.augmentations.utils.preprocess_bboxes](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/augmentations/utils.md);
any other bbox field is left untouched. | `None` |
| `**kwargs` | | Additional arguments passed to
[A.Compose](https://github.com/albumentations-team/albumentations/blob/66212d77a44927a29d6a0e81621d3c27afbd929c/albumentations/core/composition.py#L609).
| |
