请问怎么转换有三个model directory的PaddleOCR?
现在的model是一个PaddleOCR class, 有三个model_dir,请问是要分开转换成ONNX吗?转换之后怎么combine起来,还有怎么用onnxruntime呢?
@yxyphoebe 可以参考这个教程 https://aistudio.baidu.com/aistudio/projectdetail/1479970
好的,谢谢,照着这个tutorial做,遇到这个问题,不知道有没有人遇到过。
(1150, 720, 3)
Traceback (most recent call last):
File "paddleocr/tools/infer/predict_system.py", line 190, in
请问是怎么把model 的input shape改成 -1 x 3 x -1 x -1 的 @Channingss
请PaddleOCR的release/2.0分支现在支持导出为动态shape的模型: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.0/tools/export_model.py 这个是导出inference模型的教程: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.0/doc/doc_ch/inference.md
@Channingss 请问官方提供的inference model在转换后只能输入100的宽度,这块如何修改为动态输入呢
+1
可以参考下面的代码
onnx_model = onnx.load(onnx_path)
onnx.checker.check_model(onnx_model)
print(f'The {onnx_path} is checked!')
# 修改NCHW中H为动态输入
onnx_model.graph.input[0].type.tensor_type.shape.dim[2].dim_param = '?'
# 修改NCHW中W为动态输入
onnx_model.graph.input[0].type.tensor_type.shape.dim[3].dim_param = '?'
onnx.save(onnx_model, onnx_path)
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.