环境
Ubuntu 16.04
opencv 2.4.13.2
seetaface Detection installation [email protected]
step 0
没有装opencv的先装opencv
参考
https://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html
opencv2.4 确定可用
step 1
安装seetaface
seetaface在github的仓库中有源码 git clone 到本地以后
会发现有三个子仓库,三个需要分别make 按照官方给的.md的说明就可以
error1
seetaface Detection编译的过程中可能会遇到这种错误
/usr/bin/ld: cannot find -lopencv_dep_cudart
参考[1]
pi@pi:~/projects/seetaface/SeetaFaceEngine/FaceDetection/build$ cmake ..
-- C++ support has been enabled by default.
-- Use SSE
-- Use OpenMP
-- Build with examples.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/projects/seetaface/SeetaFaceEngine/FaceDetection/build
pi@pi:~/projects/seetaface/SeetaFaceEngine/FaceDetection/build$ make -j${nproc}
[ %] Built target seeta_facedet_lib
[ %] Linking CXX executable facedet_test
/usr/bin/ld: cannot find -lopencv_dep_cudart
collect2: error: ld returned exit status
CMakeFiles/facedet_test.dir/build.make:: recipe for target 'facedet_test' failed
make[]: *** [facedet_test] Error
CMakeFiles/Makefile2:: recipe for target 'CMakeFiles/facedet_test.dir/all' failed
make[]: *** [CMakeFiles/facedet_test.dir/all] Error
Makefile:: recipe for target 'all' failed
make: *** [all] Error
pi@pi:~/projects/seetaface/SeetaFaceEngine/FaceDetection/build$
解决方法
可能出现/usr/bin/ld: cannot find -lopencv_dep_cudart
解决方法,在执行cmake的时候加入下面的参数CUDA_USE_STATIC_CUDA_RUNTIME=OFF,例如cmake -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF ..
error2
编译完成以后运行
cd img
wget http://xx./1.jpg
cd ..
./build/facedet_test img/jpg ./model/seeta_fd_frontal_v1.bin
的时候可能会出现别的问题
(gedit:9625): Gtk-WARNING **: cannot open display: localhost:10.0
检查一下是不是自己vnc的问题
再看看是不是用的screen
切换到vnc的shell运行 不要用screen
如果还没有解决 参考[[2]]
(https://superuser.com/questions/310197/how-do-i-fix-a-cannot-open-display-error-when-opening-an-x-program-after-sshi)
error3
编译文件的默认环境是PC,而在ARM平台上,比如TX1运行的时候会出现编译错误:
c++: error: unrecognized command line option ‘-msse4.1’
这是由于CmakeList.txt文件中默认开启了对Intel的SSE支持(参考[3])
解决方案
编辑CMakeLists.txt
找到SSE支持 关闭
USE_SSE:BOOL=OFF
rm -r build 重新编译
恩…安装完成
reference
http://m.blog.csdn.net/u012336567/article/details/52746024