Model reference · open weights
PP-LCNet_x0_25_textline_ori is an open-weight language model from PaddlePaddle. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | Baidu |
|---|---|
| Published under | PaddlePaddle |
| Type | Language models |
| Task | Image→text |
| Runs with | PaddleOCR |
| Released | 2025-06-12 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
The text line orientation classification module primarily distinguishes the orientation of text lines and corrects them using post-processing. In processes such as document scanning and license/certificate photography, to capture clearer images, the capture device may be rotated, resulting in text lines in various orientations. Standard OCR pipelines cannot handle such data well. By utilizing image classification technology, the orientation of text lines can be predetermined and adjusted, thereby enhancing the accuracy of OCR processing. The key accuracy metrics are as follow:
Please refer to the following commands to install PaddlePaddle using pip:
# for CUDA11.8
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
# for CUDA12.6
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
# for CPU
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
For details about PaddlePaddle installation, please refer to the PaddlePaddle official website.
Install the latest version of the PaddleOCR inference package from PyPI:
python -m pip install paddleocr
You can quickly experience the functionality with a single command:
paddleocr text_line_orientation_classification \
--model_name PP-LCNet_x0_25_textline_ori \
-i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/m3ZmUPAnst1f9xXvTVLKS.png
You can also integrate the model inference of the text recognition module into your project. Before running the following code, please download the sample image to your local machine.
from paddleocr import TextLineOrientationClassification
model = TextLineOrientationClassification(model_name="PP-LCNet_x0_25_textline_ori")
output = model.predict(input="m3ZmUPAnst1f9xXvTVLKS.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")
After running, the obtained result is as follows:
{'res': {'input_path': '/root/.paddlex/predict_input/m3ZmUPAnst1f9xXvTVLKS.png', 'page_index': None, 'class_ids': array([1], dtype=int32), 'scores': array([0.99671], dtype=float32), 'label_names': ['180_degree']}}
The visualized image is as follows:
For details about usage command and descriptions of parameters, please refer to the Document.
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Using it via the API
Once AxForge deploys pp-lcnet-x0-25-textline-ori for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (pp-lcnet-x0-25-textline-ori below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"pp-lcnet-x0-25-textline-ori","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.