人脸特征点检测——基于Face_Recognition库

1.Face_Recognition库介绍

        face_recognition基于dlib进行了二次封装,号称世界上最简洁的人脸识别库。

        (1)github地址:

        https://github.com/ageitgey/face_recognition

        (2)官方指南:

        Face Recognition — Face Recognition 1.4.0 documentation

2.load_image_file方法

        主要用于加载要识别的人脸图像,加载返回的数据是Numpy数组。记录了图片的所有像素的特征向量。

 源码:

def load_image_file(file, mode='RGB'):
    """
    Loads an image file (.jpg, .png, etc) into a numpy array

    :param file: image file name or file object to load
    :param mode: format to convert the image to. Only 'RGB' (8-bit RGB, 3 channels) and 'L' (black and white) are supported.
    :return: image contents as numpy array
    """
    im = PIL.Image.open(file)
    if mode:
        im = im.con
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值