任何用于 JavaScript 人脸识别的库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7291065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Any library for face recognition in JavaScript?
提问by Felix
I would like to know if someone know how to recognize a face using just JavaScript. I've heard of OpenCV and relatives but I want to process the face recognition at the client side (web app).
我想知道是否有人知道如何仅使用 JavaScript 识别人脸。我听说过 OpenCV 和亲戚,但我想在客户端(网络应用程序)处理人脸识别。
Any ideas?
有任何想法吗?
采纳答案by nikmd23
If you are looking to recognize where a face is in an image, as opposed to matching faces across multiple images, there is actually a library that does this in conjunction with HTML canvass.
如果您想识别图像中人脸的位置,而不是在多个图像中匹配人脸,实际上有一个库可以与 HTML canvass 结合使用。
There is a demo on the developers site here. You can also download the source on github.
此处的开发人员站点上有一个演示。您也可以在github上下载源代码。
In my test's the performance was decent - but not blazing.
在我的测试中,表现还不错 - 但并不出色。
回答by le_m
Currently there is no pure JavaScript library performing face recognition. Real time face detectionhowever is possible using one of the following libraries:
目前还没有纯 JavaScript 库执行人脸识别。但是,使用以下库之一可以进行实时人脸检测:
For face and face elementdetection as well as object detection in general, you could use js-objectdetector tracking.jswhich include ports of the OpenCV object detector based on Haar-like features. Also consult this performance comparison chartfor ten popular JavaScript face detection libraries.
The very first face detectionalgorithm on the web found in ccvalso deserves a mention. Its SURF classifier is fast but not very reliable.
The headtrackrlibrary used for face trackingmight also be of interest since it implements the camshift algorithm found in OpenCV. Also have a look at clmtrackrof the same author.
对于人脸和人脸元素检测以及一般的对象检测,您可以使用js-objectdetect或tracking.js,其中包括基于 Haar 类特征的 OpenCV 对象检测器的端口。另请参阅此性能比较表,了解十个流行的 JavaScript 人脸检测库。
用于面部跟踪的headtrackr库可能也很有趣,因为它实现了 OpenCV 中的 camshift 算法。也看看同一作者的clmtrackr。
回答by Hasanavi
If you are after advanced features like Facial Recognition (Not detection only, as in it can recognize whose face it is, Eye position, gender, age, mood etc) then try this library.
如果您追求像面部识别这样的高级功能(不仅仅是检测,因为它可以识别它是谁的脸、眼睛位置、性别、年龄、情绪等),那么试试这个库。
回答by Reed Jones
Javascript library for precise tracking of facial features via Constrained Local Models
用于通过受约束的局部模型精确跟踪面部特征的 Javascript 库
回答by Chris Ismael
Hey you can use this Face Recognition API + photobooth.js sample that I just posted - http://mashape.tumblr.com/post/45712257463/face-recognition-using-javascript-and-mashape
嘿,您可以使用我刚刚发布的这个人脸识别 API + photobooth.js 示例 - http://mashape.tumblr.com/post/45712257463/face-recognition-using-javascript-and-mashape
The response from the API gives you face element coordinates, smile detection, and face recognition based on a library of pictures you have uploaded:
来自 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
}
]
}
}