Caffe on both Linux and Windows
Перейти к файлу
Sasa Galic d7b4e744c9 Merge caffe/windows@{2016-03-08} into master 2016-03-08 10:15:59 -08:00
cmake
data
docker
docs
examples
include/caffe
matlab
models
python
scripts
src
tools
windows
.Doxyfile
.gitattributes
.gitignore
.travis.yml
CMakeLists.txt
CONTRIBUTING.md
CONTRIBUTORS.md
INSTALL.md
LICENSE
Makefile
Makefile.config.example
README.md
appveyor.yml
caffe.cloc

README.md

Caffe

Travis Build Status Travis (Linux build)

[AppVeyor Build Status] (https://ci.appveyor.com/project/pavlejosipovic/caffe-3a30a) AppVeyor (Windows build)

License

Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by the Berkeley Vision and Learning Center (BVLC) and community contributors.

Check out the project site for all the details like

and step-by-step examples.

Windows Setup

Requirements: Visual Studio 2013

Pre-Build Steps

Copy .\windows\CommonSettings.props.example to .\windows\CommonSettings.props

By defaults Windows build requires CUDA and cuDNN libraries. Both can be disabled by adjusting build variables in .\windows\CommonSettings.props. Python support is disabled by default, but can be enabled via .\windows\CommonSettings.props as well. 3rd party dependencies required by Caffe are automatically resolved via NuGet.

CUDA

Download CUDA Toolkit 7.5 from nVidia website. If you don't have CUDA installed, you can experiment with CPU_ONLY build. In .\windows\CommonSettings.props set CpuOnlyBuild to true and set UseCuDNN to false.

cuDNN

Download cuDNN v3 or cuDNN v4 from nVidia website. Unpack downloaded zip to %CUDA_PATH% (environment variable set by CUDA installer). Alternatively, you can unpack zip to any location and set CuDnnPath to point to this location in .\windows\CommonSettings.props. CuDnnPath defined in .\windows\CommonSettings.props. Also, you can disable cuDNN by setting UseCuDNN to false in the property file.

Python

To build Caffe Python wrapper set PythonSupport to true in .\windows\CommonSettings.props. Download Miniconda 2.7 64-bit Windows installer [from Miniconda website] (http://conda.pydata.org/miniconda.html). Install for all users and add Python to PATH (through installer).

Run the following commands from elevated command prompt:

conda install --yes numpy scipy matplotlib scikit-image pip
pip install protobuf

Remark

After you have build solution with Python support, in order to use it you have to either:

  1. set PythonPath environment variable to point to <caffe_root>\Build\x64\Release\pycaffe
    or
  2. cp –r <caffe_root>\Build\x64\Release\pycaffe\caffe $PYTHON_DIR\lib\site-packages

Matlab

To build Caffe Matlab wrapper set MatlabSupport to true and MatlabDir to the root of your Matlab installation in .\windows\CommonSettings.props.

Remark

After you have build solution with Matlab support, in order to use it you have to set the generated matcaffe folder in the Matlab search path.

Build

Now, you should be able to build .\windows\Caffe.sln

License and Citation

Caffe is released under the BSD 2-Clause license. The BVLC reference models are released for unrestricted use.

Please cite Caffe in your publications if it helps your research:

@article{jia2014caffe,
  Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
  Journal = {arXiv preprint arXiv:1408.5093},
  Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
  Year = {2014}
}