You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to change your codes to support cuda, but after using CUDA, the program is slower. When not using cuda, it takes about 0.2 seconds to infer a picture, but after using cuda, it becomes 1.6 seconds. The following is my code, why is this happening?
I tried to change your codes to support cuda, but after using CUDA, the program is slower. When not using cuda, it takes about 0.2 seconds to infer a picture, but after using cuda, it becomes 1.6 seconds. The following is my code, why is this happening?
ProposalNetwork::ProposalNetwork(const ProposalNetwork::Config &config)
{
_net = cv::dnn::readNetFromCaffe(config.protoText, config.caffeModel);
if (_net.empty())
{
throw std::invalid_argument("invalid protoText or caffeModel");
}
else
{
if (config.useGPU)
{
_net.setPreferableBackend(cv::dnn::DNN_BACKEND_CUDA);
_net.setPreferableTarget(cv::dnn::DNN_TARGET_CUDA);
std::cout << "using CUDA" << std::endl;
}
}
_threshold = config.threshold;
}
@ksachdeva
The text was updated successfully, but these errors were encountered: