Package qupath.opencv.ml
Class PatchClassifierParams
java.lang.Object
qupath.opencv.ml.PatchClassifierParams
Parameters required to build a classifier that operates on an image patch.
This is typically used to create a PixelClassifier
.
It can also be used to create an ObjectClassifier
that takes image patches as input
(rather that features extracted from object ROIs or measurement lists).
- Since:
- v0.4.0
- Author:
- Pete Bankhead
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder to generate new patch classifier params.builder
(PatchClassifierParams params) Create a builder to generate new patch classifier params, initialized with the values from an existing parameter object.static PixelClassifier
Build a pixel classifier using these parametersgetHalo()
Get the 'halo' around the output.Get the channels to extract from the image as input to the model.Get the requested input resolution for the image.Get the requested output channel type.Get the classifications for the output.int
Get the height of a patch, in pixels.int
Get the width of a patch, in pixels.Get any postprocessing steps that should be applied after prediction.Get the image op used for prediction only.Get any preprocessing steps that should be applied.
-
Method Details
-
getInputChannels
Get the channels to extract from the image as input to the model.- Returns:
-
getPatchWidth
public int getPatchWidth()Get the width of a patch, in pixels.- Returns:
-
getPatchHeight
public int getPatchHeight()Get the height of a patch, in pixels.- Returns:
-
getHalo
Get the 'halo' around the output. This can be used to determine appropriate padding to avoid tile boundary artifacts. Can be null or empty.- Returns:
-
getInputResolution
Get the requested input resolution for the image.- Returns:
-
getOutputChannelType
Get the requested output channel type.- Returns:
-
getOutputClasses
Get the classifications for the output. Keys to the map are generally channel numbers of the output (zero-based), or could be labels in a single-channel labeled image.- Returns:
-
getPreprocessing
Get any preprocessing steps that should be applied.- Returns:
-
getPredictionOp
Get the image op used for prediction only. This is applied after any preprocessing steps, but before any postprocessing steps.- Returns:
-
getPostprocessing
Get any postprocessing steps that should be applied after prediction.- Returns:
-
buildPixelClassifier
Build a pixel classifier using these parameters- Parameters:
params
-- Returns:
-
builder
Create a builder to generate new patch classifier params.- Returns:
-
builder
Create a builder to generate new patch classifier params, initialized with the values from an existing parameter object.- Parameters:
params
- the existing parameters, used to initialize the builder- Returns:
-