Last active
March 26, 2024 14:59
-
-
Save bresilla/e95bfd6ba33c2bd9a779c33668994fcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile OPENCV with CUDDN | |
sudo apt install cuda-toolkit-12-1 tensorrt* | |
install: | |
sudo apt-get install build-essential cmake unzip pkg-config | |
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev | |
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install libv4l-dev libxvidcore-dev libx264-dev | |
sudo apt-get install libgtk-3-dev | |
sudo apt-get install libblas-dev liblapack-dev gfortran | |
sudo apt-get install python3-dev | |
download and unzip: | |
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.7.0.zip | |
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.7.0.zip | |
make a build folder in opencv and run: | |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_C_EXAMPLES=OFF -D OPENCV_ENABLE_NONFREE=ON -D WITH_CUDA=ON -D WITH_CUDNN=ON -D OPENCV_DNN_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D CUDA_ARCH_BIN=8.9 -D WITH_CUBLAS=1 -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D HAVE_opencv_python3=ON -D BUILD_EXAMPLES=ON .. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment