Class DecodeMaskRCNN

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.image.inference.bean.segment.instance.DecodeInstanceSegmentation<T>>
org.anchoranalysis.image.inference.bean.segment.instance.DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
org.anchoranalysis.plugin.onnx.bean.object.segment.decode.instance.maskrcnn.DecodeMaskRCNN

public class DecodeMaskRCNN
extends org.anchoranalysis.image.inference.bean.segment.instance.DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
Decodes the inference output from a Mask-RCNN implementation.

It is designed to work with accompanying MaskRCNN-10.onnx in resources, which expects an image of size 1088x800 (width x height) and may throw an error if the input-size is different than this.

The ONNX file was obtained from this GitHub source, which also describes its inputs and outputs.

This issue may also be relevant: it mentions an error message that occurs when a different sized input to the above is used.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    DecodeMaskRCNN()  
  • Method Summary

    Modifier and Type Method Description
    List<org.anchoranalysis.image.inference.segment.LabelledWithConfidence<org.anchoranalysis.image.inference.segment.MultiScaleObject>> decode​(List<ai.onnxruntime.OnnxTensor> inferenceOutput, org.anchoranalysis.image.inference.ImageInferenceContext context)  
    List<String> expectedOutputs()  
    org.anchoranalysis.image.bean.interpolator.Interpolator getInterpolator()
    The interpolator to use for scaling images.
    float getMinConfidence()
    Only proposals outputted from the model with a score greater or equal to this threshold are considered.
    float getMinMaskValue()
    Only voxels with a value greater or equal to this threshold are considered as part of the mask.
    void setInterpolator​(org.anchoranalysis.image.bean.interpolator.Interpolator interpolator)
    The interpolator to use for scaling images.
    void setMinConfidence​(float minConfidence)
    Only proposals outputted from the model with a score greater or equal to this threshold are considered.
    void setMinMaskValue​(float minMaskValue)
    Only voxels with a value greater or equal to this threshold are considered as part of the mask.

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • expectedOutputs

      public List<String> expectedOutputs()
      Specified by:
      expectedOutputs in class org.anchoranalysis.image.inference.bean.segment.instance.DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
    • decode

      public List<org.anchoranalysis.image.inference.segment.LabelledWithConfidence<org.anchoranalysis.image.inference.segment.MultiScaleObject>> decode​(List<ai.onnxruntime.OnnxTensor> inferenceOutput, org.anchoranalysis.image.inference.ImageInferenceContext context) throws org.anchoranalysis.core.exception.OperationFailedException
      Specified by:
      decode in class org.anchoranalysis.image.inference.bean.segment.instance.DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException
    • getMinConfidence

      public float getMinConfidence()
      Only proposals outputted from the model with a score greater or equal to this threshold are considered.
    • setMinConfidence

      public void setMinConfidence​(float minConfidence)
      Only proposals outputted from the model with a score greater or equal to this threshold are considered.
    • getMinMaskValue

      public float getMinMaskValue()
      Only voxels with a value greater or equal to this threshold are considered as part of the mask.
    • setMinMaskValue

      public void setMinMaskValue​(float minMaskValue)
      Only voxels with a value greater or equal to this threshold are considered as part of the mask.
    • getInterpolator

      public org.anchoranalysis.image.bean.interpolator.Interpolator getInterpolator()
      The interpolator to use for scaling images.
    • setInterpolator

      public void setInterpolator​(org.anchoranalysis.image.bean.interpolator.Interpolator interpolator)
      The interpolator to use for scaling images.