Smorodov / Multitarget-tracker

Multiple Object Tracker, Based on Hungarian algorithm + Kalman filter.
Apache License 2.0
2.2k stars 652 forks source link

Can YOLO Darknet run on Windows with CUDA + CUDNN? #372

Open Fazil-edu opened 2 years ago

Fazil-edu commented 2 years ago

My components: Windows 10 CUDA v11.5 CUDNN v8.3

I change option(BUILD_YOLO_LIB "Should compiled standalone yolo_lib with original darknet?" ON) to ON but it doesn't get set to ON. I am testing it to see if it has been set to ON: if (BUILD_YOLO_LIB) message("BUILD_YOLO_LIB is ON") add_subdirectory(src/Detector/darknet) add_definitions(-DBUILD_YOLO_LIB) The message does not appear. Even when I do set(BUILD_YOLO_LIB ON) directly, I get : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE). Is PkgConfig mandatory? I can't find how and where to install PkgConfig

Thanks in advance

Nuzhny007 commented 2 years ago

Hi! Do you can share all cmake output. And may be cMakeCache.txt file from build directory

Fazil-edu commented 2 years ago

However, in CMakeCache.txt it was BUILD_YOLO_LIB:BOOL=OFF although I set it to ON in CMakeLists.txt. So now I've set it ON in CMakeCache.txt and it jumps in and sets BUILD_YOLO_LIB to ON.

But I continue to have problems with PkgConfig, may be with opencv2/bgsegm.hpp also . See my CMake output:

1> -- The C compiler identification is MSVC 19.16.27045.0 1> -- The CXX compiler identification is MSVC 19.16.27045.0 1> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe 1> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe -- works 1> -- Detecting C compiler ABI info 1> -- Detecting C compiler ABI info - done 1> -- Detecting C compile features 1> -- Detecting C compile features - done 1> -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe 1> -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe -- works 1> -- Detecting CXX compiler ABI info 1> -- Detecting CXX compiler ABI info - done 1> -- Detecting CXX compile features 1> -- Detecting CXX compile features - done 1> -- Found OpenMP_C: -openmp (found version "2.0") 1> -- Found OpenMP_CXX: -openmp (found version "2.0") 1> -- Found OpenMP: TRUE (found version "2.0")
1> -- Found OpenCV: C:/opencv-4.5.5_and_opencv_contrib-4.5.5/opencv_lib (found version "4.5.5") 1> -- Looking for C++ include filesystem 1> -- Looking for C++ include filesystem - found 1> Founded filesystem header 1> -- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5 (found version "11.5") 1> -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 1> -- Found CUDNN: C:/Program Files/NVIDIA/CUDNN/v8.3/lib/x64/cudnn.lib
1> -- Looking for C++ include opencv2/bgsegm.hpp 1> -- Looking for C++ include opencv2/bgsegm.hpp - not found 1> -- Configuring done 1> -- Generating done 1> -- Build files have been written to: C:/Users/me/CMakeBuilds/b556b0c6-3001-dc35-b526-8ec8914923d0/build/x64-Debug (Standard)

Nuzhny007 commented 2 years ago

I don't use PkgConfig. It need for FindCUDNN.cmake but works without it.

bgsegm.hpp is a part of opencv_contrib: https://github.com/opencv/opencv_contrib/blob/4.x/modules/bgsegm/include/opencv2/bgsegm.hpp Do you have this file in your opencv build?

Fazil-edu commented 2 years ago

Yes I have it in my opencv lib. I've tested several other paths as well, but it still doesn't find this one opencv2/bgsegm.hpp

Nuzhny007 commented 2 years ago

Hm. I'm using some like this: https://github.com/Smorodov/Multitarget-tracker/blob/master/data/cmake_vs2019.bat