Instructions to use PaddlePaddle/UVDoc_onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/UVDoc_onnx with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import TextImageUnwarping model = TextImageUnwarping(model_name="UVDoc_onnx") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json") - Notebooks
- Google Colab
- Kaggle
UVDoc
Introduction
The main purpose of text image correction is to carry out geometric transformation on the image to correct the document distortion, inclination, perspective deformation and other problems in the image, so that the subsequent text recognition can be more accurate.
| Model | CER |
|---|---|
| UVDoc | 0.179 |
Note: Test data set: docunet benchmark data set.
Model Usage
Install Dependencies
pip install -U paddleocr
pip install -U onnxruntime-gpu
CLI Usage
paddleocr text_image_unwarping -i ./demo.jpg --model_name UVDoc --engine onnxruntime
Python API Usage
from paddleocr import TextImageUnwarping
model = TextImageUnwarping(
model_name="UVDoc",
engine="onnxruntime",
)
output = model.predict("./demo.jpg", batch_size=1)
for res in output:
res.print()
res.save_to_img(save_path="./output/")
- Downloads last month
- -