Skip to content

Commit 4ec91c4

Browse files
committed
add cli rec model
1 parent 557ea76 commit 4ec91c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

paddleocr.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ def _import_file(module_name, file_path, make_importable=False):
110110
"url": "https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar",
111111
"dict_path": "./ppocr/utils/ppocr_keys_v1.txt",
112112
},
113+
"ch_doc": {
114+
"url": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-OCRv4_server_rec_doc_infer.tar",
115+
"dict_path": "./ppocr/utils/ppchatocr_v2_dict_fix.txt",
116+
},
113117
"en": {
114118
"url": "https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar",
115119
"dict_path": "./ppocr/utils/en_dict.txt",
@@ -512,7 +516,7 @@ def parse_lang(lang):
512516
), "param lang must in {}, but got {}".format(
513517
MODEL_URLS["OCR"][DEFAULT_OCR_MODEL_VERSION]["rec"].keys(), lang
514518
)
515-
if lang == "ch":
519+
if lang in ["ch", "ch_doc"]:
516520
det_lang = "ch"
517521
elif lang == "structure":
518522
det_lang = "structure"

0 commit comments

Comments
 (0)