Package qupath.opencv.ops
Class ImageOps.ML
java.lang.Object
qupath.opencv.ops.ImageOps.ML
- Enclosing class:
- ImageOps
Machine learning operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageOpApply aDnnModelto pixels to generate a prediction.static ImageOppreprocessor(FeaturePreprocessor preprocessor) Apply aFeaturePreprocessorto pixels, considering each channel as features.static ImageOpstatModel(OpenCVClassifiers.OpenCVStatModel statModel, boolean requestProbabilities) Apply aStatModelto pixels to generate a prediction.
-
Constructor Details
-
ML
public ML()
-
-
Method Details
-
statModel
public static ImageOp statModel(OpenCVClassifiers.OpenCVStatModel statModel, boolean requestProbabilities) Apply aStatModelto pixels to generate a prediction.- Parameters:
statModel-requestProbabilities-- Returns:
-
dnn
public static ImageOp dnn(DnnModel model, int inputWidth, int inputHeight, Padding padding, String... outputNames) Apply aDnnModelto pixels to generate a prediction.- Parameters:
model-inputWidth- requested input widthinputHeight- requested input heightpadding- amount of padding providedoutputNames- names of model outputs. If empty, the first (and often only) output is used. If more than one output is specified, it is assumed that all are the same size and they be concatenated along the channels dimension.- Returns:
-
preprocessor
Apply aFeaturePreprocessorto pixels, considering each channel as features.- Parameters:
preprocessor-- Returns:
-