Yolo.Net icon indicating copy to clipboard operation
Yolo.Net copied to clipboard

Guide for dummies

Open BergChristian opened this issue 4 years ago • 10 comments

Hi!

As I got some good help from users here I decided try to help others coming after me. I got it to work for 30 and 10- series (Don't have a 20-card ut would expect it works for it) but there are challenges to get everything right. So for those of you out there needing some help!

  1. Install the latest Nvidia drivers.
  2. Install Nvidia CUDA toolkit 11.0 (The exact version is required. This might change so check the first page for the version)
  3. Download and install Nvidia cuDNN. Check the first page for the exact version.
  4. Copy the DLL files from the zip file in step 3 to your output directory. cudnn64_8.dll INCLUDING the other DLLs in the same directory.
  5. Copy opencv_world452.dll (see first page for exact version) to the output directory.
  6. Use the yolo_cpp_dll_gpu.dll in https://github.com/zgabi/Yolo.Net/tree/master/lib/Cuda11
  7. User the yolo_cpp_dll_cpu.dll in https://github.com/zgabi/Yolo.Net/tree/master/lib/Cuda10

Make sure you have all the DLLs in the output directory:

  • CuDNN files (cudnn64_8.dll + the extra in the same directory)
  • opencv_world452.dll
  • yolo_cpp_dll_gpu.dll
  • yolo_cpp_dll_cpu.dll
  • The other required DLLs (see first page) pthreadGC2.dll, pthreadVC2.dll , msvcr100.dll

Still don't work? Here are some ideas.

  • For me I had to have the yolo_cpp_dll_gpu, yolo_cpp_dll_cpu and cudnn64_8.dll in both the output directory AND a sub directory called dll.

  • Make sure you have the right yolo_cpp_dll_gpu.dll in the dll folder and output folder. It should be around 3MB. (it is the one in https://github.com/zgabi/Yolo.Net/tree/master/lib/Cuda11.0)

  • As the wrapper check this file binary to look for the right version of CUDA, having the wrong version of yolo_cpp_dll_gpu will get you an error "CUDNN does not exist", but that is because it is looking for the wrong CUDNN. It fooled me once...

  • Make sure you compile in x64.

BergChristian avatar Apr 14 '22 20:04 BergChristian

could you please create an markdown (md) file with this information, and link it in the readme.md? https://github.com/zgabi/Yolo.Net/blob/master/README.md

zgabi avatar Apr 14 '22 20:04 zgabi

I can try it, will take me some days because of Easter but will do! Thank you for your work with the library!

BergChristian avatar Apr 14 '22 21:04 BergChristian

Hello

I tried all the procedure as you suggested. I have a RTX3060 gpu.

I used the dll from lib/Cuda11.0/yolo_cpp_dll_gpu.dll

It say ddl not found yolo_cpp_dll_gpu.dll although the file is there in the output directory and in runtime folder too

The cuda 11.0 tool kit does not support a driver for my gpu so I used 11.6 (I can use 11.4 minimum) and also cudnn 8.0 does not support cuda 11.6 so used cudnn 8.4

Please help. It's bit urgent..

Thanks

SandipBR avatar Apr 23 '22 15:04 SandipBR

Hi

You need to use the exact right version of cuda and cudnn.

Paliscope avatar Apr 24 '22 09:04 Paliscope

Hi Thanks fpr the reply

Only in CUDA 11.1 RTX 30 series is supported.

https://developer.nvidia.com/blog/cuda-11-1-introduces-support-rtx-30-series/

Also there are no drivers for my card until CUDA 11.4, that's why I used higher versions. Is it possible to use a separate driver (like > 472) with CUDA toolkit 11.0 and respective cudnn ?

SandipBR avatar Apr 24 '22 11:04 SandipBR

Can anyone please provide a step by step guide to build darknet and yolo.net so i can use it with my card? I am really in a urgent need.

SandipBR avatar Apr 24 '22 11:04 SandipBR

I am running 11.0 with RTX 3050 card without problems so I don't think you need 11.1 for your card.

https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html

BergChristian avatar Apr 24 '22 12:04 BergChristian

What error du you get?

BergChristian avatar Apr 24 '22 12:04 BergChristian

Thanks BergChristian

Sorry for the delay I was doing some more tests. I changed to cuda 11.0 and cudnn 8.0. The error I am getting is "cuDNN not found"

I used the cuda 11.0 dll from lib direcotry.

I tried disabling the cudnn check but then I got error :- System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (0x8007000B)'

How to proceed furhter ?

I can provide the vnc link of my system by email.

SandipBR avatar Apr 24 '22 19:04 SandipBR

HI!

If you got the errror cuDNN not found it means that the DLLs are not in the right folder. I guess that you have mixed up x86 or x64 versions? I am running mine in x64.

Make sure you have the DLLs in the right output folder (step 4 in my guide). That is why you got the error. The check is really basic as it is only looking if the file exist.

System.BadImageFormatException is usually an indication of that you mixing x64 och x86 bad. Make sure you use x64 for all your projects and that the DLL are in the RIGHT output folder (the x64 one).

Christian

BergChristian avatar Apr 25 '22 08:04 BergChristian