Configure Caffe in one hour for Windows users.
Clone or download
Latest commit 967eedf Jul 15, 2018
Permalink
Failed to load latest commit information.
cmake Merge branch 'master' of https://github.com/bvlc/caffe into ms Aug 8, 2017
data Support spaces in path when downloading ILSVRC12 and MNIST Jul 27, 2016
docker Docker update to cuDNN 6 Apr 14, 2017
docs Merge pull request #5753 from CDLuminate/docs-update-deb-ub Aug 3, 2017
examples Merge branch 'master' of https://github.com/bvlc/caffe into ms Aug 8, 2017
include/caffe slope conv Jul 15, 2018
matlab lost two functions in the list Aug 10, 2017
models BVLC -> BAIR Apr 14, 2017
python >> to > > Jul 19, 2017
scripts Merge branch 'master' of https://github.com/bvlc/caffe into ms Jun 7, 2017
src slope conv Jul 15, 2018
tools Remove cudnn layers copied from nvidia-caffe. They are very slow. Aug 15, 2017
windows remove mxnet projects Jun 17, 2018
.Doxyfile update doxygen config to stop warnings Sep 3, 2014
.gitattributes Add support for windows build Feb 11, 2016
.gitignore Merge branch 'master' of https://github.com/bvlc/caffe into ms Jan 24, 2017
.travis.yml Stop setting cache timeout in TravisCI Jul 27, 2016
CMakeLists.txt Update CMakeLists.txt Jun 24, 2017
CONTRIBUTING.md [docs] add CONTRIBUTING.md which will appear on GitHub new Issue/PR p… Jul 30, 2015
CONTRIBUTORS.md BVLC -> BAIR Apr 14, 2017
FAQ.md Create FAQ.md Mar 13, 2017
INSTALL.md installation questions -> caffe-users Oct 19, 2015
LICENSE copyright spans 2014-2017 Jan 19, 2017
Makefile Update Makefile Sep 27, 2017
Makefile.config.example Add Pascal CUDA architectures to Makefile.config.example Feb 9, 2017
README.md Update README.md May 25, 2018
appveyor.yml Remove optimization in Appveyor build Mar 28, 2016
caffe.cloc [fix] stop cloc complaint about cu type Sep 4, 2014
plot_loss.m refact normalize Dec 7, 2016

README.md

Caffe

License

Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR)/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 2015, CUDA 9.0, third party libraries: Baidu Yun or Google Drive. Please extract the archive into ./windows/thirdparty/. Then, add the folder ./windows/thirdparty/bins to the environment variable PATH.

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.

CUDA

Download CUDA Toolkit 8.0 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 & UseNCCL to false.

cuDNN

Download cuDNN v5 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 built solution with Python support, in order to use it you have to either:

  • set PythonPath environment variable to point to <caffe_root>\Build\x64\Release\pycaffe, or
  • copy folder <caffe_root>\Build\x64\Release\pycaffe\caffe under <python_root>\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 built solution with Matlab support, in order to use it you have to add the ./matlab folder to 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 BAIR/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}
}