ubuntu16.04编译seetaface

本文大部分内容来自:
http://www.cnblogs.com/makefile/p/6059833.html

http://blog.youkuaiyun.com/u013718481/article/details/52994346?locationNum=15&fps=1
侵删。
该编译测试过程作为记录备忘。

1,下载seetaface源码

git clone https://github.com/seetaface/SeetaFaceEngine.git

2、安装opencv

sudo apt-get install libopencv-dev

3、升级cmake

sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake

4、安装解压工具

sudo apt-get install unrar

5,编译facedetection

mkdir ~/seeta/seetaface
将下载文档中FaceDetection,FaceAlignment,FaceiDentification三个文件夹负责到~/seeta/seetaface
cd ~/seeta/seetaface/FaceDetection/

#新建一个build文件夹
mkdir build
cd build
cmake ..
sudo make -j4

6、测试facedetection
在当前目录下有一个facedet_test文件

#命令原型是./facedet_test image_path model_path

./facedet_test ../data/0_1_1.jpg ../model/seeta_fd_frontal_v1.0.bin

7、编译facealignment

cd ~/seeta/seetaface/FaceAlignment
mkdir build
cd build
cmake ..
#将FaceDetection/include/face_detection.h和
#FaceDetection/build/libseeta_facedet_lib_so分别拷贝到
#FaceAlignment/include和FaceAlignment/build目录下

#将FaceAlignment/src/cfan.cpp里面所有的isnan修改成std::isnan
sudo make -j4

8、测试facealignment
编译成功,但测试提示‘段错误’,应该是模型或者图片路径出错,因该模块不需单独使用,暂时不管了。

9、编译faceidentification

cd ~/seeta/seetaface/FaceIdentification
mkdir build
cd build

将libseeta_facedet_lib.so,libseeta_fa_lib.so拷贝到~/seeta/seetaface/FaceIdentification/build目录下

将face_alignment.h,face_detection.h拷贝到~/seeta/seetaface/FaceIdentification/include目录下

在src/test/CMakeLists.txt文件循环前添加link_directories(${PROJECT_BINARY_DIR})

修改src/test/CMakeLists.txt,将
  add_executable(${BIN} ${f})
  target_link_libraries(${BIN} viplnet ${OpenCV_LIBS} )
修改为:
  add_executable(${BIN} ${f})
  target_link_libraries(${BIN} viplnet ${OpenCV_LIBS} seeta_facedet_lib seeta_fa_lib)

将model目录中的模型解压
unrar  x  seeta_fr_v1.0.part1.rar


cmake .. 
sudo make -j4 
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值