A live vision study
Drowsiness
Detector.
A closer look at a blink.
Explore how eye closure becomes a signal.
Your camera starts only when you choose.
The observation
Ready when you are.
Start your camera, or explore the guided sample without one.
- Eye ratio
- —
- Blinks
- 0
- Long closures
- 0
Camera frames stay on your device. Nothing is recorded or uploaded.
How to try it
Look ahead.
Then blink.
Use good lighting and keep your face in view. A normal blink should pass quickly. Closing both eyes for 1.5 seconds triggers the prolonged-closure state.
Eye shape, glasses, lighting, and head angle affect the estimate. The fixed eye-ratio threshold is a demonstration heuristic, not a sleep diagnosis.
Use while stationary. This educational demo is not a driving safety system.
Camera help & technical details
Allow camera access when your browser asks. If it is blocked, use your browser's camera settings and try again. A camera-free sample is always available.
The camera model and vision engine download from Google and jsDelivr when needed. Your camera frames are processed locally in a worker; the sample uses synthetic measurements without downloading a model.
New portfolio demo, adapted from P SREESANKAR's MIT example, with the EAR approach also demonstrated by LearnOpenCV. This is separate from the original 2023 Android application.
Open-source license
MIT License
Copyright (c) 2026 P SREESANKAR
Modifications Copyright (c) 2026 Reiandraa
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.