Skip to content

Commit

Permalink
add cli rec model (#14740)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyubo0722 authored Mar 6, 2025
1 parent f95280d commit e8399f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion paddleocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def _import_file(module_name, file_path, make_importable=False):
"url": "https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar",
"dict_path": "./ppocr/utils/ppocr_keys_v1.txt",
},
"ch_doc": {
"url": "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0rc0/PP-OCRv4_server_rec_doc_infer.tar",
"dict_path": "./ppocr/utils/dict/ppocrv4_doc_dict.txt",
},
"en": {
"url": "https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar",
"dict_path": "./ppocr/utils/en_dict.txt",
Expand Down Expand Up @@ -512,7 +516,7 @@ def parse_lang(lang):
), "param lang must in {}, but got {}".format(
MODEL_URLS["OCR"][DEFAULT_OCR_MODEL_VERSION]["rec"].keys(), lang
)
if lang == "ch":
if lang in ["ch", "ch_doc"]:
det_lang = "ch"
elif lang == "structure":
det_lang = "structure"
Expand Down

0 comments on commit e8399f2

Please sign in to comment.