stereo.image.segmentation.segment.cell_seg#
- stereo.image.segmentation.segment.cell_seg(model_path, img_path, out_path, deep_crop_size=20000, overlap=100, post_processing_workers=10, is_water=False, method='v3', need_tissue_cut=True, tissue_seg_model_path=None, tissue_seg_staining_type=None, gpu='-1', num_threads=-1)[source]#
Cell segmentation on regist.tif/mask.tif by deeplearning model.
- Parameters:
model_path (
str
) – the path of model used to cell segmentation.img_path (
str
) – the path of regist.tif/mask.tif.out_path (
str
) – the path of directory to save the result cell mask.tif.deep_crop_size (
int
) – deep crop size, defaults to 20000overlap (
int
) – over lap size, defaults to 100post_processing_workers (
int
) – the number of processes on post processing, defaults to 10.is_water (
bool
) – defaults to False.method (
str
) – v1, v1_pro or v3, recommend to use v3.need_tissue_cut – whether to run tissue segmentation, defaults to True. the method v1 and v1_pro have to run tissue segmentation, so these two methods must be based on regist.tif, method v3 can use mask.tif from tissue segmentation or regist.tif without tissue segmentation.
tissue_seg_model_path (
Optional
[str
]) – the path of model used to tissue segmentation, defaults to Nonetissue_seg_staining_type (
Optional
[str
]) – the staining type of regist.mask, defaults to Nonegpu (
str
) – the gpu on which the model works, available for both cell segmtation and tissue segmtation, ‘-1’ means working on cpu.num_threads (
int
) – the number of threads when model work on cpu, available for both v3 cell segmtation and tissue segmtation, -1 means using all the cores.