A drunk driving detection method and system based on sensor and machine vision
Through the combination of sensors and machine vision, deep neural networks and multi-modal coding technology are used to solve the complexity and lack of preventiveness of traditional drunk driving detection methods, achieve more accurate drunk driving detection and early warning, and improve traffic safety.
Patent Information
- Application Number
- CN202410935262.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Traditional drunk driving detection methods have problems such as complex operation, low efficiency, inability to fully consider the driver's status and behavior, easy to be circumvented, and lack of preventive measures.
Using a method based on sensors and machine vision, the alcohol sensor obtains the alcohol concentration time series in the car and the camera collects the driver's facial image, and performs contrast normalization, deep neural network feature extraction, multi-channel feature fusion and cross-modal coding to generate Facial feature-alcohol concentration multimodal fusion representation features to determine drunk driving warning.
It achieves more accurate drunk driving detection and early warning, comprehensively assesses the driver's status, prevents traffic accidents, and provides stronger safety guarantee for travel.
Smart Images

Figure CN118457218B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of drunk driving detection, and in particular, to a drunk driving detection method and system based on sensors and machine vision. Background Art
[0002] With the development of society and the advancement of science and technology, traffic safety issues have attracted more and more attention. As one of the main causes of traffic accidents, drunk driving not only endangers the driver's own life safety, but also threatens the safety of other road users. Therefore, the development of effective drunk driving detection technology is of great significance for preventing traffic accidents and protecting people's lives and property.
[0003] Traditional methods of drunk driving detection mainly rely on breath alcohol testing instruments or blood tests to determine whether the driver is drunk driving. Although these methods can detect drunk driving behavior to a certain extent, they have some defects: the blood test method is complicated to operate, inefficient, and not easy to popularize. Due to the different alcohol metabolism rates of different people, the breath alcohol test method may cause some drivers to engage in dangerous driving behavior even when the alcohol concentration does not meet the specified standard. In addition, traditional drunk driving detection methods often rely on the measurement of alcohol concentration and cannot fully consider the driver's state and behavior. In addition, traditional drunk driving detection methods require on-site operation by traffic police, which not only increases labor costs, but also may affect the accuracy of the detection due to human factors.
[0004] In addition, with the breath alcohol test, drivers can also take some measures to circumvent traditional drunk driving detection, such as changing lanes or stopping before approaching the test. In addition, traditional drunk driving detection solutions usually test after the accident, lacking preventive measures, and unable to take immediate measures to stop drivers from driving after drinking.
[0005] Therefore, an optimized drunk driving detection method and system based on sensors and machine vision is needed to solve the above technical problems. Summary of the invention
[0006] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] In a first aspect, the present disclosure provides a method for detecting drunk driving based on sensors and machine vision, the method comprising:
[0008] Obtaining a time series of alcohol concentration in the vehicle collected by the alcohol sensor and a facial image of the driver collected by the camera;
[0009] performing contrast normalization on the facial image of the driving subject to obtain a detail-enhanced facial image of the driving subject;
[0010] Performing multi-level feature capture on the facial image of the detail-enhanced driving subject by a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map;
[0011] Using a multi-channel feature fusion module guided by facial semantic features, the facial shallow feature map and the facial semantic feature map are processed to obtain a facial multi-scale fusion feature map;
[0012] Performing time series encoding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle;
[0013] Inputting the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature;
[0014] Based on the facial feature-alcohol concentration multimodal fusion representation feature, it is determined whether to generate a drunk driving warning prompt.
[0015] Optionally, the facial feature extractor based on a deep neural network is a facial feature extractor based on a dilated pyramid network.
[0016] Optionally, a multi-channel feature fusion module guided by facial semantic features is used to process the facial shallow feature map and the facial semantic feature map to obtain a facial multi-scale fusion feature map, including: cascading the facial shallow feature map and the facial semantic feature map to obtain a facial shallow-semantic fusion feature map; performing convolution encoding on the facial shallow-semantic fusion feature map to obtain a facial shallow-semantic interaction feature map; performing batch normalization processing on the facial shallow-semantic interaction feature map to obtain a normalized facial shallow-semantic interaction feature map; performing global pooling processing based on the maximum value, global pooling processing based on the random value, and global pooling processing based on the average value on the normalized facial shallow-semantic interaction feature map to obtain a facial shallow -The global maximum pooling feature vector of facial shallow-semantic interaction features, the global random value pooling feature vector of facial shallow-semantic interaction features and the global mean pooling feature vector of facial shallow-semantic interaction features; calculate the position-weighted sum of the global maximum pooling feature vector of facial shallow-semantic interaction features, the global mean pooling feature vector of facial shallow-semantic interaction features and the global random value pooling feature vector of facial shallow-semantic interaction features to obtain a multi-scale pooling representation vector of facial shallow-semantic interaction features; use the eigenvalues of each position in the multi-scale pooling representation vector of facial shallow-semantic interaction features as weights, and weight each feature matrix of the facial shallow feature map along the channel dimension to obtain the facial multi-scale fusion feature map.
[0017] Optionally, the facial shallow-semantic interaction feature map is batch normalized to obtain a normalized facial shallow-semantic interaction feature map, including: performing data distribution balancing processing on the facial shallow-semantic interaction feature map to obtain a data distribution balanced facial shallow-semantic interaction feature map; and batch normalizing the data distribution balanced facial shallow-semantic interaction feature map to obtain the normalized facial shallow-semantic interaction feature map.
[0018] Optionally, the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature, the global mean pooling feature vector of the facial shallow-semantic interaction feature and the global random value pooling feature vector of the facial shallow-semantic interaction feature is calculated to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction feature, including: calculating the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature and a first preset trainable weight value to obtain the global maximum pooling feature vector of the facial shallow-semantic interaction feature after weight modulation; calculating the position-weighted sum of the global mean pooling feature vector of the facial shallow-semantic interaction feature and a second preset trainable weight value Positional product is performed to obtain a global mean pooling feature vector of the weight-modulated facial shallow-semantic interaction features; the positional product between the global random value pooling feature vector of the facial shallow-semantic interaction features and the third preset trainable weight value is calculated to obtain a global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features; the global maximum value pooling feature vector of the weight-modulated facial shallow-semantic interaction features, the global mean pooling feature vector of the weight-modulated facial shallow-semantic interaction features and the global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features are added by position to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction features.
[0019] Optionally, the time series of the alcohol concentration in the vehicle is time-series encoded to obtain a time series association representation vector of the alcohol concentration in the vehicle, including: inputting the time series of the alcohol concentration in the vehicle into a sequence encoder based on a GRU model to obtain the time series association representation vector of the alcohol concentration in the vehicle.
[0020] Optionally, the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector are input into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature, including: matrix multiplying the in-vehicle alcohol concentration temporal association representation vector with a predetermined weight coefficient matrix, adding the obtained feature vector to a predetermined offset vector by position to obtain a modulated in-vehicle alcohol concentration temporal association representation vector; using The activation function activates the modulated in-vehicle alcohol concentration temporal association representation vector to obtain the in-vehicle alcohol concentration temporal association semantic fully connected feature vector; and the facial multi-scale fusion feature map is weighted along the channel dimension using the feature values of each position in the in-vehicle alcohol concentration temporal association semantic fully connected feature vector to obtain the facial feature-alcohol concentration multimodal fusion representation feature map.
[0021] Optionally, based on the facial feature-alcohol concentration multimodal fusion representation feature, determining whether to generate a drunk driving warning prompt includes: inputting the facial feature-alcohol concentration multimodal fusion representation feature map into a classifier-based drunk driving detection module to obtain a detection result, and the detection result is used to indicate whether to generate a drunk driving warning prompt.
[0022] In a second aspect, the present disclosure provides a drunk driving detection system based on sensors and machine vision, the system comprising:
[0023] A drunk driving data acquisition module is used to acquire the time series of the alcohol concentration in the car collected by the alcohol sensor and the facial image of the driver collected by the camera;
[0024] A contrast normalization module, used for performing contrast normalization on the facial image of the driving object to obtain a detail-enhanced facial image of the driving object;
[0025] A multi-level feature capture module, used for performing multi-level feature capture on the facial image of the detail-enhanced driving object through a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map;
[0026] A multi-channel feature fusion module, used for processing the facial shallow feature map and the facial semantic feature map using a multi-channel feature fusion module guided by facial semantic features to obtain a facial multi-scale fusion feature map;
[0027] A time series encoding module, used for performing time series encoding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle;
[0028] A cross-modal encoding module, used for inputting the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature;
[0029] The drunk driving warning prompt determination module is used to determine whether to generate a drunk driving warning prompt based on the facial feature-alcohol concentration multimodal fusion representation feature.
[0030] Optionally, the facial feature extractor based on a deep neural network is a facial feature extractor based on a dilated pyramid network.
[0031] The present invention has at least the following technical effects: compared with the prior art, the present invention performs multi-level feature capture by using a facial feature extractor based on a deep neural network after contrast normalization of the acquired facial image of the driving object; then uses a multi-channel feature fusion module guided by facial semantic features to process the facial shallow feature map and the facial semantic feature map and perform temporal encoding; inputs the facial multi-scale fusion feature map and the temporal association representation vector of the alcohol concentration in the vehicle into a cross-modal encoder based on a meta-network model, and determines whether to generate a drunk driving warning prompt based on the facial feature-alcohol concentration multi-modal fusion representation feature, which can more comprehensively evaluate the driver's status, thereby achieving more accurate drunk driving detection and warning, preventing the occurrence of traffic accidents, and providing more powerful protection for people's safe travel.
[0032] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0034] Figure 1 The present invention is a flow chart of a method for detecting drunk driving based on sensors and machine vision according to an exemplary embodiment.
[0035] Figure 2 The figure is a block diagram of a drunk driving detection system based on sensors and machine vision according to an exemplary embodiment.
[0036] Figure 3 It is a block diagram of an electronic device according to an exemplary embodiment.
[0037] Figure 4 This is a diagram of an application scenario of a drunk driving detection method based on sensors and machine vision according to an exemplary embodiment. DETAILED DESCRIPTION
[0038] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0039] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0040] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0041] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0042] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0043] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0044] In order to solve the above problems, the present disclosure provides a drunk driving detection method and system based on sensors and machine vision, which performs multi-level feature capture by a facial feature extractor based on a deep neural network after contrast normalization of the acquired facial image of the driving object; then uses a multi-channel feature fusion module guided by facial semantic features to process the facial shallow feature map and the facial semantic feature map and perform temporal encoding; the facial multi-scale fusion feature map and the temporal association representation vector of the alcohol concentration in the car are input into a cross-modal encoder based on a meta-network model, and based on the facial feature-alcohol concentration multi-modal fusion representation feature, it is determined whether a drunk driving warning prompt is generated, which can more comprehensively evaluate the driver's status, thereby achieving more accurate drunk driving detection and warning, preventing the occurrence of traffic accidents, and providing more powerful protection for people's safe travel.
[0045] The specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0046] Figure 1 is a flow chart of a method for drunk driving detection based on sensors and machine vision according to an exemplary embodiment. Figure 1 As shown, the method includes:
[0047] Step 101, obtaining a time series of alcohol concentration in the vehicle collected by the alcohol sensor and a facial image of the driver collected by the camera;
[0048] Step 102: performing contrast normalization on the facial image of the driving object to obtain a detail-enhanced facial image of the driving object;
[0049] Step 103: performing multi-level feature capture on the detail-enhanced driving object facial image by a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map;
[0050] Step 104: Process the facial shallow feature map and the facial semantic feature map using a multi-channel feature fusion module guided by facial semantic features to obtain a facial multi-scale fusion feature map;
[0051] Step 105, performing time series coding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle;
[0052] Step 106: input the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature;
[0053] Step 107: Determine whether to generate a drunk driving warning prompt based on the facial feature-alcohol concentration multimodal fusion representation feature.
[0054] Among them, the facial feature extractor based on deep neural network is a facial feature extractor based on hollow pyramid network.
[0055] It should be understood that sensor technology has been widely used in the field of automobile safety. Among them, alcohol sensors can monitor the alcohol concentration in the car in real time, providing basic data for drunk driving detection. As the accuracy of sensors improves and the cost decreases, their role in vehicle safety systems is becoming more and more important. Machine vision technology captures the driver's facial image through a camera and analyzes the driver's facial features through image processing technology to determine whether the driver is driving under the influence. The development of facial recognition technology has made machine vision play an increasingly critical role in drunk driving detection.
[0056] Based on this, in the technical solution of the present application, a drunk driving detection method based on sensors and machine vision is proposed, which can use sensor technology and machine vision technology to comprehensively detect the driver's drunk driving behavior, and generate a drunk driving warning prompt when drunk driving is detected. Specifically, the technical concept of the present application is to monitor and collect the alcohol concentration in the car in real time through an alcohol sensor, and collect the facial image data of the driving object through a camera, and then introduce an artificial intelligence-based data processing and analysis algorithm at the back end to analyze the alcohol concentration time series data in the car and the facial image of the driving object and fuse multimodal features, so as to detect whether there is drunk driving behavior, and generate a drunk driving warning prompt when drunk driving is detected, which can more comprehensively evaluate the driver's status, thereby achieving more accurate drunk driving detection and warning, preventing the occurrence of traffic accidents, and providing more powerful protection for people's safe travel.
[0057] Specifically, in the technical solution of the present application, first, the time series of the alcohol concentration in the car collected by the alcohol sensor and the facial image of the driving object collected by the camera are obtained. Then, considering that in the process of collecting the facial image of the driving object by the camera, the quality of the collected facial image may be affected due to the change of the external lighting conditions. Based on this, in the technical solution of the present application, it is necessary to perform contrast normalization on the facial image of the driving object to obtain a facial image of the driving object with enhanced details. By performing contrast normalization on the facial image, it is beneficial to extract the local contrast features of the image, reduce the impact of the global contrast change caused by the change of external lighting on the image, and highlight the facial details and texture information of the driving object in the image, so that the details in the image are clearer and more visible. This is particularly important for the subsequent extraction of the facial features of the driving object, because the facial features usually include details such as eyes, nose, mouth, etc. The specific contrast normalization step includes: subtracting the local mean from each pixel value of the facial image, and dividing it by the local standard deviation to achieve the contrast normalization of the facial image.
[0058] Then, considering that there are facial features of the driving object in the detail-enhanced driving object facial image after contrast normalization, these feature information not only exists in the shallow edges, colors and textures of the image, but also exists in the deep semantics of the image, which is used to identify whether the driving object has drunken features, such as facial semantics such as dozing off and facial expressions. Not only that, when the driving object is drunk, in the detail-enhanced driving object facial image, the feature information therein not only exists in the local area of the image, but also exists in the overall association of each area, such as the association features between eyes and mouths, which are very important for the subsequent drunk driving detection task. Based on this, in the technical solution of the present application, the detail-enhanced driving object facial image is further input into a facial feature extractor based on a hollow pyramid network to obtain a facial shallow feature map and a facial semantic feature map. It should be understood that the hollow pyramid network is a deep neural network structure with multi-level feature extraction capabilities, and the feature association information at different scales in the image can be well captured by adjusting the hollow rate. Therefore, by inputting the detail-enhanced facial image of the driver into the network, the abstract features in the facial image can be better extracted, including facial feature information such as edges, textures, and colors, and the facial semantics and expressions of the driver can be captured, providing a richer and more accurate facial feature representation for subsequent drunk driving detection tasks.
[0059] Furthermore, since the facial shallow feature map and the facial semantic feature map respectively contain different levels and different types of feature information of the driving object's facial image. The facial shallow feature map usually contains basic facial information such as facial edges, textures and colors of the driving object, while the facial semantic feature map contains higher-level semantic information, such as facial expressions and facial semantics. Therefore, in order to effectively fuse the facial shallow features and semantic features of the driving object, so that the facial feature expression of the driving object is more comprehensive and rich, in the technical solution of the present application, a multi-channel feature fusion module guided by facial semantic features is further used to process the facial shallow feature map and the facial semantic feature map to obtain a facial multi-scale fusion feature map. Through the processing of the multi-channel feature fusion module guided by facial semantic features, the facial semantic features of the driving object can be used to guide the feature optimization expression of the facial shallow feature map, thereby helping the network to better learn the hidden associations between various facial features, and effectively fuse the facial shallow features and semantic features to improve the model's understanding and expression capabilities of facial features. In addition, facial semantic feature guidance can help the model to more stably extract and utilize the facial features of driving objects when facing complex situations such as occlusion and lighting changes, so as to improve the robustness and generalization ability of the model, so that the model can focus more on features that are useful for drunk driving detection.
[0060] In one embodiment of the present disclosure, a multi-channel feature fusion module guided by facial semantic features is used to process the facial shallow feature map and the facial semantic feature map to obtain a facial multi-scale fusion feature map, including: cascading the facial shallow feature map and the facial semantic feature map to obtain a facial shallow-semantic fusion feature map; performing convolution encoding on the facial shallow-semantic fusion feature map to obtain a facial shallow-semantic interaction feature map; performing batch normalization processing on the facial shallow-semantic interaction feature map to obtain a normalized facial shallow-semantic interaction feature map; performing global pooling processing based on the maximum value, global pooling processing based on the random value, and global pooling processing based on the average value on the normalized facial shallow-semantic interaction feature map to obtain A global maximum pooling feature vector of facial shallow-semantic interaction features, a global random value pooling feature vector of facial shallow-semantic interaction features and a global mean pooling feature vector of facial shallow-semantic interaction features; calculating the position-weighted sum of the global maximum pooling feature vector of facial shallow-semantic interaction features, the global mean pooling feature vector of facial shallow-semantic interaction features and the global random value pooling feature vector of facial shallow-semantic interaction features to obtain a multi-scale pooling representation vector of facial shallow-semantic interaction features; using the eigenvalues of each position in the multi-scale pooling representation vector of facial shallow-semantic interaction features as weights, weighting each feature matrix of the facial shallow feature map along the channel dimension to obtain the facial multi-scale fusion feature map.
[0061] Furthermore, in one embodiment of the present disclosure, the facial shallow-semantic interaction feature map is batch normalized to obtain a normalized facial shallow-semantic interaction feature map, including: performing data distribution balancing processing on the facial shallow-semantic interaction feature map to obtain a data distribution balanced facial shallow-semantic interaction feature map; and batch normalizing the data distribution balanced facial shallow-semantic interaction feature map to obtain the normalized facial shallow-semantic interaction feature map.
[0062] Furthermore, in one embodiment of the present disclosure, the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature, the global mean pooling feature vector of the facial shallow-semantic interaction feature and the global random value pooling feature vector of the facial shallow-semantic interaction feature is calculated to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction feature, including: calculating the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature and a first preset trainable weight value to obtain the global maximum pooling feature vector of the facial shallow-semantic interaction feature after weight modulation; calculating the global mean pooling feature vector of the facial shallow-semantic interaction feature and a second preset trainable weight value The weight values are multiplied by position to obtain a global mean pooling feature vector of the weight-modulated facial shallow-semantic interaction features; the global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features and a third preset trainable weight value are multiplied by position to obtain a global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features; the global maximum value pooling feature vector of the weight-modulated facial shallow-semantic interaction features, the global mean pooling feature vector of the weight-modulated facial shallow-semantic interaction features and the global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features are positionally added to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction features.
[0063] Specifically, the facial shallow feature map and the facial semantic feature map are processed using the multi-channel feature fusion module guided by facial semantic features according to the following multi-channel feature fusion formula to obtain the facial multi-scale fusion feature map;
[0064] Among them, the multi-channel feature fusion formula is:
[0065] ;
[0066] ;
[0067]
[0068] in, and are respectively the facial shallow feature map and the facial semantic feature map, For splicing operation, is the convolution operation, For batch normalization, is the normalized facial shallow-semantic interaction feature map, , and They are global mean pooling, maximum value pooling and random value pooling. , and are preset trainable weight values, is the multi-scale pooling representation vector of the facial shallow-semantic interaction feature, In order to perform a weighted operation on the facial shallow feature map using the normalized facial shallow-semantic interaction feature multi-scale pooling representation vector, It is the facial multi-scale fusion feature map.
[0069] Then, considering that the change of alcohol concentration in the car is a time-series process, it contains temporal correlation and evolution trend. Therefore, in order to effectively capture the long-term dependencies in the time series data of alcohol concentration in the car, thereby revealing the laws and trends of the temporal changes in alcohol concentration, and providing more accurate information for subsequent analysis and drunk driving warning, in the technical solution of the present application, the time series of alcohol concentration in the car is further input into the sequence encoder based on the GRU model to obtain the temporal association representation vector of alcohol concentration in the car. Through the processing of the sequence encoder based on the GRU model, the temporal characteristics and long-term dependent correlation of the alcohol concentration in the car in the time dimension can be captured, providing important information for subsequent drunk driving detection.
[0070] In one embodiment of the present disclosure, the time series of the alcohol concentration in the vehicle is temporally encoded to obtain a temporal association representation vector of the alcohol concentration in the vehicle, including: inputting the time series of the alcohol concentration in the vehicle into a sequence encoder based on a GRU model to obtain the temporal association representation vector of the alcohol concentration in the vehicle.
[0071] It should be understood that the multi-scale fusion features of the face of the driving object and the time series features of the alcohol concentration in the car represent different modalities and different types of feature information, respectively, and reflect the facial performance features and alcohol concentration time series change features of the driving object in the process of drunk driving detection. Therefore, in order to be able to more comprehensively understand the state and behavior of the driver and improve the accuracy and reliability of the drunk driving detection system, in the technical solution of the present application, the multi-scale fusion feature map of the face and the time series association representation vector of the alcohol concentration in the car are further input into the cross-modal encoder based on the meta-network model to obtain the facial feature-alcohol concentration multi-modal fusion representation feature map. Through the processing of the cross-modal encoder based on the meta-network model, the potential correlation relationship between the facial features of the driving object and the time series association features of the alcohol concentration can be learned and captured, and the time series features of the alcohol concentration in the car and the multi-scale fusion features of the face of the driving object are multi-modally interactively and associated fused and encoded with this correlation relationship to generate multi-modal fusion representation features, which helps the system to more comprehensively evaluate the driver's condition and improve the accuracy and reliability of the drunk driving detection system. That is to say, combining facial features and alcohol concentration can improve the accuracy of drunk driving detection. For example, even if the alcohol concentration is not particularly high, abnormal facial expressions may indicate that the driver is under the influence of alcohol. In particular, in the technical solution of the present application, the meta-network can dynamically and adaptively adjust the weights of the temporal features of the alcohol concentration in the vehicle to perform weighted fusion of the multi-scale fusion feature map of the face along the channel dimension to adapt to different drunk driving detection scenarios, improve the drunk driving detection system's ability to understand and judge the driver's status, and thus improve the detection effect and early warning capabilities.
[0072] In one embodiment of the present disclosure, the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector are input into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature, including: after matrix multiplication of the in-vehicle alcohol concentration temporal association representation vector and a predetermined weight coefficient matrix, the obtained feature vector is added to a predetermined offset vector by position to obtain a modulated in-vehicle alcohol concentration temporal association representation vector; using The activation function activates the modulated in-vehicle alcohol concentration temporal association representation vector to obtain the in-vehicle alcohol concentration temporal association semantic fully connected feature vector; and the facial multi-scale fusion feature map is weighted along the channel dimension using the feature values of each position in the in-vehicle alcohol concentration temporal association semantic fully connected feature vector to obtain the facial feature-alcohol concentration multimodal fusion representation feature map.
[0073] Specifically, the facial multi-scale fusion feature map and the time-series association representation vector of the alcohol concentration in the vehicle are input into the cross-modal encoder based on the meta-network model for processing using the following semantic cross-modal encoding formula to obtain the facial feature-alcohol concentration multi-modal fusion representation feature map;
[0074] Among them, the semantic cross-modal encoding formula is:
[0075] ;
[0076] ;
[0077]
[0078] in, is the time series correlation representation vector of the alcohol concentration in the car, represents the weight coefficient matrix, is the offset vector, for Activation function, is the fully connected feature vector of the temporal association semantics of the alcohol concentration in the car, Indicates that the feature map is weighted using the weight vector. is the facial multi-scale fusion feature map, and are all hyperparameters, is the independent variable of the activation function, A multimodal representation feature graph of the vital signs.
[0079] Furthermore, the facial feature-alcohol concentration multimodal fusion representation feature map is input into the drunk driving detection module based on the classifier to obtain the detection result, and the detection result is used to indicate whether a drunk driving warning prompt is generated. In other words, the multimodal fusion feature representation between the multi-scale fusion features of the driver's face and the temporal features of the alcohol concentration in the car is used for classification processing to detect whether the driver has drunk driving behavior, and generate a drunk driving warning prompt when drunk driving is detected, which can more comprehensively evaluate the driver's status, thereby achieving more accurate drunk driving detection and warning, preventing the occurrence of traffic accidents, and providing more powerful protection for people's safe travel.
[0080] In one embodiment of the present disclosure, based on the facial feature-alcohol concentration multimodal fusion representation feature, determining whether to generate a drunk driving warning prompt includes: inputting the facial feature-alcohol concentration multimodal fusion representation feature map into a classifier-based drunk driving detection module to obtain a detection result, and the detection result is used to indicate whether to generate a drunk driving warning prompt.
[0081] In the technical solution of the present application, the facial multi-scale fusion feature map represents a multi-scale image semantic fusion representation of the facial image of the driving object, and the in-car alcohol concentration temporal association representation vector represents the local time-domain correlation characteristics of the in-car alcohol concentration. Taking into account the differences in feature modalities and feature dimensions, when the facial multi-scale fusion feature map and the in-car alcohol concentration temporal association representation vector are input into a cross-modal encoder based on a meta-network model to perform channel dimension feature constraint fusion on each feature matrix along the channel dimension of the facial multi-scale fusion feature map using the local time-domain correlation characteristics of the in-car alcohol concentration, the obtained facial feature-alcohol concentration multi-modal fusion representation feature map will have local overflow features, thereby affecting the accuracy of the classification judgment of the facial feature-alcohol concentration multi-modal fusion representation feature map input into the drunk driving detection module based on the classifier.
[0082] In a preferred embodiment, the facial feature-alcohol concentration multimodal fusion representation feature map is input into a classifier-based drunk driving detection module to obtain a detection result, comprising the following steps: first, the facial feature-alcohol concentration multimodal fusion representation feature map is expanded into a facial feature-alcohol concentration multimodal fusion representation feature vector, the facial feature-alcohol concentration multimodal fusion representation feature vector and its own transposition autocorrelation matrix are calculated, and the first and The inner product of the row vectors is used as the weight matrix The matrix value of the position is obtained to obtain a weight matrix, and then the weight matrix is matrix-multiplied with the autocorrelation matrix, and then further matrix-vector multiplied with the facial feature-alcohol concentration multimodal fusion representation feature vector to obtain a correction vector, and finally the correction vector is dot-multiplied with the facial feature-alcohol concentration multimodal fusion representation feature vector to obtain an optimized facial feature-alcohol concentration multimodal fusion representation feature vector, and the optimized facial feature-alcohol concentration multimodal fusion representation feature vector is input into a classifier-based drunk driving detection module to obtain a detection result.
[0083] The optimization steps are specifically expressed as follows:
[0084] ;
[0085] ;
[0086]
[0087] in, Represents the facial feature-alcohol concentration multimodal fusion representation feature vector, represents the transpose of a vector, represents the autocorrelation matrix, and The autocorrelation matrix is represented by and row vector, represents the weight matrix, The weight matrix The matrix value of the position, represents the height of the autocorrelation matrix, represents the set of real numbers, represents matrix multiplication, represents dot product, Representation of the optimized facial feature-alcohol concentration multimodal fusion representation feature vector.
[0088] Based on the self-correlation dimension of the facial feature-alcohol concentration multimodal fusion representation feature vector as the object to be modulated, the spatial sub-dimensional complexity of the high-dimensional feature space of the feature distribution is used to perform correlation expansion, thereby introducing the decomposable correlation dimension offset of the facial feature-alcohol concentration multimodal fusion representation feature vector into the heterogeneous correlation embedding space, thereby enhancing its correlation self-consistency through the joint fine-tuning of the decomposable dimension set represented by the heterogeneous correlation embedding space, so as to improve the feature distribution aggregation of the feature set of the facial feature-alcohol concentration multimodal fusion representation feature vector in the associated target classification domain, thereby improving the classification training speed and accuracy of the classification results of the facial feature-alcohol concentration multimodal fusion representation feature map when it is classified by the classifier-based drunk driving detection module. Through the above operation, it is possible to more accurately detect whether the driving object has drunk driving behavior, and generate a drunk driving warning prompt when drunk driving is detected to prevent the occurrence of traffic accidents.
[0089] To sum up, the above scheme is adopted to monitor and collect the alcohol concentration in the car in real time through the alcohol sensor, and collect the facial image data of the driving object through the camera, and then introduce the data processing and analysis algorithm based on artificial intelligence at the back end to analyze the time series data of the alcohol concentration in the car and the facial image of the driving object and fuse the multimodal features, so as to detect whether there is drunk driving behavior, and generate a drunk driving warning prompt when drunk driving is detected. It can more comprehensively evaluate the driver's status, thereby achieving more accurate drunk driving detection and warning, preventing the occurrence of traffic accidents, and providing more powerful protection for people's safe travel.
[0090] Figure 2 FIG. 1 is a block diagram of a drunk driving detection system based on sensors and machine vision according to an exemplary embodiment. Figure 2 As shown, the system 200 includes:
[0091] The drunk driving data acquisition module 201 is used to acquire the time series of the alcohol concentration in the vehicle acquired by the alcohol sensor and the facial image of the driving object acquired by the camera;
[0092] A contrast normalization module 202, configured to perform contrast normalization on the facial image of the driving subject to obtain a detail-enhanced facial image of the driving subject;
[0093] A multi-level feature capture module 203, used for performing multi-level feature capture on the detail-enhanced driving object facial image through a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map;
[0094] A multi-channel feature fusion module 204 is used to process the facial shallow feature map and the facial semantic feature map using a multi-channel feature fusion module guided by facial semantic features to obtain a facial multi-scale fusion feature map;
[0095] A time series coding module 205, used for performing time series coding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle;
[0096] A cross-modal encoding module 206, configured to input the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature;
[0097] The drunk driving warning prompt determination module 207 is used to determine whether to generate a drunk driving warning prompt based on the facial feature-alcohol concentration multimodal fusion representation feature.
[0098] In one embodiment of the present disclosure, the facial feature extractor based on a deep neural network is a facial feature extractor based on a dilated pyramid network.
[0099] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0100] like Figure 3As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0101] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0102] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0103] Figure 4 FIG. 1 is an application scenario diagram of a drunk driving detection method based on sensors and machine vision according to an exemplary embodiment. Figure 4 As shown, in this application scenario, first, the time series of the alcohol concentration in the car collected by the alcohol sensor is obtained (for example, Figure 4 C1) and the facial image of the driving object captured by the camera (e.g., Figure 4 Then, the alcohol concentration in the car and the facial image are input to a server (for example, Figure 4In the S) shown in FIG. 1 , the server is capable of processing the alcohol concentration in the vehicle and the facial image based on a drunk driving detection algorithm using sensors and machine vision to determine whether to generate a drunk driving warning prompt.
[0104] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0105] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0106] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A drunk driving detection method based on sensors and machine vision, characterized in that: include: Obtaining a time series of alcohol concentration in the vehicle collected by the alcohol sensor and a facial image of the driver collected by the camera; performing contrast normalization on the facial image of the driving subject to obtain a detail-enhanced facial image of the driving subject; Performing multi-level feature capture on the facial image of the detail-enhanced driving subject by a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map; Using a multi-channel feature fusion module guided by facial semantic features, the facial shallow feature map and the facial semantic feature map are processed to obtain a facial multi-scale fusion feature map; Performing time series encoding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle; The facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector are input into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature, which includes: After matrix multiplication of the in-vehicle alcohol concentration time series correlation representation vector and a predetermined weight coefficient matrix, the obtained feature vector and a predetermined offset vector are added according to position to obtain a modulated in-vehicle alcohol concentration time series correlation representation vector; Using a Selu activation function to activate the modulated in-vehicle alcohol concentration temporal association representation vector to obtain a fully connected semantic feature vector of the in-vehicle alcohol concentration temporal association; Using the feature values of each position in the fully connected feature vector of the temporal association semantics of the alcohol concentration in the vehicle, weighted processing is performed on the multi-scale fusion feature map of the face along the channel dimension to obtain the multi-modal fusion representation feature map of the facial feature-alcohol concentration; Based on the facial feature-alcohol concentration multimodal fusion representation feature, it is determined whether to generate a drunk driving warning prompt.
2. According to claim 1, a method for detecting drunk driving based on sensors and machine vision is characterized in that: The facial feature extractor based on deep neural network is a facial feature extractor based on hollow pyramid network.
3. A drunk driving detection method based on sensors and machine vision according to claim 2, characterized in that: The facial shallow feature map and the facial semantic feature map are processed using a multi-channel feature fusion module guided by facial semantic features to obtain a facial multi-scale fusion feature map, including: Cascading the facial shallow feature map and the facial semantic feature map to obtain a facial shallow-semantic fusion feature map; Performing convolution encoding on the facial shallow-semantic fusion feature map to obtain a facial shallow-semantic interaction feature map; Performing batch normalization processing on the facial shallow-semantic interaction feature map to obtain a normalized facial shallow-semantic interaction feature map; Performing maximum-based global pooling processing, random-value-based global pooling processing, and average-based global pooling processing on the normalized facial shallow-semantic interaction feature map to obtain a facial shallow-semantic interaction feature global maximum pooling feature vector, a facial shallow-semantic interaction feature global random-value pooling feature vector, and a facial shallow-semantic interaction feature global average pooling feature vector; Calculate the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature, the global mean pooling feature vector of the facial shallow-semantic interaction feature, and the global random value pooling feature vector of the facial shallow-semantic interaction feature to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction feature; The feature values of each position in the multi-scale pooling representation vector of the facial shallow-semantic interaction features are used as weights, and each feature matrix along the channel dimension of the facial shallow feature map is weighted to obtain the facial multi-scale fusion feature map.
4. A drunk driving detection method based on sensors and machine vision according to claim 3, characterized in that: The facial shallow-semantic interaction feature map is batch normalized to obtain a normalized facial shallow-semantic interaction feature map, including: Performing data distribution balancing processing on the facial shallow-semantic interaction feature map to obtain a data distribution balanced facial shallow-semantic interaction feature map; The data distribution balanced facial shallow-semantic interaction feature map is batch normalized to obtain the normalized facial shallow-semantic interaction feature map.
5. A drunk driving detection method based on sensors and machine vision according to claim 4, characterized in that: Calculating the position-weighted sum of the global maximum pooling feature vector of the facial shallow-semantic interaction feature, the global mean pooling feature vector of the facial shallow-semantic interaction feature, and the global random value pooling feature vector of the facial shallow-semantic interaction feature to obtain a multi-scale pooling representation vector of the facial shallow-semantic interaction feature, including: Calculate the positional product between the global maximum pooling feature vector of the facial shallow-semantic interaction feature and the first preset trainable weight value to obtain the weight-modulated global maximum pooling feature vector of the facial shallow-semantic interaction feature; Calculate the positional product between the global mean pooling feature vector of the facial shallow-semantic interaction feature and the second preset trainable weight value to obtain the global mean pooling feature vector of the facial shallow-semantic interaction feature after weight modulation; Calculate the positional product between the global random value pooling feature vector of the facial shallow-semantic interaction feature and the third preset trainable weight value to obtain the global random value pooling feature vector of the facial shallow-semantic interaction feature after weight modulation; The global maximum pooling feature vector of the weight-modulated facial shallow-semantic interaction features, the global mean pooling feature vector of the weight-modulated facial shallow-semantic interaction features, and the global random value pooling feature vector of the weight-modulated facial shallow-semantic interaction features are added by position to obtain the multi-scale pooling representation vector of the facial shallow-semantic interaction features.
6. A drunk driving detection method based on sensors and machine vision according to claim 5, characterized in that: The time series of the alcohol concentration in the vehicle is temporally encoded to obtain a temporal association representation vector of the alcohol concentration in the vehicle, including: inputting the time series of the alcohol concentration in the vehicle into a sequence encoder based on a GRU model to obtain the temporal association representation vector of the alcohol concentration in the vehicle.
7. A drunk driving detection method based on sensors and machine vision according to claim 6, characterized in that: Based on the facial feature-alcohol concentration multimodal fusion representation feature, determining whether to generate a drunk driving warning prompt includes: inputting the facial feature-alcohol concentration multimodal fusion representation feature map into a classifier-based drunk driving detection module to obtain a detection result, and the detection result is used to indicate whether to generate a drunk driving warning prompt.
8. A drunk driving detection system based on sensors and machine vision, characterized in that: include: A drunk driving data acquisition module is used to acquire the time series of the alcohol concentration in the car collected by the alcohol sensor and the facial image of the driver collected by the camera; A contrast normalization module, used for performing contrast normalization on the facial image of the driving object to obtain a detail-enhanced facial image of the driving object; A multi-level feature capture module, used for performing multi-level feature capture on the facial image of the detail-enhanced driving object through a facial feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial semantic feature map; A multi-channel feature fusion module, used for processing the facial shallow feature map and the facial semantic feature map using a multi-channel feature fusion module guided by facial semantic features to obtain a facial multi-scale fusion feature map; A time series encoding module, used for performing time series encoding on the time series of the alcohol concentration in the vehicle to obtain a time series correlation representation vector of the alcohol concentration in the vehicle; A cross-modal encoding module is used to input the facial multi-scale fusion feature map and the in-vehicle alcohol concentration temporal association representation vector into a cross-modal encoder based on a meta-network model to obtain a facial feature-alcohol concentration multi-modal fusion representation feature map as a facial feature-alcohol concentration multi-modal fusion representation feature, which includes: After matrix multiplication of the in-vehicle alcohol concentration time series correlation representation vector and a predetermined weight coefficient matrix, the obtained feature vector and a predetermined offset vector are added according to position to obtain a modulated in-vehicle alcohol concentration time series correlation representation vector; Using a Selu activation function to activate the modulated in-vehicle alcohol concentration temporal association representation vector to obtain a fully connected semantic feature vector of the in-vehicle alcohol concentration temporal association; Using the feature values of each position in the fully connected feature vector of the temporal association semantics of the alcohol concentration in the vehicle, weighted processing is performed on the multi-scale fusion feature map of the face along the channel dimension to obtain the multi-modal fusion representation feature map of the facial feature-alcohol concentration; The drunk driving warning prompt determination module is used to determine whether to generate a drunk driving warning prompt based on the facial feature-alcohol concentration multimodal fusion representation feature.
9. A drunk driving detection system based on sensors and machine vision according to claim 8, characterized in that: The facial feature extractor based on deep neural network is a facial feature extractor based on hollow pyramid network.
