Closed Eye Detection using Eye Aspect Ratio (EAR)
Problem
Our team at AV DEVS recently faced a scenario while working on a solution to detect closed eyes as part of a larger project. The usual closed eye detection using classification model of machine learning tend to get quite heavy and slow as it trains. And also it would take time before it learns and gets accurate.
Using EAR (Eye Aspect Ratio) would solve that problem but would create false assumptions for people with less EAR.
Solution
We planned to make use of both approaches and build a model that calculates EAR before actual experience begins. If the EAR is less then a threshold value, use classification model and if it is higher then threshold value, use the EAR model.
To use EAR model to detect closed eye, we monitor EAR to see if the value falls but does not increase again thus implying the person has closed the eyes. We added time sensitivity element to differentiate simple blinking vs actual closed eye.
Basic Algorithm Variable_EAR_Threshold (threshold to detect closed eye let's say 0.3) Variable_EAR_Count_Frames (no. of consecutive frames with eyes closed) Hence, --> if EAR < 0.3, start counting the no. of frames with eyes closed and store in Variable_EAR_Count_Frames. --> if Variable_EAR_Count_Frames > 50, trigger closed eye event!
Wish to build your next Machine Learning product with AV DEVS team? Reach out at [email protected]
Article Conceptualized by: Deepan Parikh
Software creator and destroyer || Innovate the world with technology
5 年Great work ??????
Software Test Lead | Scrum Master (CSM??) | Penetration Testing
5 年Interesting