You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
请问版面分析模型按照https://github.com/PaddlePaddle/PaddleOCR/blob/main/ppstructure/layout/README_ch.md
调用
python3 tools/train.py
-c configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x1_0_layout.yml
--eval
训练
调用
python3 tools/export_model.py
-c configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x1_0_layout.yml
-o weights=output/picodet_lcnet_x1_0_layout/best_model
--output_dir=output_inference/
导出为推理模型后调用
paddle2onnx --model_dir output_inference/picodet_lcnet_x1_0_layout --model_filename model.pdmodel --params_filename model.pdiparams --save_file ./onnx_inference_model/hehe_layout_model_dir/model.onnx --opset_version 11 --enable_onnx_checker True
转为onnx模型,然后调用
table_engine = PPStructure(show_log=False,
ocr=True,
layout=True,
table=True,
use_onnx=True,
det_model_dir="./onnx_inference_model/det_onnx/model.onnx",
rec_model_dir="./onnx_inference_model/rec_onnx/model.onnx",
cls_model_dir="./onnx_inference_model/rec_onnx/model.onnx",
table_model_dir="./onnx_inference_model/table_model_dir/model.onnx",
layout_model_dir="./onnx_inference_model/hehe_layout_model_dir/model.onnx"
)
进行版面分析以及识别,执行到:
layout_res, elapse = self.layout_predictor(img)
报ValueError: Model requires 2 inputs. Input Feed contains 1错误
请问该怎么转换?
Beta Was this translation helpful? Give feedback.
All reactions