37

我想知道是否有人知道如何仅使用 JavaScript 来识别人脸。我听说过 OpenCV 和亲戚,但我想在客户端(网络应用程序)处理人脸识别。

有任何想法吗?

4

5 回答 5

40

目前还没有纯 JavaScript 库执行人脸识别。但是,可以使用以下库之一进行实时人脸检测:

于 2012-09-05T19:39:22.727 回答
17

如果您正在寻找识别图像中人脸的位置,而不是在多个图像中匹配人脸,实际上有一个库可以与 HTML 画布一起执行此操作。

这里的开发者网站上有一个演示。您也可以在github上下载源代码。

在我的测试中,表现不错——但并不出色。

于 2011-09-03T04:07:59.167 回答
6

如果您正在使用面部识别等高级功能(不仅仅是检测,因为它可以识别它是谁的脸,眼睛位置,性别,年龄,情绪等)然后试试这个库。

更新: https ://www.kairos.com/face-recognition-api

于 2012-06-21T13:30:18.300 回答
5

通过约束局部模型精确跟踪面部特征的 Javascript 库

https://github.com/auduno/clmtrackr

于 2014-11-22T18:52:47.443 回答
4

嘿,你可以使用我刚刚发布的这个人脸识别 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
    }
]

}

于 2013-03-19T01:16:00.920 回答