shliar
shliar
> > 例如我已经在paddleclas、paddledetection、paddlex这三个套件中分别训练好了模型 > > 你好,听你的描述是想将已有的模型通过paddlehub来实现服务化部署。 > > > 从paddlehub的教程中,只描述了如何创建自己的module等 > > paddlehub中的创建module教程,可以将上述提到的**已有的模型**进行封装,使得模型可以使用hub serving部署,可以参考:https://github.com/PaddlePaddle/PaddleHub/blob/release/v2.2/docs/docs_ch/tutorial/custom_module.rst 你好,我查看了你链接中的文章以及文章中的module.py,我的疑惑是我使用其他paddle套件(以paddleclas为例),可以得到一个可预测的模型model.pdmodel以及model.pdiparams,但该链接里好像没有提到module.py与我得到的模型文件的联系。例如我在使用paddleclass时,会有一个predict_cls.py 该文件的接口里就有明确的模型路径,但在该链接的示例中,好像只提到了导入word dict,也没有提到是否要对已有模型做一些转换,这是我的疑惑,还请大佬解答,谢谢!
> 我已经按照以下方式修改了文件的底部`craft.py`并执行了它。它已成功`craft.onnx`在我的主目录中创建了一个文件。 > > ``` > if __name__ == '__main__': > model = CRAFT(pretrained=True) > onnx_model_path = "/home/tomdol/craft.onnx" > > model.eval() > > model_input = torch.randn(1, 3, 224, 224) >...
> Hi @shliar, I am able to convert the PyTorch model to ONNX by following the step from @tomdol and also able to convert the model to IR using this...
When I try to infer the successful IR model, the following errors appear. How should I solve this problem? you can find the IR model in https://gitee.com/shliar/craft-ir-model.git 
> @shliar. I wasn't able to access this page: https://gitee.com/shliar/craft-ir-model.git > >  > > Have you tried running the IR model with [benchmark app](https://docs.openvino.ai/2022.1/openvino_inference_engine_tools_benchmark_tool_README.html)? Does it work? Hi: I'm...
> @shliar, Can I know, which code did you use to run inference? Is it from one of the OMZ demos or a custom code? If possible, please share it...
Hi: I tried the following code: import cv2 import matplotlib.pyplot as plt import numpy as np from openvino.runtime import Core ie = Core() #model = ie.read_model(model="model/horizontal-text-detection-0001.xml") model = ie.read_model(model="model/craft.xml") compiled_model...
> @shliar. The error is related to the blob shape that is not matching with the model's input shape. Try reshaping the blob (a.k.a image) to fit the model's input...
> @shliar. The error is related to the blob shape that is not matching with the model's input shape. Try reshaping the blob (a.k.a image) to fit the model's input...
> mo --input_model craft.onnx --input_shape [1,3,706,706] --reverse_input_channels --mean_values=[123.675,116.28,103.53] --scale_values=[58.395,57.12,57.375] Hi: Your error can be solved by using the 'test_openvino.zip' I provided .You need to unzip it and replace the 'test_openvino.py'...