Category Archives: Blog

Installing Caffe on Linux

First download caffe from github:

$> git clone https://github.com/BVLC/caffe.git
$> cd caffe
$> cp Makefile.config.example Makefile.config

Edit Makefile.config
Make a copy of Makefile.config
Make the following changes to Makefile.config:
Uncomment: CPU_ONLY := 1
Uncomment the right PYTHON_INCLUDE path. If you have anaconda installed, uncomment the anaconda path for PYTHON_INCLUDE and PYTHON_LIB

Compile:
make clean
make all
make test
make runtest

You might encounter the following error during make runtest:
Error loading shared library libhdf5_hl.so.xx
In such a case, look for libhdf5_hl.so.xx in /usr/lib/x86_64-linux-gnu. If you do not find the correct version .xx and instead .yy, just copy .yy to .xx in the same folder. And it should run. For example, you might have the .7 version but your current caffe installation is looking for .8 version such as the listing shown below:
This is what exists:
/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7
/usr/lib/x86_64-linux-gnu/libhdf5.so.7

Copy above files to the following:
/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.8
/usr/lib/x86_64-linux-gnu/libhdf5.so.8

And you are good to go :)

Common property sheet in VC++

This is something I found recently. If you have common properties that you want to use for multiple projects in VC++, you can use the property sheet. For example, the include libraries of opencv are the same for all opencv related projects. So when you make a new project, you dont have to include the opencv include libraries again manually. You can just import the property sheet into your project and work from there. Here are the steps to create and import the property sheet.

Continue reading