{ } Raw JSON

bundles / skimage latest / skimage / future / trainable_segmentation / predict_segmenter

function

skimage.future.trainable_segmentation:predict_segmenter

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

Signature

def predict_segmenter(features, clf)

Summary

Segmentation of images using a pretrained classifier.

Parameters

features : ndarray

Array of features, with the last dimension corresponding to the number of features, and the other dimensions are compatible with the shape of the image to segment, or a flattened image.

clf : classifier object

trained classifier object, exposing a predict method as in scikit-learn's API, for example an instance of RandomForestClassifier or LogisticRegression classifier. The classifier must be already trained, for example with skimage.future.fit_segmenter.

Returns

output : ndarray

Labeled array, built from the prediction of the classifier.

Aliases

  • skimage.future.predict_segmenter