Ubuntu16.04下openface安装

安装openface的前三步都是按照这个博客的进行的  链接:http://www.linuxdiyf.com/linux/20268.html

第四步:安装torch按照官网进行    

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh

source ~/.bashrc

启动方式1
这是已经可以启动了torch了,启动命令为th

第二种启动方式
首先安装 sudo apt-get install luajit
然后用命令luajit -ltorch启动

关闭torch
用命令: os.exit()

安装torch的包(packages),如nn和dpnn



安装opencv
这一步比较麻烦
我早torch下面建立个文件夹
root@zpj-HP-xw4550-Workstation:~/torch# mkdir -p src
 root@zpj-HP-xw4550-Workstation:~/torch# cd src 
下载opencv2.4.11,并复制到当前路径
然后unzip unzip  opencv-2.4.11.zip 

cd  opencv-2.4.11  
mkdir  release  
cd  release  
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make  -j8 

make  install
ok,安装完成。
检验是否安装成功
进入到python
import cv2 #如果成功,就表明安装opencv成功。

6、安装dlib

把下载的
dlib-18.17.tar.bz2放到了~/torch/src下面
然后,按下面的步骤进行操作
  1. mkdir -p ~/src  
  2. cd ~/src
  3. tar xf dlib-18.17.tar.bz2  
  4. cd dlib-18.16/python_examples  
  5. mkdir build  
  6. cd build  
  7. cmake ../../tools/python  
  8. cmake --build . --config Release  
  9. cp dlib.so /usr/local/lib/python2.7/dist-packages
python
import dlib,成功!

7、Git获取openface

a.下载Openface
root@zpj-HP-xw4550-Workstation:~# git clone https://github.com/cmusatyalab/openface.git

root@zpj-HP-xw4550-Workstation:~/openface# sudo python2 setup.py install

b、获取模型
root@zpj-HP-xw4550-Workstation:~/openface# models/get-models.sh

8、运行demo

运行demo1:

root@zpj-HP-xw4550-Workstation:~/openface# ./demos/compare.py images/examples/{lennon*,clapton*}

运行demo2:
root@zpj-HP-xw4550-Workstation:~/openface# ./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pkl ./images/examples/carell.jpg

运行第三个模块时,发现错误
   错误1:ImportError: No module named txaio
    sudo pip install txaio

错误2: ImportError: No module named twisted.python.failure
sudo apt-get install python-twisted

错误3:ImportError: No module named autobahn.twisted.websocket
root@zpj-HP-xw4550-Workstation:~/openface# pip install autobahn
同理如下
root@zpj-HP-xw4550-Workstation:~/openface# pip install autobahn[twisted,accelerate,compress,serialization]
root@zpj-HP-xw4550-Workstation:~/openface# sudo pip install imagehash








评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值