[深度学习]python人脸识别库face_recognition使用教程(代码片段)

落痕的寒假 落痕的寒假     2023-04-15     793

关键词:

Python人脸识别库face_recognition使用教程

face_recognition号称是世界上最简单的开源人脸识别库,可以通过Python或命令行识别和操作人脸。face_recognition提供了十分完整的技术文档和应用实例,人脸识别初学者建议研究该库上手。face_recognition的官方代码仓库为:face_recognition。face_recognition也有自己的官方中文文档,该文档详情见:face_recognition中文使用说明

本文所有的代码和大部分测试图像来自于face_recognition官方代码仓库的examples文件夹。实际使用建议看看官方文档的函数接口说明face_recognition函数接口

face_recognition中的人脸识别模型来自开源的机器学习库Dlib,Dlib的官方代码仓库见:dlib。大部分模型用Labeled Faces in the Wild人脸数据集进行测试,有高达99.38%的准确率。但对小孩和亚洲人脸的识别准确率尚待提升。Labeled Faces in the Wild是美国麻省大学安姆斯特分校(University of Massachusetts Amherst)制作的人脸数据集,该数据集包含了从网络收集的13,000多张面部图像。该数据集算是一个非常小型的人脸数据集。

总体而言这个项目的人脸识别模型是基于成年人的,在孩子身上效果可能会一般。face_recognition一般学习代码使用或者研究源代码比较好,离工程应用还是有一定的距离。

某些网站会判定本文人脸图片违规,这是网站识别算法自身问题。本文所有算法展示效果和代码见:

github: Python-Study-Notes


1 face_recognition安装与相关知识

face_recognition支持linux,mac和windows系统,推荐linux系统使用face_recognition。安装face_recognition库之前需要安装dlib的python库。dlib的python库具体安装说明见:[常用工具] dlib编译调用指南中的第四节。注意windows下的dlib库安装不那么容易,多查查文档。

当dlib安装好后,输入以下命令安装face_recognition。

pip install face_recognition

人脸识别通用流程一般有人脸检测,人脸对齐和人脸识别三步:

  • 1 人脸检测/人脸定位 face detection and location:人脸检测就是在图片中找到人脸的具体位置,并输出包含人脸位置的边界矩形框。某些检测算法可以同时输出人脸相应的关键点。
  • 2 人脸对齐 face alignment:所谓的人脸对齐就是有时候人脸的角度不正,根据关键点检测结果通过图像变换或其他方法,将人脸上对准到一个预设的固定位置上(通常是正脸)。这样使得不同人脸的眼睛,鼻子都被放在同一个位置,大大提高识别精度。
  • 3 人脸识别 face recognition:人脸识别有很多应用方向,但是目的都是识别当前人脸对应哪个人。

简单的人脸识别通用流程示意图如下图所示。在face_recognition中所有代码都有涉及这些步骤;但是人脸对齐是直接调用dlib代码,没有实例说明。

当然在成熟的商业工程应用不只有这三个部分,比如还有人脸质量判断,活体检测之类的,但是一般的项目都包含这三大步骤。关于人脸识别的更多介绍见:https://www.cnblogs.com/xiaoyh/p/11874270.html

2 人脸检测/定位

本部分主要是对人脸进行检测和定位,并输出人脸相应的矩形框。主要用到的face_recognition内置函数有:

  • face_recognition.api.face_locations(img, number_of_times_to_upsample=1, model=‘hog’)

    • 用途:人脸检测,返回图像中人脸边界框的数组
    • img:输入图像,numpy数组
    • number_of_times_to_upsample:对图像进行上采样次数以找到更小的人脸,默认为1
    • model:检测模型,默认是hog机器学习模型,另外可设置cnn选择卷积神经网络模型以提高检测精度
    • 返回:包含多张人脸边界框的list数组,边界框数据以人脸(top, right, bottom, left) 顺序表示
  • face_recognition.api.load_image_file(file, mode=‘RGB’)

    • 用途:加载图像
    • file:图像路径名
    • mode:图像颜色类型,设置RGB表示返回RGB图像,设置’L’表示返回灰度图像
    • 返回:numpy数组

2.1 基于机器学习实现人脸检测

来自examples/find_faces_in_picture.py

%matplotlib inline
import matplotlib.pyplot as plt 
from PIL import Image
import face_recognition

# 通过PIL加载图片
image = face_recognition.load_image_file("test_img/obama.jpg")
# 基于hog机器学习模型进行人脸识别,不能使用gpu加速
face_locations = face_recognition.face_locations(image)

# 找到几张人脸
print("I found  face(s) in this photograph.".format(len(face_locations)))

for face_location in face_locations:

    # 打印人脸信息
    top, right, bottom, left = face_location
    print("A face is located at pixel location Top: , Left: , Bottom: , Right: ".format(top, left, bottom, right))

    # 提取人脸
    face_image = image[top:bottom, left:right]
    pil_image = Image.fromarray(face_image)
    # jupyter 绘图
    # pil_image.show()
    plt.imshow(pil_image)
    plt.axis('off')    
    plt.show()
I found 1 face(s) in this photograph.
A face is located at pixel location Top: 142, Left: 349, Bottom: 409, Right: 617

2.2 基于卷积神经网络实现人脸检测

来自examples/find_faces_in_picture_cnn.py

%matplotlib inline
import matplotlib.pyplot as plt 
from PIL import Image
import face_recognition

# 通过PIL加载图片
image = face_recognition.load_image_file("test_img/obama.jpg")

# 基于cnn识别人脸,是否使用gpu看装机环境
face_locations = face_recognition.face_locations(image, number_of_times_to_upsample=0, model="cnn")

print("I found  face(s) in this photograph.".format(len(face_locations)))

for face_location in face_locations:

    # 打印人脸信息
    top, right, bottom, left = face_location
    print("A face is located at pixel location Top: , Left: , Bottom: , Right: ".format(top, left, bottom, right))

    # 提取人脸
    face_image = image[top:bottom, left:right]
    pil_image = Image.fromarray(face_image)
    # jupyter 绘图
    # pil_image.show()
    plt.imshow(pil_image)
    plt.axis('off')    
    plt.show()
I found 1 face(s) in this photograph.
A face is located at pixel location Top: 154, Left: 375, Bottom: 390, Right: 611

2.3 人脸马赛克

来自examples/blur_faces_on_webcam.py

%matplotlib inline
import matplotlib.pyplot as plt
import face_recognition
import cv2

frame = cv2.imread("test_img/obama.jpg")

# 缩小图像以加快速度
small_frame = cv2.resize(frame, (0, 0), fx=0.25, fy=0.25)

# 找到人脸
face_locations = face_recognition.face_locations(small_frame, model="cnn")

for top, right, bottom, left in face_locations:
    # 提取边界框在原图比例的边界框
    top *= 4
    right *= 4
    bottom *= 4
    left *= 4

# 提取人脸
face_image = frame[top:bottom, left:right]

# 高斯模糊人脸
face_image = cv2.GaussianBlur(face_image, (99, 99), 30)

# 原图人脸替换
frame[top:bottom, left:right] = face_image

# 展示图像
img = frame[:,:,::-1] 
plt.axis('off')
plt.imshow(img)
<matplotlib.image.AxesImage at 0x2139a75cdf0>

3 人脸关键点识别

本部分主要是对人脸进行关键点识别,并输出人脸特征位置。主要用到的face_recognition内置函数有:

  • face_recognition.api.face_landmarks(face_image, face_locations=None, model=‘large’)
    • 用途:人脸关键点识别,返回图像人脸特征位置的字典
    • face_image:输入图像,numpy数组
    • face_locations:要识别的位置列表(可选)
    • model:使用的识别模型。默认值为large表示大模型。small表示小模型,但只返回五个特征点
    • 返回:特征位置(眼睛、鼻子等)的字典列表

3.1 提取图像中的人脸关键点

来自examples/find_facial_features_in_picture.py

%matplotlib inline
import matplotlib.pyplot as plt 
from PIL import Image, ImageDraw
import face_recognition

# 通过PIL加载图片
image = face_recognition.load_image_file("test_img/two_people.jpg")

# 找到图像中所有人脸的所有面部特征,返回字典
face_landmarks_list = face_recognition.face_landmarks(image)

# 发现人脸数
print("I found  face(s) in this photograph.".format(len(face_landmarks_list)))

# 创建展示结果的图像
pil_image = Image.fromarray(image)
d = ImageDraw.Draw(pil_image)

# 绘制关键点
for face_landmarks in face_landmarks_list:

    # 打印此图像中每个面部特征的位置
    # for facial_feature in face_landmarks.keys():
       # print("The  in this face has the following points: ".format(facial_feature, face_landmarks[facial_feature]))

    # 用一条线勾勒出图像中的每个面部特征
    for facial_feature in face_landmarks.keys():
        d.line(face_landmarks[facial_feature], width=5)


# jupyter 绘图
# pil_image.show()
plt.imshow(pil_image)
plt.axis('off')    
plt.show()
I found 2 face(s) in this photograph.

3.2 人脸涂色

来自examples/digital_makeup.py

%matplotlib inline
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw
import face_recognition

# 通过PIL加载图片
image = face_recognition.load_image_file("test_img/two_people.jpg")

# 找到图像中所有人脸的所有面部特征,返回字典
face_landmarks_list = face_recognition.face_landmarks(image)

pil_image = Image.fromarray(image)

# 绘图
for face_landmarks in face_landmarks_list:
    d = ImageDraw.Draw(pil_image, 'RGBA')

    # 眉毛涂色
    d.polygon(face_landmarks['left_eyebrow'], fill=(68, 54, 39, 128))
    d.polygon(face_landmarks['right_eyebrow'], fill=(68, 54, 39, 128))
    d.line(face_landmarks['left_eyebrow'], fill=(68, 54, 39, 150), width=5)
    d.line(face_landmarks['right_eyebrow'], fill=(68, 54, 39, 150), width=5)

    # 嘴唇涂色
    d.polygon(face_landmarks['top_lip'], fill=(150, 0, 0, 128))
    d.polygon(face_landmarks['bottom_lip'], fill=(150, 0, 0, 128))
    d.line(face_landmarks['top_lip'], fill=(150, 0, 0, 64), width=8)
    d.line(face_landmarks['bottom_lip'], fill=(150, 0, 0, 64), width=8)

    # 眼睛涂色
    d.polygon(face_landmarks['left_eye'], fill=(255, 255, 255, 30))
    d.polygon(face_landmarks['right_eye'], fill=(255, 255, 255, 30))

    # 眼线涂色
    d.line(face_landmarks['left_eye'] + [face_landmarks['left_eye'][0]], fill=(0, 0, 0, 110), width=6)
    d.line(face_landmarks['right_eye'] + [face_landmarks['right_eye'][0]], fill=(0, 0, 0, 110), width=6)

# jupyter 绘图
# pil_image.show()
plt.imshow(pil_image)
plt.axis('off')
plt.show()

3.3 人眼睁闭状态识别

来自examples / blink_detection.py

该部分代码作用为根据人眼关键点数据计算人眼的纵横比。人眼睁开的时候纵横比较高,人眼闭上的时候纵横比较小。如果眼睛闭上次数超过设定阈值,则输出人眼处于闭眼状态。

import matplotlib.pylab as plt
import face_recognition
import cv2
from scipy.spatial import distance as dist

# 这是一个检测眼睛状态的演示
# 人眼闭上次数超过设定阈值EYES_CLOSED_SECONDS,判定人眼处于闭眼状态
EYES_CLOSED_SECONDS = 2


def main():
    # 闭眼次数
    closed_count = 0
    # 读取两张图像模仿人睁闭眼
    img_eye_opened = cv2.imread('test_img/eye_opened.jpg')
    img_eye_closed = cv2.imread('test_img/eye_closed.jpg')
    # 设置图像输入序列,前1张睁眼,中间3张闭眼,最后1张睁眼
    frame_inputs = [img_eye_opened] + [img_eye_closed] * 3 + [img_eye_opened] * 1

    for frame_num, frame in enumerate(frame_inputs):
        # 缩小图片
        small_frame = cv2.resize(frame, (0, 0), fx=0.5, fy=0.5)
        # bgr通道变为rgb通道
        rgb_small_frame = small_frame[:, :, ::-1]
        # 人脸关键点检测
        face_landmarks_list = face_recognition.face_landmarks(rgb_small_frame)
        # 没有检测到关键点
        if len(face_landmarks_list) < 1:
            continue

        # 获得人眼特征点位置
        for face_landmark in face_landmarks_list:
            # 每只眼睛有六个关键点,以眼睛最左边顺时针顺序排列
            left_eye = face_landmark['left_eye']
            right_eye = face_landmark['right_eye']

            # 计算眼睛的纵横比ear,ear这里不是耳朵的意思
            ear_left = get_ear(left_eye)
            ear_right = get_ear(right_eye)
            # 判断眼睛是否闭上
            # 如果两只眼睛纵横比小于0.2,视为眼睛闭上
            closed = ear_left < 0.2 and ear_right < 0.2
            # 设置眼睛检测闭上次数
            if closed:
                closed_count += 1
            else:
                closed_count = 0
            # 如果眼睛检测闭上次数大于EYES_CLOSED_SECONDS,输出眼睛闭上
            if closed_count > EYES_CLOSED_SECONDS:
                eye_status = "frame  | EYES CLOSED".format(frame_num)
            elif closed_count > 0:
                eye_status = "frame  | MAYBE EYES CLOSED ".format(frame_num)
            else:
                eye_status = "frame  | EYES OPENED ".format(frame_num)
            print(eye_status)

            plt.imshow(rgb_small_frame)
            # 左右眼轮廓第一个关键点颜色为red,最后一个关键点颜色为blue,其他关键点为yellow
            color = ['red'] + ['yellow'] * int(len(left_eye) - 2) + ['blue']
            # 按照顺序依次绘制眼睛关键点
            for index in range(len(left_eye)):
                leye = left_eye[index]
                reye = right_eye[index]
                plt.plot(leye[0], leye[1], 'bo', color=color[index])
                plt.plot(reye[0], reye[1], 'bo', color=color[index])
                plt.title(eye_status)

            plt.show()

# 计算人眼纵横比
def get_ear(eye):
    # 计算眼睛轮廓垂直方向上下关键点的距离
    A = dist.euclidean(eye[1], eye[5])
    B = dist.euclidean(eye[2], eye[4])

    # 计算水平方向上的关键点的距离
    C = dist.euclidean(eye[0], eye[3])

    # 计算眼睛的纵横比
    ear = (A + B) / (2.0 * C)

    # 返回眼睛的纵横比
    return ear


if __name__ == "__main__":
    main()
frame 0 | EYES OPENED 

frame 1 | MAYBE EYES CLOSED 

frame 2 | MAYBE EYES CLOSED 

frame 3 | EYES CLOSED

frame 4 | EYES OPENED 

4 人脸识别

本部分主要是对人脸进行识别,提供多种实际任务案例。主要用到的face_recognition内置函数有:

  • face_recognition.api.face_encodings(face_image, known_face_locations=None, num_jitters=1, model=‘small’)

    • 用途:返回图像中每个人脸的128维人脸特征
    • face_image:输入图像,numpy数组
    • known_face_locations:每个人脸的边界框(可选),能够大大提高识别速度
    • num_jitters:计算人脸特征时重新采样人脸的次数。更高更准确,但更慢,即设置为100慢100倍
    • model:使用的识别模型,默认值为small表示小模型,只返回五个特征点;可设置为large
    • 返回:包含人脸特征的列表
  • face_recognition.api.compare_faces(known_face_encodings, face_encoding_to_check, tolerance=0.6)

    • 用途:将人脸特征与候选人脸特征进行比较,以查看它们是否匹配。
    • known_face_encodings:已知人脸特征列表
    • face_encoding_to_check:与已知人脸特征列表进行比较的单个人脸特征
    • tolerance:人脸距离越小表示人脸越相近,当人脸距离小于tolerance,表示是同一个人;0.6是默认值,也是作者认为的最佳值(实际有所出入)
    • 返回:包含True或者False的列表,以表示是否为同一个人脸
  • face_recognition.api.face_distance(face_encodings, face_to_compare)

    • 用途:给定一个人脸特征列表,将它们与已知的人脸特征进行比较,并获得人脸特征向量之间的欧几里德距离,距离越小面孔越相似。
    • face_encodings:已知的人脸特征列表
    • face_to_compare:未知的人脸特征列表
    • 返回:代表距离的numpy数组,和face_encodings的排序方式一样

4.1 人脸比对

来自examples/recognize_faces_in_pictures.py

该部分代码就是输入两张已知人脸图像和一张未知人脸图像,看未知人脸图像和已知人脸的哪一张图像表示的是同一个人。

%matplotlib inline
import matplotlib.pyplot as plt
from PIL import Image, ImageDraw
import face_recognition

# 通过PIL加载图片
biden_image = face_recognition.load_image_file("test_img/biden.jpg")
obama_image = face_recognition.load_image_file("test_img/obama.jpg")
unknown_image = face_recognition.load_image_file("test_img/obama2.jpg")

plt.imshow(biden_image)
plt.title('biden')
plt.axis('off')
plt.show()
plt.imshow(obama_image)
plt.title('obama')
plt.axis('off')
plt.show()
plt.imshow(unknown_image)
plt.title('unknown')
plt.axis('off')
plt.show()

# 获取输入图像文件中每个人脸的人脸特征,人脸特征维度为128
# 由于输入图像中可能有多张脸,因此它会返回一个特征列表。
# 默认输入图像只有一张人脸,只关心每个图像中的第一个特征,所以设置特征获取索引为0
# 建议单步看看该函数运行机制
try:
    biden_face_encoding = face_recognition.face_encodings(biden_image)[0]
    obama_face_encoding = face_recognition.face_encodings(obama_image)[0]
    unknown_face_encoding = face_recognition.face_encodings(unknown_image)[0]
except IndexError:
    # 没有找到人脸的情况
    print("I wasn't able to locate any faces in at least one of the images. Check the image files. Aborting...")
    quit()

# 已知人脸列表,按照顺序为拜登的人脸特征,奥巴马的人脸特征
known_faces = [
    biden_face_encoding,
    obama_face_encoding
]

# 如果未知人脸与已知人脸数组中的某个人匹配,则匹配结果为真
# 这个函数调用了face_distance人脸特征距离计算函数,可以单步调试看看源代码
results = face_recognition.compare_faces(known_faces, unknown_face_encoding)

# 是否和第一个人匹配
print("Is the unknown face a picture of Biden? ".format(results[0]))
# 是否和第二个人匹配
print("Is the unknown face a picture of Obama? ".format(results[1]))
# 这张人脸是否曾经见过
print("Is the unknown face a new person that we've never seen before? ".format(not True in results))

Is the unknown face a picture of Biden? False
Is the unknown face a picture of Obama? True
Is the unknown face a new person that we've never seen before? False

4.2 人脸识别之后在原图上画框并标注姓名

来自examples/identify_and_draw_boxes_on_faces.py

该部分代码就是输入两张已知人脸图像和一张未知人脸图像,然后进行人脸识别并在未知人脸图像标注各个人脸身份信息

%matplotlib inline
import matplotlib.pyplot as plt
import face_recognition
from PIL import Image, ImageDraw
import numpy as np

# 加载第一张示例图片并提取特征
obama_image = face_recognition.load_image_file("test_img/obama.jpg")
obama_face_encoding = face_recognition.face_encodings(obama_image)[0]

# 加载第二张示例图片并提取特征
biden_image = face_recognition.load_image_file("test_img/biden.jpg")
biden_face_encoding = face_recognition.face_encodings(biden_image)[0]

# 创建已知

深度学习项目演练:如何使用python和opencv进行人脸识别(代码片段)

...脸识别-在实时实时视频中检测和识别出一个人。在这个深度学习项目中,我们将学习如何使用Python识别实时视频中的人脸。我们将使用pythondlib的面部识别网络构建这个项目。Dlib是一个通用的软件库。使用dlib工具包,我... 查看详情

opencv-python也能实现人脸检测了(代码片段)

opencv中也可以实现深度学习中的人脸识别算法了。是怎么一回事呢?就是opencv中的DNN库,更新了好多深度学习的模块或者说是库函数,这样就让我们摆脱了安装庞大繁琐的深度学习框架。我们只需下载相应的权重文件... 查看详情

dlib+opencv深度学习人脸识别

目录(?)[+]DlibOpenCV深度学习人脸识别前言人脸数据库导入人脸检测人脸识别异常处理  Dlib+OpenCV深度学习人脸识别   前言人脸识别在LWF(LabeledFacesintheWild)数据集上人脸识别率现在已经99.7%以上,这个识别率确实非... 查看详情

人脸识别---基于深度学习和稀疏表达的人脸识别算法

介绍基于深度学习和稀疏表达的人脸识别算法1利用VGGFace提取人脸特征2PCA对人脸特征进行降维3稀疏表达的人脸匹配Code1介绍本文将介绍一种基于深度学习和稀疏表达的人脸识别算法。首先,利用深度学习框架(VGGFace)提取人脸特征... 查看详情

人脸识别---基于深度学习和稀疏表达的人脸识别算法

介绍基于深度学习和稀疏表达的人脸识别算法1利用VGGFace提取人脸特征2PCA对人脸特征进行降维3稀疏表达的人脸匹配Code1介绍本文将介绍一种基于深度学习和稀疏表达的人脸识别算法。首先。利用深度学习框架(VGGFace)提取人脸特征... 查看详情

人脸识别实战:使用pythonopencv和深度学习进行人脸识别(代码片段)

在本教程中,您将学习如何使用OpenCV、Python和深度学习执行面部识别。我们将首先简要讨论基于深度学习的面部识别的工作原理,包括“深度度量学习”的概念。从那里,我将帮助您安装实际执行人脸识别所需的库。... 查看详情

基于python_opencv人脸录入识别系统(应用dlib机器学习库)(代码片段)

基于python_opencv人脸录入、识别系统(应用dlib机器学习库)近几年应用opencv机器学习方法识别人脸的技术成为了热潮,本人根据当今的识别技术与方法,历时四个多月开发出一套基于dlib机器学习库的识别项目。希... 查看详情

人脸识别完整项目实战:完整项目案例运行演示

...的算法原理和实现机制,让大家对人脸识别与机器学习、深度学习进行有效关联;学习框架篇:系统介绍主流深度学习框架,重点就本课程用到Dlib深度学习框架进行介绍,通过dlib深度学习实战案例1和dlib深度学习实战案例2,两... 查看详情

深度学习卷积神经网络(cnn)人脸表情识别系统(gui界面)

文件大小:34M开发环境:Python3.8、Pytorch、PyCharm2020点击下载:点击下载简要概述:深度学习卷积神经网络(CNN)人脸表情识别系统(GUI界面),FER2013数据集演示视频:毕业论文 查看详情

使用 LBP、深度学习和 OpenCV 进行实时人脸识别

】使用LBP、深度学习和OpenCV进行实时人脸识别【英文标题】:RealTimeFaceRecognitionwithLBP,DeepLearningandOpenCV【发布时间】:2021-08-0509:08:10【问题描述】:我是计算机视觉方面的新手。我正在尝试使用基于深度学习dnn模块的人脸检测部... 查看详情

深度学习人脸识别实验---vgg模型

...shuai/article/details/506586701、caffe环境配置  主要参考:《深度学习21天实战Caffe》2、VGG人脸识别模型资料(提供论文和以及训练完的人脸模型)  http://www.robots.ox.ac.uk/~vgg/software/vgg_face/3、LMDB数据集的获取 查看详情

毕业设计深度学习机器视觉人脸识别系统-opencvpython(代码片段)

...脸识别过程人脸检测人脸对其人脸特征向量化人脸识别2深度学习-人脸识别过程人脸检测人脸识别MetricLarning3最后0前言🔥这两年开始毕业设计和毕业答辩的要求和难度不断提升,传统的毕设题目缺少创新和亮点,往往... 查看详情

吴恩达-深度学习-课程笔记-14:人脸识别和风格迁移(week4)

 1什么是人脸识别(whatisfacerecognition)在相关文献中经常会提到人脸验证(verification)和人脸识别(recognition)。verification就是输入图像,名字或id,判断是不是。而人脸识别是输入图像,输出这个人的名字或id。我们先构造一个准确... 查看详情

pytorch深度学习50篇·······第二篇:人脸识别

人脸识别预告!!!!!!!!各位亲爱的朋友们,今天这篇文章只是一个预告,为人脸识别做一点铺垫,包括提供需要安装的包和两个权重文件。这次我们人脸识别之旅分为两个阶段... 查看详情

[深度应用]·实战掌握dlib人脸识别开发教程

[深度应用]·实战掌握Dlib人脸识别开发教程个人网站--> http://www.yansongsong.cn/项目GitHub地址--> https://github.com/xiaosongshine/dlib_face_recognition1.背景介绍Dlib是一个深度学习开源工具,基于C++开发,也支持Python开发接口,... 查看详情

毕业设计-基于深度学习的人脸识别方法

...课题背景和意义实现技术思路一、人脸识别介绍二、基于深度学习的人脸识别方法实现效果图样例最后前言  📅大四是整个大学期间最忙碌的时光,一边要忙着备考或实习为毕业后面临的就业升学做准备,一边要为毕业设计耗... 查看详情

一个小白怎么学习人脸识别技术啊

...给f(x)识别函数肯定就不可用了。人脸检测不一定会使用深度学习技术,因为这里的技术要求相对低一些,只需要知道有没有人脸以及人脸在照片中的大致位置即可。一般我们考虑使用OpenCV、dlib等开源库的人脸检测功能(基于专... 查看详情

深度学习-人脸识别-数据集和制作

 一、 公共数据集 1.LabeledFacesinthewildHome(LFW)  很多公司号称识别率高达99%,是基于这个数据库。数据集合偏小,此时用一个在大量数据上预训练过的模型,在这个数据集合上测试。并且验证数据包含训练数据。2.CASIA... 查看详情