This code can detect your eyes and alert when the user is drowsy.
This can be used by riders who tend to drive for a longer period of time that may lead to accidents
The example code is in Python (version 2.7 or higher will work).
A computer vision system that can automatically detect driver drowsiness in a real-time video stream and then play an alarm if the driver appears to be drowsy.
Each eye is represented by 6 (x, y)-coordinates, starting at the left-corner of the eye (as if you were looking at the person), and then working clockwise around the eye:.
It checks 20 consecutive frames and if the Eye Aspect ratio is lesst than 0.25, Alert is generated.
For more information, see
To run the code, type python Drowsiness_Detection.py
python Drowsiness_Detection.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。