我是靠谱客的博主 震动小蝴蝶,这篇文章主要介绍人脸特征点检测——基于Face_Recognition库1.Face_Recognition库介绍2.load_image_file方法3.face_locations方法4.face_landmarks方法5.人脸特征点检测代码,现在分享给大家,希望可以做个参考。
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.convert(mode
最后
以上就是震动小蝴蝶最近收集整理的关于人脸特征点检测——基于Face_Recognition库1.Face_Recognition库介绍2.load_image_file方法3.face_locations方法4.face_landmarks方法5.人脸特征点检测代码的全部内容,更多相关人脸特征点检测——基于Face_Recognition库1内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复