Project
Commercial drivers, pilot, machine operators are certain jobs where if a person is drowsy, it can indeed be very dangerous, as it may lead to accidents or potentially harm oneself and others.
Drowsiness detection is a web application created using face-api.js.This web application will detect if the person in front of camera is yawning or has closed his/her eyes.If the person is yawning, then an audio will be triggered which would tell the person that he/she is drowsy. If the person has his/her eyes closed for a significant amount of time, then an audio will be triggered which would alarm the user.
This web application is designed to be a mobile app which can be used on both a computer and a smartphone, provided both of them should have a camera and a speaker.
Face-api.js, which is used in this project, is a javascript library that provides advanced face detection and facial recognition capabilities for web application.
It allows to work with face-related tasks as detecting faces, facial landmarks and face recognition, directly in the browser without the need for server-side processing.
Face-api.js maps 68 landmarks on the user's face, and using these landmarks the aspect ratios of eyes and mouth are calculated, if the aspect ratio 0f eyes are less than a threshold value, continuously for a number of times, then the audio will be triggered, similarly if the aspect ratio of mouth is more than threshold value, continuously for a number of times, then the audio will be triggered.
Technologies
HTML
CSS
JavaScript
face-api.js
Back