A method for detecting fatigue driving in an infrared monitoring scene
By acquiring driver facial videos under infrared monitoring, performing feature enhancement, and constructing a fatigue driving prediction network, the problem of low detection accuracy caused by facial differences under infrared monitoring is solved, and efficient fatigue driving detection under infrared monitoring is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2025-08-20
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies have low accuracy in detecting fatigue driving due to facial differences under infrared monitoring, making it difficult to effectively detect fatigue driving under infrared monitoring.
A fatigue driving detection method is adopted in infrared monitoring scenarios, including acquiring infrared video of the driver's face, extracting video frames and performing feature enhancement processing, constructing a fatigue driving prediction network, training the model through the BCE loss function, using attention weights and feature pyramid diagrams for feature enhancement and optimization, and finally detecting fatigue state.
Infrared monitoring improves the accuracy and real-time performance of fatigue driving detection, effectively identifying driver fatigue and enhancing detection precision and stability, thus possessing practical application value.
Smart Images

Figure CN121482756B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically relating to a fatigue driving detection method in an infrared monitoring scenario. Background Technology
[0002] Driving is an almost indispensable part of daily life, and driver fatigue detection is a frequently discussed topic in computer vision. Currently, mainstream fatigue detection methods fall into two main categories: traditional methods and modern methods. Traditional methods primarily rely on human intervention and are greatly affected by human factors, such as the observer's experience and attention, which may lead to misjudgments or missed detections. Furthermore, manual detection methods often lack unified standards, making it difficult to guarantee the consistency and comparability of detection results. Modern methods, on the other hand, are mainly based on target detection or electrode recording of the driver's electroencephalogram (EEG) spectrum, enabling them to operate in numerous complex environments and ensuring stable and reliable detection results under various conditions.
[0003] Compared to traditional methods, modern driver fatigue monitoring technology, with its intelligent perception and algorithmic advantages, significantly improves detection efficiency while drastically reducing the time and labor costs required for manual inspections. Many deep learning-based fatigue driving detection methods first locate the driver's face, then roughly pinpoint the locations of the eyes and mouth before performing relevant detection. However, the detection effectiveness of this method varies due to differences in individual face shapes, leading to offsets in face localization and resulting in poor detection results. This is especially true in vehicle-mounted monitoring conditions, where the grayscale image from infrared monitoring introduces errors into the detection results. Summary of the Invention
[0004] To address the aforementioned problems, the present invention aims to provide a fatigue driving detection method under infrared monitoring scenarios, which solves the problems of low accuracy due to facial differences and difficulty in detection under infrared monitoring in the prior art.
[0005] To achieve the above objectives, the technical solution adopted by the present invention includes:
[0006] A method for detecting driver fatigue under infrared monitoring scenarios includes the following steps:
[0007] S1. Acquire infrared video of the driver's face during vehicle driving, extract video frames from the driver's infrared video of the face and filter out inferior images to obtain a video frame image set, which includes multiple video frame images.
[0008] S2, perform feature enhancement processing on all video frame images obtained in S1 to obtain an enhanced video frame image set, which includes multiple enhanced video frame images;
[0009] S3, annotate the ground truth bounding boxes for open eyes, closed eyes, open mouth and closed mouth of all enhanced video frame images to obtain an annotated video frame image set, which includes multiple annotated video frame images.
[0010] S4. Construct a fatigue driving prediction network by taking the labeled video frame image set as input and training the fatigue driving prediction network with the BCE loss function to obtain a fatigue driving prediction model.
[0011] S5 involves extracting video frames and enhancing features from the infrared video of the driver's face to be detected, resulting in multiple enhanced video frame images to be detected. All enhanced video frame images to be detected are then input into the fatigue driving prediction model obtained in S4 to obtain the final prediction box for each enhanced video frame image to determine the detection result of the driver's fatigue state.
[0012] Preferably, the training process for S4 is as follows:
[0013] S4.1, Perform feature extraction on the labeled video frame images to obtain a feature map set, which includes multiple feature maps;
[0014] S4.2, calculate the attention weights for all feature maps to obtain multiple attention weight maps;
[0015] S4.3, perform scale-aware calculations on all attention weight maps to obtain multiple spatial attention weight maps;
[0016] S4.4 Multiply each spatial attention weight map element-wise with the corresponding feature map obtained in S4.1 to obtain a weighted feature map;
[0017] S4.5, reduce the resolution of each weighted feature map to obtain a low-resolution feature map set. The low-resolution feature map set includes 1 / 4 original resolution feature map, 1 / 8 original resolution feature map, 1 / 16 original resolution feature map and 1 / 32 original resolution feature map. Then, perform linear transformation and nonlinear activation on each low-resolution feature map in the low-resolution feature map set through Equation (6) to obtain a feature map set of unified dimension. The feature map set of unified dimension includes multiple feature maps of unified dimension.
[0018]
[0019] Among them, P i 0(x, y) is the uniform-dimensional feature map obtained after activating the i-th weighted feature map at position xy; σ is the activation function, (x, y) are the coordinates on the feature map, K represents the convolution kernel, m and n are the coordinates of the convolution kernel, and b represents the bias value;
[0020] S4.6 Upsamples the feature map set of the same dimension from top to bottom to obtain the feature pyramid map;
[0021] S4.7, adaptive pooling, convolutional smoothing and bottom-up path aggregation are performed on the feature pyramid map to obtain the path aggregation feature map;
[0022] S4.8 Input the path aggregation feature map into the detection head for convolution operation to obtain a feature map with predicted boxes. Then, optimize the difference between the predicted box and the ground truth box in each feature map through the BCE loss function until convergence, and obtain the final predicted box of the feature map corresponding to each labeled video frame image.
[0023] Preferably, the scale-aware calculation for any attention weight map in S4.3 is as follows:
[0024] S4.3.1 Perform 2D global average pooling on each attention weight map to obtain the global feature vectors of the two branches corresponding to each attention weight map;
[0025] S4.3.2, the global feature vectors of the two branches corresponding to each attention weight map are processed by the Softmax function, and then a linear transformation is fitted by 2D Gaussian mapping. Finally, a matrix dot product operation is performed with the parallel processing output to obtain the first spatial attention map and the second spatial attention map.
[0026] S4.3.3 aggregates the weight values of the first spatial attention map and the second spatial attention map, and then processes them with the Sigmoid function to obtain the spatial attention weight map.
[0027] Preferably, the process of filtering out inferior images in S1 specifically involves filtering out images where facial features are difficult to determine due to factors such as reflections or obstructions.
[0028] Preferably, the feature enhancement processing of S2 specifically includes sequentially performing contrast enhancement, filtering, and edge detection enhancement on the video frame image.
[0029] Preferably, enhancing contrast specifically includes:
[0030] S2.1, calculate the gray level probability distribution of each video frame image using equation (1);
[0031]
[0032] Where, r kIt is the kth gray level; nk is the gray level r k The number of pixels, where N is the total number of pixels.
[0033] S2.2, calculate the new gray level sk after mapping rk of each video frame image using equation (2);
[0034]
[0035] Wherein, T(r) k ) is the transformation function;
[0036] S2.3, s is obtained through equation (3) k Normalized to the grayscale range, we get s k ';
[0037] s k =round(L-1)·s k (3)
[0038] Where L is the total number of gray levels, and round is the rounding function;
[0039] S2.4, replace the grayscale level of each pixel in each video frame image with s k This yields a set of video frame images with enhanced contrast, which includes multiple video frame images with enhanced contrast.
[0040] Preferably, the filtering process specifically involves performing Gaussian filtering on all the video frame images after contrast enhancement to obtain a denoised video frame image set, which includes multiple denoised video frame images.
[0041] Preferably, edge detection enhancement specifically involves calculating the gradient in the horizontal direction and the gradient in the vertical direction of each denoised video frame image using the Sobel operator in the horizontal direction and the Sobel operator in the vertical direction, to obtain an enhanced video frame image set, which includes multiple enhanced video frame images.
[0042] The horizontal Sobel operator is shown in equation (4);
[0043]
[0044] The Sobel operator in the vertical direction is shown in equation (5);
[0045]
[0046] Where g(x,y)=G(x,y) / G(0,0) represents the normalized Gaussian weights, G(x,y) represents the two-dimensional Gaussian function, and G(0,0) represents the value of the two-dimensional Gaussian function at the origin.
[0047] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the fatigue driving detection method disclosed in this application under infrared monitoring scenarios.
[0048] A computer program product includes a computer program / instructions, which, when executed by a processor, implement the fatigue driving detection method in an infrared monitoring scenario disclosed in this application.
[0049] Compared with the prior art, the advantages of the present invention are:
[0050] (1) The fatigue driving detection method under infrared monitoring scenarios of the present invention collects driver facial data in a targeted manner under infrared monitoring, covering a variety of states, allowing the model to adapt to complex lighting and focus on learning key scene features, thereby improving the ability to identify driver fatigue states. It can accurately identify driver states under infrared monitoring and has a certain degree of real-time performance and accuracy.
[0051] (2) The fatigue driving detection method under infrared monitoring scenarios of the present invention effectively captures multi-scale features and optimizes feature representation to better identify targets of different scales, significantly improving detection accuracy in complex scenarios; at the same time, it enhances feature expression capabilities, captures richer contextual information through multi-scale fusion strategies, and can reduce redundant calculations, thereby enhancing the detection performance for targets of different sizes.
[0052] (3) The fatigue driving detection method under infrared monitoring scenario of the present invention performs multiple normalization processing on the image to improve training efficiency and stability. The final model has practical application value and can help improve traffic safety. Attached Figure Description
[0053] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof. In the drawings:
[0054] Figure 1 This is a schematic diagram of a video frame image;
[0055] Figure 2 This is a schematic diagram of the enhanced video frame image;
[0056] Figure 3 This is a schematic diagram of the enhanced video frame image to be detected;
[0057] Figure 4 This is the result of the existing dlib algorithm detecting the driver's face;
[0058] Figure 5 This is the result of the existing YOLOv11 algorithm detecting the driver's facial state;
[0059] Figure 6 This is the result of the method of the present invention detecting the driver's facial state. Detailed Implementation
[0060] The invention is not limited to the specific embodiments described below. All equivalent modifications made based on the technical solutions of this application fall within the protection scope of this invention. Unless otherwise specified, all components and devices in this invention utilize components and devices known in the prior art.
[0061] Example
[0062] This embodiment discloses a fatigue driving detection method in an infrared monitoring scenario, including the following steps:
[0063] S1, acquire infrared video of the driver's face during vehicle driving, extract video frames from the driver's facial infrared video and filter out inferior images to obtain a video frame image set. The video frame image set includes multiple video frame images, and any video frame image is as follows: Figure 2 As shown.
[0064] In this embodiment, the driver's facial infrared video during vehicle driving is obtained from the vehicle monitoring video, which includes the driver's different states at different times while driving the vehicle, including the driver's open eyes, closed eyes, open mouth, and closed mouth while driving.
[0065] The poor-quality images in this embodiment include at least those that make it difficult to determine the facial condition due to factors such as reflections or obstructions.
[0066] S2, perform feature enhancement processing on all video frame images obtained in S1 to obtain an enhanced video frame image set. The enhanced video frame image set includes multiple enhanced video frame images, and any enhanced video frame image is as follows: Figure 2 As shown, the feature enhancement processing in this embodiment specifically includes sequentially performing contrast enhancement, filtering, and edge detection enhancement on the video frame image.
[0067] In this embodiment, the contrast enhancement can effectively enhance the contrast of the image, specifically including:
[0068] S2.1, calculate the gray level probability distribution of each video frame image using equation (1);
[0069]
[0070] Where rk is the k-th gray level; nk is the gray level r k The number of pixels, where N is the total number of pixels.
[0071] S2.2, calculate the new gray level sk after mapping rk of each video frame image using equation (2);
[0072]
[0073] Wherein, T(r) k ) is the transformation function;
[0074] S2.3, s is obtained through equation (3) k Normalized to the grayscale range, we get s k ';
[0075] s k =round(L-1)·s k (3)
[0076] Where L is the total number of gray levels, and round is the rounding function;
[0077] S2.4, replace the grayscale level of each pixel in each video frame image with s k This yields a set of video frame images with enhanced contrast, which includes multiple video frame images with enhanced contrast.
[0078] The filtering process in this embodiment can remove noise from the video frame images after contrast enhancement while preserving the edge and detail information of the video frame images after contrast enhancement as much as possible. Specifically, all the video frame images after contrast enhancement are subjected to Gaussian filtering to obtain a set of denoised video frame images, which includes multiple denoised video frame images.
[0079] The edge detection enhancement in this embodiment can highlight the edge information of the denoised video frame image, making the denoised video frame image clearer and easier to observe, and improving the visual effect of the denoised video frame image; specifically, the gradient in the horizontal direction and the gradient in the vertical direction of each denoised video frame image are calculated by the Sobel operator in the horizontal direction and the Sobel operator in the vertical direction to obtain the enhanced video frame image set, which includes multiple enhanced video frame images.
[0080] The horizontal Sobel operator is shown in equation (4);
[0081]
[0082] The Sobel operator in the vertical direction is shown in equation (5);
[0083]
[0084] Where g(x,y)=G(x,y) / G(0,0) represents the normalized Gaussian weights, G(x,y) represents the two-dimensional Gaussian function, and G(0,0) represents the value of the two-dimensional Gaussian function at the origin.
[0085] S3, annotate the ground truth bounding boxes for open eyes, closed eyes, open mouth, and closed mouth in all enhanced video frame images to obtain an annotated video frame image set, which includes multiple annotated video frame images;
[0086] In this embodiment, the annotation process involves manual participation. After manual annotation, the annotated file is formatted as txt. The real bounding box contains the relative position (coordinates) of the object annotation information in the image and the category information (open eyes, closed eyes, open mouth, and closed mouth).
[0087] S4. Construct a fatigue driving prediction network by taking the labeled video frame image set as input and training the fatigue driving prediction network with the BCE loss function to obtain a fatigue driving prediction model.
[0088] The training process in S4 of this embodiment is as follows:
[0089] S4.1, Perform feature extraction on the labeled video frame images to obtain a feature map set, which includes multiple feature maps;
[0090] Assuming the labeled video frame image is I, after passing through a series of convolutional and pooling layers, a feature map set {F1, F2, ..., F} is obtained. n ,} where Fi represents the i-th feature map with size H. i ×W i ×C i H i and W i These are the height and width of the feature map, C. i It refers to the number of channels.
[0091] S4.2, calculate the attention weights for all feature maps to obtain multiple attention weight maps;
[0092] S4.3, perform scale-aware calculations on all attention weight maps to obtain multiple spatial attention weight maps;
[0093] Specifically, the scale-aware calculation for any attention weight map in S4.3 is as follows:
[0094] S4.3.1, perform 2D global average pooling on each attention weight map to obtain the global feature vectors of the two branches corresponding to each attention weight map; in this embodiment, the two branches are specifically a 1x1 convolution branch and a 3x3 convolution branch.
[0095] S4.3.2, the global feature vectors of the two branches corresponding to each attention weight map are processed by the Softmax function, and then a linear transformation is fitted by 2D Gaussian mapping. Finally, a matrix dot product operation is performed with the parallel processing output to obtain the first spatial attention map and the second spatial attention map.
[0096] S4.3.3, aggregate the weight values of the first spatial attention map and the second spatial attention map, and then process them with the Sigmoid function to obtain the spatial attention weight map;
[0097] S4.4 multiplies each spatial attention weight map element-wise with the corresponding feature map obtained in S4.1 to obtain a weighted feature map; this enhances the features near the driver's eyes and mouth, while suppressing the features of the environment around the driver.
[0098] S4.5, reduce the resolution of each weighted feature map, that is, as the network layer deepens, a low-resolution feature map set is obtained. The low-resolution feature map set includes 1 / 4 original resolution feature map, 1 / 8 original resolution feature map, 1 / 16 original resolution feature map and 1 / 32 original resolution feature map. Then, linear transformation and nonlinear activation are performed on each low-resolution feature map in the low-resolution feature map set through Equation (6) to obtain a feature map set of unified dimension. The feature map set of unified dimension includes multiple feature maps of unified dimension.
[0099]
[0100] Among them, P i 0 (x, y) is the uniform-dimensional feature map obtained after activating the i-th weighted feature map at position xy; σ is the activation function, (x, y) are the coordinates on the feature map, K represents the convolution kernel, m and n are the coordinates of the convolution kernel, and b represents the bias value;
[0101] S4.6 Upsamples the feature map set of the same dimension from top to bottom to obtain the feature pyramid map;
[0102] S4.7, adaptive pooling, convolutional smoothing and bottom-up path aggregation are performed on the feature pyramid map to obtain the path aggregation feature map;
[0103] S4.8 Input the path aggregation feature map into the detection head for convolution operation to obtain a feature map with predicted boxes. Then, optimize the difference between the predicted box and the ground truth box in each feature map through the BCE loss function until convergence, and obtain the final predicted box of the feature map corresponding to each labeled video frame image.
[0104] S5, perform video frame extraction and feature enhancement processing on the infrared video of the driver's face to be detected, obtaining multiple enhanced video frame images to be detected. Any enhanced video frame image to be detected is shown below. Figure 3 As shown, all the enhanced video frame images to be detected are input into the fatigue driving prediction model obtained by S4 to obtain the final prediction box of each enhanced video frame image to be detected, so as to determine the detection result of the driver's fatigue state.
[0105] This embodiment counts the number of frames in which the driver closes their eyes. When the number of frames exceeds three times the video frame rate, meaning the driver remains with their eyes closed for three seconds in the video, the driver is considered to be driving while fatigued. At the same time, the number of frames in which the driver opens their mouth is counted. When the number of frames in which the driver opens their mouth exceeds six times the video frame rate, meaning the driver opens their mouth for six seconds in the video, the driver is considered to be yawning, and the driver is also considered to be driving while fatigued.
[0106] This embodiment also includes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the fatigue driving detection method in the infrared monitoring scenario disclosed in this application.
[0107] This embodiment also includes a computer program product, comprising a computer program / instructions, which, when executed by a processor, implement the fatigue driving detection method in an infrared monitoring scenario disclosed in this application.
[0108] This embodiment uses Figures 3-6 The image shown is used as an example for experimental illustration. Following the above steps, the recognition results of the driver's driving state by the infrared vehicle monitoring system of the present invention are obtained, and compared with the existing technologies dlib and YOLOv11 algorithms. Figure 3 This is a schematic diagram of the enhanced video frame image to be detected. Figure 4 The results of driver's face detection using the existing dlib algorithm; Figure 5 The results of the existing YOLOv11 algorithm for detecting the driver's facial state; Figure 6 This is the result of the method of the present invention detecting the driver's facial state. It can be seen that the method of the present invention has a better effect on driver facial state detection and recognition for infrared vehicle-mounted monitoring.
[0109] Meanwhile, this embodiment will compare the method of the present invention with the existing dlib algorithm and YOLOv11 algorithm by using three important parameters: precision (P), recall (R), and F1 score (F1).
[0110] Precision rate represents the proportion of samples predicted as positive by the model that are actually positive. It reflects the accuracy of the model's predictions, i.e., how many of the predicted targets are actually true targets. The calculation formula is:
[0111]
[0112] In the above formula, TP stands for True Positive Instance, which refers to the number of targets correctly detected by the model, that is, the number of targets predicted by the model that match the ground truth targets. A Cross-Union Ratio (CUI) threshold is set to determine whether the predicted bounding box matches the ground truth bounding box; when the CUI is greater than this threshold, the prediction is considered correct. FP stands for False Positive Instance, which is the number of targets incorrectly detected by the model.
[0113] Recall is the proportion of samples that were actually positive that were correctly predicted as positive by the model. It measures the model's ability to find all real targets, i.e., how many actual targets the model can detect. The formula is:
[0114]
[0115] Here, FN represents the number of targets missed by the model, which are targets that exist in the real scene but were not detected by the model. TP is the real-world example mentioned above.
[0116] The F1 score is the harmonic mean of precision and recall, used to comprehensively evaluate the model's performance. It strikes a balance between precision and recall. The calculation formula is as follows:
[0117]
[0118] Where P is precision and R is recall.
[0119] In summary, the higher a model's precision (P), recall (R), and F1 score (F1), the better its performance and effectiveness.
[0120] Table 1 compares the method of this invention with the existing dlib algorithm and YOLOv11 algorithm. As can be seen from Table 1, the precision, recall, and F1 score of the method of this invention are all higher than those of the two existing technologies. In other words, the method of this invention is superior in assessing the driver's facial state under infrared monitoring and is more accurate in determining whether the driver is fatigued.
[0121] Table 1 Comparison of different algorithms
[0122]
[0123] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting driver fatigue under infrared monitoring scenarios, characterized in that, Includes the following steps: S1, acquire infrared video of the driver's face during vehicle driving, extract video frames from the driver's facial infrared video and filter out inferior images to obtain a video frame image set, the video frame image set including multiple video frame images. S2, perform feature enhancement processing on all video frame images obtained in S1 to obtain an enhanced video frame image set, the enhanced video frame image set including multiple enhanced video frame images; S3, mark the real bounding boxes of open eyes, closed eyes, open mouth and closed mouth for all enhanced video frame images to obtain a set of annotated video frame images, the set of annotated video frame images includes multiple annotated video frame images; S4, construct a fatigue driving prediction network. Use the labeled video frame image set as input and train the fatigue driving prediction network using the BCE loss function to obtain a fatigue driving prediction model. The training process of S4 is as follows: S4.1, Perform feature extraction on the labeled video frame images to obtain a feature map set, wherein the feature map set includes multiple feature maps; S4.2, calculate the attention weights for all feature maps to obtain multiple attention weight maps; S4.3, perform scale-aware calculations on all attention weight maps to obtain multiple spatial attention weight maps; S4.4 Multiply each spatial attention weight map element-wise with the corresponding feature map obtained in S4.1 to obtain a weighted feature map; S4.5, reduce the resolution of each weighted feature map to obtain a low-resolution feature map set, which includes a 1 / 4 original resolution feature map, a 1 / 8 original resolution feature map, a 1 / 16 original resolution feature map and a 1 / 32 original resolution feature map. Then, perform linear transformation and nonlinear activation on each low-resolution feature map in the low-resolution feature map set using Equation (6) to obtain a feature map set with a unified dimension, which includes multiple feature maps with a unified dimension. (6) in, It is a uniform-dimensional feature map obtained by activating the i-th weighted feature map at position xy; It is an activation function. These are the coordinates on the feature map, and K represents the convolution kernel. and is the coordinate of the convolution kernel, and b represents the bias value; S4.6 Upsamples the feature map set of the same dimension from top to bottom to obtain the feature pyramid map; S4.7, adaptive pooling, convolutional smoothing and bottom-up path aggregation are performed on the feature pyramid map to obtain the path aggregation feature map; S4.8 Input the path aggregation feature map into the detection head for convolution operation to obtain a feature map with prediction boxes. Then, optimize the difference between the prediction box and the ground box in each feature map through the BCE loss function until convergence, and obtain the final prediction box of the feature map corresponding to each labeled video frame image. S5 involves extracting video frames and enhancing features from the infrared video of the driver's face to be detected, resulting in multiple enhanced video frame images to be detected. All enhanced video frame images to be detected are then input into the fatigue driving prediction model obtained in S4 to obtain the final prediction box for each enhanced video frame image to determine the detection result of the driver's fatigue state.
2. The fatigue driving detection method under infrared monitoring scenarios as described in claim 1, characterized in that, The scale-aware calculation for any attention weight map in S4.3 is as follows: S4.3.1 Perform 2D global average pooling on each attention weight map to obtain the global feature vectors of the two branches corresponding to each attention weight map; S4.3.2, the global feature vectors of the two branches corresponding to each attention weight map are processed by the Softmax function, and then a linear transformation is fitted by 2D Gaussian mapping. Finally, a matrix dot product operation is performed with the parallel processing output to obtain the first spatial attention map and the second spatial attention map. S4.3.3 aggregates the weight values of the first spatial attention map and the second spatial attention map, and then processes them with the Sigmoid function to obtain the spatial attention weight map.
3. The fatigue driving detection method under infrared monitoring scenarios as described in claim 2, characterized in that, The process of filtering out substandard images in S1 specifically involves filtering out images where facial features are difficult to determine due to factors such as reflections or obstructions.
4. The fatigue driving detection method under infrared monitoring scenarios as described in claim 3, characterized in that, The feature enhancement process of S2 specifically includes sequentially performing contrast enhancement, filtering, and edge detection enhancement on the video frame image.
5. The fatigue driving detection method under infrared monitoring scenarios as described in claim 4, characterized in that, The enhanced contrast specifically includes: S2.1, calculate the gray level probability distribution of each video frame image using equation (1); (1) in, It is the kth gray level; It is grayscale. The number of pixels, It is the total number of pixels; S2.2, calculate the image of each video frame using equation (2). New grayscale level after mapping ; (2) in, It is a transformation function; S2.3, through equation (3) Normalized to the grayscale range, we get ; (3) in, It is the total number of gray levels. It is a rounding function; S2.4, replace the grayscale level of each pixel in each video frame image with... A set of video frame images with enhanced contrast is obtained, wherein the set of video frame images with enhanced contrast includes multiple video frame images with enhanced contrast.
6. The fatigue driving detection method under infrared monitoring scenarios as described in claim 5, characterized in that, Specifically, the filtering process involves performing Gaussian filtering on all the video frame images after contrast enhancement to obtain a set of denoised video frame images, which includes multiple denoised video frame images.
7. The fatigue driving detection method under infrared monitoring scenarios as described in claim 6, characterized in that, The edge detection enhancement specifically involves calculating the gradient in the horizontal direction and the gradient in the vertical direction of each denoised video frame image using the Sobel operator in the horizontal direction and the Sobel operator in the vertical direction, to obtain an enhanced set of video frame images, which includes multiple enhanced video frame images. The horizontal Sobel operator is as shown in equation (4); (4) The Sobel operator in the vertical direction is as shown in equation (5); (5) in, Represents the normalized Gaussian weights, Represents a two-dimensional Gaussian function. This represents the value of the two-dimensional Gaussian function at the origin.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the fatigue driving detection method under infrared monitoring scenarios as described in any one of claims 1-7.
9. A computer program product, characterized in that, It includes a computer program / instruction, which, when executed by a processor, implements the fatigue driving detection method in any one of the infrared monitoring scenarios described in claims 1-7.
Citation Information
Patent Citations
Fatigue detection method and device based on time sequence self-attention and auxiliary supervision
CN119580233A
Fatigue driving detection method and system based on camera and heart rate monitoring
CN120145299A