mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-01 15:32:24 +08:00
rename text rec models (#15085)
Co-authored-by: zhangyubo0722 <zangyubo0722@163.com>
This commit is contained in:
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_repsvtr_ch
|
||||
save_model_dir: ./output/ch_RepSVTR_rec
|
||||
save_epoch_step: 10
|
||||
eval_batch_step: [0, 1000]
|
||||
cal_metric_during_train: False
|
||||
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_repsvtr_gtc
|
||||
save_model_dir: ./output/ch_RepSVTR_rec_gtc
|
||||
save_epoch_step: 10
|
||||
eval_batch_step: [0, 1000]
|
||||
cal_metric_during_train: False
|
||||
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_svtrv2_ch
|
||||
save_model_dir: ./output/ch_SVTRv2_rec
|
||||
save_epoch_step: 10
|
||||
eval_batch_step: [0, 1000]
|
||||
cal_metric_during_train: False
|
||||
+3
-3
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 100
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_svtrv2_ch_distill_lr00002/
|
||||
save_model_dir: ./output/ch_SVTRv2_rec_distill_lr00002/
|
||||
save_epoch_step: 5
|
||||
eval_batch_step:
|
||||
- 0
|
||||
@@ -39,7 +39,7 @@ Architecture:
|
||||
algorithm: Distillation
|
||||
Models:
|
||||
Teacher:
|
||||
pretrained: ./output/rec_svtrv2_ch/best_accuracy
|
||||
pretrained: ./output/ch_SVTRv2_rec/best_accuracy
|
||||
freeze_params: true
|
||||
return_all_feats: true
|
||||
model_type: rec
|
||||
@@ -74,7 +74,7 @@ Architecture:
|
||||
num_decoder_layers: 2
|
||||
max_text_length: *max_text_length
|
||||
Student:
|
||||
pretrained: ./output/rec_repsvtr_ch/best_accuracy
|
||||
pretrained: ./output/ch_RepSVTR_rec/best_accuracy
|
||||
freeze_params: false
|
||||
return_all_feats: true
|
||||
model_type: rec
|
||||
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 200
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_svtrv2_gtc
|
||||
save_model_dir: ./output/ch_SVTRv2_rec_gtc
|
||||
save_epoch_step: 10
|
||||
eval_batch_step: [0, 1000]
|
||||
cal_metric_during_train: False
|
||||
+3
-3
@@ -4,7 +4,7 @@ Global:
|
||||
epoch_num: 100
|
||||
log_smooth_window: 20
|
||||
print_batch_step: 10
|
||||
save_model_dir: ./output/rec_svtrv2_gtc_distill_lr00002/
|
||||
save_model_dir: ./output/ch_SVTRv2_rec_gtc_distill_lr00002/
|
||||
save_epoch_step: 5
|
||||
eval_batch_step:
|
||||
- 0
|
||||
@@ -39,7 +39,7 @@ Architecture:
|
||||
algorithm: Distillation
|
||||
Models:
|
||||
Teacher:
|
||||
pretrained: ./output/rec_svtrv2_gtc/best_accuracy
|
||||
pretrained: ./output/ch_SVTRv2_rec_gtc/best_accuracy
|
||||
freeze_params: true
|
||||
return_all_feats: true
|
||||
model_type: rec
|
||||
@@ -74,7 +74,7 @@ Architecture:
|
||||
num_decoder_layers: 2
|
||||
max_text_length: *max_text_length
|
||||
Student:
|
||||
pretrained: ./output/rec_repsvtr_gtc/best_accuracy
|
||||
pretrained: ./output/ch_RepSVTR_rec_gtc/best_accuracy
|
||||
freeze_params: false
|
||||
return_all_feats: true
|
||||
model_type: rec
|
||||
+1
-1
@@ -658,7 +658,7 @@ C++TensorRT预测需要使用支持TRT的预测库并在编译时打开[-DWITH_T
|
||||
**A**: 推理时识别模型默认的batch_size=6, 如预测图片长度变化大,可能影响预测效果。如果出现上述问题可在推理的时候设置识别bs=1,命令如下:
|
||||
|
||||
```bash linenums="1"
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words/ch/word_4.jpg" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --rec_batch_num=1
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words/ch/word_4.jpg" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --rec_batch_num=1
|
||||
```
|
||||
|
||||
### 2.13 推理部署
|
||||
|
||||
@@ -13,8 +13,8 @@ comments: true
|
||||
|模型|配置文件|端到端|下载链接|
|
||||
| --- | --- | --- | --- |
|
||||
|PP-OCRv4| |A榜 62.77% <br> B榜 62.51%| [Model List](../../ppocr/model_list.md) |
|
||||
|SVTRv2(Rec Sever)|[configs/rec/SVTRv2/rec_svtrv2_ch.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_svtrv2_ch.yml)|A榜 68.81% (使用PP-OCRv4检测模型)| [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_infer.tar) |
|
||||
|RepSVTR(Mobile)|[识别](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_repsvtr_ch.yml) <br> [识别蒸馏](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_svtrv2_ch_distillation.yml) <br> [检测](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/det/det_repsvtr_db.yml)|B榜 65.07%| 识别: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_infer.tar) <br> 识别蒸馏: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_infer.tar) <br> 检测: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_infer.tar) |
|
||||
|SVTRv2(Rec Sever)|[configs/rec/SVTRv2/ch_SVTRv2_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/ch_SVTRv2_rec.yml)|A榜 68.81% (使用PP-OCRv4检测模型)| [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_infer.tar) |
|
||||
|RepSVTR(Mobile)|[识别](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/ch_RepSVTR_rec.yml) <br> [识别蒸馏](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/ch_SVTRv2_rec_distillation.yml) <br> [检测](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/det/det_repsvtr_db.yml)|B榜 65.07%| 识别: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_infer.tar) <br> 识别蒸馏: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_infer.tar) <br> 检测: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_infer.tar) |
|
||||
|
||||
🚀 快速使用:参考PP-OCR推理[说明文档](https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_ch/inference_ppocr.md),将检测和识别模型替换为上表中对应的RepSVTR或SVTRv2推理模型即可使用。
|
||||
|
||||
@@ -30,22 +30,22 @@ comments: true
|
||||
|
||||
```bash linenums="1"
|
||||
#单卡训练(训练周期长,不建议)
|
||||
python3 tools/train.py -c configs/rec/SVTRv2/rec_repsvtr_gtc.yml
|
||||
python3 tools/train.py -c configs/rec/SVTRv2/ch_RepSVTR_rec_gtc.yml
|
||||
|
||||
# 多卡训练,通过--gpus参数指定卡号
|
||||
# Rec 学生模型
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/rec_repsvtr_gtc.yml
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/ch_RepSVTR_rec_gtc.yml
|
||||
# Rec 教师模型
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/rec_svtrv2_gtc.yml
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/ch_SVTRv2_rec_gtc.yml
|
||||
# Rec 蒸馏训练
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/rec_svtrv2_gtc_distill.yml
|
||||
python -m paddle.distributed.launch --gpus '0,1,2,3,4,5,6,7' tools/train.py -c configs/rec/SVTRv2/ch_SVTRv2_rec_gtc_distill.yml
|
||||
```
|
||||
|
||||
### 3.2 评估
|
||||
|
||||
```bash linenums="1"
|
||||
# 注意将pretrained_model的路径设置为本地路径。
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/SVTRv2/rec_repsvtr_gtc.yml -o Global.pretrained_model=output/rec_repsvtr_gtc/best_accuracy
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/SVTRv2/ch_RepSVTR_rec_gtc.yml -o Global.pretrained_model=output/ch_RepSVTR_rec_gtc/best_accuracy
|
||||
```
|
||||
|
||||
### 3.3 预测
|
||||
@@ -54,7 +54,7 @@ python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/SVT
|
||||
|
||||
```bash linenums="1"
|
||||
# 注意将pretrained_model的路径设置为本地路径。
|
||||
python3 tools/infer_rec.py -c tools/eval.py -c configs/rec/SVTRv2/rec_repsvtr_gtc.yml -o Global.pretrained_model=output/rec_repsvtr_gtc/best_accuracy Global.infer_img='./doc/imgs_words_en/word_10.png'
|
||||
python3 tools/infer_rec.py -c tools/eval.py -c configs/rec/SVTRv2/ch_RepSVTR_rec_gtc.yml -o Global.pretrained_model=output/ch_RepSVTR_rec_gtc/best_accuracy Global.infer_img='./doc/imgs_words_en/word_10.png'
|
||||
# 预测文件夹下所有图像时,可修改infer_img为文件夹,如 Global.infer_img='./doc/imgs_words_en/'。
|
||||
```
|
||||
|
||||
@@ -66,7 +66,7 @@ python3 tools/infer_rec.py -c tools/eval.py -c configs/rec/SVTRv2/rec_repsvtr_gt
|
||||
|
||||
```bash linenums="1"
|
||||
# 注意将pretrained_model的路径设置为本地路径。
|
||||
python3 tools/export_model.py -c configs/rec/SVTRv2/rec_repsvtr_gtc.yml -o Global.pretrained_model=output/rec_repsvtr_gtc/best_accuracy Global.save_inference_dir=./inference/rec_repsvtr_infer
|
||||
python3 tools/export_model.py -c configs/rec/SVTRv2/ch_RepSVTR_rec_gtc.yml -o Global.pretrained_model=output/ch_RepSVTR_rec_gtc/best_accuracy Global.save_inference_dir=./inference/rec_repsvtr_infer
|
||||
```
|
||||
|
||||
**注意:** 如果您是在自己的数据集上训练的模型,并且调整了字典文件,请注意修改配置文件中的`character_dict_path`是否为所正确的字典文件。
|
||||
|
||||
+3
-3
@@ -75,9 +75,9 @@ paddleocr --image_dir /your/test/image.jpg --lang=hi
|
||||
|
||||
| मॉडल प्रस्तावना | मॉडल नाम | रिकमेंडिड सीन | डिटेक्शन मॉडल | रिकोगनाइजेशन मॉडल |
|
||||
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| हिन्दी:हिन्दी अल्ट्रा-लाइटवेट PP-ओसीआरv3 सिस्टम (9.9M) | devanagari_PP-ओसीआरv3_xx | मोबाइल और सर्वर |[इन्फरन्स मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar) / [प्रशिक्षितमॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) | [इन्फरन्समॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
| इंग्लिश अल्ट्रा- लाइट वेट PP-ओसीआरv3 मॉडल (13.4M) | en_PP-ओसीआरv3_xx | मोबाइल और सर्वर | [इन्फरन्स मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [प्रशिक्षितमॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar)| [इन्फरन्समॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| चाइनीस और इंग्लिश अल्ट्रा- लाइट वेट PP-ओसीआरv3 मॉडल(16.2M) | ch_PP-ओसीआरv3_xx | मोबाइल और सर्वर | [इन्फरन्स मॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [प्रशिक्षित मॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| हिन्दी:हिन्दी अल्ट्रा-लाइटवेट PP-OCRv3 सिस्टम (9.9M) | devanagari_PP-OCRv3_xx | मोबाइल और सर्वर |[इन्फरन्स मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar) / [प्रशिक्षितमॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) | [इन्फरन्समॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
| इंग्लिश अल्ट्रा- लाइट वेट PP-OCRv3 मॉडल (13.4M) | en_PP-OCRv3_xx | मोबाइल और सर्वर | [इन्फरन्स मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [प्रशिक्षितमॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar)| [इन्फरन्समॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| चाइनीस और इंग्लिश अल्ट्रा- लाइट वेट PP-OCRv3 मॉडल(16.2M) | ch_PP-OCRv3_xx | मोबाइल और सर्वर | [इन्फरन्स मॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [प्रशिक्षित मॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [प्रशिक्षित मॉडल](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [प्रशिक्षित मॉडल](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
- अधिक मॉडल डाउनलोड (एकाधिक भाषाओं सहित) के लिए, कृपया [PP-ओसीआर सीरीज मॉडल डाउनलोड](../doc_en/models_list_en.md) देखें।
|
||||
- एक नए भाषा अनुरोध के लिए, कृपया [नई भाषा अनुरोधों के लिए दिशानिर्देश](#language_requests).
|
||||
|
||||
+2
-2
@@ -81,8 +81,8 @@ paddleocr --image_dir /your/test/image.jpg --lang=japan # change for i18n abbr
|
||||
| モデル紹介 | モデル名 | 推奨のシーン | 検出モデル | 認識モデル |
|
||||
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| 日本語超軽量 PP-OCRv3 モデル(14.8M) | japan_PP-OCRv3_xx | モバイル & サーバー |[推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar)/[トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) |[推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_infer.tar)/[トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar) |
|
||||
| 英語超軽量PP-OCRv3モデル(13.4M) | en_PP-OCRv3_xx | モバイル & サーバー | [推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 中国語と英語の超軽量 PP-OCRv3 モデル(16.2M) | ch_PP-OCRv3_xx | モバイル & サーバー | [推論モデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [トレーニングモデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 英語超軽量PP-OCRv3モデル(13.4M) | en_PP-OCRv3_xx | モバイル & サーバー | [推論モデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推論モデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 中国語と英語の超軽量 PP-OCRv3 モデル(16.2M) | ch_PP-OCRv3_xx | モバイル & サーバー | [推論モデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [トレーニングモデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [推論モデル](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [トレーニングモデル](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
- その他のモデルのダウンロード (多言語を含む) については、[PP-OCR シリーズ モデルのダウンロード] (../doc_en/models_list_en.md)をご参照ください。
|
||||
- 新しい言語のリクエストについては、 [新しい言語_リクエストのガイドライン](#language_requests)を参照してください。
|
||||
|
||||
+2
-2
@@ -81,8 +81,8 @@ paddleocr --image_dir /your/test/image.jpg --lang=korean
|
||||
| 모델 소개 |모델 명 | 권장 씬| 감지 모델 |인식 모델 |
|
||||
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| 한국어 초경량 PP-OCRv3 모델(14.8M) | korean_PP-OCRv3_xx | 모바일 & 서버 | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar) |
|
||||
| 영어 초경량 PP-OCRv3 모델(13.4M) | en_PP-OCRv3_xx | 모바일 & 서버 | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 중국어 및 영어 초경량 PP-OCRv3 model(16.2M) | ch_PP-OCRv3_xx | 모바일 & 서버 | [추론 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [훈련 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 영어 초경량 PP-OCRv3 모델(13.4M) | en_PP-OCRv3_xx | 모바일 & 서버 | [추론 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [추론 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 중국어 및 영어 초경량 PP-OCRv3 model(16.2M) | ch_PP-OCRv3_xx | 모바일 & 서버 | [추론 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [훈련 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [추론 모델](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [훈련 모델](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
- (다중 언어를 포함하여)더 많은 모델을 다운로드 하려면, [PP-OCR 시리즈 모델 다운로드](../doc_en/models_list_en.md)를 참조할 것.
|
||||
- 신규 언어 요청에 대해서는, [신규 언어 요청 지침](#language_requests)을 참조할 것.
|
||||
|
||||
+3
-3
@@ -78,9 +78,9 @@ paddleocr --image_dir /your/test/image.jpg --lang=ru
|
||||
|
||||
| Введение модели | Название модели | Рекомендуемая сцена | Модель обнаружения | Модель распознавания |
|
||||
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| Ру́сский язы́к:Ру́сский язы́к Сверхлегкая модель ПП-OCRv3 (13.4M) | cyrillic_PP-OCRv3_xx | Мобильный и сервер |[модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar)/[обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) | [модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar)/[обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| Английский сверхлегкая модель ПП-OCRv3 (13,4 Мб) | en\_ПП-OCRv3_xx |Мобильный и сервер | [модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [вывод модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| Сверхлегкая китайская и английская модель ПП-OCRv3 (16,2M) | ch\_ПП-OCRv3_xx | Мобильный и сервер | [вывод модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [обученный модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [вывод модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| Ру́сский язы́к:Ру́сский язы́к Сверхлегкая модель PP-OCRv3 (13.4M) | cyrillic_PP-OCRv3_xx | Мобильный и сервер |[модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_infer.tar)/[обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/Multilingual_PP-OCRv3_det_distill_train.tar) | [модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar)/[обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| Английский сверхлегкая модель PP-OCRv3 (13,4 Мб) | en_PP-OCRv3_xx |Мобильный и сервер | [модель вывода](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [вывод модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| Сверхлегкая китайская и английская модель PP-OCRv3 (16,2M) | ch_PP-OCRv3_xx | Мобильный и сервер | [вывод модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [обученный модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [вывод модель](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [обученный модель](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
- Для получения дополнительных загрузок моделей (включая несколько языков) см. [Загрузки моделей серии ПП-OCR](../doc_en/models_list_en.md).
|
||||
- Для запроса нового языка см [Руководство для новых языковых_запросов](#language_requests).
|
||||
|
||||
@@ -99,7 +99,7 @@ The following table also provides a series of models that can be deployed on mob
|
||||
|
||||
|Version|Introduction|Model size|Detection model|Text Direction model|Recognition model|Paddle-Lite branch|
|
||||
|---|---|---|---|---|---|---|
|
||||
|PP-OCRv3|extra-lightweight chinese OCR optimized model|16.2M|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/PP-OCRv3_mobile_det_infer.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv2/lite/ch_ppocr_mobile_v2.0_cls_infer_opt.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.nb)|v2.10|
|
||||
|PP-OCRv3|extra-lightweight chinese OCR optimized model|16.2M|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/PP-OCRv3_mobile_det_infer.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv2/lite/ch_ppocr_mobile_v2.0_cls_infer_opt.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/PP-OCRv3_mobile_rec_infer.nb)|v2.10|
|
||||
|PP-OCRv3(slim)|extra-lightweight chinese OCR optimized model|5.9M|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_slim_infer.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv2/lite/ch_ppocr_mobile_v2.0_cls_slim_opt.nb)|[download link](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.nb)|v2.10|
|
||||
|
||||
If you directly use the model in the above table for deployment, you can skip the following steps and directly read [Section 2.2](#2.2-Run-optimized-model-on-Phone).
|
||||
|
||||
@@ -54,8 +54,8 @@ Using the PP-OCR series English detection, recognition, and classification model
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv3_det_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv3_rec_infer.tar && cd ..
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv3_mobile_rec_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar
|
||||
cd ./inference && tar xf ch_ppocr_mobile_v2.0_cls_infer.tar && cd ..
|
||||
@@ -67,8 +67,8 @@ Using the PP-OCR series English detection, recognition, and classification model
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv3_det_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv4_rec_infer.tar && cd ..
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv4_mobile_rec_infer.tar
|
||||
cd ./inference && tar xf en_PP-OCRv4_mobile_rec_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar
|
||||
cd ./inference && tar xf ch_ppocr_mobile_v2.0_cls_infer.tar && cd ..
|
||||
@@ -95,9 +95,9 @@ python3 tools/export_model.py -c configs/det/PP-OCRv4/PP-OCRv4_mobile_det.yml \
|
||||
-o Global.pretrained_model=./pretrained/PP-OCRv4_mobile_det_pretrained \
|
||||
Global.save_inference_dir=./inference/PP-OCRv4_mobile_det_infer/
|
||||
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml \
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml \
|
||||
-o Global.pretrained_model=./pretrained/ch_PP-OCRv4_rec_train/student \
|
||||
Global.save_inference_dir=./inference/ch_PP-OCRv4_rec_infer/
|
||||
Global.save_inference_dir=./inference/PP-OCRv4_mobile_rec_infer/
|
||||
|
||||
python3 tools/export_model.py -c configs/cls/cls_mv3.yml \
|
||||
-o Global.pretrained_model=./pretrained/ch_ppocr_mobile_v2.0_cls_train/best_accuracy \
|
||||
@@ -118,7 +118,7 @@ Use Paddle2ONNX to convert Paddle static graph models to the ONNX model format:
|
||||
--opset_version 11 \
|
||||
--enable_onnx_checker True
|
||||
|
||||
paddle2onnx --model_dir ./inference/en_PP-OCRv3_rec_infer \
|
||||
paddle2onnx --model_dir ./inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--save_file ./inference/rec_onnx/model.onnx \
|
||||
@@ -143,7 +143,7 @@ Use Paddle2ONNX to convert Paddle static graph models to the ONNX model format:
|
||||
--opset_version 11 \
|
||||
--enable_onnx_checker True
|
||||
|
||||
paddle2onnx --model_dir ./inference/en_PP-OCRv4_rec_infer \
|
||||
paddle2onnx --model_dir ./inference/en_PP-OCRv4_mobile_rec_infer \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--save_file ./inference/rec_onnx/model.onnx \
|
||||
@@ -197,7 +197,7 @@ Taking the English OCR model as an example, you can perform prediction using Pad
|
||||
```bash linenums="1"
|
||||
python3 tools/infer/predict_system.py --use_gpu=False \
|
||||
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
|
||||
--rec_model_dir=./inference/en_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=./inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--det_model_dir=./inference/en_PP-OCRv3_det_infer \
|
||||
--image_dir=./docs/infer_deploy/images/img_12.jpg\
|
||||
--rec_char_dict_path=ppocr/utils/en_dict.txt
|
||||
@@ -208,7 +208,7 @@ Taking the English OCR model as an example, you can perform prediction using Pad
|
||||
```bash linenums="1"
|
||||
python3 tools/infer/predict_system.py --use_gpu=False \
|
||||
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
|
||||
--rec_model_dir=./inference/en_PP-OCRv4_rec_infer \
|
||||
--rec_model_dir=./inference/en_PP-OCRv4_mobile_rec_infer \
|
||||
--det_model_dir=./inference/en_PP-OCRv3_det_infer \
|
||||
--image_dir=./docs/infer_deploy/images/img_12.jpg \
|
||||
--rec_char_dict_path=ppocr/utils/en_dict.txt
|
||||
|
||||
@@ -55,8 +55,8 @@ Paddle2ONNX 支持将 PaddlePaddle 模型格式转化到 ONNX 模型格式,算
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar
|
||||
cd ./inference && tar xf ch_PP-OCRv3_rec_infer.tar && cd ..
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar
|
||||
cd ./inference && tar xf ch_ppocr_mobile_v2.0_cls_infer.tar && cd ..
|
||||
@@ -68,8 +68,8 @@ Paddle2ONNX 支持将 PaddlePaddle 模型格式转化到 ONNX 模型格式,算
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_det_infer.tar
|
||||
cd ./inference && tar xf PP-OCRv4_mobile_det_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar
|
||||
cd ./inference && tar xf ch_PP-OCRv4_rec_infer.tar && cd ..
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_rec_infer.tar
|
||||
cd ./inference && tar xf PP-OCRv4_mobile_rec_infer.tar && cd ..
|
||||
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar
|
||||
cd ./inference && tar xf ch_ppocr_mobile_v2.0_cls_infer.tar && cd ..
|
||||
@@ -96,9 +96,9 @@ python3 tools/export_model.py -c configs/det/PP-OCRv4/PP-OCRv4_mobile_det.yml \
|
||||
-o Global.pretrained_model=./pretrained/PP-OCRv4_mobile_det_pretrained \
|
||||
Global.save_inference_dir=./inference/PP-OCRv4_mobile_det_infer/
|
||||
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml \
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml \
|
||||
-o Global.pretrained_model=./pretrained/ch_PP-OCRv4_rec_train/student \
|
||||
Global.save_inference_dir=./inference/ch_PP-OCRv4_rec_infer/
|
||||
Global.save_inference_dir=./inference/PP-OCRv4_mobile_rec_infer/
|
||||
|
||||
python3 tools/export_model.py -c configs/cls/cls_mv3.yml \
|
||||
-o Global.pretrained_model=./pretrained/ch_ppocr_mobile_v2.0_cls_train/best_accuracy \
|
||||
@@ -119,7 +119,7 @@ Global.save_inference_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer/
|
||||
--opset_version 11 \
|
||||
--enable_onnx_checker True
|
||||
|
||||
paddle2onnx --model_dir ./inference/ch_PP-OCRv3_rec_infer \
|
||||
paddle2onnx --model_dir ./inference/PP-OCRv3_mobile_rec_infer \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--save_file ./inference/rec_onnx/model.onnx \
|
||||
@@ -144,7 +144,7 @@ Global.save_inference_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer/
|
||||
--opset_version 11 \
|
||||
--enable_onnx_checker True
|
||||
|
||||
paddle2onnx --model_dir ./inference/ch_PP-OCRv4_rec_infer \
|
||||
paddle2onnx --model_dir ./inference/PP-OCRv4_mobile_rec_infer \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--save_file ./inference/rec_onnx/model.onnx \
|
||||
@@ -199,7 +199,7 @@ python3 tools/infer/predict_system.py --use_gpu=False --use_onnx=True \
|
||||
```bash linenums="1"
|
||||
python3 tools/infer/predict_system.py --use_gpu=False \
|
||||
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
|
||||
--rec_model_dir=./inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=./inference/PP-OCRv3_mobile_rec_infer \
|
||||
--det_model_dir=./inference/PP-OCRv3_mobile_det_infer \
|
||||
--image_dir=./docs/infer_deploy/images/lite_demo.png
|
||||
```
|
||||
@@ -209,7 +209,7 @@ python3 tools/infer/predict_system.py --use_gpu=False --use_onnx=True \
|
||||
```bash linenums="1"
|
||||
python3 tools/infer/predict_system.py --use_gpu=False \
|
||||
--cls_model_dir=./inference/ch_ppocr_mobile_v2.0_cls_infer \
|
||||
--rec_model_dir=./inference/ch_PP-OCRv4_rec_infer \
|
||||
--rec_model_dir=./inference/PP-OCRv4_mobile_rec_infer \
|
||||
--det_model_dir=./inference/PP-OCRv4_mobile_det_infer \
|
||||
--image_dir=./docs/infer_deploy/images/lite_demo.png
|
||||
```
|
||||
|
||||
@@ -69,7 +69,7 @@ Firstly, download the [inference model](../model_list.en.md) of PPOCR
|
||||
# Download and unzip the OCR text detection model
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar -O PP-OCRv3_mobile_det_infer.tar && tar -xf PP-OCRv3_mobile_det_infer.tar
|
||||
# Download and unzip the OCR text recognition model
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar -O ch_PP-OCRv3_rec_infer.tar && tar -xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar -O PP-OCRv3_mobile_rec_infer.tar && tar -xf PP-OCRv3_mobile_rec_infer.tar
|
||||
```
|
||||
|
||||
Then, you can use installed paddle_serving_client tool to convert inference model to mobile model.
|
||||
@@ -83,7 +83,7 @@ python3 -m paddle_serving_client.convert --dirname ./PP-OCRv3_mobile_det_infer/
|
||||
--serving_client ./ppocr_det_v3_client/
|
||||
|
||||
# Recognition model conversion
|
||||
python3 -m paddle_serving_client.convert --dirname ./ch_PP-OCRv3_rec_infer/ \
|
||||
python3 -m paddle_serving_client.convert --dirname ./PP-OCRv3_mobile_rec_infer/ \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--serving_server ./ppocr_rec_v3_serving/ \
|
||||
|
||||
@@ -77,7 +77,7 @@ pip3 install paddle_serving_app-0.8.3-py3-none-any.whl
|
||||
# 下载并解压 OCR 文本检测模型
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar -O PP-OCRv3_mobile_det_infer.tar && tar -xf PP-OCRv3_mobile_det_infer.tar
|
||||
# 下载并解压 OCR 文本识别模型
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar -O ch_PP-OCRv3_rec_infer.tar && tar -xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_rec_infer.tar -O PP-OCRv3_mobile_rec_infer.tar && tar -xf PP-OCRv3_mobile_rec_infer.tar
|
||||
```
|
||||
|
||||
接下来,用安装的paddle_serving_client把下载的inference模型转换成易于server部署的模型格式。
|
||||
@@ -91,7 +91,7 @@ python3 -m paddle_serving_client.convert --dirname ./PP-OCRv3_mobile_det_infer/
|
||||
--serving_client ./ppocr_det_v3_client/
|
||||
|
||||
# 转换识别模型
|
||||
python3 -m paddle_serving_client.convert --dirname ./ch_PP-OCRv3_rec_infer/ \
|
||||
python3 -m paddle_serving_client.convert --dirname ./PP-OCRv3_mobile_rec_infer/ \
|
||||
--model_filename inference.pdmodel \
|
||||
--params_filename inference.pdiparams \
|
||||
--serving_server ./ppocr_rec_v3_serving/ \
|
||||
|
||||
@@ -55,10 +55,10 @@ For lightweight Chinese recognition model inference, you can execute the followi
|
||||
|
||||
```bash linenums="1"
|
||||
# download CRNN text recognition inference model
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar
|
||||
tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_rec_infer.tar
|
||||
tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
# run inference
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_10.png" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --rec_image_shape=3,48,320
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_10.png" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --rec_image_shape=3,48,320
|
||||
```
|
||||
|
||||

|
||||
@@ -75,9 +75,9 @@ For English recognition model inference, you can execute the following commands,
|
||||
|
||||
```bash linenums="1"
|
||||
# download en model:
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar
|
||||
tar xf en_PP-OCRv3_rec_infer.tar
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words/en/word_1.png" --rec_model_dir="./en_PP-OCRv3_rec_infer/" --rec_char_dict_path="ppocr/utils/en_dict.txt"
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar
|
||||
tar xf en_PP-OCRv3_mobile_rec_infer.tar
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words/en/word_1.png" --rec_model_dir="./en_PP-OCRv3_mobile_rec_infer/" --rec_char_dict_path="ppocr/utils/en_dict.txt"
|
||||
```
|
||||
|
||||

|
||||
@@ -134,13 +134,13 @@ When performing prediction, you need to specify the path of a single image or a
|
||||
|
||||
```bash linenums="1"
|
||||
# use direction classifier
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --cls_model_dir="./cls/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=true
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --cls_model_dir="./cls/" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --use_angle_cls=true
|
||||
# not use use direction classifier
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=false
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --use_angle_cls=false
|
||||
# use multi-process
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=false --use_mp=True --total_process_num=6
|
||||
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/00018069.jpg" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --use_angle_cls=false --use_mp=True --total_process_num=6
|
||||
# use PDF files, you can infer the first few pages by using the `page_num` parameter, the default is 0, which means infer all pages
|
||||
python3 tools/infer/predict_system.py --image_dir="./xxx.pdf" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --cls_model_dir="./cls/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=true --page_num=2
|
||||
python3 tools/infer/predict_system.py --image_dir="./xxx.pdf" --det_model_dir="./PP-OCRv3_mobile_det_infer/" --cls_model_dir="./cls/" --rec_model_dir="./PP-OCRv3_mobile_rec_infer/" --use_angle_cls=true --page_num=2
|
||||
```
|
||||
|
||||
After executing the command, the recognition result image is as follows:
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ hide:
|
||||
|
||||
| 模型简介 | 模型名称 | 推荐场景 | 检测模型| 方向分类器 | 识别模型|
|
||||
| ----- | -------------- | --------------- | ------- | ------- | ---------- |
|
||||
| 中英文超轻量 PP-OCRv4 模型(15.8M) | PP-OCRv4_mobile_det | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv4_mobile_det_pretrained.pdparams) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_train.tar) |
|
||||
| 中英文超轻量 PP-OCRv3 模型(16.2M) | PP-OCRv3_mobile_det | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams ) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 英文超轻量 PP-OCRv3 模型(13.4M) | en_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 中英文超轻量 PP-OCRv4 模型(15.8M) | PP-OCRv4_mobile_det | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv4_mobile_det_pretrained.pdparams) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_train.tar) |
|
||||
| 中英文超轻量 PP-OCRv3 模型(16.2M) | PP-OCRv3_mobile_det | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams ) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 英文超轻量 PP-OCRv3 模型(13.4M) | en_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
- 超轻量 OCR 系列更多模型下载(包括多语言),可以参考[PP-OCR 系列模型下载](../ppocr/model_list.md),文档分析相关模型参考[PP-Structure 系列模型下载](../ppstructure/models_list.md)
|
||||
|
||||
|
||||
@@ -62,4 +62,4 @@ We conducted model training on 4x8 V100 GPUs. Accuracy, training time, and multi
|
||||
|
||||
| Model | Configuration | Configuration | 8 GPU training time / Accuracy | 4x8 GPU training time / Accuracy | Acceleration ratio |
|
||||
|:------:|:-----:|:--------:|:--------:|:--------:|:-----:|
|
||||
| SVTR | [ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml) | PP-OCRv3_rec data | 10d/- | 2.84d/74.00% | **3.5** |
|
||||
| SVTR | [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml) | PP-OCRv3_rec data | 10d/- | 2.84d/74.00% | **3.5** |
|
||||
|
||||
@@ -62,6 +62,6 @@ python3 -m paddle.distributed.launch \
|
||||
|
||||
| 模型 | 配置 | 数据集 | 单机8卡耗时/精度 | 4机8卡耗时/精度 | 加速比 |
|
||||
|:------:|:-----:|:--------:|:--------:|:--------:|:-----:|
|
||||
| SVTR | [ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml) | PP-OCRv3_rec data | 10d/- | 2.84d/74.0% | **3.5** |
|
||||
| SVTR | [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml) | PP-OCRv3_rec data | 10d/- | 2.84d/74.0% | **3.5** |
|
||||
|
||||
**注意**: 在训练的GPU卡数过多时,精度会稍微有所损失(1%左右),此时可以尝试通过添加warmup或者适当增加迭代轮数来弥补精度损失。
|
||||
|
||||
@@ -328,7 +328,7 @@ For more specific implementation of `DistillationMetric`, please refer to: [dist
|
||||
|
||||
There are two ways to fine-tune the recognition distillation task.
|
||||
|
||||
1. Fine-tuning based on knowledge distillation: this situation is relatively simple, download the pre-trained model. Then configure the pre-training model path and your own data path in [ch_PP-OCRv2_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml) to perform fine-tuning training of the model.
|
||||
1. Fine-tuning based on knowledge distillation: this situation is relatively simple, download the pre-trained model. Then configure the pre-training model path and your own data path in [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml) to perform fine-tuning training of the model.
|
||||
2. Do not use knowledge distillation in fine-tuning: In this case, you need to first extract the student model parameters from the pre-training model. The specific steps are as follows.
|
||||
|
||||
- First download the pre-trained model and unzip it.
|
||||
@@ -354,7 +354,7 @@ print(s_params.keys())
|
||||
paddle.save(s_params, "ch_PP-OCRv3_rec_train/student.pdparams")
|
||||
```
|
||||
|
||||
After the extraction is complete, use [ch_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml) to modify the path of the pre-trained model (the path of the exported `student.pdparams` model) and your own data path to fine-tune the model.
|
||||
After the extraction is complete, use [PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec.yml) to modify the path of the pre-trained model (the path of the exported `student.pdparams` model) and your own data path to fine-tune the model.
|
||||
|
||||
### 2.2 Detection Model Configuration File Analysis
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ PaddleOCR中集成了知识蒸馏的算法,具体地,有以下几个主要
|
||||
|
||||
### 2.1 识别配置文件解析
|
||||
|
||||
配置文件在[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml)。
|
||||
配置文件在[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml)。
|
||||
|
||||
#### 2.1.1 模型结构
|
||||
|
||||
@@ -316,7 +316,7 @@ Metric:
|
||||
|
||||
对蒸馏得到的识别蒸馏进行微调有2种方式。
|
||||
|
||||
(1)基于知识蒸馏的微调:这种情况比较简单,下载预训练模型,在[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml)中配置好预训练模型路径以及自己的数据路径,即可进行模型微调训练。
|
||||
(1)基于知识蒸馏的微调:这种情况比较简单,下载预训练模型,在[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml)中配置好预训练模型路径以及自己的数据路径,即可进行模型微调训练。
|
||||
|
||||
(2)微调时不使用知识蒸馏:这种情况,需要首先将预训练模型中的学生模型参数提取出来,具体步骤如下:
|
||||
|
||||
@@ -344,7 +344,7 @@ print(s_params.keys())
|
||||
paddle.save(s_params, "ch_PP-OCRv3_rec_train/student.pdparams")
|
||||
```
|
||||
|
||||
转化完成之后,使用[ch_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec.yml),修改预训练模型的路径(为导出的`student.pdparams`模型路径)以及自己的数据路径,即可进行模型微调。
|
||||
转化完成之后,使用[PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec.yml),修改预训练模型的路径(为导出的`student.pdparams`模型路径)以及自己的数据路径,即可进行模型微调。
|
||||
|
||||
### 2.2 检测配置文件解析
|
||||
|
||||
|
||||
+14
-14
@@ -57,8 +57,8 @@ The relationship of the above models is as follows.
|
||||
|
||||
|model name|description|config|model size|download|
|
||||
| --- | --- | --- | --- | --- |
|
||||
|ch_PP-OCRv3_rec_slim | [New] Slim quantization with distillation lightweight model, supporting Chinese, English text recognition |[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml)| 4.9M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_train.tar) / [nb model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.nb) |
|
||||
|ch_PP-OCRv3_rec| [New] Original lightweight model, supporting Chinese, English, multilingual text recognition |[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml)| 12.4M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|PP-OCRv3_mobile_rec_slim | [New] Slim quantization with distillation lightweight model, supporting Chinese, English text recognition |[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml)| 4.9M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_train.tar) / [nb model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.nb) |
|
||||
|PP-OCRv3_mobile_rec| [New] Original lightweight model, supporting Chinese, English, multilingual text recognition |[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml)| 12.4M |[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
|ch_PP-OCRv2_rec_slim| Slim quantization with distillation lightweight model, supporting Chinese, English text recognition|[ch_PP-OCRv2_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml)| 9.0M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_train.tar) |
|
||||
|ch_PP-OCRv2_rec| Original lightweight model, supporting Chinese, English, and multilingual text recognition |[ch_PP-OCRv2_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml)|8.5M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar) |
|
||||
|ch_ppocr_mobile_slim_v2.0_rec|Slim pruned and quantized lightweight model, supporting Chinese, English and number recognition|[rec_chinese_lite_train_v2.0.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml)| 6.0M | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_slim_train.tar) |
|
||||
@@ -71,8 +71,8 @@ The relationship of the above models is as follows.
|
||||
|
||||
|model name|description|config|model size|download|
|
||||
| --- | --- | --- | --- | --- |
|
||||
|en_PP-OCRv3_rec_slim | [New] Slim quantization with distillation lightweight model, supporting English, English text recognition |[en_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml)| 3.2M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_train.tar) / [nb model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.nb) |
|
||||
|en_PP-OCRv3_rec| [New] Original lightweight model, supporting English, English, multilingual text recognition |[en_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml)| 9.6M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
|en_PP-OCRv3_mobile_rec_slim | [New] Slim quantization with distillation lightweight model, supporting English, English text recognition |[en_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml)| 3.2M |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_train.tar) / [nb model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.nb) |
|
||||
|en_PP-OCRv3_mobile_rec| [New] Original lightweight model, supporting English, English, multilingual text recognition |[en_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml)| 9.6M |[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
|en_number_mobile_slim_v2.0_rec|Slim pruned and quantized lightweight model, supporting English and number recognition|[rec_en_number_lite_train.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/multi_language/rec_en_number_lite_train.yml)| 2.7M | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/en_number_mobile_v2.0_rec_slim_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/en_number_mobile_v2.0_rec_slim_train.tar) |
|
||||
|en_number_mobile_v2.0_rec|Original lightweight model, supporting English and number recognition|[rec_en_number_lite_train.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/multi_language/rec_en_number_lite_train.yml)|2.6M|[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/en_number_mobile_v2.0_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/en_number_mobile_v2.0_rec_train.tar) |
|
||||
|
||||
@@ -82,16 +82,16 @@ The relationship of the above models is as follows.
|
||||
|
||||
|model name| dict file | description|config|model size|download|
|
||||
| --- | --- | --- |--- | --- | --- |
|
||||
| korean_PP-OCRv3_rec | ppocr/utils/dict/korean_dict.txt |Lightweight model for Korean recognition|[korean_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_rec.yml)|11.0M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar) |
|
||||
| japan_PP-OCRv3_rec | ppocr/utils/dict/japan_dict.txt |Lightweight model for Japanese recognition|[japan_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_rec.yml)|11.0M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar) |
|
||||
| chinese_cht_PP-OCRv3_rec | ppocr/utils/dict/chinese_cht_dict.txt | Lightweight model for chinese cht|[chinese_cht_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_rec.yml)|12.0M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_train.tar) |
|
||||
| te_PP-OCRv3_rec | ppocr/utils/dict/te_dict.txt | Lightweight model for Telugu recognition |[te_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_rec.yml)|9.6M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_train.tar) |
|
||||
| ka_PP-OCRv3_rec | ppocr/utils/dict/ka_dict.txt | Lightweight model for Kannada recognition |[ka_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_rec.yml)|9.9M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_train.tar) |
|
||||
| ta_PP-OCRv3_rec | ppocr/utils/dict/ta_dict.txt |Lightweight model for Tamil recognition|[ta_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_rec.yml)|9.6M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_train.tar) |
|
||||
| latin_PP-OCRv3_rec | ppocr/utils/dict/latin_dict.txt | Lightweight model for latin recognition | [latin_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_rec.yml) |9.7M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_train.tar) |
|
||||
| arabic_PP-OCRv3_rec | ppocr/utils/dict/arabic_dict.txt | Lightweight model for arabic recognition | [arabic_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/arabic_PP-OCRv3_rec.yml) |9.6M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_train.tar) |
|
||||
| cyrillic_PP-OCRv3_rec | ppocr/utils/dict/cyrillic_dict.txt | Lightweight model for cyrillic recognition | [cyrillic_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_rec.yml) |9.6M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| devanagari_PP-OCRv3_rec | ppocr/utils/dict/devanagari_dict.txt | Lightweight model for devanagari recognition | [devanagari_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_rec.yml) |9.9M|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
| korean_PP-OCRv3_mobile_rec | ppocr/utils/dict/korean_dict.txt |Lightweight model for Korean recognition|[korean_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_mobile_rec.yml)|11.0M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/japan_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar) |
|
||||
| japan_PP-OCRv3_mobile_rec | ppocr/utils/dict/japan_dict.txt |Lightweight model for Japanese recognition|[japan_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_mobile_rec.yml)|11.0M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/japan_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar) |
|
||||
| chinese_cht_PP-OCRv3_mobile_rec | ppocr/utils/dict/chinese_cht_dict.txt | Lightweight model for chinese cht|[chinese_cht_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_mobile_rec.yml)|12.0M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/chinese_cht_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_train.tar) |
|
||||
| te_PP-OCRv3_mobile_rec | ppocr/utils/dict/te_dict.txt | Lightweight model for Telugu recognition |[te_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_mobile_rec.yml)|9.6M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/te_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_train.tar) |
|
||||
| ka_PP-OCRv3_mobile_rec | ppocr/utils/dict/ka_dict.txt | Lightweight model for Kannada recognition |[ka_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_mobile_rec.yml)|9.9M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/ka_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_train.tar) |
|
||||
| ta_PP-OCRv3_mobile_rec | ppocr/utils/dict/ta_dict.txt |Lightweight model for Tamil recognition|[ta_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_mobile_rec.yml)|9.6M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/ta_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_train.tar) |
|
||||
| latin_PP-OCRv3_mobile_rec | ppocr/utils/dict/latin_dict.txt | Lightweight model for latin recognition | [latin_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_mobile_rec.yml) |9.7M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_train.tar) |
|
||||
| arabic_PP-OCRv3_mobile_rec | ppocr/utils/dict/arabic_dict.txt | Lightweight model for arabic recognition | [arabic_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/arabic_PP-OCRv3_mobile_rec.yml) |9.6M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/arabic_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_train.tar) |
|
||||
| cyrillic_PP-OCRv3_mobile_rec | ppocr/utils/dict/cyrillic_dict.txt | Lightweight model for cyrillic recognition | [cyrillic_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_rec.yml) |9.6M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/cyrillic_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| devanagari_PP-OCRv3_mobile_rec | ppocr/utils/dict/devanagari_dict.txt | Lightweight model for devanagari recognition | [devanagari_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_mobile_rec.yml) |9.9M|[inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/devanagari_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
For a complete list of languages and tutorials, please refer to [Multi-language model](./blog/multi_languages.en.md)
|
||||
|
||||
|
||||
+18
-18
@@ -62,11 +62,11 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训
|
||||
|
||||
| 模型名称 | 模型简介 | 配置文件 | 推理模型大小 | 下载地址 |
|
||||
| ----- | --------- | ------ | ------------ | ------- |
|
||||
| ch_PP-OCRv4_rec | 【最新】超轻量模型,支持中英文、数字识别 | [ch_PP-OCRv4_rec_distill.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_distill.yml) | 10M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_train.tar) |
|
||||
| ch_PP-OCRv4_server_rec | 【最新】高精度模型,支持中英文、数字识别 | [ch_PP-OCRv4_rec_hgnet.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet.yml) | 88M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_server_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_server_train.tar) |
|
||||
| ch_PP-OCRv4_server_rec_doc | 【最新】高精度模型,支持中英文、数字识别,支持1.5万+字符和部分生僻字识别 | [ch_PP-OCRv4_rec_hgnet_doc.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet_doc.yml) | 75M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0//PP-OCRv4_server_rec_doc_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv4_server_rec_doc_pretrained.pdparams) |
|
||||
| ch_PP-OCRv3_rec_slim | slim量化版超轻量模型,支持中英文、数字识别 | [ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml) | 4.9M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_train.tar) / [nb模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.nb) |
|
||||
| ch_PP-OCRv3_rec | 原始超轻量模型,支持中英文、数字识别 | [ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml) | 12.4M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| PP-OCRv4_mobile_rec | 【最新】超轻量模型,支持中英文、数字识别 | [PP-OCRv4_mobile_rec_distill.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec_distill.yml) | 10M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_train.tar) |
|
||||
| PP-OCRv4_server_rec | 【最新】高精度模型,支持中英文、数字识别 | [PP-OCRv4_server_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/PP-OCRv4_server_rec.yml) | 88M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_server_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_server_train.tar) |
|
||||
| PP-OCRv4_server_rec_doc | 【最新】高精度模型,支持中英文、数字识别,支持1.5万+字符和部分生僻字识别 | [PP-OCRv4_server_rec_doc.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/PP-OCRv4_server_rec_doc.yml) | 75M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv4_server_rec_doc_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv4_server_rec_doc_pretrained.pdparams) |
|
||||
| PP-OCRv3_mobile_rec_slim | slim量化版超轻量模型,支持中英文、数字识别 | [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml) | 4.9M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_train.tar) / [nb模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.nb) |
|
||||
| PP-OCRv3_mobile_rec | 原始超轻量模型,支持中英文、数字识别 | [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml) | 12.4M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| ch_PP-OCRv2_rec_slim | slim量化版超轻量模型,支持中英文、数字识别 | [ch_PP-OCRv2_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml) | 9.0M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_train.tar) |
|
||||
| ch_PP-OCRv2_rec | 原始超轻量模型,支持中英文、数字识别 | [ch_PP-OCRv2_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml) | 8.50M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar) |
|
||||
| ch_ppocr_mobile_slim_v2.0_rec | slim裁剪量化版超轻量模型,支持中英文、数字识别 | [rec_chinese_lite_train_v2.0.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml) | 6.0M | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_slim_train.tar) |
|
||||
@@ -79,9 +79,9 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训
|
||||
|
||||
| 模型名称 | 模型简介 | 配置文件| 推理模型大小 | 下载地址|
|
||||
| ------- | -------- | ------ | ------------ | ----- |
|
||||
| en_PP-OCRv4_rec | 【最新】原始超轻量模型,支持英文、数字识别 | [en_PP-OCRv4_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/en_PP-OCRv4_rec.yml) | 9.7M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_train.tar) |
|
||||
| en_PP-OCRv3_rec_slim | slim量化版超轻量模型,支持英文、数字识别 | [en_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml) | 3.2M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_train.tar) / [nb模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.nb) |
|
||||
| en_PP-OCRv3_rec | 原始超轻量模型,支持英文、数字识别 | [en_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml) | 9.6M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| en_PP-OCRv4_mobile_rec | 【最新】原始超轻量模型,支持英文、数字识别 | [en_PP-OCRv4_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv4/en_PP-OCRv4_mobile_rec.yml) | 9.7M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv4_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_train.tar) |
|
||||
| en_PP-OCRv3_mobile_rec_slim | slim量化版超轻量模型,支持英文、数字识别 | [en_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml) | 3.2M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_train.tar) / [nb模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_slim_infer.nb) |
|
||||
| en_PP-OCRv3_mobile_rec | 原始超轻量模型,支持英文、数字识别 | [en_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml) | 9.6M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| en_number_mobile_slim_v2.0_rec | slim裁剪量化版超轻量模型,支持英文、数字识别 | [rec_en_number_lite_train.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/multi_language/rec_en_number_lite_train.yml) | 2.7M | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/en_number_mobile_v2.0_rec_slim_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/en/en_number_mobile_v2.0_rec_slim_train.tar) |
|
||||
| en_number_mobile_v2.0_rec | 原始超轻量模型,支持英文、数字识别 | [rec_en_number_lite_train.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/multi_language/rec_en_number_lite_train.yml) | 2.6M | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/en_number_mobile_v2.0_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/en_number_mobile_v2.0_rec_train.tar) |
|
||||
|
||||
@@ -91,16 +91,16 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训
|
||||
|
||||
| 模型名称 | 字典文件 | 模型简介 | 配置文件 | 推理模型大小 | 下载地址 |
|
||||
| ----- | ------ | ------------ | ------ | ------------ | ---- |
|
||||
| korean_PP-OCRv3_rec | ppocr/utils/dict/korean_dict.txt | 韩文识别 | [korean_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_rec.yml) | 11.0M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar) |
|
||||
| japan_PP-OCRv3_rec | ppocr/utils/dict/japan_dict.txt | 日文识别 | [japan_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_rec.yml) | 11.0M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar) |
|
||||
| chinese_cht_PP-OCRv3_rec | ppocr/utils/dict/chinese_cht_dict.txt | 中文繁体识别 | [chinese_cht_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_rec.yml) | 12.0M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_train.tar) |
|
||||
| te_PP-OCRv3_rec | ppocr/utils/dict/te_dict.txt | 泰卢固文识别 | [te_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_rec.yml) | 9.6M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_train.tar) |
|
||||
| ka_PP-OCRv3_rec | ppocr/utils/dict/ka_dict.txt | 卡纳达文识别 | [ka_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_rec.yml) | 9.9M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_train.tar) |
|
||||
| ta_PP-OCRv3_rec | ppocr/utils/dict/ta_dict.txt | 泰米尔文识别 | [ta_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_rec.yml) | 9.6M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_train.tar) |
|
||||
| latin_PP-OCRv3_rec | ppocr/utils/dict/latin_dict.txt | 拉丁文识别 | [latin_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_rec.yml) | 9.7M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_train.tar) |
|
||||
| arabic_PP-OCRv3_rec | ppocr/utils/dict/arabic_dict.txt | 阿拉伯字母 | [arabic_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/arabic_PP-OCRv3_rec.yml) | 9.6M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_train.tar) |
|
||||
| cyrillic_PP-OCRv3_rec | ppocr/utils/dict/cyrillic_dict.txt | 斯拉夫字母 | [cyrillic_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_rec.yml) | 9.6M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| devanagari_PP-OCRv3_rec | ppocr/utils/dict/devanagari_dict.txt | 梵文字母 | [devanagari_PP-OCRv3_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_rec.yml) | 9.9M | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
| korean_PP-OCRv3_mobile_rec | ppocr/utils/dict/korean_dict.txt | 韩文识别 | [korean_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_mobile_rec.yml) | 11.0M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/korean_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar) |
|
||||
| japan_PP-OCRv3_mobile_rec | ppocr/utils/dict/japan_dict.txt | 日文识别 | [japan_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_mobile_rec.yml) | 11.0M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/japan_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar) |
|
||||
| chinese_cht_PP-OCRv3_mobile_rec | ppocr/utils/dict/chinese_cht_dict.txt | 中文繁体识别 | [chinese_cht_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_mobile_rec.yml) | 12.0M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/chinese_cht_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_train.tar) |
|
||||
| te_PP-OCRv3_mobile_rec | ppocr/utils/dict/te_dict.txt | 泰卢固文识别 | [te_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_mobile_rec.yml) | 9.6M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/te_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_train.tar) |
|
||||
| ka_PP-OCRv3_mobile_rec | ppocr/utils/dict/ka_dict.txt | 卡纳达文识别 | [ka_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_mobile_rec.yml) | 9.9M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/ka_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_train.tar) |
|
||||
| ta_PP-OCRv3_mobile_rec | ppocr/utils/dict/ta_dict.txt | 泰米尔文识别 | [ta_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_mobile_rec.yml) | 9.6M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/ta_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_train.tar) |
|
||||
| latin_PP-OCRv3_mobile_rec | ppocr/utils/dict/latin_dict.txt | 拉丁文识别 | [latin_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_mobile_rec.yml) | 9.7M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/latin_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_train.tar) |
|
||||
| arabic_PP-OCRv3_mobile_rec | ppocr/utils/dict/arabic_dict.txt | 阿拉伯字母 | [arabic_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/arabic_PP-OCRv3_mobile_rec.yml) | 9.6M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/arabic_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_train.tar) |
|
||||
| cyrillic_PP-OCRv3_mobile_rec | ppocr/utils/dict/cyrillic_dict.txt | 斯拉夫字母 | [cyrillic_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_mobile_rec.yml) | 9.6M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/cyrillic_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar) |
|
||||
| devanagari_PP-OCRv3_mobile_rec | ppocr/utils/dict/devanagari_dict.txt | 梵文字母 | [devanagari_PP-OCRv3_mobile_rec.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_mobile_rec.yml) | 9.9M | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/devanagari_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar) |
|
||||
|
||||
查看完整语种列表与使用教程请参考: [多语言模型](./blog/multi_languages.md)
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ For more information on inference methods, please refer to[Paddle Inference doc]
|
||||
|
||||
### 3.2 Model
|
||||
|
||||
It is recommended to choose the PP-OCRv3 model (configuration file: [ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml),pre-trained model: [ch_PP-OCRv3_rec_train.tar](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar),its accuracy and generalization performance is the best pre-training model currently available.
|
||||
It is recommended to choose the PP-OCRv3 model (configuration file: [PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml),pre-trained model: [PP-OCRv3_mobile_rec_train.tar](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar),its accuracy and generalization performance is the best pre-training model currently available.
|
||||
|
||||
For more PP-OCR series models, please refer to [PP-OCR Series Model Library](../model_list.en.md).
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ PaddleOCR提供的配置文件是在8卡训练(相当于总的batch size是`8*
|
||||
|
||||
### 3.2 模型选择
|
||||
|
||||
建议选择PP-OCRv3模型(配置文件:[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml),预训练模型:[ch_PP-OCRv3_rec_train.tar](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar))进行微调,其精度与泛化性能是目前提供的最优预训练模型。
|
||||
建议选择PP-OCRv3模型(配置文件:[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml),预训练模型:[ch_PP-OCRv3_rec_train.tar](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar))进行微调,其精度与泛化性能是目前提供的最优预训练模型。
|
||||
|
||||
更多PP-OCR系列模型,请参考[PP-OCR 系列模型库](../model_list.md)。
|
||||
|
||||
|
||||
@@ -185,10 +185,10 @@ Start training:
|
||||
# Training icdar15 English data and The training log will be automatically saved as train.log under "{save_model_dir}"
|
||||
|
||||
#specify the single card training(Long training time, not recommended)
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy
|
||||
|
||||
#specify the card number through --gpus
|
||||
python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy
|
||||
python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy
|
||||
```
|
||||
|
||||
PaddleOCR supports alternating training and evaluation. You can modify `eval_batch_step` in `configs/rec/rec_icdar15_train.yml` to set the evaluation frequency. By default, it is evaluated every 500 iter and the best acc model is saved under `output/rec_CRNN/best_accuracy` during the evaluation process.
|
||||
@@ -198,9 +198,9 @@ If the evaluation set is large, the test will be time-consuming. It is recommend
|
||||
- Tip: You can use the `-c` parameter to select multiple model configurations under the `configs/rec/` path for training. The recognition algorithms supported at [rec_algorithm](../../algorithm/overview.en.md):
|
||||
|
||||
For training Chinese data, it is recommended to use
|
||||
[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml). If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file:
|
||||
[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml). If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file:
|
||||
|
||||
Take `ch_PP-OCRv3_rec_distillation.yml` as an example:
|
||||
Take `PP-OCRv3_mobile_rec_distillation.yml` as an example:
|
||||
|
||||
```yaml linenums="1"
|
||||
Global:
|
||||
@@ -431,11 +431,11 @@ In actual use, it is recommended to load the official pre-trained model and fine
|
||||
|
||||
### 3.1. Evaluation
|
||||
|
||||
The model parameters during training are saved in the `Global.save_model_dir` directory by default. When evaluating indicators, you need to set `Global.checkpoints` to point to the saved parameter file. The evaluation dataset can be set by modifying the `Eval.dataset.label_file_list` field in the `configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml` file.
|
||||
The model parameters during training are saved in the `Global.save_model_dir` directory by default. When evaluating indicators, you need to set `Global.checkpoints` to point to the saved parameter file. The evaluation dataset can be set by modifying the `Eval.dataset.label_file_list` field in the `configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml` file.
|
||||
|
||||
```bash linenums="1"
|
||||
# GPU evaluation, Global.checkpoints is the weight to be tested
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.checkpoints={path/to/weights}/best_accuracy
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.checkpoints={path/to/weights}/best_accuracy
|
||||
```
|
||||
|
||||
### 3.2 Test
|
||||
@@ -465,7 +465,7 @@ Among them, best_accuracy._is the best model on the evaluation set; iter_epoch_x
|
||||
|
||||
```bash linenums="1"
|
||||
# Predict English results
|
||||
python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
|
||||
python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
|
||||
```
|
||||
|
||||
Input image:
|
||||
@@ -515,7 +515,7 @@ export FLAGS_enable_pir_api=0
|
||||
# Global.pretrained_model parameter Set the training model address to be converted without adding the file suffix .pdmodel, .pdopt or .pdparams.
|
||||
# Global.save_inference_dir Set the address where the converted model will be saved.
|
||||
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_rec/
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_mobile_rec/
|
||||
```
|
||||
|
||||
If you have a model trained on your own dataset with a different dictionary file, please make sure that you modify the `character_dict_path` in the configuration file to your dictionary file path.
|
||||
@@ -523,7 +523,7 @@ If you have a model trained on your own dataset with a different dictionary file
|
||||
After the conversion is successful, there are three files in the model save directory:
|
||||
|
||||
```text linenums="1"
|
||||
inference/en_PP-OCRv3_rec/
|
||||
inference/en_PP-OCRv3_mobile_rec/
|
||||
├── inference.pdiparams # The parameter file of recognition inference model
|
||||
├── inference.pdiparams.info # The parameter information of recognition inference model, which can be ignored
|
||||
└── inference.pdmodel # The program file of recognition model
|
||||
@@ -533,13 +533,13 @@ inference/en_PP-OCRv3_rec/
|
||||
|
||||
```bash
|
||||
export FLAGS_enable_pir_api=1
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_rec/
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_mobile_rec/
|
||||
```
|
||||
|
||||
Once successful, you will have two files in the directory:
|
||||
|
||||
```text
|
||||
inference/en_PP-OCRv3_rec/
|
||||
inference/en_PP-OCRv3_mobile_rec/
|
||||
├── inference.pdiparams # Model parameter file for the inference model
|
||||
└── inference.json # Program file for the inference model
|
||||
```
|
||||
|
||||
@@ -153,7 +153,7 @@ PaddleOCR内置了一部分字典,可以按需使用。
|
||||
|
||||
- 自定义字典
|
||||
|
||||
如需自定义dic文件,请在 `configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml` 中添加 `character_dict_path` 字段, 指向您的字典路径。
|
||||
如需自定义dic文件,请在 `configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml` 中添加 `character_dict_path` 字段, 指向您的字典路径。
|
||||
|
||||
### 1.5. 添加空格类别
|
||||
|
||||
@@ -195,10 +195,10 @@ tar -xf en_PP-OCRv3_rec_train.tar && rm -rf en_PP-OCRv3_rec_train.tar
|
||||
# 训练icdar15英文数据 训练日志会自动保存为 "{save_model_dir}" 下的train.log
|
||||
|
||||
#单卡训练(训练周期长,不建议)
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
|
||||
|
||||
# 多卡训练,通过--gpus参数指定卡号
|
||||
python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
|
||||
python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
|
||||
```
|
||||
|
||||
正常启动训练后,会看到以下log输出:
|
||||
@@ -225,15 +225,15 @@ log 中自动打印如下信息:
|
||||
| samples | 当前 batch 内的样本数 |
|
||||
| ips | 每秒处理图片的数量 |
|
||||
|
||||
PaddleOCR支持训练和评估交替进行, 可以在 `configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml` 中修改 `eval_batch_step` 设置评估频率,默认每500个iter评估一次。评估过程中默认将最佳acc模型,保存为 `output/en_PP-OCRv3_rec/best_accuracy` 。
|
||||
PaddleOCR支持训练和评估交替进行, 可以在 `configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml` 中修改 `eval_batch_step` 设置评估频率,默认每500个iter评估一次。评估过程中默认将最佳acc模型,保存为 `output/en_PP-OCRv3_mobile_rec/best_accuracy` 。
|
||||
|
||||
如果验证集很大,测试将会比较耗时,建议减少评估次数,或训练完再进行评估。
|
||||
|
||||
**提示:** 可通过 -c 参数选择 `configs/rec/` 路径下的多种模型配置进行训练,PaddleOCR支持的识别算法可以参考[前沿算法列表](../../algorithm/overview.md):
|
||||
|
||||
训练中文数据,推荐使用[ch_PP-OCRv3_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml),如您希望尝试其他算法在中文数据集上的效果,请参考下列说明修改配置文件:
|
||||
训练中文数据,推荐使用[PP-OCRv3_mobile_rec_distillation.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/PP-OCRv3/PP-OCRv3_mobile_rec_distillation.yml),如您希望尝试其他算法在中文数据集上的效果,请参考下列说明修改配置文件:
|
||||
|
||||
以 `ch_PP-OCRv3_rec_distillation.yml` 为例:
|
||||
以 `PP-OCRv3_mobile_rec_distillation.yml` 为例:
|
||||
|
||||
```yaml linenums="1"
|
||||
Global:
|
||||
@@ -302,7 +302,7 @@ Eval:
|
||||
如果训练程序中断,如果希望加载训练中断的模型从而恢复训练,可以通过指定Global.checkpoints指定要加载的模型路径:
|
||||
|
||||
```bash linenums="1"
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.checkpoints=./your/trained/model
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.checkpoints=./your/trained/model
|
||||
```
|
||||
|
||||
**注意**:`Global.checkpoints`的优先级高于`Global.pretrained_model`的优先级,即同时指定两个参数时,优先加载`Global.checkpoints`指定的模型,如果`Global.checkpoints`指定的模型路径有误,会加载`Global.pretrained_model`指定的模型。
|
||||
@@ -359,7 +359,7 @@ args1: args1
|
||||
如果您想进一步加快训练速度,可以使用[自动混合精度训练](https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/performance_improving/amp_cn.html), 以单机单卡为例,命令如下:
|
||||
|
||||
```bash linenums="1"
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml \
|
||||
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml \
|
||||
-o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy \
|
||||
Global.use_amp=True Global.scale_loss=1024.0 Global.use_dynamic_loss_scaling=True
|
||||
```
|
||||
@@ -369,7 +369,7 @@ python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml \
|
||||
多机多卡训练时,通过 `--ips` 参数设置使用的机器IP地址,通过 `--gpus` 参数设置使用的GPU ID:
|
||||
|
||||
```bash linenums="1"
|
||||
python3 -m paddle.distributed.launch --ips="xx.xx.xx.xx,xx.xx.xx.xx" --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml \
|
||||
python3 -m paddle.distributed.launch --ips="xx.xx.xx.xx,xx.xx.xx.xx" --gpus '0,1,2,3' tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml \
|
||||
-o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
|
||||
```
|
||||
|
||||
@@ -457,11 +457,11 @@ DCU设备上运行需要设置环境变量 `export HIP_VISIBLE_DEVICES=0,1,2,3`
|
||||
|
||||
### 3.1. 指标评估
|
||||
|
||||
训练中模型参数默认保存在`Global.save_model_dir`目录下。在评估指标时,需要设置`Global.checkpoints`指向保存的参数文件。评估数据集可以通过 `configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml` 修改Eval中的 `label_file_path` 设置。
|
||||
训练中模型参数默认保存在`Global.save_model_dir`目录下。在评估指标时,需要设置`Global.checkpoints`指向保存的参数文件。评估数据集可以通过 `configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml` 修改Eval中的 `label_file_path` 设置。
|
||||
|
||||
```bash linenums="1"
|
||||
# GPU 评估, Global.checkpoints 为待测权重
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.checkpoints={path/to/weights}/best_accuracy
|
||||
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.checkpoints={path/to/weights}/best_accuracy
|
||||
```
|
||||
|
||||
### 3.2. 测试识别效果
|
||||
@@ -491,7 +491,7 @@ output/rec/
|
||||
|
||||
```bash linenums="1"
|
||||
# 预测英文结果
|
||||
python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
|
||||
python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
|
||||
```
|
||||
|
||||
预测图片:
|
||||
@@ -542,7 +542,7 @@ export FLAGS_enable_pir_api=0
|
||||
# Global.pretrained_model 参数设置待转换的训练模型地址,不用添加文件后缀 .pdmodel,.pdopt或.pdparams。
|
||||
# Global.save_inference_dir参数设置转换的模型将保存的地址。
|
||||
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_rec/
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_mobile_rec/
|
||||
```
|
||||
|
||||
**注意:**如果您是在自己的数据集上训练的模型,并且调整了中文字符的字典文件,请注意修改配置文件中的`character_dict_path`为自定义字典文件。
|
||||
@@ -550,7 +550,7 @@ python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Glo
|
||||
转换成功后,在目录下有三个文件:
|
||||
|
||||
```text linenums="1"
|
||||
inference/en_PP-OCRv3_rec/
|
||||
inference/en_PP-OCRv3_mobile_rec/
|
||||
├── inference.pdiparams # 识别inference模型的参数文件
|
||||
├── inference.pdiparams.info # 识别inference模型的参数信息,可忽略
|
||||
└── inference.pdmodel # 识别inference模型的program文件
|
||||
@@ -560,13 +560,13 @@ inference/en_PP-OCRv3_rec/
|
||||
|
||||
```bash linenums="1"
|
||||
export FLAGS_enable_pir_api=1
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_rec/
|
||||
python3 tools/export_model.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy Global.save_inference_dir=./inference/en_PP-OCRv3_mobile_rec/
|
||||
```
|
||||
|
||||
转换成功后,在目录下有三个文件:
|
||||
|
||||
```text linenums="1"
|
||||
inference/en_PP-OCRv3_rec/
|
||||
inference/en_PP-OCRv3_mobile_rec/
|
||||
├── inference.pdiparams # 识别inference模型的参数文件
|
||||
└── inference.json # 识别inference模型的program文件
|
||||
```
|
||||
|
||||
@@ -86,8 +86,8 @@ For more tutorials, including model training, model compression, deployment, etc
|
||||
|
||||
| Model introduction | Model name | Recommended scene | Detection model | Direction classifier | Recognition model |
|
||||
| ----- | --- | --- | ------ | ---- | ------ |
|
||||
| Chinese and English ultra-lightweight PP-OCRv3 model(16.2M) | ch_PP-OCRv3_xx | Mobile & Server | [inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [trained model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| English ultra-lightweight PP-OCRv3 model(13.4M) | en_PP-OCRv3_xx | Mobile & Server | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| Chinese and English ultra-lightweight PP-OCRv3 model(16.2M) | ch_PP-OCRv3_xx | Mobile & Server | [inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [trained model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| English ultra-lightweight PP-OCRv3 model(13.4M) | en_PP-OCRv3_xx | Mobile & Server | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| Chinese and English ultra-lightweight PP-OCRv2 model(11.6M) | ch_PP-OCRv2_xx | Mobile & Server | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar) |
|
||||
| Chinese and English ultra-lightweight PP-OCR model (9.4M) | ch_ppocr_mobile_v2.0_xx | Mobile & server | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar) |
|
||||
| Chinese and English general PP-OCR model (143.4M) | ch_ppocr_server_v2.0_xx | Server | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_train.tar) |
|
||||
|
||||
@@ -95,8 +95,8 @@ PP-OCR中英文模型列表如下:
|
||||
|
||||
| 模型简介 | 模型名称 | 推荐场景 | 检测模型 | 方向分类器 | 识别模型 |
|
||||
| ----- | ----- | --------------- | ---- | -------------- | --- |
|
||||
| 中英文超轻量PP-OCRv3模型(16.2M) | ch_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 英文超轻量PP-OCRv3模型(13.4M) | en_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 中英文超轻量PP-OCRv3模型(16.2M) | ch_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar) / [训练模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_pretrained_model/PP-OCRv3_mobile_det_pretrained.pdparams) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
|
||||
| 英文超轻量PP-OCRv3模型(13.4M) | en_PP-OCRv3_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
|
||||
| 中英文超轻量PP-OCRv2模型(13.0M) | ch_PP-OCRv2_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar) / [训练模型](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar) |
|
||||
| 中英文超轻量PP-OCR mobile模型(9.4M) | ch_ppocr_mobile_v2.0_xx | 移动端&服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_pre.tar) |
|
||||
| 中英文通用PP-OCR server模型(143.4M) | ch_ppocr_server_v2.0_xx | 服务器端 | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [推理模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar) / [预训练模型](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_pre.tar) |
|
||||
|
||||
@@ -19,7 +19,7 @@ mkdir inference && cd inference
|
||||
## Download the detection model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar && tar xf en_PP-OCRv3_det_infer.tar
|
||||
## Download the recognition model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar && tar xf en_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar && tar xf en_PP-OCRv3_mobile_rec_infer.tar
|
||||
## Download the ultra-lightweight English table inch model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -35,7 +35,7 @@ cd ..
|
||||
python predict_system.py \
|
||||
--image_dir=../docs/ppstructure/images/table_1.png \
|
||||
--det_model_dir=inference/en_PP-OCRv3_det_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/en_dict.txt \
|
||||
--table_model_dir=inference/en_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt \
|
||||
@@ -63,7 +63,7 @@ cd inference
|
||||
## Download the detection model of the ultra-lightweight Chinese PP-OCRv3 model and unzip it
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
## Download the recognition model of the ultra-lightweight Chinese PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
## Download the ultra-lightweight Chinese table inch model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -83,7 +83,7 @@ cd ..
|
||||
python predict_system.py \
|
||||
--image_dir=./docs/table/2.png \
|
||||
--det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict_ch.txt \
|
||||
|
||||
@@ -19,7 +19,7 @@ mkdir inference && cd inference
|
||||
## Download the detection model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar && tar xf en_PP-OCRv3_det_infer.tar
|
||||
## Download the recognition model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar && tar xf en_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar && tar xf en_PP-OCRv3_mobile_rec_infer.tar
|
||||
## Download the ultra-lightweight English table inch model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -35,7 +35,7 @@ cd ..
|
||||
python predict_system.py \
|
||||
--image_dir=./docs/ppstructure/images/table_1.png \
|
||||
--det_model_dir=inference/en_PP-OCRv3_det_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/en_dict.txt \
|
||||
--table_model_dir=inference/en_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt \
|
||||
@@ -63,7 +63,7 @@ cd inference
|
||||
## Download the detection model of the ultra-lightweight Chinese PP-OCRv3 model and unzip it
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
## Download the recognition model of the ultra-lightweight Chinese PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
## Download the ultra-lightweight Chinese table inch model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -83,7 +83,7 @@ cd ..
|
||||
python predict_system.py \
|
||||
--image_dir=./docs/table/2.png \
|
||||
--det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict_ch.txt \
|
||||
|
||||
@@ -58,7 +58,7 @@ Before installing the service module, you need to prepare the inference model an
|
||||
| Model | Path |
|
||||
| ------- | - |
|
||||
| text detection model | ./inference/PP-OCRv3_mobile_det_infer/ |
|
||||
| text recognition model | ./inference/ch_PP-OCRv3_rec_infer/ |
|
||||
| text recognition model | ./inference/PP-OCRv3_mobile_rec_infer/ |
|
||||
| text angle classifier | ./inference/ch_ppocr_mobile_v2.0_cls_infer/ |
|
||||
| layout parse model | ./inference/picodet_lcnet_x1_0_fgd_layout_infer/ |
|
||||
| tanle recognition | ./inference/ch_ppstructure_mobile_v2.0_SLANet_infer/ |
|
||||
|
||||
@@ -60,7 +60,7 @@ pip3 install paddlehub==2.1.0 --upgrade -i https://mirror.baidu.com/pypi/simple
|
||||
| 模型 | 路径 |
|
||||
| ------------------- | ------------------------------------------------------ |
|
||||
| 检测模型 | `./inference/PP-OCRv3_mobile_det_infer/` |
|
||||
| 识别模型 | `./inference/ch_PP-OCRv3_rec_infer/` |
|
||||
| 识别模型 | `./inference/PP-OCRv3_mobile_rec_infer/` |
|
||||
| 方向分类器 | `./inference/ch_ppocr_mobile_v2.0_cls_infer/` |
|
||||
| 版面分析模型 | `./inference/picodet_lcnet_x1_0_fgd_layout_infer/` |
|
||||
| 表格结构识别模型 | `./inference/ch_ppstructure_mobile_v2.0_SLANet_infer/` |
|
||||
|
||||
@@ -18,7 +18,7 @@ wget https://paddleocr.bj.bcebos.com/ppstructure/models/layout/picodet_lcnet_x1_
|
||||
# Download the PP-OCRv3 text detection model and unzip it
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
# Download the PP-OCRv3 text recognition model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
# Download the PP-StructureV2 form recognition model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
cd ..
|
||||
@@ -28,7 +28,7 @@ cd ..
|
||||
|
||||
```bash linenums="1"
|
||||
python3 predict_system.py --det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--layout_model_dir=inference/picodet_lcnet_x1_0_layout_infer \
|
||||
--image_dir=./docs/table/1.png \
|
||||
@@ -56,7 +56,7 @@ After the operation is completed, each image will have a directory with the same
|
||||
|
||||
```bash linenums="1"
|
||||
python3 predict_system.py --det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--image_dir=./docs/table/table.jpg \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
|
||||
@@ -21,7 +21,7 @@ wget https://paddleocr.bj.bcebos.com/ppstructure/models/layout/picodet_lcnet_x1_
|
||||
# 下载PP-OCRv3文本检测模型并解压
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
# 下载PP-OCRv3文本识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
# 下载PP-StructureV2表格识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
cd ..
|
||||
@@ -31,7 +31,7 @@ cd ..
|
||||
|
||||
```bash linenums="1"
|
||||
python3 predict_system.py --det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--layout_model_dir=inference/picodet_lcnet_x1_0_layout_infer \
|
||||
--image_dir=./docs/table/1.png \
|
||||
@@ -59,7 +59,7 @@ python3 predict_system.py --layout_model_dir=inference/picodet_lcnet_x1_0_layout
|
||||
|
||||
```bash linenums="1"
|
||||
python3 predict_system.py --det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--image_dir=./docs/table/table.jpg \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
|
||||
@@ -128,7 +128,7 @@ mkdir inference && cd inference
|
||||
# Download the detection model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar && tar xf en_PP-OCRv3_det_infer.tar
|
||||
# Download the recognition model of the ultra-lightweight English PP-OCRv3 model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar && tar xf en_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar && tar xf en_PP-OCRv3_mobile_rec_infer.tar
|
||||
# Download the ultra-lightweight English table inch model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -147,7 +147,7 @@ If input is Chinese document,download Chinese models:
|
||||
python3 predict_system.py \
|
||||
--image_dir=./docs/table/1.png \
|
||||
--det_model_dir=inference/en_PP-OCRv3_det_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/en_dict.txt \
|
||||
--table_model_dir=inference/en_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt \
|
||||
|
||||
@@ -132,7 +132,7 @@ mkdir inference && cd inference
|
||||
# 下载英文超轻量PP-OCRv3检测模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar && tar xf en_PP-OCRv3_det_infer.tar
|
||||
# 下载英文超轻量PP-OCRv3识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar && tar xf en_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/en_PP-OCRv3_mobile_rec_infer.tar && tar xf en_PP-OCRv3_mobile_rec_infer.tar
|
||||
# 下载英文表格识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
@@ -154,7 +154,7 @@ cd ..
|
||||
python3 predict_system.py \
|
||||
--image_dir=./docs/table/1.png \
|
||||
--det_model_dir=inference/en_PP-OCRv3_det_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/en_PP-OCRv3_mobile_rec_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/en_dict.txt \
|
||||
--table_model_dir=inference/en_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt \
|
||||
|
||||
@@ -63,14 +63,14 @@ mkdir inference && cd inference
|
||||
# Download the PP-OCRv3 text detection model and unzip it
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
# Download the PP-OCRv3 text recognition model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
# Download the PP-StructureV2 form recognition model and unzip it
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
cd ..
|
||||
# run
|
||||
python3 table/predict_table.py \
|
||||
--det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict_ch.txt \
|
||||
|
||||
@@ -66,14 +66,14 @@ mkdir inference && cd inference
|
||||
# 下载PP-OCRv3文本检测模型并解压
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar
|
||||
# 下载PP-OCRv3文本识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar
|
||||
wget https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar
|
||||
# 下载PP-StructureV2中文表格识别模型并解压
|
||||
wget https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar
|
||||
cd ..
|
||||
# 执行表格识别
|
||||
python table/predict_table.py \
|
||||
--det_model_dir=inference/PP-OCRv3_mobile_det_infer \
|
||||
--rec_model_dir=inference/ch_PP-OCRv3_rec_infer \
|
||||
--rec_model_dir=inference/PP-OCRv3_mobile_rec_infer \
|
||||
--table_model_dir=inference/ch_ppstructure_mobile_v2.0_SLANet_infer \
|
||||
--rec_char_dict_path=../ppocr/utils/ppocr_keys_v1.txt \
|
||||
--table_char_dict_path=../ppocr/utils/dict/table_structure_dict_ch.txt \
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
===========================cpp_infer_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
use_opencv:True
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_infer/
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
infer_quant:False
|
||||
inference:./deploy/cpp_infer/build/ppocr --rec_img_h=48 --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt
|
||||
--use_gpu:True|False
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
===========================paddle2onnx_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
python:python3.7
|
||||
2onnx: paddle2onnx
|
||||
--det_model_dir:
|
||||
--model_filename:inference.pdmodel
|
||||
--params_filename:inference.pdiparams
|
||||
--det_save_file:
|
||||
--rec_model_dir:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_model_dir:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--rec_save_file:./inference/rec_v3_onnx/model.onnx
|
||||
--opset_version:10
|
||||
--enable_onnx_checker:True
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
===========================serving_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
python:python3.7
|
||||
trans_model:-m paddle_serving_client.convert
|
||||
--det_dirname:null
|
||||
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:null
|
||||
--det_serving_client:null
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
python:python3.7
|
||||
gpu_list:0|0,1
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o Global.print_batch_step=1 Train.loader.shuffle=false
|
||||
norm_train:tools/train.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o Global.print_batch_step=1 Train.loader.shuffle=false
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
inference_dir:Student
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
python:python3.7
|
||||
gpu_list:192.168.0.1,192.168.0.2;0,1
|
||||
Global.use_gpu:True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
norm_train:tools/train.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
inference_dir:Student
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv3_rec
|
||||
model_name:PP-OCRv3_mobile_rec
|
||||
python:python3.7
|
||||
gpu_list:0|0,1
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
norm_train:tools/train.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
norm_export:tools/export_model.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
inference_dir:Student
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_PACT
|
||||
model_name:PP-OCRv3_mobile_rec_PACT
|
||||
python:python3.7
|
||||
gpu_list:0|0,1
|
||||
Global.use_gpu:True|True
|
||||
@@ -7,14 +7,14 @@ Global.auto_cast:fp32
|
||||
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
|
||||
Global.save_model_dir:./output/
|
||||
Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128
|
||||
Global.pretrained_model:pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy
|
||||
Global.pretrained_model:pretrain_models/PP-OCRv3_mobile_rec_train/best_accuracy
|
||||
train_model_name:latest
|
||||
train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:pact_train
|
||||
norm_train:null
|
||||
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
null:null
|
||||
@@ -28,13 +28,13 @@ null:null
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:null
|
||||
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
fpgm_export: null
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
inference_dir:Student
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_slim_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_slim_infer
|
||||
infer_export:null
|
||||
infer_quant:True
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
===========================kl_quant_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_KL
|
||||
model_name:PP-OCRv3_mobile_rec_KL
|
||||
python:python3.7
|
||||
Global.pretrained_model:
|
||||
Global.save_inference_dir:null
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_infer/
|
||||
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
infer_quant:True
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
--use_gpu:False|True
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
===========================cpp_infer_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_PACT
|
||||
model_name:PP-OCRv3_mobile_rec_KL
|
||||
use_opencv:True
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_pact_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_klquant_infer
|
||||
infer_quant:False
|
||||
inference:./deploy/cpp_infer/build/ppocr --rec_img_h=48 --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt
|
||||
--use_gpu:True|False
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
===========================serving_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_KL
|
||||
model_name:PP-OCRv3_mobile_rec_KL
|
||||
python:python3.7
|
||||
trans_model:-m paddle_serving_client.convert
|
||||
--det_dirname:./inference/ch_PP-OCRv3_det_klquant_infer/
|
||||
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_kl_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_kl_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_klquant_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_klquant_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_kl_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_kl_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
===========================serving_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_KL
|
||||
model_name:PP-OCRv3_mobile_rec_KL
|
||||
python:python3.7
|
||||
trans_model:-m paddle_serving_client.convert
|
||||
--det_dirname:null
|
||||
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:null
|
||||
--det_serving_client:null
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_klquant_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_klquant_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_kl_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_kl_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
===========================cpp_infer_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_KL
|
||||
model_name:PP-OCRv3_mobile_rec_PACT
|
||||
use_opencv:True
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_klquant_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_pact_infer
|
||||
infer_quant:False
|
||||
inference:./deploy/cpp_infer/build/ppocr --rec_img_h=48 --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt
|
||||
--use_gpu:True|False
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
===========================serving_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_PACT
|
||||
model_name:PP-OCRv3_mobile_rec_PACT
|
||||
python:python3.7
|
||||
trans_model:-m paddle_serving_client.convert
|
||||
--det_dirname:./inference/ch_PP-OCRv3_det_pact_infer/
|
||||
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_pact_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_pact_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_pact_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_pact_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_pact_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_pact_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
===========================serving_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_PACT
|
||||
model_name:PP-OCRv3_mobile_rec_PACT
|
||||
python:python3.7
|
||||
trans_model:-m paddle_serving_client.convert
|
||||
--det_dirname:null
|
||||
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:null
|
||||
--det_serving_client:null
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_pact_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_pact_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_pact_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_pact_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv3_rec_PACT
|
||||
model_name:PP-OCRv3_mobile_rec_PACT
|
||||
python:python3.7
|
||||
gpu_list:0|0,1
|
||||
Global.use_gpu:True|True
|
||||
@@ -7,14 +7,14 @@ Global.auto_cast:amp
|
||||
Global.epoch_num:lite_train_lite_infer=1|whole_train_whole_infer=50
|
||||
Global.save_model_dir:./output/
|
||||
Train.loader.batch_size_per_card:lite_train_lite_infer=16|whole_train_whole_infer=128
|
||||
Global.pretrained_model:pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy
|
||||
Global.pretrained_model:pretrain_models/PP-OCRv3_mobile_rec_train/best_accuracy
|
||||
train_model_name:latest
|
||||
train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:pact_train
|
||||
norm_train:null
|
||||
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
pact_train:deploy/slim/quantization/quant.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
null:null
|
||||
@@ -28,13 +28,13 @@ null:null
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:null
|
||||
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o
|
||||
quant_export:deploy/slim/quantization/export_model.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o
|
||||
fpgm_export: null
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
inference_dir:Student
|
||||
infer_model:./inference/ch_PP-OCRv3_rec_slim_quant_infer
|
||||
infer_model:./inference/PP-OCRv3_mobile_rec_slim_quant_infer
|
||||
infer_export:null
|
||||
infer_quant:True
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_mobile_rec
|
||||
model_name:PP-OCRv4_mobile_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt] Train.loader.num_workers=16 Eval.loader.num_workers=16
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt] Train.loader.num_workers=16 Eval.loader.num_workers=16
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_mobile_rec
|
||||
model_name:PP-OCRv4_mobile_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_ampO2_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec_ampO2_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_mobile_rec
|
||||
model_name:PP-OCRv4_mobile_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_fp32_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec_fp32_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_server_rec
|
||||
model_name:PP-OCRv4_server_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt] Train.loader.num_workers=16 Eval.loader.num_workers=16
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_server_rec.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt] Train.loader.num_workers=16 Eval.loader.num_workers=16
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_server_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_server_rec
|
||||
model_name:PP-OCRv4_server_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet_ampO2_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_server_rec_ampO2_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
to_static_train:Global.to_static=true
|
||||
@@ -26,14 +26,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
===========================train_params===========================
|
||||
model_name:ch_PP-OCRv4_server_rec
|
||||
model_name:PP-OCRv4_server_rec
|
||||
python:python
|
||||
gpu_list:0
|
||||
Global.use_gpu:True|True
|
||||
@@ -13,7 +13,7 @@ train_infer_img_dir:./inference/rec_inference
|
||||
null:null
|
||||
##
|
||||
trainer:norm_train
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec_hgnet_fp32_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
norm_train:tools/train.py -c configs/rec/PP-OCRv4/PP-OCRv4_server_rec_fp32_ultra.yml -o Global.cal_metric_during_train=False Global.print_batch_step=1 Train.loader.shuffle=false Train.dataset.data_dir=./train_data/ic15_data Train.dataset.label_file_list=[./train_data/ic15_data/rec_gt_train.txt] Eval.dataset.data_dir=./train_data/ic15_data Eval.dataset.label_file_list=[./train_data/ic15_data/rec_gt_test.txt]
|
||||
pact_train:null
|
||||
fpgm_train:null
|
||||
distill_train:null
|
||||
@@ -27,14 +27,14 @@ null:null
|
||||
===========================infer_params===========================
|
||||
Global.save_inference_dir:./output/
|
||||
Global.checkpoints:
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml -o
|
||||
norm_export:tools/export_model.py -c configs/rec/PP-OCRv4/PP-OCRv4_mobile_rec.yml -o
|
||||
quant_export:
|
||||
fpgm_export:
|
||||
distill_export:null
|
||||
export1:null
|
||||
export2:null
|
||||
##
|
||||
infer_model:./inference/ch_PP-OCRv4_rec_infer
|
||||
infer_model:./inference/PP-OCRv4_mobile_rec_infer
|
||||
infer_export:null
|
||||
infer_quant:False
|
||||
inference:tools/infer/predict_rec.py --rec_image_shape="3,48,320"
|
||||
+1
-1
@@ -12,7 +12,7 @@ inference:./deploy/cpp_infer/build/ppocr --rec_img_h=48 --rec_char_dict_path=./p
|
||||
--precision:fp32
|
||||
--det_model_dir:
|
||||
--image_dir:./inference/ch_det_data_50/all-sum-510/
|
||||
--rec_model_dir:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_model_dir:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--benchmark:True
|
||||
--det:True
|
||||
--rec:True
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ inference:tools/infer/predict_system.py --rec_image_shape="3,48,320"
|
||||
--precision:fp32
|
||||
--det_model_dir:
|
||||
--image_dir:./inference/ch_det_data_50/all-sum-510/
|
||||
--rec_model_dir:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_model_dir:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--benchmark:True
|
||||
null:null
|
||||
null:null
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
inference:./ocr_db_crnn system
|
||||
runtime_device:ARM_CPU
|
||||
det_infer_model:PP-OCRv3_mobile_det_infer|ch_PP-OCRv3_det_slim_quant_infer
|
||||
rec_infer_model:ch_PP-OCRv3_rec_infer|ch_PP-OCRv3_rec_slim_quant_infer
|
||||
rec_infer_model:PP-OCRv3_mobile_rec_infer|PP-OCRv3_mobile_rec_slim_quant_infer
|
||||
cls_infer_model:ch_ppocr_mobile_v2.0_cls_infer|ch_ppocr_mobile_v2.0_cls_slim_infer
|
||||
--cpu_threads:1|4
|
||||
--det_batch_size:1
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
inference:./ocr_db_crnn system
|
||||
runtime_device:ARM_GPU_OPENCL
|
||||
det_infer_model:PP-OCRv3_mobile_det_infer|ch_PP-OCRv3_det_slim_quant_infer
|
||||
rec_infer_model:ch_PP-OCRv3_rec_infer|ch_PP-OCRv3_rec_slim_quant_infer
|
||||
rec_infer_model:PP-OCRv3_mobile_rec_infer|PP-OCRv3_mobile_rec_slim_quant_infer
|
||||
cls_infer_model:ch_ppocr_mobile_v2.0_cls_infer|ch_ppocr_mobile_v2.0_cls_slim_infer
|
||||
--cpu_threads:1|4
|
||||
--det_batch_size:1
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ python:python3.7
|
||||
--model_filename:inference.pdmodel
|
||||
--params_filename:inference.pdiparams
|
||||
--det_save_file:./inference/det_v3_onnx/model.onnx
|
||||
--rec_model_dir:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_model_dir:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--rec_save_file:./inference/rec_v3_onnx/model.onnx
|
||||
--opset_version:10
|
||||
--enable_onnx_checker:True
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_kl_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_kl_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_klquant_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_klquant_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_kl_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_kl_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ trans_model:-m paddle_serving_client.convert
|
||||
--params_filename:inference.pdiparams
|
||||
--det_serving_server:./deploy/pdserving/ppocr_det_v3_pact_serving/
|
||||
--det_serving_client:./deploy/pdserving/ppocr_det_v3_pact_client/
|
||||
--rec_dirname:./inference/ch_PP-OCRv3_rec_pact_infer/
|
||||
--rec_dirname:./inference/PP-OCRv3_mobile_rec_pact_infer/
|
||||
--rec_serving_server:./deploy/pdserving/ppocr_rec_v3_pact_serving/
|
||||
--rec_serving_client:./deploy/pdserving/ppocr_rec_v3_pact_client/
|
||||
serving_dir:./deploy/pdserving
|
||||
|
||||
@@ -3,7 +3,7 @@ model_name:slanet
|
||||
use_opencv:True
|
||||
infer_model:./inference/ch_ppstructure_mobile_v2.0_SLANet_infer/
|
||||
infer_quant:False
|
||||
inference:./deploy/cpp_infer/build/ppocr --det_model_dir=./inference/PP-OCRv3_mobile_det_infer --rec_model_dir=./inference/ch_PP-OCRv3_rec_infer --output=./output/table --type=structure --table=True --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --table_char_dict_path=./ppocr/utils/dict/table_structure_dict_ch.txt
|
||||
inference:./deploy/cpp_infer/build/ppocr --det_model_dir=./inference/PP-OCRv3_mobile_det_infer --rec_model_dir=./inference/PP-OCRv3_mobile_rec_infer --output=./output/table --type=structure --table=True --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --table_char_dict_path=./ppocr/utils/dict/table_structure_dict_ch.txt
|
||||
--use_gpu:True|False
|
||||
--enable_mkldnn:False
|
||||
--cpu_threads:6
|
||||
|
||||
@@ -6,7 +6,7 @@ Global.save_inference_dir:null
|
||||
infer_model:./inference/en_ppstructure_mobile_v2.0_SLANet_infer/
|
||||
infer_export:deploy/slim/quantization/quant_kl.py -c test_tipc/configs/slanet/SLANet.yml -o
|
||||
infer_quant:True
|
||||
inference:ppstructure/table/predict_table.py --det_model_dir=./inference/PP-OCRv3_mobile_det_infer --rec_model_dir=./inference/ch_PP-OCRv3_rec_infer --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --table_char_dict_path=./ppocr/utils/dict/table_structure_dict.txt --image_dir=./ppstructure/docs/table/table.jpg --det_limit_side_len=736 --det_limit_type=min --output ./output/table
|
||||
inference:ppstructure/table/predict_table.py --det_model_dir=./inference/PP-OCRv3_mobile_det_infer --rec_model_dir=./inference/PP-OCRv3_mobile_rec_infer --rec_char_dict_path=./ppocr/utils/ppocr_keys_v1.txt --table_char_dict_path=./ppocr/utils/dict/table_structure_dict.txt --image_dir=./ppstructure/docs/table/table.jpg --det_limit_side_len=736 --det_limit_type=min --output ./output/table
|
||||
--use_gpu:True|False
|
||||
--enable_mkldnn:False
|
||||
--cpu_threads:6
|
||||
|
||||
@@ -73,4 +73,4 @@ train_log/
|
||||
| PP-Structure-table |[config](../configs/en_table_structure/train_infer_python.txt) | 14.151 | 14.077 / 14.23 / 14.25 |0.012140351 | 16.285 | 16.595 / 16.878 / 16.531 | 0.020559308 | 20,000| 5,000|
|
||||
| det_r50_dcn_fce_ctw_v2.0 |[config](../configs/det_r50_dcn_fce_ctw_v2.0/train_infer_python.txt) | 14.057 | 14.029 / 14.02 / 14.014 |0.001069214 | 18.298 |18.411 / 18.376 / 18.331| 0.004345228 | 10,000| 2,000|
|
||||
| ch_PP-OCRv3_det |[config](../configs/ch_PP-OCRv3_det/train_infer_python.txt) | 8.622 | 8.431 / 8.423 / 8.479|0.006604552 | 14.203 |14.346 14.468 14.23| 0.016450097 | 10,000| 2,000|
|
||||
| ch_PP-OCRv3_rec |[config](../configs/ch_PP-OCRv3_rec/train_infer_python.txt) | 90.239 | 90.077 / 91.513 / 91.325|0.01569176 | | | | 160,000| 40,000|
|
||||
| PP-OCRv3_mobile_rec |[config](../configs/PP-OCRv3_mobile_rec/train_infer_python.txt) | 90.239 | 90.077 / 91.513 / 91.325|0.01569176 | | | | 160,000| 40,000|
|
||||
|
||||
@@ -8,14 +8,14 @@ Linux GPU/CPU 多机多卡训练推理测试的主程序为`test_train_inference
|
||||
|
||||
| 算法名称 | 模型名称 | 多机多卡 |
|
||||
| :----: | :----: | :----: |
|
||||
| PP-OCRv3 | ch_PP-OCRv3_rec | 分布式训练 |
|
||||
| PP-OCRv3 | PP-OCRv3_mobile_rec | 分布式训练 |
|
||||
|
||||
|
||||
- 推理相关:
|
||||
|
||||
| 算法名称 | 模型名称 | device_CPU | device_GPU | batchsize |
|
||||
| :----: | :----: | :----: | :----: | :----: |
|
||||
| PP-OCRv3 | ch_PP-OCRv3_rec | 支持 | - | 1/6 |
|
||||
| PP-OCRv3 | PP-OCRv3_mobile_rec | 支持 | - | 1/6 |
|
||||
|
||||
|
||||
## 2. 测试流程
|
||||
@@ -31,10 +31,10 @@ Linux GPU/CPU 多机多卡训练推理测试的主程序为`test_train_inference
|
||||
|
||||
#### 2.1.2 准备数据
|
||||
|
||||
运行`prepare.sh`准备数据和模型,以配置文件`test_tipc/configs/ch_PP-OCRv3_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`为例,数据准备命令如下所示。
|
||||
运行`prepare.sh`准备数据和模型,以配置文件`test_tipc/configs/PP-OCRv3_mobile_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`为例,数据准备命令如下所示。
|
||||
|
||||
```shell
|
||||
bash test_tipc/prepare.sh test_tipc/configs/ch_PP-OCRv3_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
|
||||
bash test_tipc/prepare.sh test_tipc/configs/PP-OCRv3_mobile_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
|
||||
```
|
||||
|
||||
**注意:** 由于是多机训练,这里需要在所有的节点上均运行启动上述命令,准备数据。
|
||||
@@ -47,10 +47,10 @@ bash test_tipc/prepare.sh test_tipc/configs/ch_PP-OCRv3_rec/train_linux_gpu_flee
|
||||
export FLAGS_START_PORT=17000
|
||||
```
|
||||
|
||||
以配置文件`test_tipc/configs/ch_PP-OCRv3_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`为例,测试方法如下所示。
|
||||
以配置文件`test_tipc/configs/PP-OCRv3_mobile_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt`为例,测试方法如下所示。
|
||||
|
||||
```shell
|
||||
bash test_tipc/test_train_inference_python.sh test_tipc/configs/ch_PP-OCRv3_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
|
||||
bash test_tipc/test_train_inference_python.sh test_tipc/configs/PP-OCRv3_mobile_rec/train_linux_gpu_fleet_normal_infer_python_linux_gpu_cpu.txt lite_train_lite_infer
|
||||
```
|
||||
|
||||
**注意:** 由于是多机训练,这里需要在所有的节点上均运行启动上述命令进行测试。
|
||||
@@ -61,9 +61,9 @@ bash test_tipc/test_train_inference_python.sh test_tipc/configs/ch_PP-OCRv3_rec
|
||||
输出结果如下,表示命令运行成功。
|
||||
|
||||
```bash
|
||||
Run successfully with command - ch_PP-OCRv3_rec - python3.7 -m paddle.distributed.launch --ips=192.168.0.1,192.168.0.2 --gpus=0,1 tools/train.py -c test_tipc/configs/ch_PP-OCRv3_rec/ch_PP-OCRv3_rec_distillation.yml -o Global.use_gpu=True Global.save_model_dir=./test_tipc/output/ch_PP-OCRv3_rec/lite_train_lite_infer/norm_train_gpus_0,1_autocast_fp32_nodes_2 Global.epoch_num=3 Global.auto_cast=fp32 Train.loader.batch_size_per_card=16 !
|
||||
Run successfully with command - PP-OCRv3_mobile_rec - python3.7 -m paddle.distributed.launch --ips=192.168.0.1,192.168.0.2 --gpus=0,1 tools/train.py -c test_tipc/configs/PP-OCRv3_mobile_rec/PP-OCRv3_mobile_rec_distillation.yml -o Global.use_gpu=True Global.save_model_dir=./test_tipc/output/PP-OCRv3_mobile_rec/lite_train_lite_infer/norm_train_gpus_0,1_autocast_fp32_nodes_2 Global.epoch_num=3 Global.auto_cast=fp32 Train.loader.batch_size_per_card=16 !
|
||||
......
|
||||
Run successfully with command - ch_PP-OCRv3_rec - python3.7 tools/infer/predict_rec.py --rec_image_shape="3,48,320" --use_gpu=False --enable_mkldnn=False --cpu_threads=6 --rec_model_dir=./test_tipc/output/ch_PP-OCRv3_rec/lite_train_lite_infer/norm_train_gpus_0,1_autocast_fp32_nodes_2/Student --rec_batch_num=1 --image_dir=./inference/rec_inference --benchmark=True --precision=fp32 > ./test_tipc/output/ch_PP-OCRv3_rec/lite_train_lite_infer/python_infer_cpu_usemkldnn_False_threads_6_precision_fp32_batchsize_1.log 2>&1 !
|
||||
Run successfully with command - PP-OCRv3_mobile_rec - python3.7 tools/infer/predict_rec.py --rec_image_shape="3,48,320" --use_gpu=False --enable_mkldnn=False --cpu_threads=6 --rec_model_dir=./test_tipc/output/PP-OCRv3_mobile_rec/lite_train_lite_infer/norm_train_gpus_0,1_autocast_fp32_nodes_2/Student --rec_batch_num=1 --image_dir=./inference/rec_inference --benchmark=True --precision=fp32 > ./test_tipc/output/PP-OCRv3_mobile_rec/lite_train_lite_infer/python_infer_cpu_usemkldnn_False_threads_6_precision_fp32_batchsize_1.log 2>&1 !
|
||||
```
|
||||
|
||||
在开启benchmark参数时,可以得到测试的详细数据,包含运行环境信息(系统版本、CUDA版本、CUDNN版本、驱动版本),Paddle版本信息,参数设置信息(运行设备、线程数、是否开启内存优化等),模型信息(模型名称、精度),数据信息(batchsize、是否为动态shape等),性能信息(CPU,GPU的占用、运行耗时、预处理耗时、推理耗时、后处理耗时),内容如下所示:
|
||||
@@ -100,7 +100,7 @@ bash test_tipc/test_train_inference_python.sh test_tipc/configs/ch_PP-OCRv3_rec
|
||||
[2022/06/02 22:53:35] ppocr INFO: preprocess_time(ms): 0.1136, inference_time(ms): 79.5877, postprocess_time(ms): 0.6945
|
||||
```
|
||||
|
||||
该信息可以在运行log中查看,以上面的`ch_PP-OCRv3_rec`为例,log位置在`./test_tipc/output/ch_PP-OCRv3_rec/lite_train_lite_infer/results_python.log`。
|
||||
该信息可以在运行log中查看,以上面的`PP-OCRv3_mobile_rec`为例,log位置在`./test_tipc/output/PP-OCRv3_mobile_rec/lite_train_lite_infer/results_python.log`。
|
||||
|
||||
如果运行失败,也会在终端中输出运行失败的日志信息以及对应的运行命令。可以基于该命令,分析运行失败的原因。
|
||||
|
||||
|
||||
+45
-45
@@ -57,7 +57,7 @@ if [ ${MODE} = "benchmark_train" ];then
|
||||
ln -s ./icdar2015_benckmark ./icdar2015
|
||||
cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv4_mobile_rec" ]];then
|
||||
if [[ ${model_name} =~ "PP-OCRv4_mobile_rec" ]];then
|
||||
rm -rf ./train_data/ic15_data
|
||||
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/ic15_data_benckmark.tar --no-check-certificate
|
||||
cd ./train_data/ && tar xf ic15_data_benckmark.tar
|
||||
@@ -67,7 +67,7 @@ if [ ${MODE} = "benchmark_train" ];then
|
||||
cd ../
|
||||
cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv4_server_rec" ]];then
|
||||
if [[ ${model_name} =~ "PP-OCRv4_server_rec" ]];then
|
||||
rm -rf ./train_data/ic15_data
|
||||
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/ic15_data_benckmark.tar --no-check-certificate
|
||||
cd ./train_data/ && tar xf ic15_data_benckmark.tar
|
||||
@@ -118,14 +118,14 @@ if [ ${MODE} = "benchmark_train" ];then
|
||||
ln -s ./icdar2015_benckmark ./icdar2015
|
||||
cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_ppocr_mobile_v2_0_rec" || ${model_name} =~ "ch_ppocr_server_v2_0_rec" || ${model_name} =~ "ch_PP-OCRv2_rec" || ${model_name} =~ "rec_mv3_none_bilstm_ctc_v2_0" || ${model_name} =~ "ch_PP-OCRv3_rec" ]];then
|
||||
if [[ ${model_name} =~ "ch_ppocr_mobile_v2_0_rec" || ${model_name} =~ "ch_ppocr_server_v2_0_rec" || ${model_name} =~ "ch_PP-OCRv2_rec" || ${model_name} =~ "rec_mv3_none_bilstm_ctc_v2_0" || ${model_name} =~ "PP-OCRv3_mobile_rec" ]];then
|
||||
rm -rf ./train_data/ic15_data
|
||||
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/ic15_data_benckmark.tar --no-check-certificate
|
||||
cd ./train_data/ && tar xf ic15_data_benckmark.tar
|
||||
ln -s ./ic15_data_benckmark ./ic15_data
|
||||
cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv2_rec" || ${model_name} =~ "ch_PP-OCRv3_rec" || ${model_name} =~ "ch_PP-OCRv4_mobile_rec" || ${model_name} =~ "ch_PP-OCRv4_server_rec" ]];then
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv2_rec" || ${model_name} =~ "PP-OCRv3_mobile_rec" || ${model_name} =~ "PP-OCRv4_mobile_rec" || ${model_name} =~ "PP-OCRv4_server_rec" ]];then
|
||||
rm -rf ./train_data/ic15_data
|
||||
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dataset/ic15_data_benckmark.tar --no-check-certificate
|
||||
cd ./train_data/ && tar xf ic15_data_benckmark.tar
|
||||
@@ -275,9 +275,9 @@ if [ ${MODE} = "lite_train_lite_infer" ];then
|
||||
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar --no-check-certificate
|
||||
cd ./pretrain_models/ && tar xf ch_PP-OCRv2_rec_train.tar && cd ../
|
||||
fi
|
||||
if [ ${model_name} == "ch_PP-OCRv3_rec" ] || [ ${model_name} == "ch_PP-OCRv3_rec_PACT" ]; then
|
||||
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar --no-check-certificate
|
||||
cd ./pretrain_models/ && tar xf ch_PP-OCRv3_rec_train.tar && cd ../
|
||||
if [ ${model_name} == "PP-OCRv3_mobile_rec" ] || [ ${model_name} == "PP-OCRv3_mobile_rec_PACT" ]; then
|
||||
wget -nc -P ./pretrain_models/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_train.tar --no-check-certificate
|
||||
cd ./pretrain_models/ && tar xf PP-OCRv3_mobile_rec_train.tar && cd ../
|
||||
fi
|
||||
if [ ${model_name} == "det_r18_db_v2_0" ]; then
|
||||
wget -nc -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ResNet18_vd_pretrained.pdparams --no-check-certificate
|
||||
@@ -481,8 +481,8 @@ elif [ ${MODE} = "whole_infer" ];then
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv2_det" ]]; then
|
||||
eval_model_name="ch_PP-OCRv2_det_infer"
|
||||
@@ -500,15 +500,15 @@ elif [ ${MODE} = "whole_infer" ];then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_slim_quant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_PP-OCRv2_rec_slim_quant_infer.tar && cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "ch_PP-OCRv3_rec" ]]; then
|
||||
eval_model_name="ch_PP-OCRv3_rec_infer"
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ${eval_model_name}.tar && tar xf ch_PP-OCRv3_rec_slim_infer.tar && cd ../
|
||||
if [[ ${model_name} =~ "PP-OCRv3_mobile_rec" ]]; then
|
||||
eval_model_name="PP-OCRv3_mobile_rec_infer"
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/PP-OCRv3_mobile_rec_slim_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ${eval_model_name}.tar && tar xf PP-OCRv3_mobile_rec_slim_infer.tar && cd ../
|
||||
fi
|
||||
if [[ ${model_name} == "ch_PP-OCRv3_rec_PACT" ]]; then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_slim_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_rec_slim_infer.tar && cd ../
|
||||
if [[ ${model_name} == "PP-OCRv3_mobile_rec_PACT" ]]; then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/PP-OCRv3_mobile_rec_slim_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_rec_slim_infer.tar && cd ../
|
||||
fi
|
||||
if [ ${model_name} == "en_server_pgnetA" ]; then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/pgnet/en_server_pgnetA.tar --no-check-certificate
|
||||
@@ -620,8 +620,8 @@ elif [ ${MODE} = "whole_infer" ];then
|
||||
if [[ ${model_name} =~ "slanet" ]];then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/en_ppstructure_mobile_v2.0_SLANet_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference/ && tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference/ && tar xf en_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ../
|
||||
fi
|
||||
if [[ ${model_name} =~ "vi_layoutxlm_ser" ]]; then
|
||||
${python_name} -m pip install -r ppstructure/kie/requirements.txt
|
||||
@@ -652,15 +652,15 @@ if [[ ${model_name} =~ "KL" ]]; then
|
||||
cd ./train_data/ && tar xf ic15_data.tar && cd ../
|
||||
cd ./inference && tar xf rec_inference.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
||||
fi
|
||||
if [ ${model_name} = "ch_PP-OCRv3_rec_KL" ]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
if [ ${model_name} = "PP-OCRv3_mobile_rec_KL" ]; then
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
||||
wget -nc -P ./train_data/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ic15_data.tar --no-check-certificate
|
||||
cd ./train_data/ && tar xf ic15_data.tar
|
||||
wget -nc -P ./ic15_data/ https://paddleocr.bj.bcebos.com/dataset/rec_gt_train_lite.txt --no-check-certificate
|
||||
wget -nc -P ./ic15_data/ https://paddleocr.bj.bcebos.com/dataset/rec_gt_test_lite.txt --no-check-certificate
|
||||
cd ../
|
||||
cd ./inference && tar xf rec_inference.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
||||
cd ./inference && tar xf rec_inference.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ../
|
||||
fi
|
||||
if [ ${model_name} = "ch_PP-OCRv2_det_KL" ]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||
@@ -764,18 +764,18 @@ if [ ${MODE} = "cpp_infer" ];then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_det_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_det_pact_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||
elif [ ${model_name} = "ch_PP-OCRv3_rec" ]; then
|
||||
elif [ ${model_name} = "PP-OCRv3_mobile_rec" ]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
elif [ ${model_name} = "ch_PP-OCRv3_rec_KL" ]; then
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_rec_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
elif [ ${model_name} = "PP-OCRv3_mobile_rec_KL" ]; then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_klquant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_rec_klquant_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
elif [ ${model_name} = "ch_PP-OCRv3_rec_PACT" ]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/PP-OCRv3_mobile_rec_klquant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_rec_klquant_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
elif [ ${model_name} = "PP-OCRv3_mobile_rec_PACT" ]; then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/rec_inference.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_rec_pact_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/PP-OCRv3_mobile_rec_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_rec_pact_infer.tar && tar xf rec_inference.tar && cd ../
|
||||
elif [ ${model_name} = "ch_ppocr_mobile_v2_0" ]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||
@@ -794,8 +794,8 @@ if [ ${MODE} = "cpp_infer" ];then
|
||||
elif [ ${model_name} = "ch_PP-OCRv3" ]; then
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && tar xf ch_det_data_50.tar && cd ../
|
||||
elif [[ ${model_name} =~ "en_table_structure" ]];then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/table/en_ppocr_mobile_v2.0_table_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/dygraph_v2.0/table/en_ppocr_mobile_v2.0_table_rec_infer.tar --no-check-certificate
|
||||
@@ -812,8 +812,8 @@ if [ ${MODE} = "cpp_infer" ];then
|
||||
elif [[ ${model_name} =~ "slanet" ]];then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference/ && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
||||
wget -nc -P ./inference/ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference/ && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ../
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -836,10 +836,10 @@ if [ ${MODE} = "serving_infer" ];then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_det_klquant_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_klquant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv2_det_klquant_infer.tar && tar xf ch_PP-OCRv2_rec_klquant_infer.tar && cd ../
|
||||
elif [ ${model_name} == "ch_PP-OCRv3_det_KL" ] || [ ${model_name} == "ch_PP-OCRv3_rec_KL" ] ; then
|
||||
elif [ ${model_name} == "ch_PP-OCRv3_det_KL" ] || [ ${model_name} == "PP-OCRv3_mobile_rec_KL" ] ; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_det_klquant_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_klquant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_det_klquant_infer.tar && tar xf ch_PP-OCRv3_rec_klquant_infer.tar && cd ../
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/PP-OCRv3_mobile_rec_klquant_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_det_klquant_infer.tar && tar xf PP-OCRv3_mobile_rec_klquant_infer.tar && cd ../
|
||||
elif [ ${model_name} == "ch_ppocr_mobile_v2_0_det_PACT" ] || [ ${model_name} == "ch_ppocr_mobile_v2.0_rec_PACT" ] ; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_det_pact_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_ppocr_mobile_v2.0_rec_pact_infer.tar --no-check-certificate
|
||||
@@ -848,10 +848,10 @@ if [ ${MODE} = "serving_infer" ];then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_det_pact_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv2_rec_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv2_det_pact_infer.tar && tar xf ch_PP-OCRv2_rec_pact_infer.tar && cd ../
|
||||
elif [ ${model_name} == "ch_PP-OCRv3_det_PACT" ] || [ ${model_name} == "ch_PP-OCRv3_rec_PACT" ] ; then
|
||||
elif [ ${model_name} == "ch_PP-OCRv3_det_PACT" ] || [ ${model_name} == "PP-OCRv3_mobile_rec_PACT" ] ; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_det_pact_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/ch_PP-OCRv3_rec_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_det_pact_infer.tar && tar xf ch_PP-OCRv3_rec_pact_infer.tar && cd ../
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/tipc_fake_model/PP-OCRv3_mobile_rec_pact_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf ch_PP-OCRv3_det_pact_infer.tar && tar xf PP-OCRv3_mobile_rec_pact_infer.tar && cd ../
|
||||
elif [[ ${model_name} =~ "ch_ppocr_mobile_v2_0" ]]; then
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar --no-check-certificate
|
||||
@@ -866,8 +866,8 @@ if [ ${MODE} = "serving_infer" ];then
|
||||
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
||||
elif [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ../
|
||||
fi
|
||||
# wget data
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/dygraph_v2.0/test/ch_det_data_50.tar --no-check-certificate
|
||||
@@ -894,8 +894,8 @@ if [ ${MODE} = "paddle2onnx_infer" ];then
|
||||
cd ./inference && tar xf ch_PP-OCRv2_det_infer.tar && tar xf ch_PP-OCRv2_rec_infer.tar && cd ../
|
||||
elif [[ ${model_name} =~ "ch_PP-OCRv3" ]]; then
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_det_infer.tar --no-check-certificate
|
||||
wget -nc -P ./inference https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf ch_PP-OCRv3_rec_infer.tar && cd ../
|
||||
wget -nc -P ./inference https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-OCRv3_mobile_rec_infer.tar --no-check-certificate
|
||||
cd ./inference && tar xf PP-OCRv3_mobile_det_infer.tar && tar xf PP-OCRv3_mobile_rec_infer.tar && cd ../
|
||||
elif [[ ${model_name} =~ "slanet" ]];then
|
||||
wget -nc -P ./inference/ https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/paddle3.0b2/ch_ppstructure_mobile_v2.0_SLANet_infer.tar --no-check-certificate
|
||||
cd ./inference/ && tar xf ch_ppstructure_mobile_v2.0_SLANet_infer.tar && cd ../
|
||||
|
||||
Reference in New Issue
Block a user