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

GPU Darknet detection not working #450

Closed
FlawTECH opened this issue Feb 13, 2018 · 2 comments · Fixed by #593
Closed

GPU Darknet detection not working #450

FlawTECH opened this issue Feb 13, 2018 · 2 comments · Fixed by #593

Comments

@FlawTECH
Copy link

Hello,
I've been wondering if there's any update regarding #123 ?
I'm trying to use GPU based detection using CvDnn.ReadNetFromDarknet("yolo-voc.cfg", "yolo-voc.weights"); but it only seems to be using the CPU.

In fact, when running int count = Cv2.GetCudaEnabledDeviceCount(); it still returns 0 even though CUDA 9.1 is installed on the machine, so my guess is that it simply won't use GPU based detection and it's really annoying. I tried the solution mentioned in #123 but I don't even know where I'd need to put opencv_core and opencv_gpu dlls and it's probably outdated.

I'm running Windows 10 btw.
Thanks !

@ravazquez
Copy link
Contributor

As far as I understand, openCV does not ship with CUDA enabled dlls, you have to build the dlls on your own to enable CUDA. I also believe that the default OpenCVSharp binaries do not ship with CUDA enabled, you may need to add the references to your own openCV dlls in the OpenCVSharp project and rebuild it by hand.

@captainst
Copy link

I encountered the same problem. I noticed that the current version of opencvsharp uses the static libs from opencv rather than dlls. So the #123 solution probably won't work. I think for the current version, the correct steps should be like this:

  1. Rebuild the opencv 3.4.1 with cuda support. (there are many tutorials on line on how to do this)
  2. Download or clone the opencvsharp 3.4.1 source, replace the .lib files in opencv_files_341 folder with the newly generated .lib files with cuda support.
  3. Rebuild the opencvsharp from source.

Haven't tried this yet. But I think that should be the right way.

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

Successfully merging a pull request may close this issue.

3 participants