Ubuntu16下openface的安装与测试

Ubuntu16安装配置openface

1.        安装准备:

sudo apt-get install build-essential-y 

sudo apt-get install cmake -y 

sudo apt-get install curl -y 

sudo apt-get install gfortran -y 

sudo apt-get install git -y 

sudo apt-get install libatlas-dev -y 

sudo apt-get install libavcodec-dev -y 

sudo apt-get install libavformat-dev-y 

sudo apt-get install libboost-all-dev-y 

sudo apt-get install libgtk2.0-dev -y 

sudo apt-get install libjpeg-dev -y 

sudo apt-get install liblapack-dev -y 

sudo apt-get install libswscale-dev -y 

sudo apt-get install pkg-config -y 

sudo apt-get install python-dev -y 

sudo apt-get install python-pip -y 

sudo apt-get install wget -y

sudo apt-get install zip -y

2.        安装库

sudo pip2 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip2 install scipy -i https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip2 install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip2 install scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple

sudo pip2 install scikit-image -i https://pypi.tuna.tsinghua.edu.cn/simple

3.        安装torch

git clonehttps://github.com/torch/distro.git ~/torch --recursive

cd ~/torch; bash install-deps;

./install.sh

source ~/.bashrc

安装包:

~/torch/install/bin/luarocks installdpnn 

~/torch/install/bin/luarocks installnn 

~/torch/install/bin/luarocks installoptim 

~/torch/install/bin/luarocks installcsvigo 

~/torch/install/bin/luarocks installcunn   

~/torch/install/bin/luarocks install torchx

~/torch/install/bin/luarocks installgraphicsmagick

~/torch/install/bin/luarocks install cutorch

4.        安装opencv:

mkdir -p src

cd src

复制编译好的opencv到目录下。

5.        安装dlib:

下载:https://github.com/davisking/dlib/releases

mkdir -p ~/src 

cd ~/src tar xf dlib-18.16.tar.gz 

cd dlib-18.16/python_examples 

mkdir build 

cd build 

cmake ../../tools/python 

cmake --build . --config Release 

sudo cp dlib.so/usr/local/lib/python2.7/dist-packages

6.        安装openface:

git clone https://github.com/cmusatyalab/openface.git

sudo python2 setup.py install

models/get-models.sh

运行demo2:

./demos/compare.py images/examples/{lennon*,clapton*}

运行demo3:

./demos/classifier.py infermodels/openface/celeb-classifier.nn4.small2.v1.pkl ./images/examples/carell.jpg

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值