Class ImageInferenceContext
Object
org.anchoranalysis.image.inference.ImageInferenceContext
public final class ImageInferenceContext extends Object
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
Constructors Constructor Description ImageInferenceContext(DualScale<Dimensions> dimensions, org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor, Optional<List<String>> classLabels, org.anchoranalysis.image.voxel.resizer.VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, Logger logger) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Optional<List<String>>getClassLabels()If available, labels of classes loaded from a text file atclassLabelsPath.DualScale<Dimensions>getDimensions()The size of the image for which we wish to segment, before and after any scaling for model inference.ExecutionTimeRecordergetExecutionTimeRecorder()Allows execution-time for particular operations to be recorded.LoggergetLogger()Where to log information messages during inference.org.anchoranalysis.image.voxel.resizer.VoxelsResizergetResizer()How to resize images or voxel-buffers.org.anchoranalysis.spatial.scale.ScaleFactorgetScaleFactor()The inverse of the scaling-factor applied to reduceunscaledDimensionsto the input-matrix used for inference.inthashCode()DualScale<Optional<org.anchoranalysis.spatial.scale.ScaleFactor>>scaleFactorUpscale()The scaling-factors needed to upscale the model output to match the desired scale.StringtoString()
-
Constructor Details
-
ImageInferenceContext
public ImageInferenceContext(DualScale<Dimensions> dimensions, org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor, Optional<List<String>> classLabels, org.anchoranalysis.image.voxel.resizer.VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, Logger logger)
-
-
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
DualScaleby, 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
public org.anchoranalysis.spatial.scale.ScaleFactor getScaleFactor()The inverse of the scaling-factor applied to reduceunscaledDimensionsto the input-matrix used for inference. -
getClassLabels
If available, labels of classes loaded from a text file atclassLabelsPath. -
getResizer
public org.anchoranalysis.image.voxel.resizer.VoxelsResizer 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
-