lazyslide.seg.cell_types

Contents

lazyslide.seg.cell_types#

cell_types(wsi, model='nulite', tile_key='tiles', magnification=None, transform=None, batch_size=4, num_workers=0, device=None, amp=None, autocast_dtype=None, size_filter=False, nucleus_size=(20, 1000), pbar=True, extract_features=False, key_added='cell_types')#

Cell type segmentation for the whole slide image.

tile should be prepared before segmentation, the tile size should be reasonable (with mpp around 0.5) for the model to work properly

Supported models:
Parameters:
wsiWSIData

The WSIData object to work on.

modelstr | SegmentationModel, default: “nulite”

The cell type segmentation model.

tile_keystr, default: “tiles”

The key of the tile table.

magnificationstr, default: None

The magnification of the model.

transformcallable, default: None

The transformation for the input tiles.

batch_sizeint, default: 4

The batch size for segmentation.

num_workersint, default: 0

The number of workers for data loading.

devicestr, default: None

The device for the model.

pbarbool, default: True

Whether to show a progress bar during segmentation.

key_addedstr, default: “cell_types”

The key for the added cell type shapes.