Class OnnxDetectionPredictorProperties
java.lang.Object
com.itextpdf.pdfocr.onnxtr.detection.OnnxDetectionPredictorProperties
Properties for configuring text detection ONNX models.
It contains a path to the model, model input properties and a model output post-processor.
-
Constructor Summary
ConstructorsConstructorDescriptionOnnxDetectionPredictorProperties
(String modelPath, OnnxInputProperties inputProperties, IDetectionPostProcessor postProcessor) Creates new text detection predictor properties. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new text detection properties object for existing pre-trained DBNet models, stored on disk.boolean
Creates a new text detection properties object for existing pre-trained FAST models, stored on disk.Returns the ONNX model input properties.Returns the path to the ONNX model.Returns the ONNX model output post-processor.int
hashCode()
Creates a new text detection properties object for existing pre-trained LinkNet models, stored on disk.toString()
-
Constructor Details
-
OnnxDetectionPredictorProperties
public OnnxDetectionPredictorProperties(String modelPath, OnnxInputProperties inputProperties, IDetectionPostProcessor postProcessor) Creates new text detection predictor properties.- Parameters:
-
modelPath
- path to the ONNX model to load -
inputProperties
- ONNX model input properties -
postProcessor
- ONNX model output post-processor
-
-
Method Details
-
dbNet
Creates a new text detection properties object for existing pre-trained DBNet models, stored on disk.This can be used to load the following models from OnnxTR:
- Parameters:
-
modelPath
- path to the pre-trained model - Returns:
- a new text detection properties object for a DBNet model
-
fast
Creates a new text detection properties object for existing pre-trained FAST models, stored on disk. This is the default text detection model in OnnxTR.This can be used to load the following models from OnnxTR:
- Parameters:
-
modelPath
- path to the pre-trained model - Returns:
- a new text detection properties object for a FAST model
-
linkNet
Creates a new text detection properties object for existing pre-trained LinkNet models, stored on disk.This can be used to load the following models from OnnxTR:
- Parameters:
-
modelPath
- path to the pre-trained model - Returns:
- a new text detection properties object for a LinkNet model
-
getModelPath
Returns the path to the ONNX model.- Returns:
- the path to the ONNX model
-
getInputProperties
Returns the ONNX model input properties.- Returns:
- the ONNX model input properties
-
getPostProcessor
Returns the ONNX model output post-processor.- Returns:
- the ONNX model output post-processor
-
equals
-
hashCode
public int hashCode() -
toString
-