Windows VS2015 + dlib + cuda Environment setup

Source: Internet
Author: User
Tags dnn

1. Tools Required: VS2015 (UPDATA3), Dlib (19.7), CUDA (9.2), Cmake,

VS2015 need updata3 version, because dlib in DNN module needs VS2015 and above, and cuda load needs VS2015 version updata3 (VS2017 did not try to load cuda, so it is not clear the specifics).

Dlib version supports DNN and other modules, it is recommended to download 19.x version

Steps:

1. Installing VS2015

2. Download Dlib: Dlib official website

Need to add environment variables

3. Download and install Cuda: Cuda Download (9.2)

After downloading the direct default installation, after the final installation is completed there are three options boxes, click the last one (the first two is selected by default) with VS2015 open cuda test file, run will generate run test EXE file.

Need to add environment variables

Specific operation reference:

Http://blog.sina.com.cn/s/blog_9cc09dc20102vtor.html

4. Download the CMake and install . CMake Download

Select the version of your computer to download and install by default

Click the GUI file

The first path fills the Lib path

The second path fills the CMake generated file path (custom folder, place build Dlib project)

Visual Studio Win64 is the updata3 version of VS2015

will then run automatically,

If the computer is installed with Cuda and VS2015 is the UPDATA3 version, then the Dlib_use_cuda will appear after the marquee, you can choose, otherwise you cannot select (OFF).

When you're done, click the Configure,open Project button to open the Dlib project with VS2015.

Depending on the Release/debug and 64/32 bit different options, running the Dlib file can generate different lib files.

Test:

Set up the VS2015 project, you can download the test code on the Dlib website.

Include Directories: Paths to add Dlib and Cuda, (OpenCV path)

Library Directory Installation cuda lib file path (OpenCV path)

The C + + preprocessor adds:

Dlib_png_support
Dlib_jpeg_support
Dlib_jpeg_static
Dlib_use_cuda

Additional Dependencies

Dlib lib file:

Dlib19.7_64.lib

OpenCV in lib file:

Opencv_objdetect2413.lib
Opencv_ts2413.lib
Opencv_video2413.lib
Opencv_nonfree2413.lib
Opencv_ocl2413.lib
Opencv_photo2413.lib
Opencv_stitching2413.lib
Opencv_superres2413.lib
Opencv_videostab2413.lib
Opencv_calib3d2413.lib
Opencv_contrib2413.lib
Opencv_core2413.lib
Opencv_features2d2413.lib
Opencv_flann2413.lib
Opencv_gpu2413.lib
Opencv_highgui2413.lib
Opencv_imgproc2413.lib
Opencv_legacy2413.lib
Opencv_ml2413.lib

Cuda lib File

Cublas.lib
Cublas_device.lib
Cuda.lib
Cudadevrt.lib
Cudart.lib
Cudart_static.lib
Cudnn.lib
Cufft.lib
Cufftw.lib
Curand.lib
Cusolver.lib
Cusparse.lib
Nppc.lib
Nppial.lib
Nppicc.lib
Nppicom.lib
Nppidei.lib
Nppif.lib
Nppig.lib
Nppim.lib
Nppist.lib
Nppisu.lib
Nppitc.lib
Npps.lib
Nvblas.lib
Nvcuvid.lib
Nvgraph.lib
Nvml.lib
Nvrtc.lib
OpenCL.lib

Final Result:

Windows VS2015 + dlib + cuda Environment setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.