Skip to content

Collate Tiles

Source

Collate function for tiling.

collate_tiles(batch)

Collate tiles received from CAREamics prediction dataloader.

CAREamics prediction dataloader returns tuples of arrays and TileInformation. In case of non-tiled data, this function will return the arrays. In case of tiled data, it will return the arrays, the last tile flag, the overlap crop coordinates and the stitch coordinates.

Parameters:

Name Type Description Default
batch list[tuple[ndarray, TileInformation], ...]

Batch of tiles.

required

Returns:

Type Description
Any

Collated batch.