PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.47k stars 7.84k forks source link

训练模型导出时,当PaddleOCR所在路径包含中文字符串时,导出的模型缺少inference.pdiparams #13534

Closed raoyutian closed 3 months ago

raoyutian commented 3 months ago

Search before asking

Bug

训练模型导出时,当PaddleOCR所在路径包含中文字符串时,导出的模型缺少inference.pdiparams 测试发现Global.save_inference_dir参数如果指定含有中文路径,则导出的推理模型缺少inference.pdiparams文件,而inference.pdmodel、inference.pdiparams.info均可生成。

Environment

win10,PaddleOCR V2.7

Minimal Reproducible Example

python tools/export_model.py -c configs\rec\PP-OCRv4\en_PP-OCRv4_rec.yml -o Global.checkpoints=./output/en_PP-OCRv4_rec/best_accuracy Global.save_inference_dir=D:\中文文件夹

Additional

python tools/export_model.py -c configs\rec\PP-OCRv4\en_PP-OCRv4_rec.yml -o Global.checkpoints=./output/en_PP-OCRv4_rec/best_accuracy Global.save_inference_dir=D:\中文文件夹

Are you willing to submit a PR?

raoyutian commented 3 months ago

Global.save_inference_dir采用相对路径可以解决该问题。