# Drowsiness Detection in Drivers Using Facial Feature Analysis
## 3 Methods
### Adaptive Frame Threshold  
The adaptive frame threshold method is proposed with two main objectives: firstly, to minimize false drowsiness warnings, and secondly, to align with the guidance mentioned in a TechCrunch article [31], which suggests that drivers should take a minimum of a 6 h break after every 12 h of driving. The static threshold method relies on analyzing single frames, which may lead to occasional false alarms. Thus, the adaptive frame threshold method is implemented to analyze consecutive frames until the algorithm identifies a frame that meets the threshold value for drowsiness. The number of successive frames evaluated adjusts based on the driving duration, as outlined in Equations (4) and (6). As driving time increases, the likelihood of drowsiness also rises, necessitating fewer consecutive frames to be evaluated. Figure 9 illustrates how the adaptive threshold algorithm works. Two separate collections of video datasets were employed to assess the effectiveness of the adaptive frame threshold algorithm. The initial dataset, (UTA--RLDD) from [PERSON] et al. [32], collected from the University of Texas, Arlington, was designed  
Figure 8: The 68 facial landmark points surrounding the detected face. Figure 9: Adaptive frame threshold algorithm. specifically to evaluate drowsiness through the monitoring of closed eyes. The dataset has 180 videos amounting to 30 h of RGB video footage, featuring 60 healthy participants. The group includes 51 males and 9 females from diverse ethnicities, aged between 20 and 59 years. Among these participants, 36 consented to their facial data being used in research studies. The second dataset is the 'Yawning Detection Dataset' or YawDD by [PERSON] et al. [24], which encompasses various yawning scenarios. For the UTA--RLDD dataset [32], consecutive frames capturing closed eyes were extracted from videos recorded at 15 frames per second. Due to the video's short length, they were consolidated into one extended video to meet this study's requirements, resulting in four videos, each lasting thirty minutes. The frame dimensions were standardized to \(320\times 290\) pixels [1]. Similarly, for the YawDD dataset [24], which included 254 videos featuring both males and females, a similar consolidation process was applied to create four videos, each lasting thirty minutes. These videos maintained a frame rate of 15 fps and dimensions (480 \(\times\) 320) pixels. These videos processed from both datasets were now ready for analysis using the adaptive frame threshold algorithm to identify instances of drowsiness. In certain instances, the yawning by the driver served as an indicator of drowsiness. Based on findings from [PERSON]. [PERSON] [33], it is noted that the typical duration of a yawn for a healthy individual ranges from 4 to 6 s. Consequently, we suggest that the algorithm should examine a greater number of consecutive frames to detect yawning at the beginning of the journey compared to the later stages of the drive. So, we compute the number of frames to check at the onset using the time of 6 s since we expect to check more frames at the beginning and using the time of 4 s as we expect to check for fewer frames toward the end. The specified number of successive frames to consider is as follows:  
\[\text{No. of frames(t = 0) = 6 s \times 15 fps} \tag{3}\]  
\[\text{No. of frames(t = 0) = 90 frames} \tag{4}\]  
The computed value is interpreted as when one captured frame meets the yawning criterion, that is, MAR exceeds 0.4. Then, start counting to 90 frames with the initial frame included. On the other hand, we compute the number of frames towards the end of the journey at a time, t (30 min) is given as follows:  
\[\text{No. of frames(t = 30) = 4 s \times 15 fps} \tag{5}\]  
\[\text{No. of frames(t = 30) = 60 frames} \tag{6}\]  
We suggest using a linear equation to adjust the number of frames to be checked at a specific time, t. Figure 10 is a graph of how the frames change with time.