项目地址:https://github.com/ageitgey/face_recognition#face-recognition 本文的模型使用了C++工具箱dlib基于深度学习的最新人脸识别方法,基于户外脸部数据测试库Labeled Faces in the Wild 的基准水平来说,达到了99.38%的准确率. dlib:http://dlib.net/ 数据测试库Labeled Faces in the Wild:http://vis-www.cs.umass.edu/lfw/ 模型提
首先,我们准备了0~9的训练集和测试集,这些手写体全部经过像素转换,用0,1表示,有颜色的区域为0,没有颜色的区域为1.实现代码如下: # 图片处理 # 先将所有图片转为固定宽高,比如32*,然后再进行处理 from PIL import Image as img f = open('f:/result/weixin.txt', 'a') im = img.open('f:/data/weixin.jpg') # im.save('f:/data/weixin.bmp') length = im