转换attention的识别模型,失败了
Created by: aceyw
(1)
转换ctc的模型时候,使用的命令是,
python3 tools/export_model.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints=./ch_lite/rec_mv3_crnn/best_accuracy
Global.save_inference_dir=./inference/rec_crnn/
转换成功了,并且使用新模型进行预测也是成功的。
(2)
转换attention模型的时候,使用的是det_r50_vd_db.tar模型,
python3 tools/export_model.py
-c configs/rec/rec_r34_vd_tps_bilstm_attn.yml
-o Global.checkpoints="../d0_pprawmodel/rec_r34_vd_tps_bilstm_attn/best_accuracy"
Global.save_inference_dir="./acey_exports/rec_r34_vd_tps_bilstm_attn_infer_acey"
Global.use_gpu=false
Global.character_type=ch
Global.character_dict_path=./ppocr/utils/ppocr_keys_v1.txt
但是转换失败了,提示错误是:
Traceback (most recent call last):
File "tools/export_model.py", line 93, in
main()
File "tools/export_model.py", line 67, in main
config, eval_program, startup_prog)
File "/home/aex/ycode/python_demo0/aPaddleOCR/tools/program.py", line 193, in build_export
image, outputs = model(mode='export')
File "/home/aex/ycode/python_demo0/aPaddleOCR/ppocr/modeling/architectures/rec_model.py", line 112, in call
predict = predicts['predict']
KeyError: 'predict'
麻烦请帮忙看看,应该怎么修改呢?
谢谢 ~