• 小谭谭
    2019-03-22
    TypeError Traceback (most recent call last)
    <ipython-input-23-53972d9633c8> in <module>()
          6 img = align_image(img)
          7 # 数据规范化
    ----> 8 img = (img/255. ).astype(np.float32)
          9 # 人脸特征向量
         10 embedded[i] = nn4_small2_pretrained.predict(np.expand_dims(img, axis=0))[0]

    TypeError: unsupported operand type(s) for /: 'NoneType' and 'float

    老师,有错呀,咋办。人脸识别的数据规范化的地方
    展开

    作者回复: 输出一下 img,看看是不是不是咱们一开始的人脸图像了?

    
     1
  • James-Pang
    2019-12-27
    老师,win10下安装dlib总是报错,怎么解决?
    
    
  • Geek_49e793
    2019-12-13
    老师您好,我在做练习的时候。这句 from align import AlignDlib 报错,提示ImportError: cannot import name 'AlignDlib' from 'align'
    我的环境是python3.7 , align也安装过了。请问是要安装openface才可以吗?还是说版本问题?新版本align已经没有AlignDlib了?
    
    
  • Kevin
    2019-06-07
    csv格式的预训练模型转化成h5格式,是怎么做的呀?
    
    
  • Yafei
    2019-05-16
    def load_image(path):
        img = cv2.imread(path, 1)
        return img[...,::-1]

    def load_image1(path):
        img = cv2.imread(path)
        return cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

    这两种方式有啥区别吗?我用numpy.array_equal()去比较这两种方法加载的同一张图,返回True,但是在调用getLargestBoundingBox()时,上面两种方法返回的图确结果不一样。load_image()方法得到的图提示
    “Warning: Unsupported image type, must be 8bit gray or RGB image.” 而且没有得到相应的人脸bounding box. 真是费解,还望老师解答下。
    展开
    
    
我们在线,来聊聊吧