A method and system for detecting distracted driving behavior

Through the CenterNet network of CNN neural network and attention mechanism, the problem of inaccurate detection of driver distraction behavior in the existing technology is solved, accurate detection of driver smoking and eating behavior is achieved, and traffic safety is improved.

CN112861608BActive Publication Date: 2024-09-10ZHEJIANG WANLI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011596966.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2024-09-10
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

Existing technology is not accurate enough in detecting drivers' distracted behaviors, leading to potential traffic safety hazards. In particular, it is difficult to accurately identify drivers' distracted behaviors such as smoking and eating while driving.

Method used

Using the CenterNet network of CNN neural network combined with the attention mechanism, through image pre-processing and enhanced feature extraction, a training model for distracted driving behavior is established to achieve real-time detection of driver distracted behavior.

Benefits of technology

It improves the precision and accuracy of detection, can effectively identify the driver's smoking and eating behaviors during driving, reduces background noise interference, and protects the driver's safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861608B
    Figure CN112861608B
Patent Text Reader

Abstract

The present invention belongs to the field of computer vision technology, and provides a method for detecting distracted driving behavior, including the following steps: S1, obtaining a real-time image of the driver's driving behavior by a preset method; S2, performing image pre-processing on the image by a CNN neural network, and dividing the processed image into an image of a manned area or an image of an unmanned area; S3, performing distracted driving behavior detection on the classified image by a training model of distracted driving behavior, and obtaining a detection result. The present invention also provides a distracted driving behavior detection system, and the advantage of the present invention is that by integrating the target detection network CenterNet with an attention mechanism, it can identify smoking actions and eating behaviors while driving, and for distracted driving behaviors, it can accurately detect the driver's distracted behavior during driving in real time, and the detection accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method and system for detecting distracted driving behavior. Background Art

[0002] If you are distracted while driving, it will pose a serious safety hazard to traffic safety.

[0003] With the development of technology, the number of traffic accidents is increasing day by day. The main cause of traffic accidents is the driver's distracted behavior. These distracted behaviors are caused by the driver paying attention to distracting objects while driving. Among them, eating and smoking are the most common driving distraction behaviors.

[0004] Therefore, detecting and identifying distracted driving behavior and issuing warnings can eliminate potential risks and is an important means to ensure safe driving of drivers. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a model training method and a detection method for distracted driving behavior, so as to solve the problem of inaccurate detection of driver distracted behavior;

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for detecting distracted driving behavior comprises the steps of:

[0008] S1. Obtaining a real-time image of the driver's driving behavior in a preset manner;

[0009] S2, performing image pre-processing on the image through a CNN neural network, and dividing the processed image into an image of a region with people or an image of a region without people;

[0010] S3. Using the classified images through a distracted driving behavior training model to detect distracted driving behavior and obtain a detection result.

[0011] Furthermore, the specific steps of obtaining the training model of distracted driving behavior in step S3 are:

[0012] S31, obtaining multiple images of the driver's distracted driving behavior in different time periods in a preset manner, and establishing a corresponding data set;

[0013] S32, performing image pre-processing on the data set through a CNN neural network, and dividing the processed images into images of manned areas or images of unmanned areas, and establishing corresponding image data subsets of manned areas and image data subsets of unmanned areas;

[0014] S33, using the CenterNet network with an attention mechanism module to perform enhanced feature extraction on images in the two data subsets;

[0015] S34. Perform target detection training on the CenterNet network using images containing enhanced features to obtain a training model.

[0016] Furthermore, the specific steps of step S32 are:

[0017] S321, preprocessing the images in the data set;

[0018] S322, performing image processing on the preprocessed image through a CNN neural network;

[0019] S323, dividing the image processed by the CNN neural network into an image of a manned area or an image of an unmanned area, and establishing corresponding image data subsets of the manned area and image data subsets of the unmanned area.

[0020] Furthermore, the method of preprocessing the images in the data set in step S321 includes translation, scaling, horizontal flipping and color transformation, and each preprocessed image is obtained through a variety of random combination transformations in the image preprocessing method.

[0021] Furthermore, the specific steps of step S33 are:

[0022] S331, inputting the images in the data subset into the CenterNet network;

[0023] S332, perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and the output dimension matches the number of input feature channels;

[0024] S333, generating a weight for each feature channel by using preset parameters;

[0025] S334, weighting the output weights to the previous features channel by channel through multiplication, and completing the recalibration of the original features in the channel dimension;

[0026] S335, activate the feature through ReLu and then upsample it to the original dimension through a fully connected layer;

[0027] S336. The normalized weight obtained through the gate of the Sigmoid function is weighted to the features of each channel through size normalization processing to obtain enhanced features.

[0028] A distracted driving behavior detection system, comprising:

[0029] An image acquisition module, used to acquire a real-time image of the driver's driving behavior in a preset manner;

[0030] An image pre-processing module is used to perform image pre-processing on the image through a CNN neural network, and to classify the processed image into an image of a manned area or an image of an unmanned area;

[0031] The image detection module is used to detect distracted driving behavior on the classified images through a training model of distracted driving behavior and obtain the detection results.

[0032] Furthermore, the image detection module specifically includes:

[0033] An image acquisition and storage unit, used to obtain multiple images of the driver's distracted driving behavior in different time periods in a preset manner and establish a corresponding data set;

[0034] An image pre-processing and storage unit, used to perform image pre-processing on the data set through a CNN neural network, and to divide the processed images into images of manned areas or images of unmanned areas, and to establish corresponding image data subsets of manned areas and image data subsets of unmanned areas;

[0035] An enhanced feature extraction unit is used to perform enhanced feature extraction on images in two types of data subsets through a CenterNet network including an attention mechanism module;

[0036] The training unit trains the CenterNet network for target detection using images containing enhanced features to obtain a training model.

[0037] Furthermore, the image pre-processing and storage unit includes:

[0038] An image preprocessing subunit, used for preprocessing images in the data set;

[0039] An image processing subunit, used for processing the pre-processed image through a CNN neural network;

[0040] The image classification and storage subunit divides the images processed by the CNN neural network into images of human-occupied areas or images of unmanned areas, and establishes corresponding data subsets.

[0041] Furthermore, the enhanced feature extraction unit includes:

[0042] The image input subunit is used to input the images in the data subset into the CenterNet network;

[0043] The feature compression subunit is used to perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and the output dimension matches the number of input feature channels;

[0044] A weight setting subunit, used to generate weights for each feature channel by preset parameters;

[0045] The feature recalibration subunit is used to weight the output weights to the previous features channel by channel through multiplication, completing the recalibration of the original features in the channel dimension;

[0046] The feature sampling subunit is used to upsample the features to the original dimension after ReLu activation through a fully connected layer;

[0047] The normalization processing subunit is used to add the normalized weight obtained through the gate of the Sigmoid function to the features of each channel through size normalization processing to obtain enhanced features.

[0048] Compared with the prior art, the present invention has at least the following beneficial effects:

[0049] (1) The detection method proposed in the present invention uses a simple and fast binary classification network to pre-process the image, thereby reducing the noise interference caused by different backgrounds, and does not destroy the feature information of the image during processing, especially the information on small targets;

[0050] (2) The detection method proposed in this invention integrates the target detection network CenterNet with the attention mechanism, so that it can identify smoking and eating behaviors while driving;

[0051] (3) The detection system proposed in the present invention can detect distracted driving behavior in real time and accurately, with high detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is an overall flow chart of the first embodiment of the present invention.

[0053] Figure 2 This is a flowchart of step S3 in the first embodiment of the present invention.

[0054] Figure 3 This is a flowchart of step S32 in the first embodiment of the present invention.

[0055] Figure 4 It is a structural framework diagram of the CNN network in the first embodiment of the present invention.

[0056] Figure 5 This is a flowchart of step S33 in the first embodiment of the present invention.

[0057] Figure 6a It is a diagram of the detection results of the detection method of the present invention and the commonly used CenterNet combined with the attention mechanism module in the human area.

[0058] Figure 6b It is a detection result diagram of the detection method of the present invention and the commonly used CenterNet combined with the attention mechanism module in an unmanned area.

[0059] Figure 6c It is a test comparison diagram of the present invention and several representative detection networks. DETAILED DESCRIPTION

[0060] The following are specific embodiments of the present invention, and the technical solutions of the present invention are further described in conjunction with the accompanying drawings, but the present invention is not limited to these embodiments.

[0061] Embodiment 1

[0062] like Figure 1 As shown, the present invention provides a method for detecting distracted driving behavior, characterized in that it includes the steps of:

[0063] S1. Obtaining a real-time image of the driver's driving behavior by shooting with a camera;

[0064] S2, performing image pre-processing on the image through a CNN neural network, and dividing the processed image into an image of a region with people or an image of a region without people;

[0065] S3. Using the classified images through a distracted driving behavior training model to detect distracted driving behavior and obtain a detection result.

[0066] Further, such as Figure 2 As shown, the specific steps of obtaining the training model of distracted driving behavior in step S3 are:

[0067] S31, acquiring multiple images of the driver's distracted driving behavior in different time periods by photographing, and establishing a corresponding data set;

[0068] S32, performing image pre-processing on the data set through a CNN neural network, and dividing the processed images into two types of images: images of manned areas and images of unmanned areas, and establishing corresponding image data subsets of manned areas and image data subsets of unmanned areas;

[0069] S33, using the CenterNet network with an attention mechanism module to perform enhanced feature extraction on images in the two data subsets;

[0070] S34. Perform target detection training on the CenterNet network using images containing enhanced features to obtain a training model.

[0071] Further, such as Figure 3 As shown, the specific steps of step S32 are:

[0072] S321, preprocessing the images in the data set;

[0073] The methods for preprocessing images in the dataset include translation, scaling, horizontal flipping and color transformation, and each preprocessed image is obtained through multiple random combination transformations in the image preprocessing methods.

[0074] At the same time, these images cover different lighting, shooting angles, resolutions, backgrounds, etc., meeting the needs of training sample diversity.

[0075] S322, performing image processing on the preprocessed image through a CNN neural network;

[0076] S323, dividing the image processed by the CNN neural network into an image of a manned area and an image of an unmanned area, and establishing corresponding image data subsets of the manned area and image data subsets of the unmanned area.

[0077] In target detection, the quality of the image directly affects the accuracy of detection, so preprocessing is required before feature extraction and recognition of image processing. The main purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information, and simplify the data to the maximum extent, thereby improving the reliability of feature extraction, image segmentation, matching and recognition.

[0078] The binary classification method based on CNN neural network of the present invention can effectively and quickly divide the data set into two subsets: human area and unmanned area, which can reduce the noise interference caused by different backgrounds and will not destroy the feature information of the image during processing, especially for small targets; wherein, the CNN network structure framework is as follows Figure 4 shown.

[0079] Further, such as Figure 5 As shown, the specific steps of step S33 are:

[0080] S331, inputting the images in the data subset into the CenterNet network;

[0081] S332. Perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and match the output dimension with the number of input feature channels.

[0082] This real number has a global receptive field to some extent, and the dimension of the output matches the number of feature channels of the input. It represents the global distribution of responses on the feature channels, and enables the layers close to the input to obtain the global receptive field.

[0083] S333, generating a weight for each feature channel by using preset parameters;

[0084] It is a mechanism similar to gates in recurrent neural networks, where parameters are learned to explicitly model correlations between feature channels.

[0085] S334, weighting the output weights to the previous features channel by channel through multiplication, and completing the recalibration of the original features in the channel dimension;

[0086] S335, activate the feature through ReLu and then upsample it to the original dimension through a fully connected layer;

[0087] The advantages of the present invention over directly using a fully connected layer are: first, it has more nonlinearity and can better fit the complex correlations between channels; second, it greatly reduces the number of parameters and the amount of calculation.

[0088] S336. The normalized weight obtained through the gate of the Sigmoid function is weighted to the features of each channel through size normalization processing to obtain enhanced features.

[0089] All enhanced features constitute the final feature map. The enhanced feature map can better reduce the interference of distracted driving detection, which greatly improves the detection accuracy.

[0090] As shown in FIG6 , the present invention integrates the target detection network CenterNet with the attention mechanism, so that it can recognize smoking actions and eating behaviors while driving with high detection accuracy.

[0091] Among them, Figure 6 (a) is a comparison of the detection results of CenterNet detection method in this paper that integrates SCEA (spatial and channel enhanced attention mechanism) and several common attention mechanism modules in the presence of people. Through a large number of experiments, it can be seen from the figure that the detection accuracy is greatly improved and the recall rate is slightly improved.

[0092] Figure 6b The figure shows the comparison of the detection results of the CenterNet detection method in this paper that integrates SCEA (spatial and channel enhanced attention mechanism) and several common attention mechanism modules in the unmanned area. The experimental results show that the SCEA-CenterNet method has improved the detection precision and recall rate in the unmanned area while keeping the detection speed basically unchanged.

[0093] In order to verify the performance of the method of the present invention, several representative networks were used for comparison and analysis under the same data set, and then the experimental results were explained in detail, such as Figure 6cAs shown in the figure, it can be seen from the experimental results that compared with other mainstream methods, the method proposed in this paper can effectively improve the detection mAP, and its performance in recall rate is also better than other existing networks.

[0094] The detection method proposed in the present invention uses a simple and fast binary classification network to pre-process the image, thereby reducing noise interference caused by different backgrounds, and does not destroy the feature information of the image during processing, especially the information on small targets; the detection method proposed in the present invention integrates the target detection network CenterNet with an attention mechanism, so that it can recognize smoking actions and eating behaviors while driving.

[0095] Embodiment 2

[0096] The present invention provides a system for distracted driving behavior, comprising:

[0097] An image acquisition module, used to acquire a real-time image of the driver's driving behavior in a preset manner;

[0098] An image pre-processing module is used to perform image pre-processing on the image through a CNN neural network, and to classify the processed image into an image of a manned area or an image of an unmanned area;

[0099] The image detection module is used to detect distracted driving behavior on the classified images through a training model of distracted driving behavior and obtain the detection results.

[0100] Among them, the image detection module specifically includes:

[0101] An image acquisition and storage unit, used to obtain multiple images of the driver's distracted driving behavior in different time periods in a preset manner and establish a corresponding data set;

[0102] An image pre-processing and storage unit is used to perform image pre-processing on the data set through a CNN neural network, and divide the processed images into two types of images: images of manned areas and images of unmanned areas, and establish corresponding image data subsets of manned areas and image data subsets of unmanned areas;

[0103] An enhanced feature extraction unit is used to perform enhanced feature extraction on images in two types of data subsets through a CenterNet network including an attention mechanism module;

[0104] The training unit trains the CenterNet network for target detection using images containing enhanced features to obtain a training model.

[0105] Furthermore, the image pre-processing and storage unit includes:

[0106] An image preprocessing subunit, used for preprocessing images in the data set;

[0107] An image processing subunit, used for processing the pre-processed image through a CNN neural network;

[0108] The image classification and storage subunit divides the images processed by the CNN neural network into images of human-occupied areas and images of unmanned areas, and establishes corresponding data subsets.

[0109] Furthermore, the enhanced feature extraction unit includes:

[0110] The image input subunit is used to input the images in the data subset into the CenterNet network;

[0111] The feature compression subunit is used to perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and the output dimension matches the number of input feature channels;

[0112] A weight setting subunit, used to generate weights for each feature channel by preset parameters;

[0113] The feature recalibration subunit is used to weight the output weights to the previous features channel by channel through multiplication, completing the recalibration of the original features in the channel dimension;

[0114] The feature sampling subunit is used to upsample the features to the original dimension after ReLu activation through a fully connected layer;

[0115] The normalization processing subunit is used to add the normalized weight obtained through the gate of the Sigmoid function to the features of each channel through size normalization processing to obtain enhanced features.

[0116] The detection system proposed in the present invention uses a simple and fast binary classification network to pre-process the image, thereby reducing noise interference caused by different backgrounds, and does not destroy the feature information of the image during processing, especially the information on small targets; the detection system proposed in the present invention integrates the target detection network CenterNet with an attention mechanism, so that it can recognize smoking actions and eating behaviors while driving.

[0117] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

Claims

1. A method for detecting distracted driving behavior, characterized in that: Includes steps: S1. Obtaining a real-time image of the driver's driving behavior in a preset manner; S2, performing image pre-processing on the image through a CNN neural network, and dividing the processed image into an image of a region with people or an image of a region without people; S3, using the classified images to detect distracted driving behavior through a training model of distracted driving behavior, and obtaining a detection result; The specific steps of obtaining the training model of distracted driving behavior in step S3 are: S31, obtaining multiple images of the driver's distracted driving behavior in different time periods in a preset manner, and establishing a corresponding data set; S32, performing image pre-processing on the data set through a CNN neural network, and dividing the processed images into images of manned areas or images of unmanned areas, and establishing corresponding image data subsets of manned areas and image data subsets of unmanned areas; S33, using the CenterNet network with an attention mechanism module to perform enhanced feature extraction on images in the two data subsets; S34, training the CenterNet network for target detection using images containing enhanced features to obtain a training model; The specific steps of step S32 are: S321, preprocessing the images in the data set; S322, performing image processing on the preprocessed image through a CNN neural network; S323, dividing the image processed by the CNN neural network into an image of a manned area or an image of an unmanned area, and establishing corresponding image data subsets of the manned area and image data subsets of the unmanned area; The specific steps of step S33 are: S331, inputting the images in the data subset into the CenterNet network; S332, perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and the output dimension matches the number of input feature channels; S333, generating a weight for each feature channel by using preset parameters; S334, weighting the output weights to the previous features channel by channel through multiplication, and completing the recalibration of the original features in the channel dimension; S335, activate the feature through ReLu and then upsample it to the original dimension through a fully connected layer; S336. The normalized weight obtained through the gate of the Sigmoid function is weighted to the features of each channel through size normalization processing to obtain enhanced features.

2. The method for detecting distracted driving behavior according to claim 1, characterized in that: The method of preprocessing the images in the data set in step S321 includes translation, scaling, horizontal flipping and color transformation, and each preprocessed image is obtained through a variety of random combination transformations in the image preprocessing method.

3. A distracted driving behavior detection system, characterized in that: include: An image acquisition module, used to acquire a real-time image of the driver's driving behavior in a preset manner; An image pre-processing module is used to perform image pre-processing on the image through a CNN neural network, and to classify the processed image into an image of a manned area or an image of an unmanned area; An image detection module is used to detect distracted driving behavior by using a training model of distracted driving behavior on the classified image and obtain a detection result; The image pre-processing module includes: An image preprocessing subunit, used for preprocessing images in the data set; An image processing subunit, used for processing the pre-processed image through a CNN neural network; The image classification and storage subunit divides the images processed by the CNN neural network into images with people in the area or images without people in the area, and establishes corresponding data subsets; The image detection module specifically includes: An image acquisition and storage unit, used to obtain multiple images of the driver's distracted driving behavior in different time periods in a preset manner and establish a corresponding data set; An image pre-processing and storage unit, used to perform image pre-processing on the data set through a CNN neural network, and to divide the processed images into images of manned areas or images of unmanned areas, and to establish corresponding image data subsets of manned areas and image data subsets of unmanned areas; An enhanced feature extraction unit is used to perform enhanced feature extraction on images in two types of data subsets through a CenterNet network including an attention mechanism module; The training unit performs target detection training on the CenterNet network using images containing enhanced features to obtain a training model; The enhanced feature extraction unit includes: The image input subunit is used to input the images in the data subset into the CenterNet network; The feature compression subunit is used to perform feature compression along the spatial dimension, convert each two-dimensional feature channel into a real number, and the output dimension matches the number of input feature channels; A weight setting subunit, used to generate weights for each feature channel by preset parameters; The feature recalibration subunit is used to weight the output weights to the previous features channel by channel through multiplication, completing the recalibration of the original features in the channel dimension; The feature sampling subunit is used to upsample the features to the original dimension after ReLu activation through a fully connected layer; The normalization processing subunit is used to add the normalized weight obtained through the gate of the Sigmoid function to the features of each channel through size normalization processing to obtain enhanced features.