人臉表情分類

2021-08-19 18:58:19 字數 4525 閱讀 4224

第五周。

本次由於不確定網路型別,本次選用googlenetv2,alexnet,darknet19三種網路模型

由於darknet缺少某些功能,本次識別採用caffe。

caffe的高效能伺服器的配置。

tar -xvf opencv.tar.gz

mkdir build

cmake -d cmake_build_type=release -d cmake_install_prefix=/path/to/local ..

make -j24&&make install

tar -zvf boost.tar.gz

./bootstrap.sh

./b2

cp ./lib/* /path/to/local/lib

cp -rf *8 /path/to/local

tar -zvf leveldb.tar.gz

make

cp out-shared/* /path/to/local

cp out-static/* /path/to/local

cp -rf include /path/to/local

tar -zvf g***s.tar.gz

mkdir build&&cd build

cmake -d cmake_build_type_release -d cmake_install_prefix=/path/to/local ..

make&&make install

tar -xvf glog.tz

mkdir build

cd build

cmake -d cmake_build_type_release -d cmake_install_prefix=/path/to/local ..

make&&make install

unzip python.zip

./configure --prefix=/path/to/local

make&&make install

編輯~/.bashrc

新增

export $path=/path/to/local/bin:$path

export $ld_library_path=/path/to/local/include:$ld_library_path

source ~/.bashrc

python --version

若python為2.7則為正確版本

pip安裝:

tar -xvf pip.tar

python setup.py install

pip install numpy
unzip openblas.zip

mkdir build

cd build

cmake -d build_type_release -d cmake_install_prefix=/path/to/local ..

make&&make install

mkdir build

cd build

cmake -d build_type_release -d cmake_install_refix=/path/to/local ..

make&&make install

make

mv mdb/libraries/liblmdb/*so* /path/to/local/lib

mv mdb/libraries/liblmdb/*.h /path/to/local/include

./configure --prefix=/path/to/local

make&&make install

./configure --prefix=/path/to/local

make&&make install

tar -xvf cmake-3.6.tar.gz

mv bin/* /path/to/local/bin

tar -xvf cudnn.bz2

cp include/* /path/to/local/include

cp lib64/* /path/to/local/include

環境變數配置

export path=$home/cmake-3.6/bin:$path

#export path=$home/gcc-build-4.9.4/bin:$path

export path=$home/cuda-7.5/bin:$path

export path=$home/opencv6/bin:$path

export path=$home/opencv6/include:$path

export path=$home/local/bin:$path

export path=$home/local/include:$path

export path=$home/.local/bin:$path

export ld_library_path=$home/cuda-7.5/lib64:$ld_library_path

export ld_library_path=$home/cuda-7.5/lib:$ld_library_path

export ld_library_path=$home/local/lib:$ld_library_path

export ld_library_path=$home/local/lib64:$ld_library_path

export ld_library_path=$home/.local/lib:$ld_library_path

#export ld_library_path=$home/cuda/lib64:$ld_library_path

#export ld_library_path=$home/cuda/include:$ld_library_path

export ld_library_path=$home/opencv6/lib:$ld_library_path

export pkg_config_path=$home/opencv6/lib/pkgconfig:$pkg_config_path

export pkg_config_path=$home/local/lib/pkgconfig:$pkg_config_path

export pkg_config_path=$home/local/lib64/pkgconfig:$pkg_config_path

source ~/.bashrc

配置caffe

cp makefile.config.example makefile.config
use_cudnn := 1前注釋去掉

更改cuda_dir:

cuda_dir := /home/users/zibojia/cuda-7.5
在  -gencode arch=compute_60,code=sm_60 \,

-gencode arch=compute_61,code=sm_61 \,

-gencode arch=compute_61,code=compute_61前面新增注釋

更改blas

blas := open

更改python_include和python_lib:

python_include := /home/users/zibojia/local/include/python2.7 \

/home/users/zibojia/.local/lib/python2.7/site-packages/numpy/core/include

python_lib := /home/users/zibojia/local/lib

更改include_dirs:

include_dirs := $(python_include)  /home/users/zibojia/local/include /home/users/zibojia/opencv6/include  /home/users/zibojia/cuda-7.5/include

library_dirs := $(python_lib) /home/users/zibojia/local/lib /home/users/zibojia/opencv6/lib /home/users/zibojia/cuda-7.5/lib

編譯

make all -j100

make test

make runtest

人臉表情識別

首先我們來了解一下表情識別的相關背景知識以及發展近況。人臉表情是最直接 最有效的情感識別模式。它有很多人機互動方面的應用,例如疲勞駕駛檢測和手機端實時表情識別。早在20世紀ekman等專家就通過跨文化調研提出了七類基礎表情,分別是生氣,害怕,厭惡,開心,悲傷,驚訝以及中立。然而不斷的研究發現這七類基...

人臉識別面部表情

import dlib 人臉識別的庫dlib import numpy as np 資料處理的庫numpy import cv2 影象處理的庫opencv class face emotion def init self 使用特徵提取器get frontal face detector self.d...

輕量化人臉表情識別

1 引言 1.1應用價值 人臉表情識別在人機互動 教育 安防 輔助駕駛 廣告等領域均有廣泛應用,是乙個很有發展前景的方向。目前,僅針對人臉識別的技術相對成熟,表情識別還有很大市場,接下來需要做的是將表情識別運用到實際場景中,將其與現實需求進行良好結合。例如在遊戲製作上面,可以根據人類情感做出實時反映...