This commit is contained in:
恍兮惚兮 2025-01-08 16:31:41 +08:00
parent 65853d13ae
commit 4615c55696
2 changed files with 49 additions and 1 deletions

39
cpp/LunaOCR/models.txt Normal file
View File

@ -0,0 +1,39 @@
ja
https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/japan_PP-OCRv4_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/japan_dict.txt
zh
https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/ppocr_keys_v1.txt
en
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/en_dict.txt
cht
https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/chinese_cht_dict.txt
ko
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/korean_PP-OCRv4_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/korean_dict.txt
ru/uk
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/cyrillic_dict.txt
ar
https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/arabic_PP-OCRv4_rec_infer.tar
https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppocr/utils/dict/arabic_dict.txt
ml的检测效果很烂所以都用的en的检测器
没有ru的rec所以用cyrillic简单替代
paddle2onnx
paddle2onnx --model_dir ./ --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file 1.onnx --opset_version 11 --enable_onnx_checker True
https://github.com/PaddlePaddle/PaddleOCR/issues/1048 这里面有很多其他语言的但转换onnx不管用

View File

@ -154,7 +154,16 @@ def question():
def callback():
langs = getallsupports()
supportlang.setText("_,_".join([getlang_inner2show(f) for f in langs]))
_allsupports = ["ja", "en", "zh", "cht", "ko", "ru"]
_allsupports = [
Languages.Japanese,
Languages.English,
Languages.Chinese,
Languages.TradChinese,
Languages.Korean,
Languages.Russian,
Languages.Arabic,
Languages.Ukrainian,
]
allsupports.clear()
for l in _allsupports:
if l not in langs: