Faces人臉識別
分爲兩個模塊,Faces文件夾下存放人臉識別算法的代碼,Web文件夾下存放網站搭建的代碼python
詳情請查看各個模塊下的readme文檔web
項目簡介
核心算法
一款基於Dlib、opencv開發的人臉識別程序,包含人臉檢測、人臉校訂、人臉識別、表情識別四個模塊算法
- 人臉檢測問題上,初步採用了傳統HOG+SVM的方式,單次人臉檢測僅需0.1s
- 針對人臉檢測過程當中部分人頭偏移角度過大而檢測不到人臉的問題,加入具備角度自適應性的旋轉魯棒算法
- 人臉識別問題上,使用適用於人臉的ResNet-34深度神經網絡來提取人臉特徵,在公共數據集上擁有99.37%的準確率
- 針對女明星妝容變化較大(不一樣年齡、不一樣化妝風格)的狀況,採用數據加強的方法,經過爬蟲自動爬取女明星本人更多的照片,擴大已知人像庫,儘量消除女明星妝容變化較大引發的偏差
- 爲了擁有更高的準確性,加入基於人臉關鍵點的人臉校訂模塊。先將人臉校訂、標準化後再送入深度神經網絡中,能夠獲得更加穩定的編碼,同等狀況下能夠提高3.6%的準確率
- 爲了增長項目的可玩性,加入了基於深度學習的表情識別模塊,快來體驗一下!
人臉檢測效果圖以下flask
![](http://static.javashuo.com/static/loading.gif)
通過人臉檢測、人臉校訂並裁剪後的stdface如圖服務器
![](http://static.javashuo.com/static/loading.gif)
人臉識別結果網絡
![](http://static.javashuo.com/static/loading.gif)
表情識別結果框架
![](http://static.javashuo.com/static/loading.gif)
Web部分
一個基於flask框架搭建的包含人臉圖庫、人臉識別的輕量級網站學習
- 爲了與python程序高度耦合,採用python輕量級框架flask,部署在服務器的127.0.0.1:5000上
- 針對每次調用程序都要花費大量時間從新加載模型的問題,將算法使用到的模型常駐內存中,單次調用人臉識別程序僅需0.3s
網站主要頁面如圖網站
首頁:編碼
![](http://static.javashuo.com/static/loading.gif)
人像圖庫
![](http://static.javashuo.com/static/loading.gif)
人臉識別(未上傳)
![](http://static.javashuo.com/static/loading.gif)
人臉識別結果
![](http://static.javashuo.com/static/loading.gif)
表情識別結果
![](http://static.javashuo.com/static/loading.gif)
關於咱們
![](http://static.javashuo.com/static/loading.gif)
API調用耗時
![](http://static.javashuo.com/static/loading.gif)