Caffe
Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR) and by community contributors. Check http://caffe.berkeleyvision.org/ for more information.
Installation
- For basic installation, follow the link http://caffe.berkeleyvision.org/installation.html
- Here we recommend setting up the environments using docker: https://github.com/BVLC/caffe/tree/master/docker While official Caffe docker may exist several environment errors during compiling, you can either fixed these errors and commit a new one for your own docker or you can choose a third party released one. Here is the docker hub repositories recommended: https://hub.docker.com/r/kaixhin/cuda-caffe, and you need to pull the specified tag you needed: https://hub.docker.com/r/kaixhin/cuda-caffe/tags, here is the docker pull example:
docker pull kaixhin/cuda-caffe:7.5
Basic Usage
- Clone Caffe repository:
https://github.com/BVLC/caffe.git
- Compile Caffe:
cd $CAFFE_ROOT
cp Makefile.config.example Makefile.config
vim Makefile.config
make -j8
Here are three interfaces for usage:Command Line, matcaffe and pycaffe. http://caffe.berkeleyvision.org/tutorial/interfaces.html
Matcaffe
If you want to use matcaffe, please specify the MATLAB_DIR in Makefle.config, then build matcaffe after building caffe:
cd $CAFFE_ROOT
make matcaffe
Pycaffe
Similarly, for pycaffe, build pycaffe after building caffe, add the module directory to your $PYTHONPATH by export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH or the like for import caffe
cd $CAFFE_ROOT
make pycaffe
Useful Links
- Tutorial: http://caffe.berkeleyvision.org/tutorial
- Model zoo: http://caffe.berkeleyvision.org/model_zoo.html
- Matcaffe example: https://github.com/BVLC/caffe/blob/master/matlab/demo/classification_demo.m
- Pycaffe example: http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/00-classification.ipynb