Model training method, driver state monitoring method and system
By using multi-angle human posture image data and autoencoder in the driver's status monitoring system for feature extraction, combined with dynamic routing decisions and time tags, the problems of limited data angles and missing timing analysis in the prior art are solved, and higher monitoring accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202411599922.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-11
AI Technical Summary
The existing driver status monitoring methods rely on a single-view camera system, resulting in limited data angles, inability to fully capture complex driving behaviors, and lack of timing analysis, limiting the real-time and accuracy of monitoring.
A model training method is proposed, which enhances the model's ability to reconstruct the original data by obtaining multi-angle human posture image data samples, using an autoencoder to perform feature extraction, and selectively transmitting features with information through dynamic routing decisions. At the same time, acquisition time tags are introduced to consider the timing of data to accurately analyze driver behavior changes.
It improves the accuracy and real-time performance of model training, enhances the monitoring ability of driver status, reduces information loss, and improves the flexibility and accuracy of the model.
Smart Images

Figure CN119723232A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model training method, a driver status monitoring method and a system. Background Art
[0002] During the driving process of a vehicle, the driver's state directly affects the safety of vehicle driving. At present, the existing driver state monitoring methods often rely on a single-view camera system, resulting in limited data angles and an inability to fully capture complex driving behaviors. At the same time, the lack of time series analysis makes it impossible to effectively analyze the dynamic changes of behavior, limiting the real-time nature of monitoring. Therefore, the existing driver state monitoring methods have low accuracy and pose a major safety hazard. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a model training method, a driver status monitoring method and a system, aiming to improve the accuracy of model training, as well as improve the real-time and accuracy of driver status monitoring.
[0004] In a first aspect, the present application provides a model training method for a processing device, the method comprising:
[0005] Acquire a human body posture image data sample, wherein the human body posture image data sample is identified with a state category label and a collection time label;
[0006] Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes a plurality of network layers arranged in cascade order;
[0007] Inputting the human posture image data sample into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, and update the autoencoder after reconstructing the output features of each layer through the decoder, so as to obtain a feature extraction model;
[0008] The human posture image data samples and / or sample feature data are used to train a preset classifier to obtain a classification model, wherein the sample feature data is obtained by extracting features from the human posture image data samples by a feature extraction model, and the classification model is used to distinguish the driver's status category.
[0009] In a possible implementation, the human posture image data sample is input into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, and reconstruct the output features of each layer through the decoder and then update the autoencoder to obtain a feature extraction model, including:
[0010] In each network layer, the output features of the human posture image data sample in the previous layer, the weight and bias of the current layer are obtained;
[0011] Determine the linear transformation output of the current layer based on the output features of the previous layer, the weights of the current layer, and the bias;
[0012] Input the linear transformation output of the current layer into the preset activation function for calculation, and output the activation function output feature of the current layer;
[0013] Calculate the output features of the activation function of the current layer based on the preset importance scoring model to obtain the corresponding feature importance score value;
[0014] Dynamic routing decisions are made based on the activation function output features of the current layer and the corresponding feature importance score values to determine the output features of the human posture image data sample at the current layer.
[0015] In a possible implementation, determining the linear transformation output of the current layer based on the output features of the previous layer, the weights and biases of the current layer includes:
[0016] The linear transformation output of the current layer is calculated by the following formula (1), including:
[0017] z r,i =W r,i ·x r,i-1 +b r,i (1)
[0018] Among them, z r,i is the linear transformation output of the i-th layer in the encoder, W r,i is the weight of the i-th layer, b r,i is the bias of the i-th layer, x r,i-1 is the output feature of the i-1th layer in the encoder;
[0019] The method of making a dynamic routing decision based on the activation function output feature of the current layer and the corresponding feature importance score value to determine the output feature of the human posture image data sample at the current layer includes:
[0020] The output features of the current layer are calculated by the following formula (2), including:
[0021] x r,i =route(a r,i ,imp(a r,i )) (2)
[0022] Among them, x r,i is the output feature of the human posture image data sample at the current layer, a r,i The activation function output feature of the current layer, imp(a r,i ) is the feature importance score value corresponding to the output feature of the activation function of the current layer, and route(*) represents the dynamic routing function.
[0023] In a possible implementation, the network layer includes a plurality of neurons; the dynamic routing decision is made based on the output features of the activation function of the current layer and the corresponding feature importance score value to determine the output features of the human posture image data sample in the current layer, including:
[0024] Obtaining activation output data of any neuron in the current layer and a neuron feature importance score about the activation output data, wherein the activation output data is obtained after the activation function processes the input data of the neuron;
[0025] The neuron feature importance score of each neuron is used as a calculation weight, and the activation output data is weightedly calculated based on the calculation weight to obtain the output feature of the human posture image data sample at the current layer.
[0026] In a possible implementation, the activation function output feature of the current layer is calculated based on a preset importance scoring model to obtain a corresponding feature importance score value, including:
[0027] Get the feature weights of the activation output data of any neuron in the current layer;
[0028] Based on the activation output data of each neuron in the current layer and the corresponding feature weight, calculate the feature importance score value of the activation function output feature of the current layer;
[0029] The feature importance score is calculated by the following formula (3):
[0030]
[0031] Among them, a r,i,j is the activation output data of the jth neuron in the i-th layer of the encoder, a r,i,k is the activation output data of the kth neuron in the i-th layer of the encoder, wr,imp,j is the feature weight of the activation output data of the jth neuron in the i-th layer, w r,imp,k is the feature weight of the activation output data of the kth neuron in the i-th layer, n r,i is the number of neurons in the i-th layer of the encoder.
[0032] In a possible implementation, the human posture image data sample is input into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, and reconstruct the output features of each layer through the decoder and then update the autoencoder to obtain a feature extraction model, including:
[0033] For any network layer, reconstructing the output features of the human posture image data sample at the current layer through the decoder to obtain reconstructed image data;
[0034] Determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples;
[0035] Based on the reconstruction error, determine the model parameter gradient of the current layer, the model parameter gradient includes a weight gradient and a bias gradient;
[0036] The weight of the current layer is updated according to the weight gradient of the current layer, and the bias of the current layer is updated according to the bias gradient of the current layer, until the preset iteration stop condition is reached to obtain the feature extraction model.
[0037] In a possible implementation, determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples includes:
[0038] The reconstruction error is calculated by the following formula (4), including:
[0039]
[0040] Among them, L r is the reconstruction error, m r is the sample number of the human body posture image data sample, is the lth human body posture image data sample input to the autoencoder, is the reconstructed lth human body posture image data sample;
[0041] The step of determining the model parameter gradient of the current layer based on the reconstruction error of the current layer includes:
[0042] The weight gradient is calculated by the following formula (5), including:
[0043]
[0044] Where, ΔW r,i is the weight gradient of the i-th layer of the autoencoder, η r is the learning rate of the autoencoder, W r,i is the current weight of the i-th layer of the autoencoder;
[0045] The bias gradient is calculated by the following formula (6), including:
[0046]
[0047] Where Δb r,i is the bias gradient of the i-th layer of the autoencoder, b r,i is the current bias of the i-th layer of the autoencoder;
[0048] The method of updating the weight of the current layer according to the weight gradient of the current layer and updating the bias of the current layer according to the bias gradient of the current layer until a preset iteration stop condition is reached to obtain a feature extraction model includes:
[0049] The bias gradient is calculated by the following formula (7), including:
[0050]
[0051] in, is the updated weight of the i-th layer of the autoencoder, S r,i is the sparsity measure of the neurons in the i-th layer of the autoencoder, λ r,s is the preset sparsity pruning threshold, represents the indicator function;
[0052] The bias gradient is calculated by the following formula (8), including:
[0053]
[0054] in, is the updated bias of the i-th layer of the autoencoder.
[0055] In a possible implementation, the sparsity measure of the neurons in the current layer is obtained by the following steps, including:
[0056] For any network layer, obtain the activation output data of any human posture image data sample at the current layer;
[0057] Calculate the sparsity measure of neurons in the current layer based on the activation output data of the human posture image data sample in the current layer, the sample number of the human posture image data sample and a preset sparsity threshold;
[0058] The bias gradient is calculated by the following formula (9), including:
[0059]
[0060] In the formula, a r,i,l is the activation output data of the lth human posture image data sample in the i-th layer, τ r is the sparsity threshold.
[0061] In a second aspect, the present application provides a driver status monitoring method for a processing device, the method comprising:
[0062] Acquire human body posture image data sent by at least one camera device arranged in the vehicle, wherein the human body posture image data carries a collection time tag;
[0063] Using a feature extraction model generated by the model training method described in the first aspect or any possible implementation of the first aspect, the human posture image data is subjected to feature dimensionality reduction to obtain image feature data;
[0064] The image feature data is identified using a classification model generated by the model training method described in the first aspect or any possible implementation of the first aspect to obtain a status category result of the driver in the vehicle.
[0065] In a third aspect, the present application provides a driver status monitoring system, the system comprising a processing device and at least one camera device arranged in a vehicle;
[0066] The camera device is connected to the processing device and is used to collect human posture image data and then send it to the processing device, wherein the human posture image data carries a collection time tag;
[0067] The processing device is used to obtain the human body posture image data;
[0068] Using a feature extraction model generated by the model training method described in the first aspect or any possible implementation of the first aspect, the human posture image data is subjected to feature dimensionality reduction to obtain image feature data;
[0069] The image feature data is identified using a classification model generated by the model training method described in the first aspect or any possible implementation of the first aspect to obtain a status category result of the driver in the vehicle.
[0070] The model training method, driver status monitoring method and system proposed in this application obtain a feature extraction model by training an autoencoder, and make dynamic routing decisions based on the output features of the human posture image data samples in the previous layer and the feature importance score of the current layer during the training process, determine the output features of the current layer, and selectively transmit features with information, thereby enhancing the model's ability to reconstruct the original data, while reducing information loss and improving the flexibility and accuracy of model training. By installing cameras at multiple angles in the vehicle to collect human posture image data, more comprehensive driver and passenger behavior data can be obtained from multiple perspectives, and the collection time label is introduced to take into account the temporal nature of the data to accurately analyze the driver's behavior changes. The human posture image data is subjected to feature extraction and classification by trained feature extraction models and classification models, thereby improving the real-time and accuracy of driver status monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A flowchart of a model training method provided in an embodiment of the present application;
[0072] Figure 2 A schematic diagram of the encoder processing flow provided in an embodiment of the present application;
[0073] Figure 3 A schematic diagram of a decoder processing flow provided in an embodiment of the present application;
[0074] Figure 4 A flowchart of a driver status monitoring method provided in an embodiment of the present application;
[0075] Figure 5 A schematic diagram of the structure of a driver status monitoring system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0077] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0078] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0079] First, some nouns involved in this application are analyzed:
[0080] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0081] Autoencoder (AE): It is a type of artificial neural network (ANN) used in semi-supervised learning and unsupervised learning. Its function is to perform representation learning on the input information by taking the input information as the learning target. The autoencoder consists of two parts: encoder and decoder. The encoder is responsible for mapping the input data to a low-dimensional latent space, usually called the encoding feature or bottleneck layer. This process is implemented through a multi-layer neural network, and each layer will perform certain transformations and compressions on the data. The decoder remaps the encoded low-dimensional representation back to the original input space to reconstruct the input data. The decoder is also implemented through a multi-layer neural network, upsampling and transforming layer by layer to restore the low-dimensional representation to an approximate form of the original input data.
[0082] Dynamic routing decision: refers to the router deciding the node's routing selection based on the current status information of the network.
[0083] Activation Function: It is a function that performs nonlinear transformation on the input of each neuron in an artificial neural network.
[0084] At present, existing driver status monitoring methods often rely on a single-view camera system, which results in limited data angles and is unable to fully capture complex driving behaviors. At the same time, the lack of time series analysis makes it impossible to effectively analyze the dynamic changes of behavior, limiting the real-time nature of monitoring. Therefore, the existing driver status monitoring methods have low accuracy and pose a major safety hazard.
[0085] Based on the above problems, the embodiments of the present application provide a model training method, a driver status monitoring method and system, which trains the autoencoder by means of dynamic routing decision-making to obtain a feature extraction model, improve the accuracy of model training, and install camera equipment at multiple angles in the vehicle to collect human posture image data, and introduce collection time labels, taking into account the temporal nature of the data, to achieve accurate analysis of the driver's behavior changes. The human posture image data is subjected to feature extraction and classification by means of the trained feature extraction model and classification model, thereby improving the real-time and accuracy of driver status monitoring.
[0086] The model training method, driver status monitoring method and system provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the model training method and driver status monitoring method in the embodiments of the present application are described.
[0087] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0088] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0089] The model training method and driver status monitoring method provided in the embodiments of the present application relate to the field of artificial intelligence technology. The model training method and driver status monitoring method provided in the embodiments of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a vehicle terminal, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application of the model training method and the driver status monitoring method, but is not limited to the above forms.
[0090] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0091] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0092] Figure 1 A flow chart of a model training method provided in an embodiment of the present application, Figure 1The method may include but is not limited to steps S101 to S104.
[0093] S101, obtaining a human body posture image data sample, wherein the human body posture image data sample is identified with a state category label and a collection time label.
[0094] In this application, human posture image data samples are derived from multiple camera devices arranged inside the vehicle, which can be high-resolution cameras. Therefore, this application can obtain more comprehensive driver and passenger behavior data from multiple perspectives by installing high-resolution cameras at multiple angles inside the vehicle to collect human posture image data. Compared with traditional single-perspective collection, it can greatly enhance the coverage and diversity of data, which helps the model to learn and understand different driving behaviors and states more comprehensively.
[0095] Optionally, human posture image data samples are stored in the form of image matrices, where each image is represented as a three-dimensional array in the format of M a ×N a ×3, represents the height of the image M a 、Width N a The image is stored in a cloud server in a standard image file format, and each frame of the image is timestamped to form a collection time tag. The collection time tag includes the camera device that collected the image data and the collection time of the image data.
[0096] In the present application, the image data in the human posture image data sample is annotated by an annotation method, and the annotation method may be manual annotation. Exemplarily, the state category labels may include "normal driving", "using a mobile phone", "talking to a passenger", "observing a vehicle dashboard", and "fatigue driving".
[0097] Therefore, this application performs model training by annotating human posture image data samples with state category labels and collection time labels to improve the accuracy of data annotation, and introduces timestamps to consider the temporal nature of the data, thereby enhancing the ability to analyze the dynamic changes of driving behavior, thereby improving the accuracy and real-time performance of model training.
[0098] S102: Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes a plurality of network layers arranged in cascade order.
[0099] In this application, the encoder is used to map the input data to a low-dimensional latent space, that is, the encoder performs certain transformations and compressions on the human posture image data samples. The decoder is used to remap the encoded low-dimensional representation back to the original input space, that is, the decoder reconstructs the data of the encoder output.
[0100] Optionally, the decoder may have multiple network layers corresponding to the encoder. Exemplarily, in the present application, the network layer may be a hidden layer.
[0101] S103, inputting the human posture image data sample into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, so that the output features of each layer are reconstructed by the decoder and then the autoencoder is updated to obtain a feature extraction model.
[0102] In this application, for the training of the encoder, an autoencoder algorithm based on dynamic routing is used for feature dimensionality reduction. Specifically, a dynamic routing mechanism based on feature importance score is used to automatically determine the transmission path of each feature in different layers of the encoder, thereby enhancing the model's ability to reconstruct the original data and reducing information loss. More specifically, the input human posture image data sample is transmitted through each layer of the encoder, and each layer makes a dynamic routing decision based on the output features of the previous layer and the feature importance score value of the current layer, selectively transmitting the most informative features.
[0103] For the training of the decoder, the output features from different encoding layers are used to reconstruct the data, and the model parameters of the autoencoder are updated according to the reconstructed data until the preset iteration stop condition is reached, and the training of the autoencoder is completed to obtain the feature extraction model. Among them, the model parameters include the weight and bias of each layer.
[0104] Therefore, by training the encoder and decoder, the present application can selectively transmit features with information content, enhance the model's ability to reconstruct the original data, reduce information loss, and improve the accuracy and efficiency of feature extraction. It can reduce the amount of data for model training while retaining as much effective information as possible, thereby improving the accuracy and efficiency of model training, and is suitable for complex or changeable application environments.
[0105] S104. Using the human posture image data samples and / or sample feature data, a preset classifier is trained to obtain a classification model, wherein the sample feature data is obtained by extracting features from the human posture image data samples by a feature extraction model, and the classification model is used to distinguish the driver's status category.
[0106] In the present application, the feature extraction model is used to perform operations such as feature dimension reduction and feature extraction on the input data, and the human posture image data sample is input into the feature extraction model, which can output the feature information of the human posture image data sample. Optionally, the preset classifier is trained using the feature information to obtain a classification model, which can reduce the amount of data processing and improve the accuracy and efficiency of the classification model training. Optionally, the preset classifier is trained using the human posture image data sample to obtain a classification model, which effectively improves the accuracy of the classification model. Optionally, the preset classifier can also be trained using the feature information and the human posture image data sample to obtain a classification model, which improves the accuracy and efficiency of the classification model training.
[0107] The training method of the model proposed in this application obtains a feature extraction model by training an autoencoder, and during the training process, dynamic routing decisions are made based on the output features of the human posture image data samples in the previous layer and the feature importance score values of the current layer, the output features of the current layer are determined, and the selective transmission of features with information content is achieved. This enhances the model's ability to reconstruct the original data, while reducing information loss, thereby improving the flexibility and accuracy of model training, and is conducive to improving the real-time and accuracy of driver status monitoring.
[0108] In some embodiments, Figure 2 This is a flowchart of the encoder processing provided in an embodiment of the present application. This embodiment provides a method for encoder processing, that is, step S103 may include but is not limited to steps S201 to S205.
[0109] S201, in each network layer, obtaining the output features of the human posture image data sample in the previous layer, the weight and bias of the current layer;
[0110] S202, determining the linear transformation output of the current layer based on the output features of the previous layer, the weights and biases of the current layer;
[0111] S203, inputting the linear transformation output of the current layer into a preset activation function to perform calculation, and outputting the activation function output feature of the current layer;
[0112] S204, calculating the activation function output features of the current layer based on a preset importance scoring model to obtain a corresponding feature importance score value;
[0113] S205, making a dynamic routing decision based on the activation function output features of the current layer and the corresponding feature importance score values, and determining the output features of the human posture image data sample at the current layer.
[0114] In this embodiment, the weights and biases of each network layer of the autoencoder are initialized. The initial weights of any layer of the autoencoder are obtained by the following formula, including:
[0115]
[0116] In the formula, is the initial weight of the i-th layer in the autoencoder, n r,i is the number of neurons in the i-th layer of the encoder, n r,i-1 is the number of neurons in the i-1th layer of the encoder; randn(n r,i ,n r,i-1 ) indicates that the shape is n r,i ×n r,i-1 Standard normal distribution random numbers;
[0117] The initial bias of any layer of the autoencoder is obtained by the following formula, including:
[0118]
[0119] In the formula, is the initial bias of the i-th layer in the autoencoder, zeros(n r,i ) indicates that the length is n t,i The zero vector of .
[0120] Furthermore, the human body posture image data samples are input into the encoder, and the human body posture image data samples are transformed, compressed and other data processed through each network layer of the encoder before being transmitted. That is, for each network layer, a dynamic routing decision is made based on the output features of the human body posture image data samples in the previous layer and the feature importance score of the current layer. After the output features of the human body posture image data samples in the current layer are determined, they are transmitted to the next network layer, thereby realizing the selective transmission of features with rich information.
[0121] Based on the above embodiments, in some embodiments, step S202 includes:
[0122] The linear transformation output of the current layer is calculated by the following formula (1), including:
[0123] z r,i =W r,i ·x r,i-1 +b r,i (1)
[0124] Among them, z r,i is the linear transformation output of the i-th layer in the encoder, W r,i is the weight of the i-th layer, b r,i is the bias of the i-th layer, x r,i-1 is the output feature of the i-1th layer in the encoder.
[0125] Specifically, step S203 includes:
[0126] The activation function output features of the current layer are calculated using the following formula, including:
[0127] a r,i =Re(z r,i )
[0128] Among them, a r,i Output feature of the activation function of the current layer, Re(*) represents the activation function, such as ReLU activation function.
[0129] In some embodiments, step S205 includes:
[0130] The output features of the current layer are calculated by the following formula (2), including:
[0131] x r,i =route(a r,i ,imp(a r,i )) (2)
[0132] Among them, x r,i is the output feature of the human posture image data sample at the current layer, a r,i The activation function output feature of the current layer, imp(a r,i ) is the feature importance score value corresponding to the activation function output feature of the current layer; route(*) represents a dynamic routing function, specifically a dynamic routing function based on feature importance; imp(*) represents the importance scoring function used to calculate the activation function output feature / activation output data of the autoencoder.
[0133] Therefore, this embodiment determines the linear transformation output of the current layer based on the output features of the previous layer, the weights and biases of the current layer in each network layer of the encoder, obtains the activation function output features of the current layer through the activation function, and then determines the feature importance score value corresponding to the activation function output features of the current layer, thereby making dynamic routing decisions based on the activation function output features of the current layer and the corresponding feature importance score values, determining the output features of the human posture image data samples in the current layer, and selectively transmitting features with information content. On the premise of retaining as much effective information as possible, the amount of data for model training is reduced, thereby improving the accuracy and efficiency of model training.
[0134] In some embodiments, step S205 further includes:
[0135] Obtaining activation output data of any neuron in the current layer and a neuron feature importance score about the activation output data, wherein the activation output data is obtained after the activation function processes the input data of the neuron;
[0136] The neuron feature importance score of each neuron is used as a calculation weight, and the activation output data is weightedly calculated based on the calculation weight to obtain the output feature of the human posture image data sample at the current layer.
[0137] In this embodiment, the dynamic routing function integrates the activation output data of the features of each neuron by weighted averaging. Therefore, this embodiment determines the importance of the features of the neuron by calculating the neuron feature importance score, and performs weighted calculation based on the neuron feature importance score and activation output data of each neuron from the weight of the activation output data of each neuron to obtain the output features of the human posture image data sample at the current layer.
[0138] Among them, the output features of the human posture image data sample at the current layer are calculated by the following formula, including:
[0139]
[0140] In the formula, a r,i,j is the activation output data of the jth neuron in the i-th layer of the encoder, imp(a r,i,j ) is the neuron feature importance score of the jth neuron in the i-th layer of the encoder.
[0141] In some embodiments, step S204 includes:
[0142] Get the feature weights of the activation output data of any neuron in the current layer;
[0143] Based on the activation output data of each neuron in the current layer and the corresponding feature weight, calculate the feature importance score value of the activation function output feature of the current layer;
[0144] The feature importance score is calculated by the following formula (3):
[0145]
[0146] Among them, a r,i,j is the activation output data of the jth neuron in the i-th layer of the encoder, a r,i,k is the activation output data of the kth neuron in the i-th layer of the encoder; w r,imp,j is the feature weight of the activation output data of the jth neuron in the i-th layer, obtained through training, representing the importance of the j-th feature; w r,imp,kis the feature weight of the activation output data of the k-th neuron in the i-th layer, obtained through training, representing the importance of the k-th feature; n r,i is the number of neurons in the i-th layer of the encoder.
[0147] In some embodiments, Figure 3 This is a flowchart of the decoder processing provided in an embodiment of the present application. This embodiment provides a method for encoder processing, that is, step S103 may include but is not limited to steps S301 to S304.
[0148] S301, for any network layer, reconstructing the output features of the human posture image data sample at the current layer through the decoder to obtain reconstructed image data;
[0149] S302, determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples;
[0150] S303: Determine a model parameter gradient of the current layer based on the reconstruction error, where the model parameter gradient includes a weight gradient and a bias gradient;
[0151] S304, updating the weight of the current layer according to the weight gradient of the current layer, and updating the bias of the current layer according to the bias gradient of the current layer, until a preset iteration stop condition is reached, thereby obtaining a feature extraction model.
[0152] In this embodiment, for the training of the decoder, the output features of different encoder network layers are reconstructed by the decoder to obtain reconstructed data, thereby calculating the reconstruction error. Then, based on the reconstruction error, the model parameters of the autoencoder, such as weights and biases, can be updated by the back propagation algorithm until the iteration stop condition is reached to obtain a feature extraction model. Exemplarily, the iteration stop condition is used to characterize the iteration stop condition for updating the autoencoder (i.e., updating the model parameters of the autoencoder), which means that the training of the autoencoder is completed. Optionally, the iteration stop condition can be to reach a preset maximum number of iterations. For example, the maximum number of iterations is set to 1000 times.
[0153] In a specific embodiment, the step S302 includes:
[0154] The reconstruction error is calculated by the following formula (4), including:
[0155]
[0156] Among them, L r is the reconstruction error, i.e., the loss function; m r is the sample number of the human body posture image data sample, is the lth human body posture image data sample input to the autoencoder, is the reconstructed lth human body posture image data sample.
[0157] Furthermore, the weights and biases of the autoencoder are updated through the back-propagation algorithm. It should be noted that the back-propagation algorithm updates the parameters in the network by calculating the gradient, thereby continuously optimizing the performance of the model. In the autoencoder network, the encoder encodes the high-dimensional input data into low-dimensional latent variables, while the decoder attempts to restore the latent variables to the initial dimension to reconstruct the original input data. The back-propagation algorithm can ensure that the parameters of the encoder and decoder are continuously adjusted, so that the reconstruction error is gradually reduced, thereby improving the accuracy of the model.
[0158] Specifically, the weight gradient and bias gradient of each layer of the autoencoder are calculated. The weight gradient can be the update increment of the weight, and the bias gradient can be the update increment of the bias. Then, the weight of the corresponding layer is updated according to the weight gradient, and the bias of the corresponding layer is updated according to the weight gradient, so as to update the autoencoder.
[0159] Therefore, this embodiment reconstructs data through the decoder and calculates the reconstruction error. The weight gradient and bias gradient are calculated based on the reconstruction error to update the weight and bias of the autoencoder, which can effectively improve the training accuracy and efficiency of the obtained feature extraction model and can be applicable to a variety of application scenarios.
[0160] Optionally, step S303 includes:
[0161]
[0162] Where, ΔW r,i is the weight gradient of the i-th layer of the autoencoder, η r is the learning rate of the autoencoder, W r,i is the current weight of the i-th layer of the autoencoder;
[0163] The bias gradient is calculated by the following formula (6), including:
[0164]
[0165] Where Δb r,i is the bias gradient of the i-th layer of the autoencoder, b r,i is the current bias of the i-th layer of the autoencoder.
[0166] Optionally, step S304 includes:
[0167] The bias gradient is calculated by the following formula (7), including:
[0168]
[0169] in, is the updated weight of the i-th layer of the autoencoder, S r,i is the sparsity measure of the neurons in the i-th layer of the autoencoder, λ r,s is the preset sparsity pruning threshold, represents the indicator function;
[0170] The bias gradient is calculated by the following formula (8), including:
[0171]
[0172] in, is the updated bias of the i-th layer of the autoencoder.
[0173] It should be noted that the principle of the indicator function is to take 1 when the condition in the brackets is met, otherwise it takes 0.
[0174] For example, r,s It is set to 0.8, indicating that weights will be pruned when the sparsity measure is above 80%.
[0175] In some embodiments, the sparsity measure of neurons in the current layer is obtained by the following steps, including:
[0176] For any network layer, obtain the activation output data of any human posture image data sample at the current layer;
[0177] Based on the activation output data of the human posture image data samples in the current layer, the sample number of the human posture image data samples and a preset sparsity threshold, a sparsity measure of neurons in the current layer is calculated.
[0178] In this embodiment, the computational efficiency and generalization ability of the model are improved by dynamically pruning redundant weights, that is, the weights corresponding to neurons with smaller activation output data in most cases will be dynamically pruned, thereby simplifying the model structure. Specifically, the importance of neurons is judged by statistically analyzing the sparsity of activation values. The calculation method of the sparsity measure of the i-th layer neurons of the autoencoder is expressed as the following formula (9):
[0179]
[0180] In the formula, a r,i,l is the activation output data of the lth human posture image data sample in the i-th layer, τ r is the sparsity threshold.
[0181] Figure 4 A flowchart of a driver status monitoring method provided in an embodiment of the present application is shown in FIG. Figure 4The method may include but is not limited to steps S401 to S403.
[0182] S401, acquiring human body posture image data sent by at least one camera device arranged in a vehicle, wherein the human body posture image data carries a collection time tag;
[0183] S402, using the feature extraction model generated by the above-mentioned model training method to perform feature dimension reduction on the human posture image data to obtain image feature data;
[0184] S403: Using the classification model generated by the above-mentioned model training method to identify the image feature data, obtain the status category result of the driver in the vehicle.
[0185] The driver status monitoring method proposed in this embodiment can obtain more comprehensive driver and passenger behavior data from multiple perspectives by installing cameras at multiple angles in the vehicle to collect human posture image data, and introduces collection time tags to accurately analyze the driver's behavior changes in consideration of the temporal nature of the data. The human posture image data is subjected to feature extraction and classification by means of a trained feature extraction model and classification model, thereby improving the real-time and accuracy of driver status monitoring.
[0186] Figure 5 A schematic diagram of the structure of a driver status monitoring system provided in an embodiment of the present application, wherein the driver status monitoring system 500 includes a processing device 501 and at least one camera device 502 disposed in a vehicle;
[0187] The camera device 502 is connected to the processing device 501 and is used to collect human posture image data and then send it to the processing device. The human posture image data carries a collection time tag;
[0188] The processing device 501 is used to obtain the human body posture image data;
[0189] Using the feature extraction model generated by the above-mentioned model training method to perform feature dimension reduction on the human posture image data to obtain image feature data;
[0190] The image feature data is identified using a classification model generated by the above-mentioned model training method to obtain a status category result of the driver in the vehicle.
[0191] In some embodiments, the processing device 501 is used to obtain a human posture image data sample, wherein the human posture image data sample is identified with a state category label and a collection time label;
[0192] Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes a plurality of network layers arranged in cascade order;
[0193] Inputting the human posture image data sample into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, and update the autoencoder after reconstructing the output features of each layer through the decoder, so as to obtain a feature extraction model;
[0194] The human posture image data samples and / or sample feature data are used to train a preset classifier to obtain a classification model, wherein the sample feature data is obtained by extracting features from the human posture image data samples by a feature extraction model, and the classification model is used to distinguish the driver's status category.
[0195] In some embodiments, the processing device 501 is used to obtain, in each network layer, the output features of the human posture image data sample in the previous layer, the weight and bias of the current layer;
[0196] Determine the linear transformation output of the current layer based on the output features of the previous layer, the weights of the current layer, and the bias;
[0197] Input the linear transformation output of the current layer into the preset activation function for calculation, and output the activation function output feature of the current layer;
[0198] Calculate the output features of the activation function of the current layer based on the preset importance scoring model to obtain the corresponding feature importance score value;
[0199] Dynamic routing decisions are made based on the activation function output features of the current layer and the corresponding feature importance score values to determine the output features of the human posture image data sample at the current layer.
[0200] In some embodiments, the processing device 501 is used to determine the linear transformation output of the current layer based on the output feature of the previous layer, the weight and bias of the current layer, including:
[0201] The linear transformation output of the current layer is calculated by the following formula (1), including:
[0202] z r,i =W r,i ·x r,i-1 +b r,i (1)
[0203] Among them, z r,iis the linear transformation output of the i-th layer in the encoder, W r,i is the weight of the i-th layer, b r,i is the bias of the i-th layer, x r,i-1 is the output feature of the i-1th layer in the encoder;
[0204] The dynamic routing decision is made according to the output features of the activation function of the current layer and the corresponding feature importance score value to determine the output features of the human posture image data sample at the current layer, including:
[0205] The output features of the current layer are calculated by the following formula (2), including:
[0206] x r,i =route(a r,i ,imp(a r,i )) (2)
[0207] Among them, x r,i is the output feature of the human posture image data sample at the current layer, a r,i The activation function output feature of the current layer, imp(a r,i ) is the feature importance score value corresponding to the output feature of the activation function of the current layer, and route(*) represents the dynamic routing function.
[0208] In some embodiments, the processing device 501 is used to obtain activation output data of any neuron in the current layer and a neuron feature importance score about the activation output data, wherein the activation output data is obtained after the activation function processes the input data of the neuron;
[0209] The neuron feature importance score of each neuron is used as a calculation weight, and the activation output data is weightedly calculated based on the calculation weight to obtain the output feature of the human posture image data sample at the current layer.
[0210] In some embodiments, the processing device 501 is used to obtain feature weights of activation output data of any neuron in the current layer;
[0211] Based on the activation output data of each neuron in the current layer and the corresponding feature weight, calculate the feature importance score value of the activation function output feature of the current layer;
[0212] The feature importance score is calculated by the following formula (3):
[0213]
[0214] Among them, a r,i,jis the activation output data of the jth neuron in the i-th layer of the encoder, a r,i,k is the activation output data of the kth neuron in the i-th layer of the encoder, w r,imp,j is the feature weight of the activation output data of the jth neuron in the i-th layer, w r,imp,k is the feature weight of the activation output data of the kth neuron in the i-th layer, n r,i is the number of neurons in the i-th layer of the encoder.
[0215] In some embodiments, the processing device 501 is used to reconstruct the output features of the human posture image data sample at the current layer through the decoder for any network layer to obtain reconstructed image data;
[0216] Determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples;
[0217] Based on the reconstruction error, determine the model parameter gradient of the current layer, the model parameter gradient includes a weight gradient and a bias gradient;
[0218] The weight of the current layer is updated according to the weight gradient of the current layer, and the bias of the current layer is updated according to the bias gradient of the current layer, until the preset iteration stop condition is reached to obtain the feature extraction model.
[0219] In some embodiments, the processing device 501 is used to calculate the reconstruction error using the following formula (4), including:
[0220]
[0221] Among them, L r is the reconstruction error, m r is the sample number of the human body posture image data sample, is the lth human body posture image data sample input to the autoencoder, is the reconstructed lth human body posture image data sample;
[0222] The weight gradient is calculated by the following formula (5), including:
[0223]
[0224] Where, ΔW r,i is the weight gradient of the i-th layer of the autoencoder, η r is the learning rate of the autoencoder, W r,i is the current weight of the i-th layer of the autoencoder;
[0225] The bias gradient is calculated by the following formula (6), including:
[0226]
[0227] Where Δb r,i is the bias gradient of the i-th layer of the autoencoder, b r,i is the current bias of the i-th layer of the autoencoder;
[0228] The bias gradient is calculated by the following formula (7), including:
[0229]
[0230] in, is the updated weight of the i-th layer of the autoencoder, S r,i is the sparsity measure of the neurons in the i-th layer of the autoencoder, λ r,s is the preset sparsity pruning threshold, represents the indicator function;
[0231] The bias gradient is calculated by the following formula (8), including:
[0232]
[0233] in, is the updated bias of the i-th layer of the autoencoder.
[0234] In some embodiments, the processing device 501 is used to obtain activation output data of any human posture image data sample at the current layer for any network layer;
[0235] Calculate the sparsity measure of neurons in the current layer based on the activation output data of the human posture image data sample in the current layer, the sample number of the human posture image data sample and a preset sparsity threshold;
[0236] The bias gradient is calculated by the following formula (9), including:
[0237]
[0238] In the formula, a r,i,l is the activation output data of the lth human posture image data sample in the i-th layer, τ r is the sparsity threshold.
[0239] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0240] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0241] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0242] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0243] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0244] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0245] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0246] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0247] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0249] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0250] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A model training method, characterized in that: For processing a device, the method comprises: Acquire a human body posture image data sample, wherein the human body posture image data sample is identified with a state category label and a collection time label; Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes a plurality of network layers arranged in cascade order; Inputting the human posture image data sample into the autoencoder, so as to make a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determine the output features of the current layer, and update the autoencoder after reconstructing the output features of each layer through the decoder, so as to obtain a feature extraction model; The human posture image data samples and / or sample feature data are used to train a preset classifier to obtain a classification model, wherein the sample feature data is obtained by extracting features from the human posture image data samples by a feature extraction model, and the classification model is used to distinguish the driver's status category.
2. The training method of the model according to claim 1, characterized in that: The method comprises: inputting the human posture image data sample into the autoencoder, making a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determining the output features of the current layer, and reconstructing the output features of each layer through the decoder and then updating the autoencoder to obtain a feature extraction model, including: In each network layer, the output features of the human posture image data sample in the previous layer, the weight and bias of the current layer are obtained; Determine the linear transformation output of the current layer based on the output features of the previous layer, the weights of the current layer, and the bias; Input the linear transformation output of the current layer into the preset activation function for calculation, and output the activation function output feature of the current layer; Calculate the output features of the activation function of the current layer based on the preset importance scoring model to obtain the corresponding feature importance score value; Dynamic routing decisions are made based on the activation function output features of the current layer and the corresponding feature importance score values to determine the output features of the human posture image data sample at the current layer.
3. The training method of the model according to claim 2, characterized in that: The step of determining the linear transformation output of the current layer based on the output features of the previous layer, the weights of the current layer, and the bias comprises: The linear transformation output of the current layer is calculated by the following formula (1), including: z r,i =W r,i ·x r,i-1 +b r,i (1) Among them, z r,i is the linear transformation output of the i-th layer in the encoder, W r,i is the weight of the i-th layer, b r,i is the bias of the i-th layer, x r,i-1 is the output feature of the i-1th layer in the encoder; The dynamic routing decision is made according to the output features of the activation function of the current layer and the corresponding feature importance score value to determine the output features of the human posture image data sample at the current layer, including: The output features of the current layer are calculated by the following formula (2), including: x r,i =route(a r,i ,imp(a r,i )) (2) Among them, x r,i is the output feature of the human posture image data sample at the current layer, a r,i The activation function output feature of the current layer, imp(a r,i ) is the feature importance score value corresponding to the output feature of the activation function of the current layer, and route(*) represents the dynamic routing function.
4. The training method of the model according to claim 3, characterized in that: The network layer comprises a plurality of neurons; the dynamic routing decision is made according to the output features of the activation function of the current layer and the corresponding feature importance score value to determine the output features of the human posture image data sample in the current layer, including: Obtaining activation output data of any neuron in the current layer and a neuron feature importance score about the activation output data, wherein the activation output data is obtained after the activation function processes the input data of the neuron; The neuron feature importance score of each neuron is used as a calculation weight, and the activation output data is weightedly calculated based on the calculation weight to obtain the output feature of the human posture image data sample at the current layer.
5. The training method of the model according to claim 4, characterized in that: The activation function output feature of the current layer is calculated based on the preset importance scoring model to obtain the corresponding feature importance score value, including: Get the feature weights of the activation output data of any neuron in the current layer; Based on the activation output data of each neuron in the current layer and the corresponding feature weight, calculate the feature importance score value of the activation function output feature of the current layer; The feature importance score is calculated by the following formula (3): Among them, a r,i,j is the activation output data of the jth neuron in the i-th layer of the encoder, a r,i,k is the activation output data of the kth neuron in the i-th layer of the encoder, w r,imp,j is the feature weight of the activation output data of the jth neuron in the i-th layer, w r,imp,k is the feature weight of the activation output data of the kth neuron in the i-th layer, n r,i is the number of neurons in the i-th layer of the encoder.
6. The training method of the model according to claim 5, characterized in that: The method comprises: inputting the human posture image data sample into the autoencoder, making a dynamic routing decision in each network layer according to the output features of the human posture image data sample in the previous layer and the feature importance score value of the current layer, determining the output features of the current layer, and reconstructing the output features of each layer through the decoder and then updating the autoencoder to obtain a feature extraction model, including: For any network layer, reconstructing the output features of the human posture image data sample at the current layer through the decoder to obtain reconstructed image data; Determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples; Based on the reconstruction error, determine the model parameter gradient of the current layer, the model parameter gradient includes a weight gradient and a bias gradient; The weight of the current layer is updated according to the weight gradient of the current layer, and the bias of the current layer is updated according to the bias gradient of the current layer, until the preset iteration stop condition is reached to obtain the feature extraction model.
7. The training method of the model according to claim 6, characterized in that: The step of determining a reconstruction error based on the reconstructed image data and corresponding human posture image data samples comprises: The reconstruction error is calculated by the following formula (4), including: Among them, L r is the reconstruction error, m r is the sample number of the human body posture image data sample, is the lth human body posture image data sample input to the autoencoder, is the reconstructed lth human body posture image data sample; The step of determining the model parameter gradient of the current layer based on the reconstruction error of the current layer includes: The weight gradient is calculated by the following formula (5), including: Where, ΔW r,i is the weight gradient of the i-th layer of the autoencoder, η r is the learning rate of the autoencoder, W r,i is the current weight of the i-th layer of the autoencoder; The bias gradient is calculated by the following formula (6), including: Where Δb r,i is the bias gradient of the i-th layer of the autoencoder, b r,i is the current bias of the i-th layer of the autoencoder; The method of updating the weight of the current layer according to the weight gradient of the current layer and updating the bias of the current layer according to the bias gradient of the current layer until a preset iteration stop condition is reached to obtain a feature extraction model includes: The bias gradient is calculated by the following formula (7), including: in, is the updated weight of the i-th layer of the autoencoder, S r,i is the sparsity measure of the neurons in the i-th layer of the autoencoder, λ r,s is the preset sparsity pruning threshold, represents the indicator function; The bias gradient is calculated by the following formula (8), including: in, is the updated bias of the i-th layer of the autoencoder.
8. The model training method according to claim 7, characterized in that: The sparsity measure of the neurons in the current layer is obtained through the following steps, including: For any network layer, obtain the activation output data of any human posture image data sample at the current layer; Calculate the sparsity measure of neurons in the current layer based on the activation output data of the human posture image data sample in the current layer, the sample number of the human posture image data sample and a preset sparsity threshold; The bias gradient is calculated by the following formula (9), including: In the formula, a r,i,l is the activation output data of the lth human posture image data sample in the i-th layer, τ r is the sparsity threshold.
9. A driver status monitoring method, characterized in that: For processing a device, the method comprises: Acquire human body posture image data sent by at least one camera device arranged in the vehicle, wherein the human body posture image data carries a collection time tag; Using a feature extraction model generated by the model training method according to any one of claims 1 to 8, feature dimension reduction is performed on the human posture image data to obtain image feature data; The image feature data is identified using a classification model generated by the model training method as described in any one of claims 1 to 8 to obtain a status category result of the driver in the vehicle.
10. A driver status monitoring system, characterized in that: The system includes a processing device and at least one camera device disposed in the vehicle; The camera device is connected to the processing device and is used to collect human posture image data and then send it to the processing device, wherein the human posture image data carries a collection time tag; The processing device is used to obtain the human body posture image data; Using a feature extraction model generated by the model training method according to any one of claims 1 to 8, feature dimension reduction is performed on the human posture image data to obtain image feature data; The image feature data is identified using a classification model generated by the model training method as described in any one of claims 1 to 8 to obtain a status category result of the driver in the vehicle.
Citation Information
Patent Citations
Dynamic routing technology based on convolutional neural network
CN108462644A
Driver posture recognition method based on double-view-angle video data
CN111832446A
Sparse self-encoding model training method and device, equipment and medium
CN118036669A
Intelligent image recognition method based on computer vision and machine learning
CN118537816A
Training method and device of image recognition model and image recognition method and device
CN119580358A
Cited By
Automatic driving strategy generation method and device and vehicle-mounted large model deployment method and device
CN120671782A