Lightweight distraction driving recognition method and system based on improved ConvNeXt
By improving the ConvNeXt model and combining it with CR-Former, CEA and RSHC modules, the problems of insufficient local detail perception and excessive computational overhead in distracted driving recognition technology are solved, and high-precision, low-latency lightweight driving behavior recognition is achieved.
Patent Information
- Application Number
- CN202610562236.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-14
AI Technical Summary
Existing distracted driving recognition technologies suffer from insufficient local detail perception, excessive computational overhead, and low feature extraction efficiency in in-vehicle applications, making it difficult to simultaneously meet the requirements of high accuracy and low latency.
An improved ConvNeXt model is adopted, replacing the ConvNeXt Block module in the original ConvNeXt model with the CR-Former module, and combining the CEA module and RSHC module to enhance feature extraction capabilities and reduce computational cost.
While reducing computational load, it maintains high-precision driving behavior recognition capabilities, achieving a recognition accuracy of 99.24%, and is adapted to the computing power and power consumption constraints of in-vehicle embedded devices.
Smart Images

Figure CN122392032A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification using deep learning, and in particular to a lightweight distracted driving recognition method and system based on an improved ConvNeXt. Background Technology
[0002] With the development of intelligent transportation and advanced driver assistance systems (ADAS), distracted driving behavior recognition has become an important research direction in the field of computer vision. Vision-based non-contact recognition solutions are gradually becoming mainstream due to their advantages such as convenient deployment and non-intrusiveness. However, existing distracted driving recognition technologies still have the following shortcomings when applied to practical in-vehicle applications.
[0003] 1. Existing convolutional neural networks (CNNs) have insufficient feature extraction capabilities and limited accuracy in perceiving details: Current mainstream distracted driving recognition solutions are mostly built upon traditional CNNs (such as ConvNeXt, ResNet, and other related models). Although CNNs have a natural advantage in local feature extraction, they are limited by the local receptive field of convolution operations, making it difficult for the model to establish long-distance global contextual dependencies. This results in insufficient ability to distinguish subtle differences when faced with occlusion, complex lighting, or similar body movements (such as "making a phone call with the left hand" versus "making a phone call with the right hand"), thus limiting further improvements in recognition accuracy.
[0004] 2. The computational overhead of Transformer models is too high, making them difficult to adapt to the constraints of automotive hardware: In recent years, VisionTransformer (ViT) and its derivative models have demonstrated excellent global modeling capabilities thanks to their self-attention mechanism. However, the computational complexity of the self-attention mechanism increases quadratically with the feature map size, resulting in extremely high model parameter count and floating-point operation volume. For example, the number of parameters in a typical high-performance vision model often exceeds 20M, and the computational cost exceeds 10G FLOPs. This is too heavy a burden for automotive terminals (such as embedded chips and edge computing devices) with limited computing power and sensitive power consumption, making it difficult to meet the requirements of real-time recognition.
[0005] 3. Existing lightweight solutions come at the cost of accuracy, failing to balance lightweight design and high performance: To deploy on in-vehicle devices, some research attempts to reduce computational costs through model pruning, knowledge distillation, or the design of lightweight networks (such as MobileNet and ShuffleNet). However, these methods often severely compromise feature representation capabilities while significantly compressing the model, leading to a substantial drop in recognition accuracy (typically below 97%). Existing technologies generally face a dilemma of "accuracy-efficiency": high-accuracy models are slow, while fast models have poor accuracy, failing to simultaneously meet the stringent requirements of high recognition rates and low latency in in-vehicle scenarios.
[0006] In summary, existing methods for recognizing distracted driving behavior generally suffer from technical bottlenecks such as insufficient perception of local details, excessive computational overhead, and low feature extraction efficiency. Therefore, a novel technical solution is urgently needed that can significantly reduce model computation while maintaining or even improving the ability to capture details of driving behavior, thereby achieving high-precision, low-latency, and lightweight distracted driving behavior recognition. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a lightweight distracted driving recognition method and system based on the improved ConvNeXt. It solves the problems of insufficient local detail perception, excessive computational overhead, and low feature extraction efficiency in existing distracted driving behavior recognition methods.
[0008] The technical solution of this invention is: a lightweight distracted driving recognition method based on improved ConvNeXt, the steps of which are as follows: S01. Image Acquisition and Processing: Acquire images of driving scenes and preprocess the images; S02. Model Improvement and Construction: Construct an improved ConvNeXt model, the improvement being the replacement of the ConvNeXt Block module in the original ConvNeXt model with the CR-Former module; S03. Parameter setting and training: Set the training hyperparameters, input the preprocessed image into the improved ConvNeXt model for iterative training, and obtain the distracted driving behavior recognition model; S04. Behavior Recognition and Output: Input the image of the driving scene to be recognized into the distracted driving behavior recognition model and output the driving behavior recognition result.
[0009] A further technical solution of the present invention is: In step S01, the preprocessing operation includes: adopting a random cropping strategy during the model training stage, randomly cropping a fixed-size region from the source image of a preset size as a training sample, and performing a random horizontal flipping operation on the cropped image.
[0010] A further technical solution of the present invention is: in step S02, the improved ConvNeXt model includes an input layer, four stages, an average pooling layer and a classifier connected in series. In each stage, downsampling is first performed through two-dimensional convolution to expand the channel dimension, and then features are extracted through multiple CR-Former modules. The average pooling layer converts the feature map output from the last stage into a one-dimensional vector, which is then input into the classifier to complete the classification of driving behavior.
[0011] A further technical solution of the present invention is: the CR-Former module includes a first LayerNorm, a CEA module, a first element-wise additive residual connection, a second LayerNorm, an RSHC module, and a second element-wise additive residual connection; Its execution process includes: The input features are enhanced with detail features by the first LayerNorm and CEA modules, and then fused with the input features for the first time through the first element-wise additive residual connection. The result of the first fusion is then fused with the global context features by the second LayerNorm and RSHC modules, and then fused with the first fused features for the second time through the second element-wise additive residual connection to output the final features.
[0012] A further technical solution of the present invention is that the CEA module includes a channel segmentation unit, a feature enhancement unit, a channel merging unit, a global channel attention calibration unit, and a bypass attention compensation unit; Its execution process includes: First, the original input features are divided into C independent groups along the channel dimension by the channel segmentation unit to separate the initial spatial features corresponding to each channel; Subsequently, the features of each group are fed into the feature enhancement unit in parallel. Each group includes two paths: a direct connection branch and an enhancement branch. The direct connection branch retains the original single-channel features, while the enhancement branch is sequentially shuffled and downsampled by the ShuffDown unit, weighted by the SE Attention unit within the group, expanded by the Expand unit to expand the channel dimensions, and shuffled and upsampled by the ShuffUp unit. Then, the original single-channel features of the direct connection branch are used as gate weights and fused with the upsampled output features of the enhancement branch through element-wise multiplication to complete the feature enhancement of one group. Then, the enhanced features of each group are stitched together along the channel dimension using the channel stitching unit; Next, the spliced feature map is connected to the global attention calibration unit. First, the spatial dimension is compressed by global average pooling, and then the non-linear dependency between channels is modeled by 1×1 convolution to generate the main path C×1×1 channel weight vector. Then, the spliced feature map and the main path C×1×1 channel weight vector are multiplied element-wise to obtain the feature map after the first global calibration. Finally, the original input features are introduced into the side-channel attention compensation unit. First, the spatial dimension is compressed by global average pooling. Then, the non-linear dependency between channels is modeled by 1×1 convolution to generate a side-channel C×1×1 channel weight vector. Then, the feature map after the first global calibration is multiplied element-wise with the side-channel C×1×1 channel weight vector to complete the dual attention calibration. The resulting enhanced features are used as the output of the CEA module.
[0013] A further technical solution of the present invention is that the RSHC module includes a channel segmentation unit, a semi-convolution unit, a channel merging unit, a channel rearrangement unit, a depthwise convolution unit, a channel attention unit, and a normalization unit; Its execution process includes: First, the channel segmentation module divides the original input features with C channels into three groups equally along the channel dimension; Subsequently, the features of each group are fed into the semi-convolutional unit in parallel to complete the initial feature extraction while maintaining the spatial resolution. Then, the features of the three groups are re-stitched along the channel dimension through the channel merging unit to output the intermediate feature map. Then, the intermediate feature map is first shuffled by the channel rearrangement unit to promote cross-group information interaction, and then spatially filtered in a single channel by the deep convolution unit to output a feature map with enhanced local details. Next, the enhanced feature map is connected to the channel attention unit. First, global average pooling is performed on the feature map to compress the spatial dimension, resulting in a C×1×1 channel description vector. Then, the non-linear dependency between channels is modeled through two fully connected layers and activation functions to generate a C×1×1 channel weight vector. Finally, the channel weight vector is multiplied element-wise with the original feature map to output the feature map with the channel dimension calibration completed. Finally, the calibrated feature map is distributed and normalized using a normalization unit, and then fused with the original input features of the RSHC module using element-wise additive residual fusion. The resulting enhanced features are used as the output of the RSHC module.
[0014] A further technical solution of the present invention is as follows: In step S03, the training hyperparameters are configured as follows: the AdamW optimizer is used for iterative parameter optimization, and the learning rate is set to 5×10. -4 The weight decay coefficient is set to 5×10. -2 The batch size was set to 32, and the cross-entropy function was used as the loss function.
[0015] A further technical solution of the present invention is: in step S04, the driving behavior recognition results include: safe driving, sending messages with the left hand, sending messages with the right hand, making a phone call with the left hand, making a phone call with the right hand, operating a radio, drinking a beverage, reaching behind, fixing hair and makeup, and communicating with passengers.
[0016] The technical solution of this invention is: a lightweight distracted driving recognition system based on improved ConvNeXt, which is used in conjunction with the aforementioned lightweight distracted driving recognition method based on improved ConvNeXt. It includes an image acquisition and processing module, a model building and configuration module, a model iterative training module, and a behavior recognition output module, connected sequentially from front to back via data flow. The image acquisition and processing module implements step S01, the model building and configuration module implements step S02, the model iterative training module implements step S03, and the behavior recognition output module implements step S04.
[0017] A further technical solution of the present invention is that the behavior recognition output module is deployed in the vehicle terminal embedded device for real-time monitoring of the driver's status.
[0018] Compared with the prior art, the present invention has the following advantages: 1. Achieving both accuracy and efficiency: Breaking through the traditional constraint that "high accuracy necessarily requires high computing power," it achieves an ultra-high recognition accuracy of 99.24% while compressing the computing power to a lightweight level of 2.94G and reducing the number of parameters to 9.76M, perfectly balancing performance and overhead.
[0019] 2. Extremely strong detail perception: Through the "group gating + dual attention calibration" mechanism of the CEA module, the problem of detail loss during downsampling is effectively solved, improving the ConvNeXt model to achieve 100% accuracy in recognizing the fine action of "making a phone call with the left hand" (see...). Figure 6 The accuracy rate for the confusion matrix (and other multiple categories such as reaching behind or drinking) is >99%, accurately distinguishing 10 types of distracting behaviors.
[0020] 3. More efficient feature interaction: By utilizing the "three-part recombination + shuffling convolution" strategy of the RSHC module, the cross-channel information flow is maximized with extremely low computing power, which not only retains the advantages of lightweight design, but also significantly enhances the model's ability to understand spatial context.
[0021] 4. Strong deployment and implementation: The model is small in size and has a fast inference speed, perfectly adapting to the computing power and power consumption constraints of in-vehicle embedded devices, providing a highly reliable and low-cost real-time monitoring solution for intelligent cockpit DMS systems.
[0022] The present invention will be further described below with reference to the figures and embodiments. Attached Figure Description
[0023] Figure 1 The flowchart shows a lightweight distracted driving recognition method based on the improved ConvNeXt. Figure 2 A schematic diagram of the improved ConvNeXt model; Figure 3This is a structural diagram of the CR-Former module; Figure 4 This is a structural diagram of the CEA module; Figure 5 This is a schematic diagram of the RSHC module. Figure 6 To improve the confusion matrix diagram for recognizing State Farm datasets using the ConvNeXt model; Figure 7 A confusion matrix diagram for identifying State Farm datasets for existing ConvNet models; Figure 8 A confusion matrix diagram for identifying the State Farm dataset for an existing FasterNet-S model; Figure 9 A confusion matrix diagram for identifying the State Farm dataset for existing RDNet models. Detailed Implementation
[0024] Example 1:
[0025] The lightweight distracted driving detection method based on the improved ConvNeXt has the following steps: S01. Image Acquisition and Processing: Acquire driving scene images and preprocess them. The preprocessing operations include: during the model training phase, using a random cropping strategy, randomly cropping a 256×256 pixel region from the original 640×480 pixel image as a training sample, and performing a random horizontal flipping operation on the cropped image to expand the effective training sample size and improve the model's generalization ability.
[0026] The driving scene images are from the State Farm dataset, which covers 10 representative driving states. All images are in RGB color mode with a resolution of 640×480 pixels. They are divided into training and testing sets in an 8:2 ratio to meet the needs of model training and performance verification.
[0027] S02. Model Improvement and Construction: Construct an improved ConvNeXt model, wherein the improvement is to replace the ConvNeXt Block module in the original ConvNeXt model with the CR-Former module.
[0028] The improved ConvNeXt model consists of an input layer, four stages, an average pooling layer (AvgPool), and a classifier, which are connected in series.
[0029] The specific structure of the four stages is as follows: Stage 1: Downsampling is performed using 2D convolution with 4×4 kernels to generate a feature map with 96 channels and 64 height and width. Then, 3 CR-Former modules are concatenated for feature extraction. Stage 2: Downsampling is performed using 2×2 convolutional kernels to generate a feature map with 192 channels and 32 in both height and width. Then, three CR-Former modules are concatenated to extract features. Stage 3: Downsampling is performed through 2D convolution with 2×2 kernels to generate a feature map with 384 channels and 16 height and width. Then, 9 CR-Former modules are concatenated for feature extraction. Stage 4: Downsampling is performed using 2×2 convolution kernels to generate a feature map with 768 channels and a height and width of 8. Then, three CR-Former modules are concatenated to extract features.
[0030] The improved ConvNeXt model execution flow includes: First, the input layer receives an RGB feature map of size 3×256×256. Then, the feature map is processed through four stages for progressive feature extraction, each stage beginning with a downsampling module. In the initial downsampling of Stage 1, the height and width of the feature map are compressed to one-quarter of their original size, while the input channels are mapped from 3 channels to a 96-channel high-dimensional space to provide rich initial feature support for subsequent deep networks. In the downsampling modules of Stages 2, 3, and 4, the height and width of the feature map are compressed to half of their original size, and the channel dimension is expanded to twice that of the input. Finally, the average pooling layer performs global average pooling on the feature map output from Stage 4, converting the feature map into a 768×1 one-dimensional vector, which is then input into the classifier to complete the driving behavior classification.
[0031] The CR-Former module includes a first LayerNorm (Layer Normalization, LN), a CEA (Channel Enhancement Attention, CEA) module, a first element-wise additive residual connection, a second LayerNorm (Layer Normalization, LN) RSHC (Residual Shuffle HalfConvolution, RSHC) module, and a second element-wise additive residual connection.
[0032] The execution flow of the CR-Former module includes: The input features are enhanced with detail features by the first LayerNorm and CEA modules, and then fused with the input features for the first time through the first element-wise additive residual connection. The result of the first fusion is then fused with the global context features by the second LayerNorm and RSHC modules, and then fused with the first fused features for the second time through the second element-wise additive residual connection to output the final features.
[0033] The CEA module includes a channel segmentation unit, a feature enhancement unit, a channel merging unit, a global channel attention calibration unit, and a bypass attention compensation unit.
[0034] The execution flow of the CEA module includes: First, the original input features (C×H×W specification) are divided into C independent groups along the channel dimension by the channel segmentation unit to separate the initial spatial features corresponding to each channel; Subsequently, the features of each group are fed into the feature enhancement unit in parallel. Each group includes two paths: a direct connection branch and an enhancement branch. The direct connection branch retains the original single-channel features, while the enhancement branch is sequentially shuffled and downsampled by the ShuffDown unit (converting it into a feature with a shape of 16×H / 4×W / 4), weighted by the SE Attention unit within the group for channel attention (to reduce the model's computational parameters), expanded by the Expand unit to expand the channel dimension (while maintaining the spatial shape of the feature map at 16×H / 4×W / 4), and shuffled and upsampled by the ShuffUp unit (folding the channel dimension back to restore the spatial resolution of the feature map to H×W, and restoring the number of channels to 1). The original single-channel features of the direct connection branch are then used as gate weights and fused with the upsampled output features of the enhancement branch through element-wise multiplication to complete the feature enhancement of one group. Then, the enhanced features of each group are stitched together along the channel dimension by the channel stitching unit (reconstructing a feature map of C×H×W specification). Next, the concatenated feature map (C×H×W specification) is connected to the global attention calibration unit. First, the spatial dimension is compressed by global average pooling (to obtain a C×1×1 channel description vector). Then, the non-linear dependency between channels is modeled by 1×1 convolution to generate the main path C×1×1 channel weight vector. Then, the concatenated feature map (C×H×W specification) and the main path C×1×1 channel weight vector are multiplied element-wise to obtain the feature map (C×H×W specification) after the first global calibration.
[0035] Finally, the original input features (C×H×W size) are introduced into the side-channel attention compensation unit (to avoid the loss of original input information during parallel enhancement). First, the spatial dimension is compressed by global average pooling (to obtain a C×1×1 channel description vector). Then, the non-linear dependencies between channels are modeled by 1×1 convolution to generate a side-channel C×1×1 channel weight vector (this channel weight vector is based on the original global context without enhancement processing, which can provide an unbiased benchmark calibration signal for subsequent fusion). Then, the feature map after the first global calibration is multiplied element-wise with the side-channel C×1×1 channel weight vector to complete the dual attention calibration. The resulting enhanced features (with dimensions of C×H×W) are used as the output of the CEA module.
[0036] The RSHC module includes a channel splitting unit, a semi-convolution unit, a channel merging unit, a channel rearrangement unit, a depthwise convolution unit, a channel attention unit, and a normalization unit.
[0037] The HalfConv unit is a mature and lightweight convolution operator in the field of deep learning. It reduces the amount of computation by reducing the number of computation channels. For specific implementation, please refer to existing technologies (such as the HalfConv module in the FasterNet series models).
[0038] The execution flow of the RSHC module includes: First, the channel segmentation module divides the original input features (feature map with dimensions C×H×W (number of channels × height × width)) with C channels into 3 groups (each group has C / 3 channels to separate the feature representations of different channel subsets). Subsequently, the features of each group are fed into the HalfConv unit in parallel to complete the initial feature extraction while keeping the spatial resolution (H×W) unchanged. Then, the features of the three groups are re-stitched along the channel dimension by the channel merging unit to output the intermediate feature map (dimension C×H×W (number of channels × height × width)). Then, the intermediate feature map is first shuffled by the Channel Shuffle unit to promote cross-group information interaction, and then spatially filtered in a single channel by the Deep Convolutional Unit (DWConv) to output a feature map with enhanced local details (dimension C×H×W). Next, the enhanced feature map is connected to the channel attention unit (SE Attention). First, global average pooling (GAP) is performed on the feature map to compress the spatial dimension, resulting in a C×1×1 channel description vector. Then, two fully connected layers and an activation function (such as ReLU activation function) are used to model the non-linear dependencies between channels, generating a C×1×1 channel weight vector. Finally, the channel weight vector is multiplied element-wise with the original feature map to output a feature map with channel dimension calibration (dimension C×H×W). Finally, the calibrated feature map is distributed normalized using a batch normalization unit (Batch Norm) and then fused with the original input features of the RSHC module using element-wise additive residual fusion. The resulting enhanced features (with dimensions C×H×W) are used as the output of the RSHC module.
[0039] S03. Parameter setting and training: Set the training hyperparameters, input the preprocessed image into the improved ConvNeXt model for iterative training, and obtain the distracted driving behavior recognition model.
[0040] The training hyperparameters are configured as follows: the AdamW optimizer is used for iterative parameter optimization, and the learning rate is set to 5×10. -4 The weight decay coefficient is set to 5×10. -2 The batch size was set to 32, and the cross-entropy function was used as the loss function.
[0041] S04. Behavior Recognition and Output: Input the image of the driving scene to be recognized into the distracted driving behavior recognition model and output the driving behavior recognition result.
[0042] The driving behavior recognition results include: safe driving, sending messages with the left hand, sending messages with the right hand, making phone calls with the left hand, making phone calls with the right hand, operating the radio, drinking beverages, reaching behind, fixing hair and makeup, and communicating with passengers.
[0043] The lightweight distracted driving recognition system based on the improved ConvNeXt, which is used in conjunction with the aforementioned lightweight distracted driving recognition method based on the improved ConvNeXt, includes an image acquisition and processing module, a model building and configuration module, a model iterative training module, and a behavior recognition output module connected in a data stream from front to back.
[0044] The image acquisition and processing module implements step S01, the model construction and configuration module implements step S02, the model iterative training module implements step S03, and the behavior recognition and output module implements step S04. The behavior recognition and output module is deployed in an embedded device in the vehicle terminal and is used for real-time monitoring of the driver's state.
[0045] Explanation of the technical effects of this invention: The improved ConvNeXt model significantly reduces model computation costs and hardware resource consumption, while effectively enhancing the model's ability to capture detailed features of driving behavior, providing technical support for high-precision recognition.
[0046] Table 1 shows a comparison of the experimental results of the improved ConvNeXt model with other models on the State Farm dataset.
[0047] Table 1: The experiment was conducted using an NVIDIA RTX 3090 GPU, with 300 training epochs. The State Farm dataset was divided into training and testing sets in an 8:2 ratio, and the input images were uniformly resized to 256×256.
[0048] Acc / % (Accuracy): Reflects the model's "recognition accuracy." A higher value indicates stronger correctness in tasks such as classification / detection. The improved ConvNeXt model's accuracy (99.24%) is higher than all other existing models (ConvNet-T: 99.15%, FasterNet-S: 96.32%, RDNet-T: 98.82%). This shows that the improved ConvNeXt model surpasses existing solutions in recognition accuracy and has stronger adaptability to the State Farm dataset.
[0049] FLOPs / G (floating-point operations per billion): This measures the computational complexity of a model. A lower FLOPs / G indicates that the model consumes fewer computational resources (such as GPU computing power and inference time) during runtime. The improved ConvNeXt model's computational cost (2.94G) is significantly lower than other models (ConvNet-T: 11.67G, FasterNet-S: 11.9G, RDNet-T: 13.21G). This demonstrates that the improved ConvNeXt model significantly reduces computational complexity, saving GPU computing power and shortening inference time in practical deployments, making it more suitable for computationally sensitive scenarios (such as mobile devices and edge devices).
[0050] params / M (number of parameters, in millions): Measures the "parameter scale" of a model. A lower value indicates a more "lightweight" model, with lower requirements for hardware storage and deployment costs. The improved ConvNeXt model has significantly fewer parameters (9.76M) than other models (ConvNet-T: 27.83M, FasterNet-S: 29.91M, RDNet-T: 22.83M). This indicates that the improved ConvNeXt model has a more "lightweight" structural design, lower hardware storage resource requirements, and is easier to deploy and update.
[0051] In summary, Table 1, through the experimental design of "controlling consistent input resolution", intuitively demonstrates that the improved ConvNeXt model on the State Farm dataset simultaneously achieves "improved accuracy, reduced computational cost, and reduced parameter count", that is, it comprehensively outperforms other existing models in the three key dimensions of performance (Acc), efficiency (FLOPs), and lightweight (params).
[0052] II. Comparison of the confusion matrix of the improved ConvNeXt model with three other existing models for recognizing State Farm datasets, such as... Figure 6-9 As shown.
[0053] The diagonal cells of the confusion matrix represent the number / proportion of correctly identified “predicted label = true label” (the darker the color and the larger the value, the higher the accuracy); the off-diagonal cells represent the number / proportion of misjudgments (the smaller the value and the lighter the color, the fewer the errors).
[0054] Figure 6 The corresponding ConvNeXt model has the best performance, with the highest recognition accuracy (accuracy >99% for most categories), the fewest errors, and can accurately distinguish between "safe driving" and 10 types of distracting behaviors such as "using the left / right hand to send a text message / make a phone call" and "operating the radio".
[0055] Figure 7 The corresponding existing ConvNet model performs well, but is slightly inferior to the improved ConvNeXt model. Its performance is close to that of the improved ConvNeXt model, but its accuracy is slightly lower (e.g., 98.6% for safe driving vs. 99.4% for the improved ConvNeXt model), placing it in the "first tier" of existing models.
[0056] Figure 8 The corresponding existing FasterNet-S model has the worst performance, with the lowest recognition accuracy, the most false positives, and is unable to effectively distinguish similar distracting behaviors (such as "using the right hand to send a text message → safe driving" with 9 instances, accounting for 1.9%; "using the left hand to make a phone call → operating the radio" with 7 instances, accounting for 2.9%).
[0057] Figure 9 The corresponding existing RDNet model has moderate performance, and its recognition accuracy is between that of the existing ConvNet model and the existing FasterNet-S model (e.g., the number of "safe driving → safe driving" is 493, accounting for 97.0%; the number of "send text messages with left hand → send text messages with left hand" is about 99%).
[0058] contrast Figure 6-9 It can be seen that the improved ConvNeXt model is superior to existing models (ConvNet, FasterNet-S, RDNet) in both recognition accuracy and error control.
Claims
1. A lightweight distracted driving recognition method based on improved ConvNeXt, characterized by the following steps: as follows: S01. Image Acquisition and Processing: Acquire images of driving scenes and preprocess the images; S02. Model Improvement and Construction: Construct an improved ConvNeXt model, the improvement being the replacement of the ConvNeXt Block module in the original ConvNeXt model with the CR-Former module; S03. Parameter setting and training: Set the training hyperparameters, input the preprocessed image into the improved ConvNeXt model for iterative training, and obtain the distracted driving behavior recognition model; S04. Behavior Recognition and Output: Input the image of the driving scene to be recognized into the distracted driving behavior recognition model and output the driving behavior recognition result.
2. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 1, characterized in that, In step S01, the preprocessing operation includes: adopting a random cropping strategy during the model training phase, randomly cropping a fixed-size region from the source image of a preset size as a training sample, and performing a random horizontal flipping operation on the cropped image.
3. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 2, characterized in that, S In step 02, the improved ConvNeXt model includes an input layer, four stages, an average pooling layer, and a classifier connected in series. In each Stage, downsampling is first performed through two-dimensional convolution to expand the channel dimension, and then features are extracted through multiple CR-Former modules. The average pooling layer converts the feature map output from the last stage into a one-dimensional vector, which is then input into the classifier to complete the classification of driving behavior.
4. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 3, characterized in that, The CR-Former module includes a first LayerNorm, a CEA module, a first element-wise additive residual join, a second LayerNorm, an RSHC module, and a second element-wise additive residual join; Its execution process includes: The input features are enhanced with detail features by the first LayerNorm and CEA modules, and then fused with the input features for the first time through the first element-wise additive residual connection. The result of the first fusion is then fused with the global context features by the second LayerNorm and RSHC modules, and then fused with the first fused features for the second time through the second element-wise additive residual connection to output the final features.
5. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 4, characterized in that, The CEA module includes a channel segmentation unit, a feature enhancement unit, a channel merging unit, a global channel attention calibration unit, and a bypass attention compensation unit; Its execution process includes: First, the original input features are divided into C independent groups along the channel dimension by the channel segmentation unit to separate the initial spatial features corresponding to each channel; Subsequently, the features of each group are fed into the feature enhancement unit in parallel. Each group includes two paths: a direct connection branch and an enhancement branch. The direct connection branch retains the original single-channel features, while the enhancement branch is sequentially shuffled and downsampled by the ShuffDown unit, weighted by the SE Attention unit within the group, expanded by the Expand unit to expand the channel dimensions, and shuffled and upsampled by the ShuffUp unit. Then, the original single-channel features of the direct connection branch are used as gate weights and fused with the upsampled output features of the enhancement branch through element-wise multiplication to complete the feature enhancement of one group. Then, the enhanced features of each group are stitched together along the channel dimension using the channel stitching unit; Next, the spliced feature map is connected to the global attention calibration unit. First, the spatial dimension is compressed by global average pooling, and then the non-linear dependency between channels is modeled by 1×1 convolution to generate the main path C×1×1 channel weight vector. Then, the spliced feature map and the main path C×1×1 channel weight vector are multiplied element-wise to obtain the feature map after the first global calibration. Finally, the original input features are introduced into the side-channel attention compensation unit. First, the spatial dimension is compressed by global average pooling. Then, the non-linear dependency between channels is modeled by 1×1 convolution to generate a side-channel C×1×1 channel weight vector. Then, the feature map after the first global calibration is multiplied element-wise with the side-channel C×1×1 channel weight vector to complete the dual attention calibration. The resulting enhanced features are used as the output of the CEA module.
6. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 5, characterized in that, The RSHC module includes a channel segmentation unit, a semi-convolution unit, a channel merging unit, a channel rearrangement unit, a depthwise convolution unit, a channel attention unit, and a normalization unit; Its execution process includes: First, the channel segmentation module divides the original input features with C channels into three groups equally along the channel dimension; Subsequently, the features of each group are fed into the semi-convolutional unit in parallel to complete the initial feature extraction while maintaining the spatial resolution. Then, the features of the three groups are re-stitched along the channel dimension through the channel merging unit to output the intermediate feature map. Then, the intermediate feature map is first shuffled by the channel rearrangement unit to promote cross-group information interaction, and then spatially filtered in a single channel by the deep convolution unit to output a feature map with enhanced local details. Next, the enhanced feature map is connected to the channel attention unit. First, global average pooling is performed on the feature map to compress the spatial dimension, resulting in a C×1×1 channel description vector. Then, the non-linear dependency between channels is modeled through two fully connected layers and activation functions to generate a C×1×1 channel weight vector. Finally, the channel weight vector is multiplied element-wise with the original feature map to output the feature map with the channel dimension calibration completed. Finally, the calibrated feature map is distributed and normalized using a normalization unit, and then fused with the original input features of the RSHC module using element-wise additive residual fusion. The resulting enhanced features are used as the output of the RSHC module.
7. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 6, characterized in that, In step S03, the training hyperparameters are configured as follows: the AdamW optimizer is used for iterative parameter optimization, and the learning rate is set to 5×10. -4 The weight decay coefficient is set to 5×10. -2 The batch size was set to 32, and the cross-entropy function was used as the loss function.
8. The lightweight distracted driving recognition method based on the improved ConvNeXt as described in claim 7, characterized in that, S In step 04, the driving behavior recognition results include: safe driving, sending messages with the left hand, sending messages with the right hand, making phone calls with the left hand, making phone calls with the right hand, operating the radio, drinking beverages, reaching behind, fixing hair and makeup, and communicating with passengers.
9. A lightweight distracted driving recognition system based on improved ConvNeXt, used in conjunction with any one of claims 1-8, characterized in that, It includes an image acquisition and processing module, a model building and configuration module, a model iterative training module, and a behavior recognition and output module, which are connected in sequence from front to back. The image acquisition and processing module is used to implement step S01, the model building and configuration module is used to implement step S02, the model iterative training module is used to implement step S03, and the behavior recognition and output module is used to implement step S04.
10. The lightweight distracted driving recognition system based on the improved ConvNeXt as described in claim 9, characterized in that: The behavior recognition output module is deployed in the vehicle terminal embedded device and is used to monitor the driver's status in real time.