我想知道是否有人知道如何仅使用 JavaScript 来识别人脸。我听说过 OpenCV 和亲戚,但我想在客户端(网络应用程序)处理人脸识别。
有任何想法吗?
我想知道是否有人知道如何仅使用 JavaScript 来识别人脸。我听说过 OpenCV 和亲戚,但我想在客户端(网络应用程序)处理人脸识别。
有任何想法吗?
目前还没有纯 JavaScript 库执行人脸识别。但是,可以使用以下库之一进行实时人脸检测:
对于面部和面部元素检测以及一般的对象检测,您可以使用js-objectdetect或tracking.js,其中包括基于 Haar 特征的 OpenCV 对象检测器的端口。另请参阅此十个流行的 JavaScript 人脸检测库的性能比较表。
用于面部跟踪的headtrackr库也可能很有趣,因为它实现了 OpenCV 中的 camshift 算法。也看看同一作者的clmtrackr。
如果您正在使用面部识别等高级功能(不仅仅是检测,因为它可以识别它是谁的脸,眼睛位置,性别,年龄,情绪等)然后试试这个库。
通过约束局部模型精确跟踪面部特征的 Javascript 库
嘿,你可以使用我刚刚发布的这个人脸识别 API + photobooth.js 示例 - http://mashape.tumblr.com/post/45712257463/face-recognition-using-javascript-and-mashape
API 的响应会根据您上传的图片库为您提供人脸元素坐标、微笑检测和人脸识别:
{
“status”: “success”,
“images”: [
“http://lambdal.com/tiger.jpg”
],
“photos”: [
{
“url”: “http://lambdal.com/tiger.jpg”,
“width”: 600,
“tags”: [
{
“eye_left”: {
“y”: 116,
“x”: 357
},
“confidence”: 0.978945010372561,
“center”: {
“y”: 130,
“x”: 339
},
“mouth_right”: {
“y”: 178,
“x”: 366
},
“mouth_left”: {
“y”: 178,
“x”: 310
},
“height”: 140,
“width”: 140,
“mouth_center”: {
“y”: 178,
“x”: 338
},
“nose”: {
“y”: 147,
“x”: 336
},
“eye_right”: {
“y”: 115,
“x”: 314
},
“tid”: “31337”,
“attributes”: [
{
“smile_rating”: 0.7,
“smiling”: true,
“confidence”: 0.7
},
{
“gender”: “male”,
“confidence”: 0.5982579729635792
}
],
“uids”: [
{
“confidence”: 0.742,
“prediction”: “chris1”,
“uid”: “chris1@apitraveler”
},
{
“confidence”: 0.161,
“prediction”: “hazel”,
“uid”: “hazel@apitraveler”
},
{
“confidence”: 0.065,
“prediction”: “dylan”,
“uid”: “dylan@apitraveler”
}
]
}
],
“height”: 585
}
]
}