Replies: 1 comment
-
转换成功后,在目录下有三个文件:
注意: 如果需要以新 IR 模式(FLAGS_enable_pir_api=1)存储 .json 文件,请执行以下命令切换到新 IR 模式:
详情请看文档:https://paddlepaddle.github.io/PaddleOCR/latest/ppocr/model_train/recognition.html#4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我的程式码如下:
model_dir = r'C:\Users\403b\Desktop\PaddleOCR-2.9.1\inference_model\rec4' # 你训练好的模型存放路径
ocr_model = PaddleOCR(rec_model_dir=model_dir, rec_char_dict_path=None)
result = ocr_model.ocr(resized_img,det=False, cls=False)
但是執行時會顯示:
download https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar to C:\Users\403b\Desktop\PaddleOCR-2.9.1\inference_model\rec4\ch_PP-OCRv4_rec_infer.tar
100%|██████████| 10720/10720 [00:00<00:00, 11432.30it/s][2024/12/23 16:43:22]
似乎是使用自动下载的官方模型而不是使用我训练的模型?

我想使用我训练的模型去辨识文字
下面是我的练好的模型存放路径資料夾截圖
我使用
python tools/export_model.py -c en_PP-OCRv4_rec.yml -o Global.pretrained_model=output/rec_ppocr_v4_2/best_accuracy.pdparams Global.save_inference_dir=./inference_model/rec4/
将训练模型转换为推理模型,但是转换完资料夹内是inference.json与inference.pdiparams与inference.yml
并没有inference.pdmodel、inference.pdiparams.info请问是拿里出了问题?
Beta Was this translation helpful? Give feedback.
All reactions