Home

Awesome

jQuery Face Detection Plugin

Build Status NPM version Bower version

A jQuery/Zepto plugin to detect faces on images, videos and canvases to get theirs coordinates.

Importante note: This plugin uses an algorithm by Liu Liu.

Demos

Website and demo here:

http://facedetection.jaysalvat.com/

Get started

Download the plugin with the method of your choice.

Include jQuery and the plugin.

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="path/to/dist/jquery.facedetection.min.js"></script>

Set a picture with some faces in your HTML page.

<img id="picture" src="img/face.jpg">

Apply the plugin to this image and get the face coordinates.

<script>
    $('#picture').faceDetection({
        complete: function (faces) {
            console.log(faces);
        }
    });
</script>

Results

Returns an array of found faces object:

Settings