唐国梁 openCV学习笔记--主要记录提到的理论信息

opencv基础

官方文档:https://docs.opencv.org/master/d9/df8/tutorial_root.html

OpenCV 源码:https://github.com/opencv/opencv

人脸识别相关算法的链接

1. Haar Cascade 哈尔级联

  1. 核心原理
    (1)使用Haar-like特征做检测
    (2)Integral Image : 积分图加速特征计算
    (3)AdaBoost : 选择关键特征,进行人脸和非人脸分类
    (4)Cascade : 级联,弱分类器成为强分类器
    PS:积分图就是只遍历一次图像就可以求出图像中所有区域像素和的快速算法,大大的提高了图像特征值计算的效率

论文:Rapid Object Detection using a Boosted Cascade of Simple Features
参考博文:https://www.cnblogs.com/zyly/p/9410563.html
在这里插入图片描述
3. Haar cascade
它提供了四个级联分类器(针对人脸的正面):
(1)haarcascade_frontalface_alt.xml (FA1):
22 stages and 20 x 20 haar features

(2)haarcascade_frontalface_alt2.xml (FA2):
20 stages and 20 x 20 haar features

(3)haarcascade_frontalface_alt_tree.xml (FAT):
47 stages and 20 x 20 haar features

(4)haarcascade_frontalface_default.xml (FD):
25 stages and 24 x 24 haar features

2. 基于dlib进行人脸检测

  1. Dlib是一个深度学习开源工具,基于C++开发,也支持Python开发接口。

  2. 由于Dlib对于人脸特征提取支持很好,有很多训练好的人脸特征提取模型供开发者使用,所以Dlib人脸识别开发很适合做人脸项目开发。

官网地址:http://dlib.net
Github 源码库:https://github.com/davisking/dlib

  1. HOG 方向梯度直方图(Histogram of Oriented Gradient)

(1)HOG是一种特征描述子,通常用于从图像数据中提取特征。它广泛用于计算机视觉任务的物体检测。

(2)特征描述子的作用:它是图像的简化表示,仅包含有关图像的最重要信息。

论文:《Histograms of Oriented Gradients for Human Detection》

3. 关键点检测

3.1 基于dlib关键点检测

  1. dlib.get_frontal_face_detector( ) 获取人脸检测器
  2. dlib.shape_predictor( ) 预测人脸关键点

人脸关键点模型,下载地址:
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2.

3.2 基于face_recognition进行人脸关键点检测

  1. face_recognition 是使用简单的人脸识别工具,它使用dlib先进的人脸识别技术构建而成,并具有深度学习功能。

(1)Github 地址:https://github.com/ageitgey/face_recognition
(2)官方指南:
https://face-recognition.readthedocs.io/en/latest/readme.html
(3)源码实现:
https://face-recognition.readthedocs.io/en/latest/face_recognition.html

4 目标跟踪

  1. 基于dlib库 —— 检测人脸、跟踪人脸;

  2. 基于dlib库 —— 选定目标物体,跟踪目标;

5 人脸识别

5.1 基于dlib人脸识别

在这里插入图片描述
dlib 提供的高精度人脸识别算法是基于深度学习网络ResNet-34实现。该网络基于三百万张照片进行训练,最终获得了人脸检测模型。

下载地址:
https://github.com/davisking/dlib-models/blob/master/dlib_face_recognition_resnet_model_v1.dat.bz2
在这里插入图片描述

5.2 face_recognition 人脸识别

用到的方法:

  1. face_distance(face_encodings, face_to_compare)

  2. face_locations(img, number_of_times_to_upsample=1, model=“hog”)

  3. face_landmarks(face_image, face_locations=None, model=“large”)

  4. face_encodings(face_image, known_face_locations=None, num_jitters=1, model=“small”)

  5. compare_faces(known_face_encodings, face_encoding_to_check, tolerance=0.6)

face_recognition的API文档:
https://face-recognition.readthedocs.io/en/latest/_modules/face_recognition/api.html#face_locations

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值