spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
20.66k stars 11.52k forks source link

Build was not completed correctly. #882

Closed Muthukumar4796 closed 4 months ago

Muthukumar4796 commented 4 months ago

OpenCV 4.8.0 OS: Ubunttu 22.04 Cuda version : 12.2 i) I use Python version 3.10, but it seems to have been built for version 2.7. Screenshot from 2024-02-03 10-49-06

ii)I tried using the CMake that you provided. cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D INSTALL_C_EXAMPLES=ON \ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \ -D PYTHON_EXECUTABLE=usr/bin/python3.10 \ -D BUILD_EXAMPLES=ON \ -D WITH_CUDA=ON \ -D CUDA_FAST_MATH=ON \ -D WITH_CUBLAS=ON \ -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.2 \ -D OpenCL_LIBRARY=/usr/local/cuda-12.2/lib64/libOpenCL.so \ -DOpenCL_INCLUDE_DIR=/usr/local/cuda-12.2/include/ \ .. It displayed an error for Cudnn, I already downloaded version 8.9.7 for Cudnn, which is compatible with my Cuda version 12.2. Screenshot from 2024-02-03 10-49-06 Screenshot from 2024-02-03 11-03-22

so I tried; -D WITH_CUDNN=ON \ -D OPENCV_DNN_CUDA=ON \ -D CUDA_ARCH_BIN=7.5 \

iii) After that, Cudnn was still not showing up. So, I thought I would try to build it and the build was completed. However, while running the test python code, there were still issues. Screenshot from 2024-02-03 11-07-07