squidpy.im.SegmentationCustom
- class squidpy.im.SegmentationCustom(func)[source]
Segmentation model based on a user-defined function.
- Parameters:
func (
Callable[...,ndarray[tuple[Any,...],dtype[Any]]]) – Segmentation function to use. Can be anycallable(), as long as it has the following signature:numpy.ndarray(height, width, channels)->numpy.ndarray(height, width[, 1]). The segmentation must be ofnumpy.uint32type, where 0 marks background.
Methods
segment(img, **kwargs)Segment an image.