This project realizes the deepid2 (a face verification framework) in c++, which is efficient and lightweight.
- opencv
- boost
- prerequisites for the successful installation of caffe
plz refer to the above prerequisites' project page to install them.
- git clone --recursive https://git.coding.net/jiajianzju/FaceVerification.git
- cd $FACE_ROOT
- git submodule update --remote algorithm/caffe
- cd algorithm/caffe
- cp Makefile.config.bak Makefile.config
- make all -j8
If you encounter the problem 'caffe.pb.h:This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc.', you can solve it via the following commands:
- protoc src/caffe/proto/caffe.proto --cpp_out=.
- cp src/caffe/proto/caffe.ph.h include/caffe/proto
If you encounter the problem 'pyconfig.h: No such file or directory', you can solve it via the following commands:
- vim ~/.bashrc
- add a line export CPLUS_INCLUDE_PATH=/usr/include/python2.7:$CPLUS_INCLUDE_PATH in the end of the file
- source ~/.bashrc
Or if you encounter the problem 'nccl.h: No such file or directory', you can solve it via the following solution:
- install nccl according to http://www.nvidia.com/object/caffe-installation.html
After you make caffe successfully, continue with the following commands:
- cd algorithm/libdeepid2
- make all
- vim ~/.bashrc
- add a line export LD_LIBRARY_PATH=$FACE_ROOT/algorithm/caffe/build/lib:$LD_LIBRARY_PATH in the end of the file
- source ~/.bashrc
Then you can run generated demo in the directory algorithm/libdeepid2. Here $FACE_ROOT is the root directory of the project.