人脸识别流程

该博客详细介绍了人脸识别的过程,包括编码阶段,使用128维向量表示人脸,并进行初始的人脸标记,采用5特征点和68特征点模型训练。接着讨论了图像匹配,通过计算两张脸的多维欧氏距离来确定相似度。
摘要由CSDN通过智能技术生成

第一步:编码——将人脸表示为128为的向量

def face_encodings(face_image,known_face_locations=None,num_jitters=1)
     """
     return:128维人脸编码向量
     param face_image:包含人脸图像
     param known_face_locations:是否已知人脸位置
     param num_jitters:计算编码时,重新采样的次数
     """
     raw_landmarks=_raw_face_landmarks(face_image,known_face_locations,model="small")
     return [np.array(face_encoder.compute_face_descriptor(face_image,raw_landmark_set,numjitters)) for  raw_landmark_set in raw_landmarks]

1.1 初始人脸标记

def _raw_face_landmarks(face_image, face_locations=None, model="large"):
        """
        return: 
        face_locations: 人脸位置是否已知
        model: 两种模式,5特征点(small)和68特征点(large)
        """        
        if face_locations is None:
            face_locations=_raw_face_locations(fa
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值