## 2 Algorithm and Methodology
### Sliding Window Model
Ground truth labels were determined through a combination of participant self-reported fatigue ratings and expert annotations of behavioral cues. The predicted fatigue levels were produced by the proposed model using fused behavioral indicators. As shown in Figure 10, the classification results yielded an overall accuracy of 91.7%, with particularly strong performance in recognizing Awake and Severe states (both achieving 100% classification accuracy). Misclassifications primarily occurred between adjacent

Figure 9: Changes in fatigue status during a 30 min fatigue driving test among subjects in Groups A, B, and C.

classes, such as Mild and Moderate, which are often difficult to distinguish due to their gradual transitions in real-world conditions. The confusion matrix confirms that the proposed system can reliably distinguish between four fatigue levels, supporting its applicability in graded fatigue warning systems. ### Effectiveness of Personalized Thresholds in Improving Detection Accuracy

Figure 11a,b present line plots of yawns and blinks observed during fatigue driving tests on 12 participants. The plots compare the results of two detection methods: the personalized threshold method (blue dots) and the average threshold method (red squares), with the gray dashed line representing the real values. It is evident from the figures that the personalized threshold detection consistently produces results that are closer to the real values, demonstrating superior detection accuracy. In contrast, the average threshold method shows greater deviation from the real values, reflecting its lower performance. To better assess the performance of the personalized threshold and average threshold methods in fatigue driving detection, we calculated the Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE), and the results are presented in Table 4. The MAE is calculated as:

\[\text{MAE}=\frac{1}{n}\sum_{i=1}^{n}|y_{i}-\hat{y}_{i}| \tag{15}\]

Figure 11: (**a**) Line plot of the number of yawns in fatigue driving detection; (**b**) Line plot of the number of blinks in fatigue driving detection. Figure 10: Confusion matrix of fatigue severity classification. where \(y_{i}\) represents the actual values, \(\hat{y}_{i}\) represents the predicted values, and \(n\) is the number of data points. The RMSE is calculated as:

\[l\in\{\text{Awake, Mild, Moderate, Severe}\}\]0

As shown in Table 4, the MAE and RMSE values of the personalized threshold method are significantly lower than those of the average threshold method, indicating its ability to more accurately approximate the real values in practical applications. These results clearly highlight the effectiveness of the personalized threshold method, which provides a closer approximation to the real values and outperforms the traditional average threshold method in both yawns and blinks detection. This confirms that the personalized threshold method offers a significant improvement in detection accuracy and reliability, making it a superior choice for fatigue driving detection. ### Fatigue Detection Accuracy

To calculate the average accuracy of the proposed fatigue driving detection algorithm, 45 video segments randomly selected from the YawDD dataset were used to detect fatigue status under various conditions. The multi-feature fatigue detection method records the number of blinks, yawns, and nods, as well as the fatigue status for each video segment, and the detection results are compared with the actual values. The experimental results are shown in Table 5 (only a portion of the results is presented). The results indicate that, out of 45 detections, 43 correctly identified the fatigue status, with only 2 instances where the fatigue state was mistakenly identified as normal. The average accuracy reached 95.6%.