-
Notifications
You must be signed in to change notification settings - Fork 38
2 Face Recognition
In order to realize inference regarding driver behavior, in first place, we implement face recognition models within OpenVINO's toolkit, that result to be very usefull for face detection due to their great accuracy.
It is important to highlight that currently the facial landmarks detection model included in OpenVino's toolkit (facial-landmarks-35-adas-0001) presents some detection limitations, it has not enought landmarks points arround the eyes to enable blink detection. Instead, we decided to integrate it to an external model, by implementing "dlib’s facial landmarks detector".
From this point, we separete the face recognition into two processes: First this we use OpenVINO's models for defining a "face ROI" (Region of Interest); second, we use this face ROI to identify certain facial landmarks as points of interest, with the external model, that will allow us to calculate eye/mouth movement.
By using these points of interest -6 for each eye and 6 for the mouth- we are able to calculate what is called 'Eye Aspect Ratio (EAR)' that provides us two (2) values for eye/mouth open or close respectively. Those values will be crucial for detecting and notifying about what we have defined as "Drowsiness Detection".
Under our business logic a "Drowsiness State" implies a combination of the amount of blinks detected and their frequency, plus the amount of yawns detected during a determine time frame.
On the one hand, regarding blinking detection once we have a positive detection for blink, by using the mentioned external model, the program is able to count blinks and to calculate their duration. This will help us to determine and to differentiate when the driver has a regular blinking or its frequency and duration is sufficiently large to trigger the corresponding alarms.
On the other hand, as we said the same external detection model allows us to detect mouth movements being able to identify when its opening gesture can be considered as a yawn. According to the amount of yawns detected within a specific and determined time frame (i.e, 1 minute), it will trigger the corresponding alarms notifying the driver of his/her drowsiness state.
In order to inferencing different levels and kinds of distraction, we have developed a functional logic that detects the head position (see link), allowing us to recognize whether the head position is centered or not. It is important to mention that currently the available detection models can not detect the eye's center for monitoring gaze attention, however by using head position detection we asume the gaze attention point to describe the following scenarios:
- "Eyes out of the road", when the driver moves the head to a side.
- "Stop looking at (...)", when the driver moves the down to a side.