Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv加载图像进行推理 #361

Open
PengPeng-JunJun opened this issue Apr 7, 2023 · 5 comments
Open

opencv加载图像进行推理 #361

PengPeng-JunJun opened this issue Apr 7, 2023 · 5 comments

Comments

@PengPeng-JunJun
Copy link

代码中的推理和预测都是使用的PIL库加载的图像,请问有测试过用opencv加载图像进行推理么?
预测中有推理vedio的代码,但是将代码复制到推理单张图像时,运行会报错,在utils.py文件的20行,个人认为是cv和PIL的API不一致的原因

@PengPeng-JunJun PengPeng-JunJun changed the title ONNX调用问题请教 opencv加载图像进行推理 Apr 7, 2023
@bubbliiiing
Copy link
Owner

我使用起来都差不多,使用PIL是因为绘图

@PengPeng-JunJun
Copy link
Author

可以分享一份用OPENCV来实现推理预测的代码么?当前的代码都是用PIL来加载图像的

@PengPeng-JunJun
Copy link
Author

up主,还想请教一下,代码中有将pth文件转换成ONNX的功能,请问你有用过ONNX来进行过推理预测么?是用的OPENCV的DNN模块或是ONNXRuntime还是NCNN这一类的推理加速引擎呢?

@bubbliiiing
Copy link
Owner

可以分享一份用OPENCV来实现推理预测的代码么?当前的代码都是用PIL来加载图像的

这个我不考虑,因为这两者没有本质区别,性能差距也基本没有……

@bubbliiiing
Copy link
Owner

up主,还想请教一下,代码中有将pth文件转换成ONNX的功能,请问你有用过ONNX来进行过推理预测么?是用的OPENCV的DNN模块或是ONNXRuntime还是NCNN这一类的推理加速引擎呢?

里面有用onnx读取然后预测的代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants