TiledTissueMask, which walks a WSI in fixed-size patches, processes them through a TissueMaskModel, and stitches the per-tile predictions into a full-slide binary mask.
TiledTissueMask
TissueMaskModel with a tiling strategy to produce a full-slide binary mask. The tile size and resolution are taken from the model’s tile spec. The workflow (see generate) is:
- Compute the tissue bounding box at the model’s resolution.
- Walk the bounding box in non-overlapping, tile-spec-sized patches.
- Read patches sequentially and dispatch them concurrently to the model endpoint for GPU-efficient batched inference.
- Stitch the per-tile masks back into the output array.
The segmentation model. Its tile spec supplies the tile size and resolution used for tiling.
generate
An open WSI reader.
Whether to display a per-tile progress bar. Defaults to
True.Maximum concurrent HTTP requests. Defaults to 64.
uint8 mask of shape (H, W) covering the tissue
bounding box at resolution, with values in
{0, 1} where 1 = tissue.
