Class ImageInferenceContext
Object
ImageInferenceContext
Attributes describing the situation in which inference on images is occurring.
These may be helpful for decoding output from the inference.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionImageInferenceContext
(DualScale<Dimensions> dimensions, ScaleFactor scaleFactor, Optional<List<String>> classLabels, VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, Logger logger) Creates a newImageInferenceContext
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
If available, labels of classes loaded from a text file atclassLabelsPath
.The size of the image for which we wish to segment, before and after any scaling for model inference.Allows execution-time for particular operations to be recorded.Where to log information messages during inference.How to resize images or voxel-buffers.The inverse of the scaling-factor applied to reduceunscaledDimensions
to the input-matrix used for inference.int
hashCode()
final DualScale
<Optional<ScaleFactor>> The scaling-factors needed to upscale the model output to match the desired scale.toString()
-
Constructor Details
-
ImageInferenceContext
public ImageInferenceContext(DualScale<Dimensions> dimensions, ScaleFactor scaleFactor, Optional<List<String>> classLabels, VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, Logger logger) Creates a newImageInferenceContext
instance.- Parameters:
dimensions
- The size of the image for which we wish to segment, before and after any scaling for model inference.scaleFactor
- The inverse of the scaling-factor applied to reduceunscaledDimensions
to the input-matrix used for inference.classLabels
- If available, labels of classes loaded from a text file atclassLabelsPath
.resizer
- How to resize images or voxel-buffers.executionTimeRecorder
- Allows execution-time for particular operations to be recorded.logger
- Where to log information messages during inference.
-
-
Method Details
-
scaleFactorUpscale
The scaling-factors needed to upscale the model output to match the desired scale.- Returns:
- each scaling-factor (if required) to scale an image (at the respective scale in
DualScale
by, so they become identically sized to theDualScale.atInputScale()
.
-
getDimensions
The size of the image for which we wish to segment, before and after any scaling for model inference. -
getScaleFactor
The inverse of the scaling-factor applied to reduceunscaledDimensions
to the input-matrix used for inference. -
getClassLabels
If available, labels of classes loaded from a text file atclassLabelsPath
. -
getResizer
How to resize images or voxel-buffers. -
getExecutionTimeRecorder
Allows execution-time for particular operations to be recorded. -
getLogger
Where to log information messages during inference. -
equals
-
hashCode
public int hashCode() -
toString
-