A driving distraction detection method and system based on local and global knowledge distillation

By introducing grouping convolution technology and attention mechanism into the teacher network, and training student network models in combination with local and global knowledge distillation methods, the problems of high hardware cost and insufficient model accuracy in the existing technology are solved, and efficient and accurate driver distraction detection are achieved.

CN118447487BActive Publication Date: 2025-03-18UNIV OF JINAN
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410664375.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2025-03-18
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

The existing driver distraction detection methods have problems such as high hardware cost, strong invasiveness and insufficient accurate detection capabilities of the model in the case of complex driver behavior.

Method used

The driving distraction detection method based on local and global knowledge distillation is adopted. By introducing grouping convolution technology and attention mechanisms into the teacher network, and training students' network models in combination with local and global knowledge distillation methods, the accuracy and efficiency of detection are improved.

Benefits of technology

It realizes the extraction of rich feature information under limited computing resources, significantly improves the feature representation ability, improves the accuracy and efficiency of driver distraction detection, and enables the model to achieve detection accuracy similar to that of the teacher network at a lower parameter quantity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447487B_ABST
    Figure CN118447487B_ABST
Patent Text Reader

Abstract

The present invention proposes a method and system for detecting distracted driving based on local and global knowledge distillation. By introducing group convolution technology in the teacher network, the model's parameter amount and computational complexity can be effectively reduced, while maintaining the effectiveness of feature extraction, so that the model can still extract rich feature information under limited computing resources. The introduction of the attention mechanism enables the model to adaptively focus on the areas in the image that are most relevant to distracted driving behavior, significantly improving the representation ability of features, so that the model can focus more on key information; the combination of local distillation and global distillation enables the student network to more comprehensively analyze the driver's behavior in the inference stage, improve the accuracy of detection, and enable the student network to achieve detection accuracy similar to that of the teacher network while maintaining a low parameter amount.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular, relates to a driving distraction detection method and system based on local and global knowledge distillation. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] When a driver's attention is diverted from the driving task to another activity, their attention is considered distracted. Cognitive distraction, behavioral distraction, and visual distraction are three typical types of driver distraction. The driver is the main decision maker and controller of the vehicle, so behavioral distraction can greatly affect normal driving and easily lead to traffic accidents.

[0004] There are currently three main methods for detecting driver distraction. One is a detection method based on physiological information, such as heart rate and EEG signals, which can more intuitively reflect changes in the user's state; the second is a detection method based on wearable devices, such as using data gloves, head-mounted eye trackers, etc.; the third is a detection method based on computer vision, which uses image classification or target detection through deep learning algorithms to extract and detect driver image features. The hardware cost of most physiological signal detection methods is very high, and invasive physiological sensors often affect the driver's driving experience. Wearable device-based methods also have certain limitations. In order to solve these problems, researchers have gradually shifted their focus to computer vision methods. Driver distraction detection technologies based on computer vision are non-invasive, so they do not affect the driver's normal driving.

[0005] The input features of existing distraction recognition models are based on image features such as face and hands. The driver's image visual data includes images or videos of the driver's facial expressions, eye movements, and body movements. Models based on image features are highly practical and have low recognition costs. However, due to the complexity of driver behavior, there are very large limitations in the model's ability to accurately and real-time detect the driver's behavior.

[0006] Therefore, how to accurately, quickly and effectively identify whether a driver is in a distracted state is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0007] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a driving distraction detection method and system based on local and global knowledge distillation, introduces group convolution technology and attention mechanism into the teacher network; and adopts a combination of global knowledge distillation and local knowledge distillation to train the student network model, so that the distraction detection model obtained can accurately and quickly perform recognition and detection.

[0008] To achieve the above objectives, a first aspect of the present invention provides a driving distraction detection method based on local and global knowledge distillation, comprising:

[0009] Acquire the behavior image to be detected;

[0010] Using the trained teacher network model to perform knowledge distillation training to obtain a distraction detection model, using the distraction detection model to extract features of the behavior image to be detected to obtain image features, performing behavior detection and recognition on the image features to obtain distraction detection results;

[0011] The training process of the distraction detection model is as follows:

[0012] Using the teacher network model, extracting features of the training image based on the grouped convolution technique, the attention mechanism and the neck network to obtain a first feature;

[0013] Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature;

[0014] Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature;

[0015] The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

[0016] A second aspect of the present invention provides a driving distraction detection system based on local and global knowledge distillation, comprising:

[0017] An acquisition module, used for acquiring the behavior image to be detected;

[0018] A detection module, used to perform knowledge distillation training using the trained teacher network model to obtain a distraction detection model, use the distraction detection model to extract features of the behavior image to be detected to obtain image features, perform behavior detection and recognition on the image features to obtain distraction detection results;

[0019] The training process of the distraction detection model is as follows:

[0020] Using the teacher network model, extracting features of the training image based on the grouped convolution technique, the attention mechanism and the neck network to obtain a first feature;

[0021] Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature;

[0022] Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature;

[0023] The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

[0024] The third aspect of the present invention provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, a driving distraction detection method based on local and global knowledge distillation is performed.

[0025] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, executes a driving distraction detection method based on local and global knowledge distillation.

[0026] One or more of the above technical solutions have the following beneficial effects:

[0027] In this invention, by introducing group convolution technology in the teacher network, the number of model parameters and computational complexity can be effectively reduced, while maintaining the effectiveness of feature extraction, so that the model can still extract rich feature information under limited computing resources. The introduction of the attention mechanism enables the model to adaptively focus on the areas in the image that are most relevant to driving distraction behavior, significantly improving the representation ability of features, so that the model can focus more on key information.

[0028] In the present invention, a combination of local distillation and global distillation is adopted, so that the student network can analyze the driver's behavior more comprehensively in the reasoning stage, improve the accuracy of detection, and enable the student network to achieve a detection accuracy close to that of the teacher network while maintaining a low number of parameters.

[0029] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0031] Figure 1 This is an overall block diagram of a distracted driving detection model in Embodiment 1 of the present invention;

[0032] Figure 2 This is a structural diagram of the SKS module in the first embodiment of the present invention;

[0033] Figure 3 This is a structural diagram of the Gc-Block module in the first embodiment of the present invention;

[0034] Figure 4 This is a schematic diagram of a data set partition diagram in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0035] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0036] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0037] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0038] Embodiment 1

[0039] This embodiment discloses a method for detecting distracted driving based on local and global knowledge distillation, including:

[0040] Acquire the behavior image to be detected;

[0041] Using the trained teacher network model to perform knowledge distillation training to obtain a distraction detection model, using the distraction detection model to extract features of the behavior image to be detected to obtain image features, performing behavior detection and recognition on the image features to obtain distraction detection results;

[0042] The training process of the distraction detection model is as follows:

[0043] Using the teacher network model, extracting features of the training image based on the grouped convolution technique, the attention mechanism and the neck network to obtain a first feature;

[0044] Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature;

[0045] Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature;

[0046] The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

[0047] This embodiment proposes a network structure named LGD-FCOS as an improved teacher network structure. The improved teacher network structure proposed in this embodiment combines an improved segmentation attention (SKS) module with selectable convolution kernels and knowledge distillation technology to improve the accuracy and efficiency of driver distraction detection. By using driver behavior characteristics, the LGD-FCOS network can effectively extract key information from images and identify distraction behaviors.

[0048] The improved teacher network model of this embodiment includes a Backbone network, a Neck network and a head network, wherein the Backbone network adopts an improved ResNet network, the Neck network adopts an FPN network, and the head network adopts an FCOS network.

[0049] The student network model of this embodiment includes a Backbone network, a Neck network and a head network, wherein the Backbone network adopts a ResNet50 network, the Neck network adopts an FPN network, and the head network adopts an FCOS network.

[0050] This embodiment improves the Backbone network in the teacher network and proposes the SKS module. Through the convolution kernels of different sizes in the SKS module, multi-scale features from local to global can be captured. This multi-scale feature extraction method helps the model better understand the complexity of driver behavior, thereby improving the accuracy of distraction detection.

[0051] like Figure 2 As shown, in this embodiment, the SKS module proposed in this embodiment is described in detail:

[0052] (1) Input: The SKS module receives the feature map from the previous layer as input. Number of channels: The feature map has c channels.

[0053] (2) In the SKS module, the input feature map is divided into two branches. In the first branch, the input feature map first passes through a 1×1 convolution layer with c channels. This operation is used to change the dimension of the input feature while keeping the number of channels unchanged. Then, group convolution is performed, passing through a 3×3 and a 5×5 convolution layer respectively, divided into 32 groups. Each convolution layer will output a feature map of c / 32 channels, and each channel focuses on a specific subset of the input features. The feature map after group convolution passes through the Split Attention module. The Split Attention module divides the feature map into multiple parts, processes these parts separately, and then recombine them to enhance the model's ability to focus on key features. The output of the SplitAttention module then passes through a 1×1 convolution layer to obtain the first branch feature result, which is used to further adjust the dimension and number of channels of the feature.

[0054] Second branch: The input feature map is downsampled through a 2×2 average pooling layer, and the step size s=2 is used to reduce the spatial dimension of the feature map; after average pooling, it passes through a 1×1 convolution layer, and the second branch feature result.

[0055] The first branch feature result and the second branch feature result are then merged through an addition operation, so that the feature information from different convolutional layers and attention modules can be fused to form a comprehensive feature representation.

[0056] The grouped convolution technique used in the SKS module can effectively reduce the number of model parameters and computational complexity while maintaining the effectiveness of feature extraction. This method enables the model to extract rich feature information under limited computing resources.

[0057] This embodiment introduces an attention mechanism, such as Split Attention, in the SKS module, which enables the model to adaptively focus on the areas in the image that are most relevant to distracted driving behavior. The introduction of the attention mechanism significantly improves the representation ability of features, allowing the model to focus more on key information.

[0058] like Figure 1 As shown in the figure, the input feature map is first trained through the improved teacher network to extract deep features, and then knowledge distillation is performed at the Neck network of the network. The deep features extracted by the teacher network are distilled to the student network through the proposed local and global knowledge distillation, so that the student network can achieve an accuracy close to that of the teacher network with a lower number of parameters.

[0059] This embodiment transfers the deep features of the teacher network to the student network through local and global knowledge distillation methods.

[0060] Specifically, the improved teacher network is used for training using a distracted driving dataset. A local distillation loss function is formed by combining the attention mechanism with traditional feature distillation, and a global knowledge loss function is proposed based on the Gc-Block module.

[0061] The student network is trained under the guidance of the teacher network. In the local distillation stage, the model transfers knowledge through the local area of ​​the feature map, so that the student network can learn the key local features of the teacher network. In the global distillation stage, the model transfers knowledge through the overall feature map, so that the student network can learn the global features and distribution of the teacher network.

[0062] The knowledge distillation technology in this embodiment not only transfers the deep features of the teacher network, but also includes spatial and channel attention information. This strategy enables the student network to learn the key features and attention distribution of the teacher network with a smaller number of parameters, further improving the performance of distraction detection. This embodiment adopts a method that combines local and global knowledge distillation, which not only retains key local features but also understands global contextual information. This combined strategy enables the student network to more comprehensively analyze driver behavior during the reasoning stage, improve detection accuracy, and enable the student network to achieve detection accuracy similar to that of the teacher network while maintaining a lower number of parameters.

[0063] This embodiment describes in detail the proposed driving distraction detection method based on local and global knowledge distillation.

[0064] Step 1: Data Preparation

[0065] like Figure 4 As shown, this embodiment selects the State Farm dataset, which is a public image dataset mainly used to study and develop machine learning models that can identify driver distraction. The dataset is provided by StateFarm Insurance Company and aims to detect and reduce traffic accidents caused by driver distraction through computer vision technology. The dataset contains images of various driver behaviors, which are divided into multiple categories, such as safe driving, using mobile phones, drinking water, talking to passengers, etc. These images can help researchers train and test their algorithm models to identify and understand various behavioral patterns of drivers during driving.

[0066] The dataset is re-divided and annotated into a target detection format dataset. The training dataset for this competition contains about 22,000 images, of which each driver has about 2,200 images, each image is taken at a resolution of 640x480 pixels and contains the entire driver's body and the interior environment.

[0067] The seven categories in the original data set, namely normal driving, drinking water, making phone calls with the left hand, making phone calls with the right hand, sending messages with the left hand, sending messages with the right hand, and controlling the center console, were unified into five categories, namely normal, drink, phone, play phone, and control.

[0068] Step 2: Training phase

[0069] The hardware device used in this embodiment is an RTX3090 graphics card with 24GB video memory. The Ubuntu 20.04.1 system model is trained for 100 epochs. The optimizer type selected is stochastic gradient descent (SGD), the initial value of the learning rate is 0.01, the momentum is 0.9, the weight decay is 0.0001, the learning rate multiplier of the bias term is 2.0, and the weight decay multiplier of the bias term is 0.0. The gradient clip parameter is set, the maximum norm of the gradient is 35, and the L2 norm is used.

[0070] The learning rate strategy selected is the step type, that is, the learning rate is adjusted at specific iteration steps. The warmup parameter indicates the learning rate warmup method, and the constant method is selected here. The number of warmup iterations is 500, and the learning rate ratio during warmup is 0.33333. The step list contains specific iteration steps, and the learning rate will be adjusted at the 30th, 60th, and 90th iteration steps.

[0071] The proposed teacher model is trained using the above training parameters to obtain the weights of the teacher model, and then local and global knowledge distillation is performed on the student network in the knowledge distillation stage.

[0072] In this stage, local and global distillation is used to perform knowledge distillation on the deep features extracted from the teacher network, so that the student network can better learn deeper features and achieve accuracy close to that of the teacher network with a lower number of parameters.

[0073] Local distillation loss:

[0074] A simple method is used to select key pixels and channels, and then the corresponding attention masks are obtained.

[0075] First, calculate the absolute average values ​​of different pixels and channels respectively:

[0076]

[0077]

[0078] Among them, F represents the FPN neck output feature, H and W represent the height and width of the feature, and C represents the channel. S and G C Represent the absolute average values ​​of FPN neck output features in different pixels and channels respectively.

[0079] Then the attention mask can be formulated as:

[0080] A S (F)=H· · oftmax(G S (F) / T) (3)

[0081] A C (F) = C softmax(G C (F) / T) (4)

[0082] Among them, A S (F) and A C (F) represents the spatial attention mask and channel attention mask respectively, and T represents the temperature of distillation.

[0083] Use the attention loss L at To make the student detector mimic the spatial and channel attention masks of the teacher detector, the formula is:

[0084]

[0085] Among them, t and s represent the teacher network and the student network. and They represent the spatial attention mask and channel attention mask of the teacher network, and the spatial attention mask and channel attention mask of the student network, respectively. l() represents L 1 loss, and γ is a hyperparameter used to balance the loss.

[0086] Characteristics of distillation:

[0087]

[0088] Among them, F T and F S Denote the FPN neck output features from the teacher and the student, respectively. S and A C denote the spatial attention mask and channel attention mask of the teacher detector respectively, and f() is the S Reshaped to match F T Adaptation layers of the same dimension. H, W represent the height and width of the feature, and C represents the channel.

[0089] The attention mask of the teacher model is used in formula (6) to guide the student network to learn features, because the features extracted by the teacher network are richer. The attention mask is used in formula (5) to calculate the attention loss.

[0090] Local distillation loss L local is the feature loss L fea and attention loss L at The sum of:

[0091] L local =L fea +L at (7)

[0092] Global distillation loss L global as follows:

[0093] L global =λ·∑(R(F T )-R(F S )) 2 (8)

[0094] The Gc-Block module processing process is:

[0095]

[0096] Among them, F represents the input feature map, that is, the feature map output by the FPN network; W k , W v1 and W v2 represents the convolutional layer, LN represents layer normalization, and N p is the number of pixels in the output feature map of the FPN network, ReLU represents the ReLU activation function, and λ is a hyperparameter for balancing the loss.

[0097] Total loss:

[0098] L=L original +L local +L global

[0099] Among them, L original is the raw loss of the detector.

[0100] The distillation loss is calculated only on the feature map, which can be obtained from the neck of the detector.

[0101] This embodiment enhances the traditional FCOS algorithm through the segmentation attention (SKS) module with selectable convolution kernels. This module enhances the performance of the backbone network ResNet, thereby significantly improving the accuracy of the FCOS target detection algorithm. In addition, a knowledge distillation framework is adopted, which is equipped with a novel local and global knowledge distillation (LGD) loss function. This framework helps the student network achieve similar accuracy to the teacher network while maintaining its own low parameter count. By training on a public dataset, our algorithm outperforms the current state-of-the-art model. These results provide an effective solution to improve the safety of drivers driving cars.

[0102] Embodiment 2

[0103] The purpose of this embodiment is to provide a driving distraction detection system based on local and global knowledge distillation, including:

[0104] An acquisition module, used for acquiring the behavior image to be detected;

[0105] A detection module, used to perform knowledge distillation training using the trained teacher network model to obtain a distraction detection model, use the distraction detection model to extract features of the behavior image to be detected to obtain image features, perform behavior detection and recognition on the image features to obtain distraction detection results;

[0106] The training process of the distraction detection model is as follows:

[0107] Using the teacher network model, extracting features of the training image based on the grouped convolution technique, the attention mechanism and the neck network to obtain a first feature;

[0108] Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature;

[0109] Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature;

[0110] The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

[0111] Embodiment 3

[0112] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the program.

[0113] Embodiment 4

[0114] The purpose of this embodiment is to provide a computer-readable storage medium.

[0115] A computer-readable storage medium stores a computer program, which executes the steps of the above method when executed by a processor.

[0116] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0117] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0118] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A driving distraction detection method based on local and global knowledge distillation, characterized in that: include: Acquire the behavior image to be detected; Using the trained teacher network model to perform knowledge distillation training to obtain a distraction detection model, using the distraction detection model to extract features of the behavior image to be detected to obtain image features, performing behavior detection and recognition on the image features to obtain distraction detection results; The training process of the distraction detection model is as follows: Using the teacher network model, extracting features of the training image based on group convolution technology, attention mechanism, and neck network to obtain a first feature; The teacher network includes a backbone network, a neck network and a detection head; the backbone network adopts an improved ResNet network, and the ResNet network is improved by using a segmentation attention module, and the segmentation attention module extracts features of the training image through grouped convolution technology and an attention mechanism; The segmentation attention module extracts features from the training image through grouped convolution technology and attention mechanism, specifically: Performing a convolution operation on the input image features of the segmentation attention module, and performing group convolution operations on the results of the convolution operation through a 3×3 convolution layer and a 5×5 convolution layer respectively; Split Attention is used to split and combine the group convolution operation results, and the first branch feature results are obtained after the Split Attention operation results are convolved; The input image features of the segmentation attention module are processed by average pooling and convolution in sequence to obtain the second branch feature results; The first branch feature result and the second branch feature result are combined to obtain the output result of the segmentation attention module; Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature; Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature; The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

2. The method for detecting distracted driving based on local and global knowledge distillation as claimed in claim 1, characterized in that: The local distillation loss value is specifically: Respectively calculating the absolute average values ​​of the neck network output features of the teacher network model and the student network model in different pixels and different channels; Based on the calculated absolute averages, respectively calculating the spatial attention mask and the channel attention mask of the teacher network model and the student network model; Calculating attention loss according to the teacher network model, the spatial attention mask and the channel attention mask of the student network model; Calculate feature loss according to the spatial attention mask and the channel attention mask of the teacher network model and the student network model, combined with the neck network output features of the teacher network model and the student network model; The attention loss and the feature loss are added to obtain a local distillation loss value.

3. The method for detecting distracted driving based on local and global knowledge distillation as claimed in claim 1, characterized in that: The calculation of the global distillation loss value is specifically as follows: L global =λ·∑(R(F T )-R(F S )) 2 , Among them, F is the output feature of the neck network, W k , W v1 and W v2 represents the convolutional layer, LN represents layer normalization, and N p is the number of pixels in the output feature of the neck network, ReLU represents the ReLU activation function, λ is the hyperparameter of the balanced loss; the superscript T represents the teacher network model, and the superscript S represents the student network model.

4. The method for detecting distracted driving based on local and global knowledge distillation as claimed in claim 1, characterized in that: The neck network adopts an FPN network, and the detection head adopts an FCOS network.

5. A driving distraction detection system based on local and global knowledge distillation, characterized in that: include: An acquisition module, used for acquiring the behavior image to be detected; A detection module, used to perform knowledge distillation training using the trained teacher network model to obtain a distraction detection model, use the distraction detection model to extract features of the behavior image to be detected to obtain image features, perform behavior detection and recognition on the image features to obtain distraction detection results; The training process of the distraction detection model is as follows: Using the teacher network model, extracting features of the training image based on group convolution technology, attention mechanism, and neck network to obtain a first feature; The teacher network includes a backbone network, a neck network and a detection head; the backbone network adopts an improved ResNet network, and the ResNet network is improved by using a segmentation attention module, and the segmentation attention module extracts features of the training image through grouped convolution technology and an attention mechanism; The segmentation attention module extracts features from the training image through grouped convolution technology and attention mechanism, specifically: Performing a convolution operation on the input image features of the segmentation attention module, and performing group convolution operations on the results of the convolution operation through a 3×3 convolution layer and a 5×5 convolution layer respectively; Split Attention is used to split and combine the group convolution operation results, and the first branch feature results are obtained after the Split Attention operation results are convolved; The input image features of the segmentation attention module are processed by average pooling and convolution in sequence to obtain the second branch feature results; The first branch feature result and the second branch feature result are combined to obtain the output result of the segmentation attention module; Using the knowledge distillation student network model, extract the features of the training image to obtain a second feature; Determine a local distillation loss value and a global distillation loss value of the knowledge distillation student network model by using the first feature and the second feature; The local distillation loss value and the global distillation loss value are used to adjust the parameters of the knowledge distillation student network model until the training is completed, and the trained knowledge distillation student network model is used as the distraction detection model.

6. The driving distraction detection system based on local and global knowledge distillation as claimed in claim 5, characterized in that: In the detection module, the calculation of the global distillation loss value is specifically as follows: L global =λ·∑(R(F T )-R(F S )) 2 , Among them, F is the output feature of the neck network, W k , W v1 and W v2 represents the convolutional layer, LN represents layer normalization, and N p is the number of pixels in the output feature of the neck network, ReLU represents the ReLU activation function, λ is the hyperparameter of the balanced loss; the superscript T represents the teacher network model, and the superscript S represents the student network model.

7. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor and the memory communicate through the bus. When the machine-readable instructions are executed by the processor, a driving distraction detection method based on local and global knowledge distillation as described in any one of claims 1 to 4 is performed.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting distracted driving based on local and global knowledge distillation as described in any one of claims 1 to 4 is executed.

Citation Information

Patent Citations

  • Target detection method and device based on neural network, machine readable medium and equipment

    CN112200062A

  • Distraction driving behavior detection method based on multi-scale attention module

    CN115082698A

  • Power transmission channel engineering vehicle target detection method and system based on knowledge distillation

    CN115131747A

  • Distraction driving detection method based on generative adversarial network and knowledge chart distillation

    CN116386013A