Class DecodeEAST
Object
AnchorBean<DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>>
DecodeInstanceSegmentation<ai.onnxruntime.OnnxTensor>
DecodeEAST
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode
(List<ai.onnxruntime.OnnxTensor> inferenceOutput, ImageInferenceContext context) Decodes the output tensors from inference intoObjectMask
s with confidence and labels.Ordered names of the tensors we are interested in processing, as outputted from inference.double
Proposed bounding boxes below this confidence interval are removed from consideration.void
setMinConfidence
(double minConfidence) Proposed bounding boxes below this confidence interval are removed from consideration.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
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 intoObjectMask
s with confidence and labels.The created
ObjectMask
s should matchunscaledDimensions
in size.- Specified by:
decode
in classDecodeInstanceSegmentation<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
Description copied from class:DecodeInstanceSegmentation
Ordered names of the tensors we are interested in processing, as outputted from inference.- Specified by:
expectedOutputs
in classDecodeInstanceSegmentation<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.
-