# Efficient Eye State Detection for Driver Fatigue Monitoring Using Optimized YOLOv7-Tiny
## 3 Experimental Results and Analysis
### Quantitative Analysis of Structured Pruning on YOLOv7-Tiny for Eye State Detection
Table 2 presents a detailed overview of the YOLOv7-tiny-Second-Prune model's performance across four different configurations, each with varying width and depth multiples (0.5, 0.33, 0.125, and 0.0625), respectively named YOLOv7-tiny-OptimaFlex-0.5, YOLOv7-tiny-OptimaFlex-0.33, YOLOv7-tiny-OptimaFlex-0.125, and YOLOv7-tiny-OptimaFlex-0.0625. As seen in Table 2, the fine-tuning involved adjusting the width_multiple and depth_multiple parameters of the YOLOv7-tiny-Second-Prune structure, maintaining 156 layers across all configurations but varying the number of parameters. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **\begin{tabular}{c} **Number of** \\ **Parameters** \\ \end{tabular} & \
\begin{tabular}{c} **Number of** \\ **Network** \\ **Layers** \\ \end{tabular} & **Precision** & **Recall** & **mAP@.5** &
\begin{tabular}{c} **Storage Size of** \\ **Weight File (MB)** \\ \end{tabular} \\ \hline Yolov7 & 36,487,166 & 314 & 0.995 & 0.984 & 0.996 & 74.8 \\ Yolov7-tiny & 6,010,302 & 208 & 0.991 & 0.992 & 0.996 & 12.3 \\ Yolov7-tiny-First-Prune & 3,963,128 & 182 & 0.999 & 1 & 0.996 & 8.1 \\ Yolov7-tiny-Second-Prune & 3,449,878 & 156 & 0.999 & 1 & 0.996 & 7.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparative analysis of YOLOv7 iterations: assessing the impact of structured pruning on model efficiency and eye state detection accuracy. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **\begin{tabular}{c} **Width Multiple/** \\ **Depth Multiple** \\ \end{tabular} & \begin{tabular}{c} **Number of** \\ **Parameters** \\ \end{tabular} & \
\begin{tabular}{c} **Number of** \\ **Layers** \\ \end{tabular} & **Precision** & **Recall** & **mAP@.5** &
\begin{tabular}{c} **Storage Size of** \\ **Weight File (MB)** \\ \end{tabular} \\ \hline Yolov7-tiny-Second-Prune & 0.5 & 864,174 & 156 & 0.984 & 0.992 & 0.996 & 1.9 \\
2-5 & 0.33 & 358,878 & 156 & 0.997 & 1 & 0.996 & 0.9 \\
2-5 & 0.125 & 55,742 & 156 & 0.997 & 1 & 0.996 & 0.3 \\
2-5 & 0.0625 & 20,174 & 156 & 0.958 & 0.982 & 0.975 & 0.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Evaluating the efficacy of fine-tuning YOLOv7-tiny-Second-Prune architecture across varied configurations for enhanced eye state detection. The results demonstrate a clear trend of improving the model's efficiency as we decrease the number of parameters by adjusting the width and depth multiples. Notably, even with substantial reductions in complexity, the model maintains high performance levels, as indicated by precision, recall, and mAP@.5 metrics. The configurations with width/depth multiples of 0.33 and 0.125 offer an exceptional balance, achieving nearly perfect precision and recall with significantly reduced parameter counts and storage sizes. This highlights the effectiveness of fine-tuning in optimizing model performance while reducing computational demands. The configuration with a width/depth multiple of 0.0625, while demonstrating the highest efficiency in terms of parameter count and storage size, shows a slight drop in precision and recall. This suggests there is a limit to how much the model can be simplified without affecting its ability to accurately detect eye states. The substantial decrease in storage size, from 1.9 MB in the 0.5 configuration to 0.2 MB in the 0.0625 configuration, illustrates the benefits of fine-tuning for applications where storage capacity is limited. The experimental analysis underscores the significance of fine-tuning the YOLOv7-tiny-Second-Prune model architecture for specific tasks such as eye state detection. By systematically adjusting the width_multiple and depth_multiple parameters, we can significantly enhance the model's efficiency and suitability for real-time applications without substantially compromising accuracy.