安装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成功。运行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