Wndows Installing the configuration CPU version of CAFFE-SSD

Source: Internet
Author: User
Tags in python

Configuration environment: WINDOWS-CAFFE-SSD + Windows7 X64 + VS2013 + matlab213a + Anconda2
(CAFFE-SSD Microsoft's official Source code: Link: http://pan.baidu.com/s/1c12xAgw password: Vurt. NuGet will automatically configure the required libraries for CAFFE-SSD)
Installed on the CPU, so there is no need to install Cuda and CUDNN.

1 do not download 3rdparty. 3rd party dependencies required by CAFFE-SSD is automatically resolved via NuGet.

2 Copy./windows/commonsettings.props.example to./windows/commonsettings.props. Commonsettings.props is the configuration file for Caffe-windows, now to modify Commonsettings.props:
1) because the WINDOWS-CAFFE-SSD is installed on the CPU. Therefore, set Cpuonlybuild to True and Usecudnn to false.

2) Compile Pycaffe. Set Pythonsupport to True. To install the required libraries for Pycaffe:
Pip install numpy scipy matplotlib scikit-image protobuf # When ANAONDA2 is installed, only PROTOBUF is not installed.
Set the root path of Python: <PythonDir>E:\Ly\Software\Anaconda</PythonDir>
After compiling the WINDOWS-CAFFE-SSD, copy the Pycaffe/caffe to Python lib/site-packages.

3) Compile Matcaffe:set Matlabsupport to True.
Set the root path for MATLAB: <MatlabDir>E:\Ly\Software\MATLAB2013a</MatlabDir>
<includepath>$ (Matlabdir) \extern\include;$ (matlabdir) \toolbox\distcomp\gpu\extern\include;$ (IncludePath) </IncludePath>
(FIX: Unable to open include file: "Gpu/mxgpuarray.h": No such file or directory.)
As with Python, after compiling WINDOWS-CAFFE-SSD, you also need to set the Caffe path for MATLAB.

4) Do not copy all the files under Ssd_new, using the original source code WINDOWS-CAFFE-SSD to compile. But copy the 3rdparty folder under Ssd_new/src/caffe to the Rc/caffe of Microsoft CAFFE-SSD; Copy the 3rdparty folder under Include/caffe to the Include/caffe under Microsoft CAFFE-SSD.

3 Open the./windows/caffe.sln with VS2013.
Compiles the entire project at compile time. You can also choose to compile, compile Libcaffe first, and then compile Matcaffe and Pycaffe.
1) Before build, change the solution to release version and set the platform to x64 (Configuration Manager). Mister into a solution, just compile.
2) Item---Properties->c/c++ general, change the "Warning as error" option to "no". FIX: "Failed to generate an object file (warning is treated as an error)".

Compile (build Solution), the Microsoft version of Caffe will be compiled to complete NuGet download related dependent libraries, after completion, you will find in the Caffe source directory of the previous level of a folder named Nugetpackages. Because it was generated when compiling Caffe, the build is not regenerated!!!

Direct compilation through, no error.
The build file is generated in the Caffe directory after compilation.

(Also, you don't need to add the Ssd_detect.cpp file to the classification project under the solution, like you said on the Web, and then compile it.) Microsoft's CAFFE-SSD has been set ssd_detec.cpp under EXAMPLES\SSD. Ssd_ The detec.cpp has been classification.cpp modified and has been compiled and generated ssd_detect.exe when compiling the entire project.

4 Configuring Matcaffe
Open matlabr2013a and add the generated Matcaffe folder to the MATLAB search path.
>>>pathtool
Click Add Folder in the window that opens, adding the Matcaffe file path. That is E:\Ly\Office\caffe-ssd-microsoft\Build\x64\Release\matcaffe.
Or add E:\Ly\Office\caffe-ssd-microsoft\Build\x64\Release to the system environment variable

5 Configuring Pycaffe
Copy the Caffe folder under the E:\Ly\Office\caffe-ssd-microsoft\Build\x64\Release\pycaffe folder to the Site-packge directory in Python. That is, path E:\Ly\Software\Anaconda\Lib\site-packages.

Finally, restart your computer to use Matcaffe and Pycaffe.

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.