AlturosDestinations / Alturos.Yolo

C# Yolo Darknet Wrapper (real-time object detection)
MIT License
425 stars 131 forks source link

GPU still not working although all the requirements are met #137

Open AaronLeong0725 opened 4 years ago

AaronLeong0725 commented 4 years ago

Hi all,

I am trying to perform live streaming detection on custom dataset using TinyYolov3.

However I am only able to use cpu to perform the live stream, and it takes around 1-2 second to detect objects in a frame. I have already moved cudnn64_7.dll, cublas64_100.dll and curand64_100.dll next to the Alyutos.Yolo.dll.

I am using NVIDIA GeForce 920M and CUDA 10.2.

Below are the images on how i configure my yolowrapper and detect the images. Alturos_yolo_config alturos_yolo_detection

May I know what is the possible cause of not using GPU for detection? I have seen through many issues from here and yet all the solutions are not working for me.

I sincerely hope that someone is able to help me with this problem. Thank you in advance.

p0w3r2100 commented 4 years ago

i could run this in GPU by using microsoft Visual C++ 2015-2019 redustributable X64 14.22.27821

vcredist_x64.zip

for GPU you need to copy cudnn64_7.dll to the {apppath}\bin\x64\Debug\x64

Hero7749 commented 4 years ago

Ensure there's cudnn64_7.dll in your ...\bin\x64\Debug\x64 Use cmd.exe and type nvcc --version to check whether your CUDA is installed properly. If version info doesn't show up, then you can try to re-install CUDA and cuDNN, and reboot your computer after setting the Environment Variable. I've solved my problem by these methods.

AaronLeong0725 commented 4 years ago

Alright, thanks for the reply. I will try it and tell you all how's the result. Thanks a lot!

asverlov commented 4 years ago

If you are using the latest codebase you need to pass GpuConfig in.

            var gpuConfig = new GpuConfig();  
            yoloWrapper = new YoloWrapper(_config_, gpuConfig);

Without it the system always defaults to CPU.

MutluAYDIN23 commented 4 years ago

If you are using the latest codebase you need to pass GpuConfig in.

            var gpuConfig = new GpuConfig();  
            yoloWrapper = new YoloWrapper(_config_, gpuConfig);

Without it the system always defaults to CPU.

With these codes on yolo 3.0.5 and CUDA 10.2. I finally ran on gpu. Thank you!