Class OnnxOrientationPredictorProperties
java.lang.Object
com.itextpdf.pdfocr.onnxtr.orientation.OnnxOrientationPredictorProperties
Properties for configuring crop orientation ONNX models.
It contains a path to the model, model input properties and a model output mapper.
-
Constructor Summary
ConstructorsConstructorDescriptionOnnxOrientationPredictorProperties
(String modelPath, OnnxInputProperties inputProperties, IOutputLabelMapper<TextOrientation> outputMapper) Creates new crop orientation predictor properties. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the ONNX model input properties.Returns the path to the ONNX model.Returns the ONNX model output mapper.int
hashCode()
mobileNetV3
(String modelPath) Creates a new crop orientation properties object for existing pre-trained MobileNetV3 models, stored on disk.toString()
-
Constructor Details
-
OnnxOrientationPredictorProperties
public OnnxOrientationPredictorProperties(String modelPath, OnnxInputProperties inputProperties, IOutputLabelMapper<TextOrientation> outputMapper) Creates new crop orientation predictor properties.- Parameters:
-
modelPath
- path to the ONNX model to load -
inputProperties
- ONNX model input properties -
outputMapper
- ONNX model output mapper
-
-
Method Details
-
mobileNetV3
Creates a new crop orientation properties object for existing pre-trained MobileNetV3 models, stored on disk. This is the only crop orientation model architecture available in OnnxTR.This can be used to load the following models from OnnxTR:
- Parameters:
-
modelPath
- path to the pre-trained model - Returns:
- a new crop orientation properties object for a MobileNetV3 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
-
getOutputMapper
Returns the ONNX model output mapper.- Returns:
- the ONNX model output mapper
-
hashCode
public int hashCode() -
equals
-
toString
-