Latin PP OCRv3 Mobile Rec
PaddleOCR團隊開發的超輕量級拉丁語文本行識別模型,支持拉丁語和數字字符識別。
下載量 898
發布時間 : 6/6/2025
模型概述
該模型是PP-OCRv3_rec系列中的文本行識別模型,專門針對拉丁語優化,適用於拉丁語文本的識別任務。
模型特點
超輕量級設計
模型僅7.8MB大小,適合移動端和嵌入式設備部署。
高精度識別
在拉丁語文本識別任務上達到76.93%的平均準確率。
嚴格錯誤判定
一行中任何字符識別錯誤即判定整行錯誤,確保實際應用中的高準確性。
模型能力
拉丁語文本識別
數字字符識別
多行文本處理
使用案例
文檔數字化
拉丁語文檔OCR
將拉丁語印刷文檔轉換為可編輯文本
識別準確率76.93%
移動應用
移動端拉丁語識別
在移動設備上實現拉丁語文本的即時識別
輕量級模型適合移動端部署
🚀 latin_PP-OCRv3_mobile_rec
latin_PP-OCRv3_mobile_rec 是 PaddleOCR 團隊開發的 PP-OCRv3_rec 系列中的文本行識別模型。該模型是基於 PP-OCRv3_mobile_rec 訓練的特定於拉丁語的模型,支持拉丁語識別。主要的準確率指標如下:
屬性 | 詳情 |
---|---|
模型類型 | latin_PP-OCRv3_mobile_rec 是基於 PP-OCRv3 識別模型訓練的超輕量級拉丁語識別模型,支持拉丁語和數字字符識別。 |
識別平均準確率(%) | 76.93 |
模型存儲大小 (M) | 7.8 M |
⚠️ 重要提示
如果一行中的任何字符(包括標點符號)識別錯誤,則整行將被標記為錯誤。這確保了在實際應用中具有更高的準確性。
🚀 快速開始
📦 安裝指南
1. 安裝 PaddlePaddle
請參考以下命令,使用 pip 安裝 PaddlePaddle:
# 適用於 CUDA11.8
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
# 適用於 CUDA12.6
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
# 適用於 CPU
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
有關 PaddlePaddle 安裝的詳細信息,請參考 PaddlePaddle 官方網站。
2. 安裝 PaddleOCR
從 PyPI 安裝最新版本的 PaddleOCR 推理包:
python -m pip install paddleocr
💻 使用示例
基礎用法
你可以通過一條命令快速體驗該功能:
paddleocr text_recognition \
--model_name latin_PP-OCRv3_mobile_rec \
-i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/az8vEPS1Q3718b3D0ehNj.png
你也可以將文本識別模塊的模型推理集成到你的項目中。在運行以下代碼之前,請將示例圖像下載到本地。
from paddleocr import TextRecognition
model = TextRecognition(model_name="latin_PP-OCRv3_mobile_rec")
output = model.predict(input="az8vEPS1Q3718b3D0ehNj.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")
運行後,得到的結果如下:
{'res': {'input_path': '/root/.paddlex/predict_input/az8vEPS1Q3718b3D0ehNj.png', 'page_index': None, 'rec_text': 'Latini multilinearis', 'rec_score': 0.9983808398246765}}
有關使用命令和參數說明的詳細信息,請參考 文檔。
高級用法
單個模型的能力是有限的,但由多個模型組成的管道可以提供更強的能力來解決現實場景中的難題。
PP-OCRv3
通用 OCR 管道用於解決文本識別任務,通過從圖像中提取文本信息並以字符串格式輸出。管道中有 5 個模塊:
- 文檔圖像方向分類模塊(可選)
- 文本圖像去畸變模塊(可選)
- 文本行方向分類模塊(可選)
- 文本檢測模塊
- 文本識別模塊
運行一條命令快速體驗 OCR 管道:
paddleocr ocr -i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/E-CtmA3e9B1yfBqLJOXMj.png \
--text_recognition_model_name latin_PP-OCRv3_mobile_rec \
--use_doc_orientation_classify False \
--use_doc_unwarping False \
--use_textline_orientation True \
--save_path ./output \
--device gpu:0
結果將打印到終端:
{'res': {'input_path': '/root/.paddlex/predict_input/E-CtmA3e9B1yfBqLJOXMj.png', 'page_index': None, 'model_settings': {'use_doc_preprocessor': True, 'use_textline_orientation': True}, 'doc_preprocessor_res': {'input_path': None, 'page_index': None, 'model_settings': {'use_doc_orientation_classify': False, 'use_doc_unwarping': False}, 'angle': -1}, 'dt_polys': array([[[ 11, 5],
...,
[ 11, 33]],
...,
[[ 11, 78],
...,
[ 11, 102]]], dtype=int16), 'text_det_params': {'limit_side_len': 64, 'limit_type': 'min', 'thresh': 0.3, 'max_side_limit': 4000, 'box_thresh': 0.6, 'unclip_ratio': 1.5}, 'text_type': 'general', 'textline_orientation_angles': array([0, ..., 0]), 'text_rec_score_thresh': 0.0, 'rec_texts': ['Exemplum', 'probationis textus', 'Latini multilinearis'], 'rec_scores': array([0.99786115, ..., 0.99657601]), 'rec_polys': array([[[ 11, 5],
...,
[ 11, 33]],
...,
[[ 11, 78],
...,
[ 11, 102]]], dtype=int16), 'rec_boxes': array([[ 11, ..., 33],
...,
[ 11, ..., 102]], dtype=int16)}}
命令行方法適用於快速體驗。對於項目集成,也只需要幾行代碼:
from paddleocr import PaddleOCR
ocr = PaddleOCR(
text_recognition_model_name="latin_PP-OCRv3_mobile_rec",
use_doc_orientation_classify=False, # 使用 use_doc_orientation_classify 啟用/禁用文檔方向分類模型
use_doc_unwarping=False, # 使用 use_doc_unwarping 啟用/禁用文檔去畸變模塊
use_textline_orientation=True, # 使用 use_textline_orientation 啟用/禁用文本行方向分類模型
device="gpu:0", # 使用 device 指定 GPU 進行模型推理
)
result = ocr.predict("https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/E-CtmA3e9B1yfBqLJOXMj.png")
for res in result:
res.print()
res.save_to_img("output")
res.save_to_json("output")
管道中默認使用的模型是 PP-OCRv5_server_rec
,因此需要通過參數 text_recognition_model_name
指定為 latin_PP-OCRv3_mobile_rec
。你也可以通過參數 text_recognition_model_dir
使用本地模型文件。有關使用命令和參數說明的詳細信息,請參考 文檔。
📚 詳細文檔
📄 許可證
本項目採用 Apache-2.0 許可證。
Table Transformer Structure Recognition
MIT
基於PubTables1M數據集訓練的表格變換器模型,用於從非結構化文檔中提取表格結構
文字識別
Transformers

T
microsoft
1.2M
186
Trocr Small Handwritten
TrOCR是一個基於Transformer的光學字符識別模型,專門用於手寫文本圖像的識別。
文字識別
Transformers

T
microsoft
517.96k
45
Table Transformer Structure Recognition V1.1 All
MIT
基於Transformer的表格結構識別模型,用於檢測文檔中的表格結構
文字識別
Transformers

T
microsoft
395.03k
70
Trocr Large Printed
基於Transformer的光學字符識別模型,適用於單行印刷體文本識別
文字識別
Transformers

T
microsoft
295.59k
162
Texify
Texify 是一個 OCR 工具,專門用於將公式圖片和文本轉換為 LaTeX 格式。
文字識別
Transformers

T
vikp
206.53k
15
Trocr Base Printed
TrOCR是基於Transformer的光學字符識別模型,專為單行文本圖像識別設計,採用編碼器-解碼器架構
文字識別
Transformers

T
microsoft
184.84k
169
Manga Ocr Base
Apache-2.0
專為日語文本設計的光學字符識別工具,主要針對日本漫畫場景優化。
文字識別
Transformers 日語

M
kha-white
130.36k
145
Trocr Large Handwritten
TrOCR是基於Transformer的光學字符識別模型,專為手寫文本識別設計,在IAM數據集上進行了微調。
文字識別
Transformers

T
microsoft
59.17k
115
Trocr Small Printed
TrOCR是一個基於Transformer的光學字符識別模型,適用於單行文本圖像的OCR任務。
文字識別
Transformers

T
microsoft
20.88k
40
Lilt Roberta En Base
MIT
語言無關版式變換器(LiLT)通過將預訓練的RoBERTa(英文)與預訓練的語言無關版式變換器(LiLT)拼接,為任何語言提供類似LayoutLM的模型。
文字識別
Transformers

L
SCUT-DLVCLab
12.05k
19
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98