lazyslide.seg.cells

Contents

lazyslide.seg.cells#

cells(wsi, model='instanseg', tile_key='tiles', transform=None, batch_size=4, num_workers=0, device=None, pbar=True, key_added='cells')#

Cell segmentation for the whole slide image.

Note

Tiles should be prepared before segmentation.

Recommended tile setting:

  • instanseg: 512x512, mpp=0.5

Parameters:
wsiWSIData

The WSIData object to work on.

modelstr | SegmentationModel, default: “instanseg”

The cell segmentation model.

tile_keystr, default: “tiles”

The key of the tile table.

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: “cells”

The key for the added cell shapes.