# Shape Detection API ❇️

aka Face Detector API 😃

TIP

This API provides access to accelerated shape detectors (e.g. human faces) for still images and/or live image feeds. It is not a W3C Standard nor is it on the W3C Standards Track.

# Examples

# Demo #1

Face detector demo

Required: chrome://flags/#enable-experimental-web-platform-features


img
Code
const faceDetector = new window.FaceDetector({maxDetectedFaces: 5, fastMode: false})

faceDetector.detect(image)
  .then(faces => {
    faces.forEach((face) => {
      // Do something awesome
    })
  })
  .catch((err) => {
    console.error(err.toString())
  })
1
2
3
4
5
6
7
8
9
10
11