Face Detection API
Find out how to use the Shape Detection API in a PWA to detect face and facial features in images and videos.
Demo
- Open the Chrome browser on your computer. Type
about://flagsin the URL bar and enable the#enable-experimental-web-platform-featuresflag. Then restart your browser. - Start detecting faces in front of your camera by clicking the button below.
- Check out the code of the demo below!
What's the Face Detection API?
The Face Detector interface of the Shape Detection API is an experimental feature that can detect faces and facial features—such as the eyes, nose, and mouth—in images or videos.
Browser support
The Shape Detection API currently works only in Chrome and Edge, and requires the Experimental Web Platform features flag to be enabled. It's not fully ready for general use yet, but you can see a preview in action above, and the code of the demo below.
API
window.FaceDetector
navigator.mediaDevices.getUserMedia
Code
Links & Documentation
Ready to generate your PWA?
Try our PWA toolkit free of charge and without limits for 14 days. No credit card required.
Generate PWA See plans