{ } Raw JSON

bundles / skimage latest / skimage / future / trainable_segmentation / TrainableSegmenter / fit

function

skimage.future.trainable_segmentation:TrainableSegmenter.fit

source: /dev/scikit-image/src/skimage/future/trainable_segmentation.py:55

Signature

def fit(self, image, labels)

Summary

Train classifier using partially labeled (annotated) image.

Parameters

image : ndarray

Input image, which can be grayscale or multichannel, and must have a number of dimensions compatible with self.features_func.

labels : ndarray of ints

Labeled array of shape compatible with image (same shape for a single-channel image). Labels >= 1 correspond to the training set and label 0 to unlabeled pixels to be segmented.

Aliases

  • skimage.future.TrainableSegmenter.fit