Face Recognition 使用的是 C++ 開源庫 dlib 通過深度學習模型構建的先進人臉識別系統,可通過 Python 接口或命令行工具對圖片中的人臉進行識別。在 Labeled Faces in the Wild 人臉數據集中進行測試,準確率高達99.38%。可以使用 Face Recognition 快速搭建人臉識別系統。
安裝
使用 pip 命令安裝 face_recognition 軟體包,官方支持 Mac 和 Linux 系統,另外也支持在樹莓派上安裝。如果系統中沒有 CMake 安裝時可能報錯,按錯誤提示解決即可。
示例一:識別圖片中的人臉
下面的示例中使用 face_locations 方法獲取圖片中人臉的位置,再根據位置在原圖上畫框。
人臉輸出結果如下圖所示:
示例二:提取面部關鍵點
下面的示例使用 face_landmarks 函數獲取圖片中面部特徵位置(如眼睛、鼻子等)信息。
提取面部特徵輸出結果如下圖所示:
Face Recognition 還可用於人臉比對、視頻人臉識別、面部美妝等。
特別聲明:以上內容(如有圖片或視頻亦包括在內)為自媒體平臺「網易號」用戶上傳並發布,本平臺僅提供信息存儲服務。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.