Object
AnchorBean<DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>>
DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
DecodeEAST

public class DecodeEAST extends DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
Extracts text from a RGB image by using the EAST deep neural network model and the ONNX Runtime.

Each object-mask represented rotated-bounding box and is associated with a confidence score.

Particular thanks to Adrian Rosebrock whose tutorial was useful in applying this model

Author:
Owen Feehan
  • Constructor Details

    • DecodeEAST

      public DecodeEAST()
  • Method Details

    • decode

      public List<LabelledWithConfidence<MultiScaleObject>> decode(List<ai.onnxruntime.OnnxTensor> inferenceOutput, ImageInferenceContext context) throws OperationFailedException
      Description copied from class: DecodeInstanceSegmentation
      Decodes the output tensors from inference into ObjectMasks with confidence and labels.

      The created ObjectMasks should match unscaledDimensions in size.

      Specified by:
      decode in class DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
      Parameters:
      inferenceOutput - the tensors that are the result of the inference.
      context - the context in which the inference is occurring.
      Returns:
      a newly created list of objects, with associated confidence, and labels, that matches unscaledDimensions in size.
      Throws:
      OperationFailedException - if it cannot be decoded successfully.
    • expectedOutputs

      public List<String> expectedOutputs()
      Description copied from class: DecodeInstanceSegmentation
      Ordered names of the tensors we are interested in processing, as outputted from inference.
      Specified by:
      expectedOutputs in class DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
      Returns:
      the list of names, as above.
    • getMinConfidence

      public double getMinConfidence()
      Proposed bounding boxes below this confidence interval are removed from consideration.
    • setMinConfidence

      public void setMinConfidence(double minConfidence)
      Proposed bounding boxes below this confidence interval are removed from consideration.