Skip to content
New issue

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

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

Already on GitHub? # to your account

OpenCV开了cuda加速,但是没有提升,会是什么原因呢? #10

Open
cucrui opened this issue May 19, 2021 · 0 comments
Open

Comments

@cucrui
Copy link

cucrui commented May 19, 2021

您好,opencv的cuda加速在yolact上很明显,大概有5倍的提升,但是在yolov5s上,几乎没有变化,想请教您可能是什么原因呢?非常感谢!

string modelFile = this->netname;
modelFile += ".onnx";
cout << "load modelFile : " << modelFile << endl; 
this->net = readNet(modelFile);
// 增加这两行用来加速 
this->net.setPreferableBackend(DNN_BACKEND_CUDA);
this->net.setPreferableTarget(DNN_TARGET_CUDA);
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant