对亚洲人识别准确度有点差,具体安装移步: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()

  

最新文章

  1. CentOS(5.8/6.7)linux生产环境若干优化实战
  2. C#知识点-委托
  3. C# DES进行加解密
  4. sql server 替换特殊符号
  5. 定位absolute使内联支持宽高(块属性变为内联,内容默认撑开)margin auto 失效
  6. ios-通知简单示例
  7. 最新百度音乐api
  8. mysql用变量存储插入的id
  9. Linux && vim 批量替换
  10. 设置android:supportsRtl="true"无效问题
  11. 快速记录 IE8 下三个问题
  12. Activiti引擎启动失败
  13. 多个JDK使用批处理命令切换JDK版本
  14. JDK自带的日志Logging
  15. Git分支管理[三]
  16. FFMPEG:H264解码-SDL显示(RGB32、RGB24、YUV420P、YUV422)
  17. npm scripts 使用指南
  18. Nginx 在线新增模块
  19. img的complete和onload
  20. 去掉dede织梦position当前位置最后一个箭头的方法

热门文章

  1. python学习笔记(3) -- 字符与数字之间的转换函数
  2. 【PAT甲级】1028 List Sorting (25 分)
  3. 【PAT甲级】1006 Sign In and Sign Out (25 分)
  4. 八大排序算法C++代码实现
  5. 日常使用SqlServer的笔记
  6. JS简单回弹原理
  7. Java生鲜电商平台-小程序或者APP拼团功能设计与架构实战
  8. 134、Java中的构造方法和构造块
  9. centos7搭建svn服务器及客户端设置
  10. 学习JNA,Jnative