Openface人脸朝向和注意力检测

第四周。

Openface是一个开源库支持人脸关键点检测,人脸朝向和视线估计。

Openface人脸朝向和注意力检测_第1张图片

Openface怎么安装呢?

更新

sudo apt-get update

sudo apt-get install build-essential

安装cmake

sudo apt-get install cmake

安装openblas

sudo apt-get install libopenblas-dev liblapack-dev

安装opencv依赖

sudo apt-get install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev 
sudo apt-get install python-numpy libtbb2 libtbb-dev 
sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev checkinstall

安装opencv依赖

wget https://github.com/opencv/opencv/archive/3.4.0.zip
sudo unzip 3.4.0.zip
cd opencv-3.4.0
mkdir build
cd build

编译

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_SHARED_LIBS=OFF ..

两线程编译

make -j2

安装

sudo make install

安装Boost

sudo apt-get install libboost1.55-all-dev

下载Openface

git clone https://github.com/TadasBaltrusaitis/OpenFace.git

编译

cd OpenFace
mkdir build
cd build
cmake -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -I/usr/include/libcxxabi" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++ -lc++abi" -D CMAKE_BUILD_TYPE=RELEASE ..
make

测试多个视频

./bin/FaceLandmarkVid -f "../samples/changeLighting.wmv" -f "../samples/2015-10-15-15-14.avi"

图片

./bin/FaceLandmarkImg -fdir "../samples/" -wild

多个脸的视频

./bin/FaceLandmarkVidMulti -f ../samples/multi_face.avi

你可能感兴趣的:(Openface人脸朝向和注意力检测)