face_recognition人脸识别
2024-09-28 21:37:06
对亚洲人识别准确度有点差,具体安装移步:https://www.cnblogs.com/ckAng/p/10981025.html
更多操作移步:https://github.com/ageitgey/face_recognition
from PIL import Image, ImageDraw
import face_recognition # Load the jpg file into a numpy array
image = face_recognition.load_image_file("img/test2.jpg") # Find all facial features in all the faces in the image
face_landmarks_list = face_recognition.face_landmarks(image) print("I found {} face(s) in this photograph.".format(len(face_landmarks_list))) # Create a PIL imagedraw object so we can draw on the picture
pil_image = Image.fromarray(image)
d = ImageDraw.Draw(pil_image) for face_landmarks in face_landmarks_list: # Print the location of each facial feature in this image
for facial_feature in face_landmarks.keys():
print("The {} in this face has the following points: {}".format(facial_feature, face_landmarks[facial_feature])) # Let's trace out each facial feature in the image with a line!
for facial_feature in face_landmarks.keys():
d.line(face_landmarks[facial_feature], width=5) # Show the picture
pil_image.show()
最新文章
- CentOS(5.8/6.7)linux生产环境若干优化实战
- C#知识点-委托
- C# DES进行加解密
- sql server 替换特殊符号
- 定位absolute使内联支持宽高(块属性变为内联,内容默认撑开)margin auto 失效
- ios-通知简单示例
- 最新百度音乐api
- mysql用变量存储插入的id
- Linux &;&; vim 批量替换
- 设置android:supportsRtl=&;quot;true&;quot;无效问题
- 快速记录 IE8 下三个问题
- Activiti引擎启动失败
- 多个JDK使用批处理命令切换JDK版本
- JDK自带的日志Logging
- Git分支管理[三]
- FFMPEG:H264解码-SDL显示(RGB32、RGB24、YUV420P、YUV422)
- npm scripts 使用指南
- Nginx 在线新增模块
- img的complete和onload
- 去掉dede织梦position当前位置最后一个箭头的方法