安装及运行openface的大坑

安装及运行openface的大坑

我是按照教程:

http://blog.youkuaiyun.com/itas109/article/details/50790139

一步一步做的,编译demo的时候遇见了若干蛋疼的错误:

错误1:运行demo中的compare.py程序时报错 /usr/bin/env: ‘python2\r’: No such file or directory

大概是这样,百度+google+stackoverflow都没有,最后才知道,是因为程序在windows下生成的,需要改为unix编码:

dos2unix compare.py

即可


错误2: 运行compare.py 报错 /usr/bin/env: th: No such file or directory

这个错误是因为安装torch时,用的sudo安装的,导致使用torch权限有些问题,采用超级帐号运行程序即可。

错误3:Exception: Unable to load image: ./images/examples/lennon*

如果按照demo中给的命令:./demos/compare.py images/examples/{lennon*,clapton*}会出现如下报错

Traceback (most recent call last):
File "./compare.py", line 99, in
d = getRep(img1) - getRep(img2)
File "./compare.py", line 68, in getRep
raise Exception("Unable to load image: {}".format(imgPath))
Exception: Unable to load image: ./images/examples/lennon*

两种原因:
1. demo中给出的图片路径是有问题的,检查改为正确路径,若当前路径在openface下,则该为:
./demos/compare.py ./images/examples/{lennon*,clapton*}
2. 路径输入:{lennon*,clapton*} 之间不能有空格,{lennon*, clapton*} 是错误的


最后,截图compare.py 的运行结果:
运行结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值