# batch_compose

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

## 类

### BatchCompose

组合批次感知的 Albumentations 变换。

#### 方法

##### init

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

组合批次变换。

参数

 * `transforms` (`TransformsSeqType`): 要组合的变换。
 * `bbox_associations` (`dict[str, dict[str, str]] | None`): 边界框字段映射到其关联的目标字段和目标类型。此处列出的字段必须带有由
   [luxonis_ml.data.augmentations.utils.preprocess_bboxes](/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/augmentations/utils.md)
   附加的索引列；任何其他边界框字段保持不变。
 * `**kwargs`: 传递给
   [A.Compose](https://github.com/albumentations-team/albumentations/blob/66212d77a44927a29d6a0e81621d3c27afbd929c/albumentations/core/composition.py#L609)
   的附加参数。

#### 属性

##### applied_params

最新调用返回的样本所形成的变换的运行时参数，以变换标识为键。未存活到该样本的子批次上的调用不予报告；在存活的子批次中，最后一个获胜。

##### batch_augmentation_indices

##### batch_size

嵌套变换批次大小的乘积，∏ibi。

##### transforms

按组合顺序排列的批次变换。
