HOW TO INSTALL pjreddie/DARKNET ON OSX
- use brew
brew install opencv
- setup opencv.pc to pkgconfig, e.g :
ln -s /usr/local/Cellar/opencv/2.4.13/lib/pkgconfig/opencv.pc /usr/local/lib/pkgconfig/opencv.pc
- setup libraries, e.g :
ln -s /usr/local/Cellar/opencv/2.4.13/ /usr/local/opt/opencv
-
Download from NVidia site and install the file
cuda_X.X.X_mac.dmg
-
Make sure that libraries exist :
/usr/local/cuda
- Add
nvcc
to the PATH :export PATH=/usr/local/cuda/bin:$PATH
- Download from NVidia site and extract the file
cudnn-X.X-osx-xYY-vZ.Z
- Copy libraries
libcudnn.*
,libcudnn_static.*
to/usr/local/cuda/lib
- Copy the header
cudnn.h
to/usr/local/cuda/include
- setup your configuration, e.g :
GPU=1
CUDNN=1
OPENCV=1
- if your Mac OSX is 10.5 or later, add this to the Makefile:
CUDA_LIB_DIR=/usr/local/cuda/lib # your path to Cuda libraries
LDFLAGS += -Wl,-rpath,$(CUDA_LIB_DIR)
path/to/darknet $ make -j4
...
path/to/darknet $ ./darknet
usage: ./darknet <function>
May I ask which ver of Cudnn and Cuda you used to get this to work I run into a gabillion problems when trying to compile with GPU and OpenCV, thanks.