itext-cyrillic_PP-OCRv3_mobile_rec_infer
These are machine learning models designed to detect and recognize text within images. They analyze visual input, identify regions containing text, and convert that text into a machine-readable format. We integrate these models into our iText PdfOCR ONNX engine to enable efficient and accurate extraction of textual content from scanned documents and image-based PDFs. For seamless integration, they are converted into ONNX format, ensuring compatibility with the iText PdfOCR engine.
Model overview
- Source: https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/cyrillic_PP-OCRv3_mobile_rec_infer.tar
- Conversion: ONNX version generated following the PaddleOCR guide – https://www.paddleocr.ai/main/en/version3.x/deployment/obtaining_onnx_models.html
- What it does: Detects text (handwritten, vertical, rotated, curved) in many languages (Simplified/Traditional Chinese, English, Japanese) with a good speed accuracy trade ‑off for mobile‑class hardware.
- iText support: Available from pdfOCR 5.0.0 onward.
Getting started with iText pdfOCR
Simple OCR engine (detection + recognition)
java (but is also available in .NET)
// detection
IDetectionPredictor detection = OnnxDetectionPredictor.paddleOcr(PATH_TO_DETECTION_MODEL); // e.g. "PP-OCRv5_mobile_det_infer.onnx"
// recognition
IRecognitionPredictor recognition = OnnxRecognitionPredictor.paddleOcr(PATH_TO_RECOGNITION_MODEL); // your recognition ONNX model
// combine into an engine
try(OnnxOcrEngine ocrEngine = new OnnxOcrEngine(detection, recognition);) {
/* Your OCR processing here */
}
OCR engine with orientation handling
java (but is also available in .NET)
IDetectionPredictor detection = OnnxDetectionPredictor.paddleOcr(PATH_TO_DETECTION_MODEL);
IRecognitionPredictor recognition = OnnxRecognitionPredictor.paddleOcr(PATH_TO_RECOGNITION_MODEL);
// orientation predictor (MobileNetV3 variant)
OnnxOrientationPredictor orientation = OnnxOrientationPredictor.mobileNetV3(PATH_TO_ORIENTATION_MODEL);
OnnxOcrEngine ocrEngine = new OnnxOcrEngine(detection, orientation, recognition);
try(OnnxOcrEngine ocrEngine = new OnnxOcrEngine(detection, orientation, recognition)) {
/* Your OCR processing here */
}
The created ocrEngine can be passed to the standard iText pdfOCR API, e.g.:
OcrPdfCreator ocrPdfCreator = new OcrPdfCreator(ocrEngine);
ocrPdfCreator.createPdfFile(Collections.singletonList(new File(imagePath)), new File(outPdfFile))
Sample projects
The following example files illustrate complete usage patterns:
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
