compile and install darknet on windows 10


Series

Guide

requirements

my system requirements

Tips:
Install Cuda after VS 2015. otherwise errors occur. (don’t know why)

commands

git clone https://github.com/AlexeyAB/darknet.git

config

  • extract opencv-3.3.0-vc14.exe to C:\opencv330\
  • find CUDA 8.0.props from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\extras\visual_studio_integration\MSBuildExtensions\CUDA 8.0.props

vim build/darknet/darknet.vcxproj

  • replace C:\opencv_2.4.9\ with C:\opencv330\
  • replace CUDA 9.2.props with CUDA 8.0.props
  • replace CUDA 9.2.targets with CUDA 8.0.targets
  • replace compute_30,sm_30; with compute_61,sm_61;

compile

open build/darknet/darknet.sln with VS 2015

include path

C:\opencv330\opencv\build\include
..\..\3rdparty\include
$(CUDA_PATH)\include

library path

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64
$(CUDA_PATH)\lib\$(PlatformName)  
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64

linker input

    ..\..\3rdparty\lib\x64\pthreadVC2.lib;cublas.lib;curand.lib;cudart.lib;

build with x64 Release.

run

darknet.exe

./darknet.exe detector test data/coco.data yolov3.cfg yolov3.weights -i 0 -thresh 0.25 dog.jpg -ext_output

darknet.py

compile yolo_cpp_dll.sln and generate yolo_cpp_dll.dll for python usage.

python darknet.py

Code

yolo.py

for linux and windows.
see yolo.py

yolo_cpp_dll

System Path

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\jre\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\jre\bin\plugin2

cuda80+cudnn6

  • cuda_8.0.61_win10.exe: cublas64_80.dll,curand64_80.dll,cudart64_80.dll
  • cudnn-8.0-windows10-x64-v6.0.zip: cudnn64_6.dll

cuda90+cudnn7

  • cuda_9.0.176_win10.exe: cublas64_90.dll,curand64_90.dll,cudart64_90.dll
  • cudnn-9.0-windows10-x64-v7.1.zip: cudnn64_7.dll

yolo dll

  • cuda80_yolo_cpp_dll: pthreadvc2.dll, cublas64_80.dll,curand64_80.dll,cudart64_80.dll,cudnn64_6.dll
  • cuda90_yolo_cpp_dll: pthreadvc2.dll, cublas64_90.dll,curand64_90.dll,cudart64_90.dll,cudnn64_7.dll

    Tips: use Dependency Walker to list dlls.

Reference

History

  • 20181101: created.

Author: kezunlin
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source kezunlin !
评论
  TOC