Description: Most of the masterpieces reproduced in Initialneil Caffe + vs2013 + OpenCV in Windows Tutorial (I) –setup
Preparatory work:
1. Download cuda7.5:https://developer.nvidia.com/cuda-downloads, the variable will be created automatically when the installation is complete cuda_path_v7_5
2. Download boost1.56:http://sourceforge.net/projects/boost/files/boost-binaries/1.56.0/, select boost_1_56_0- Msvc-12.0-64.exe, manually create environment variables after installation is complete BOOST_1_56_0
3. Download opencv3.0.0:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0.0/, manually create environment variables after installation is complete opencv_3_0_ 0
The above software except OPENCV must use 3.0, the other uses the similar version does not matter
4. Environment variables must be restarted to take effect after setting
5. Download Initialneil written vs2013 under Build Caffe project: https://github.com/initialneil/caffe-vs2013
6. Download Caffe Other third-party libraries to use: HTTP://22A088.L67.YUNPAN.CN/LK/CCWF2ZGE3TYFB (extract code: 6147), then replace the previous VS Project 3rdparty folder
Compile:
1. Because there is a problem with the proto version in this project, run the Generatepb.bat under the Xx\caffe-vs2013-master\caffe\src\caffe\proto folder before compiling to regenerate Caffe.pb.h and caffe_pretty_print.pb.h, or the subsequent parsing prototxt file will be error.
2. Edit Caffe-vs2013-debug.props and Caffe-vs2013-release.props, and replace the contents of the environment variables with your own, cuda_path_v7_5, Boost_1_56_0, Opencv_3_0_0 or something like that. Then change the sentence of Compute_50,sm_50 50 to 20 (the number is related to the GPU architecture, for Maxwell, and for Fermi, and for Kepler).
3. Open Caffe-vs2013.sln, you can see three projects in Caffe, Test-mnist and Train-mnist. If Caffe display load failed, right click Edit Caffe.vcxproj, the environment variables are also set to their own, is generally CUDA6.5 changed to 7.5 good.
4. Set the build option to release+x64, set the configuration type of the Caffe project property to application (. exe), and then right-click to compile, it should be successful. The Caffe.exe is generated under the Build/x64/release folder in the project directory, but it cannot be run and the DLL is missing.
5. Both the header file and the static library are set in the props file, and the dependent dynamic libraries need to be placed in the system path themselves. Put the Xx\opencv\build\x64\vc12\bin directory under Opencv_ffmpeg300_64.dll, Opencv_world300.dll and 3rdparty\bin\x64\ All DLLs of the release directory are placed in the Caffe.exe directory, and then run Caffe.exe should be ready.
6. Then change the configuration type to lib to generate a static library to call, change to DLL is a dynamic library, Release/debug, win32/x64 all their own pick, pay attention to choose dependent DLL different on the line
Test Test on MNIST:
1. Go to ' caffe/data/mnist ' folder and run 'get_mnist.bat ' to fetch the dataset for Mnist.
2. Go to ' caffe/examples/mnist ' folder and run 'create_mnist-leveldb.bat ' to convert mnist datasets to Lev ELDB format.
3. Run 'Train_lenet-leveldb.bat ' to start the training.
Note here the proto version of some old, the new prototxt to change their own to use, in fact, is very simple, that is, each layer of the type attribute from a small write to uppercase is good.
So much for the pits I've stepped on myself to record first.
Configuring Caffe under Windows (Environment: win7+vs2013+opencv3.0)