Package qupath.opencv.ops
Class ImageOps.ML
java.lang.Object
qupath.opencv.ops.ImageOps.ML
- Enclosing class:
ImageOps
Machine learning operations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImageOp
Apply aDnnModel
to pixels to generate a prediction.static ImageOp
preprocessor
(FeaturePreprocessor preprocessor) Apply aFeaturePreprocessor
to pixels, considering each channel as features.static ImageOp
statModel
(OpenCVClassifiers.OpenCVStatModel statModel, boolean requestProbabilities) Apply aStatModel
to pixels to generate a prediction.
-
Constructor Details
-
ML
public ML()
-
-
Method Details
-
statModel
public static ImageOp statModel(OpenCVClassifiers.OpenCVStatModel statModel, boolean requestProbabilities) Apply aStatModel
to 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 aDnnModel
to 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 aFeaturePreprocessor
to pixels, considering each channel as features.- Parameters:
preprocessor
-- Returns:
-