dgs.utils.state.collate_bboxes

dgs.utils.state.collate_bboxes(batch: list[torchvision.tv_tensors.BoundingBoxes], *_args, **_kwargs) torchvision.tv_tensors.BoundingBoxes[source]

Collate a batch of bounding boxes into a single one. It is expected that all bounding boxes have the same canvas size and format.