more effectively multithread
This commit is contained in:
2
yolo.cpp
2
yolo.cpp
@ -42,13 +42,11 @@ Yolo::Yolo(const std::filesystem::path &onnxModelPath, const cv::Size &modelInpu
|
||||
}
|
||||
if(runWithOCl)
|
||||
{
|
||||
std::cout << "\nRunning on OCV" << std::endl;
|
||||
net.setPreferableBackend(cv::dnn::DNN_BACKEND_DEFAULT);
|
||||
net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "\nRunning on CPU" << std::endl;
|
||||
net.setPreferableBackend(cv::dnn::DNN_BACKEND_OPENCV);
|
||||
net.setPreferableTarget(cv::dnn::DNN_TARGET_CPU);
|
||||
}
|
||||
|
Reference in New Issue
Block a user