A simple and interactive web application built with face-api.js to detect and analyze human facial expressions in real-time using the webcam.
- 🔍 Real-time face detection from webcam
- 😄 Emotion recognition (Happy, Sad, Angry, etc.)
- 🎯 Uses powerful
face-api.jsmodels - 🧠 Runs entirely in the browser — no backend required
- 📱 Works on most modern desktop and mobile browsers
- face-api.js — JavaScript API for face detection and recognition
- HTML5 + Vanilla JavaScript
- WebRTC (for accessing webcam)
Try the live demo here:
🔗 https://face-detect.pages.dev/
(Replace with your deployment URL)
- Loads pretrained models (
tinyFaceDetector,faceExpressionNet) from CDN/local. - Accesses the user's webcam using
navigator.mediaDevices. - Continuously detects face and classifies facial expressions in real time.
- Draws results on an overlaid canvas (bounding box + expression labels).
- Clone the repo
git clone https://github.com/nurulislamrimon/face-detect.git
cd face-detect
by Nurul Islam Rimon @Expertsquad.net