insightFace 复现以及问题汇总

首先,insightface的代码是基于python 2.7的,所以3.0的版本会有很多问题,以下是问题汇总。

使用insightFace见https://zhuanlan.zhihu.com/p/33750684

问题汇总:

1.没有装easydict:

2.nameError:python3中没有xrange,将所有的xrange替换为range.

3.UnicodeDecodeError: 'ascii' codec can't decode byte

python 2.0中的方法:

import sys

if sys.getdefaultencoding() != 'utf-8':
    reload(sys)
    sys.setdefaultencoding('utf-8')

3.0中的方法:

各种百度,都没有。

https://blog.csdn.net/qq_41185868/article/details/79039604中提到了一个方法。

所以试着加上encoding='bytes'

有用!!!

---------------------------------------------------------------------------------------------------------------------------------------------------------

好吧,还是有问题,换成python2.0的。

1.Traceback (most recent call last): File "/usr/bin/pip3", line 9, in

https://blog.csdn.net/cow66/article/details/80069309

 

你可能感兴趣的:(深度学习)