SeetaFace Engine is an open source C++ face recognition engine,which can run on cpu with no third-party dependence. It contains three key parts,i.e.,SeetaFace Detection,SeetaFace Alignment and SeetaFace Identification,which are necessary and sufficient for building a real-world face recognition applicaiton system.
1.下载
git clone https://github.com/seetaface/SeetaFaceEngine.git
2.安装cmake工具
CMake 3.1.0 or higher is required
ubunut14.04自带的cmake版本太低,可以去官网自行下载安装
3.编译FaceDetection
进入FaceDetection路径下
mkdir linux
进入linux文件夹下面
cmake ..
make
4.编译FaceIdentification
进入FaceIdentification路径下
拷贝FaceDetection include下的face_detection.h 到include下面
mkdir linux
修改CMakeLists.txt
同时将FaceDetection 生成的libseeta_facedet_lib.so 放在新建的linux文件夹下面
进入到linux文件夹
cmake ..
make
生成fa_test
执行效果如下:
5.编译FaceIdentification
进入FaceIdentification路径下
(1)修改src/test/CMakeLists.txt
添加前两个项目生成的so
12 add_executable(${BIN} ${f})
13 target_link_libraries(${BIN} viplnet ${OpenCV_LIBS})
14 target_link_libraries(${BIN} viplnet ${OpenCV_LIBS} /root/1xiu/face/SeetaFaceEngine-master/FaceIdentification/linux/libseeta_facedet_lib.so)
15 target_link_libraries(${BIN} viplnet ${OpenCV_LIBS} /root/1xiu/face/SeetaFaceEngine-master/FaceIdentification/linux/libseeta_fa_lib.so)
(2)拷贝FaceDetection include下的face_detection.h 和FaceIdentification include下面的face_alignment.h到FaceIdentification的include下面
(3)新建文件夹linux
进入到linux
cmake ..
make
生成src/test/test_face_verification.bin
在实际执行测试的时候需要修改*test.cpp,
将比对的文件修改为命令行输入
执行结果如下:
./src/test/test_face_verification.bin ../../FaceDetection/pic2.jpg ../../FaceDetection/pic3.jpg
0.700385
原文链接:https://www.f2er.com/ubuntu/355586.html