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: ndarrayArray 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 objecttrained classifier object, exposing a
predictmethod as in scikit-learn's API, for example an instance ofRandomForestClassifierorLogisticRegressionclassifier. The classifier must be already trained, for example with skimage.future.fit_segmenter.
Returns
output: ndarrayLabeled array, built from the prediction of the classifier.
Aliases
skimage.future.predict_segmenter