Face detection from webcam in browser using javascript library face-api.js
Streaming webcam on desktop computer or mobile, there is function to switch back or front cameras on mobile
https://bensonruan.com/face-detection-with-face-api-js/
Clone this repository to your local computer
git https://github.com/bensonruan/Face-Detection.git
Point your localhost to the cloned root directory
Browse to http://localhost/face-detection.html
- Turn on the Webcam switch and allowing the browser to access your webcam
- Turn on the Load Model switch to load the face detection pre-trained models
- Turn on the Detect Face switch to start detecting faces in your webcam
- Bounding Box
- Face landmarks
- Face Expression
- Age
- Gender
Please note that on iOS Safari, cameras can only be accessed via the https protocol
- jquery - JQuery
- face-api.js - JavaScript API for face detection and face recognition in the browser