Model training methods, driver state monitoring methods and systems
By installing cameras at multiple angles inside the vehicle and using autoencoders for feature extraction and classification, the problems of limited data angles and insufficient time-series analysis in existing driver condition monitoring methods are solved, thereby improving the accuracy and real-time performance of driver condition monitoring.
Patent Information
- Application Number
- CN202411599922.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing driver condition monitoring methods rely on single-view camera systems, resulting in limited data angles, an inability to fully capture complex driving behaviors, and a lack of time-series analysis, which limits the real-time performance and accuracy of monitoring.
By installing cameras at multiple angles inside the vehicle to collect human posture image data, and using an autoencoder for feature extraction and classification, the acquisition time label is introduced to perform dynamic routing decisions, train the feature extraction and classification model, and improve the accuracy and real-time performance of the model.
This technology enables the acquisition of driver behavior data from multiple perspectives, enhancing the accuracy and real-time performance of the model's monitoring of driver status, reducing information loss, and improving the flexibility and accuracy of driver status monitoring.
Smart Images

Figure CN119723232B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a model training method, a driver state monitoring method and system. Background Technology
[0002] During vehicle operation, the driver's state directly impacts driving safety. Currently, existing driver state monitoring methods often rely on single-view camera systems, resulting in limited data acquisition angles and an inability to comprehensively capture complex driving behaviors. Furthermore, the lack of temporal analysis prevents effective analysis of dynamic behavioral changes, limiting real-time monitoring. Therefore, existing driver state monitoring methods suffer from low accuracy and pose significant safety risks. Summary of the Invention
[0003] The main objective of this application is to propose a model training method, a driver state monitoring method, and a system, aiming to improve the accuracy of model training and the real-time performance and accuracy of driver state monitoring.
[0004] In a first aspect, this application provides a method for training a model, used in a processing device, the method comprising:
[0005] Acquire human posture image data samples, wherein the human posture image data samples are identified with a state category label and an acquisition time label;
[0006] Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes multiple network layers arranged in a cascaded order;
[0007] The human pose image data samples are input into the autoencoder so that in each network layer, dynamic routing decisions are made based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer to determine the output features of the current layer. The autoencoder is then updated after the output features of each layer are reconstructed by the decoder to obtain the feature extraction model.
[0008] Using the human posture image data samples and / or sample feature data, a preset classifier is trained to obtain a classification model. The sample feature data is obtained by a feature extraction model after extracting features from the human posture image data samples. The classification model is used to distinguish the driver's state category.
[0009] In one possible implementation, the human pose image data samples are input into the autoencoder to perform dynamic routing decisions at each network layer based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer, thereby determining the output features of the current layer. This allows the autoencoder to be updated after the decoder reconstructs the output features of each layer to obtain a feature extraction model, including:
[0010] In each network layer, the output features of the human pose image data sample in the previous layer, the weights of the current layer, and the bias are obtained.
[0011] Based on the output features of the previous layer, the weights of the current layer, and the bias, determine the linear transformation output of the current layer;
[0012] The linear transformation output of the current layer is input into a preset activation function for calculation, and the activation function output features of the current layer are output.
[0013] The importance score is calculated based on the preset importance scoring model to obtain the corresponding feature importance score.
[0014] Dynamic routing decisions are made based on the output features of the activation function of the current layer and the corresponding feature importance scores to determine the output features of the human pose image data sample in the current layer.
[0015] In one possible implementation, 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 includes:
[0016] The linear transformation output of the current layer is calculated using 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 W is the linear transform output of the i-th layer in the encoder. r,i Let b be the weight of the i-th layer. r,i For the bias of the i-th layer, x r,i-1 The output feature of the (i-1)th layer in the encoder;
[0019] The dynamic routing decision based on the activation function output features of the current layer and the corresponding feature importance score, to determine the output features of the human pose image data sample in the current layer, includes:
[0020] The output features of the current layer are calculated using the following formula (2), including:
[0021] x r,i =route(a r,i ,imp(a r,i (2)
[0022] Where, x r,i a represents the output feature of the human pose image data sample in the current layer. r,i imp(a) is the output feature of the activation function of the current layer. r,i ) represents the feature importance score corresponding to the output feature of the activation function of the current layer, and route(*) represents the dynamic routing function.
[0023] In one possible implementation, the network layer comprises multiple neurons; the step of determining the output features of the human pose image data sample in the current layer by performing dynamic routing decisions based on the output features of the activation function of the current layer and the corresponding feature importance score includes:
[0024] Obtain the activation output data of any neuron in the current layer and the neuron feature importance score based on the activation output data. The activation output data is obtained by processing the input data of the neuron using the activation function.
[0025] The importance score of each neuron's features is used to calculate the weight. The activated output data is then weighted based on the calculated weight to obtain the output features of the human pose image data sample in the current layer.
[0026] In one possible implementation, the step of calculating the activation function output features of the current layer based on a preset importance scoring model to obtain the corresponding feature importance score includes:
[0027] Obtain the feature weights of the activation output data of any neuron in the current layer;
[0028] Based on the activation output data and corresponding feature weights of each neuron in the current layer, calculate the feature importance score of the activation function output feature of the current layer;
[0029] The feature importance score is calculated using the following formula (3), including:
[0030]
[0031] Among them, a r,i,j For the activation output data of the j-th neuron in the i-th layer of the encoder, a r,i,k w represents the activation output data of the k-th neuron in the i-th layer of the encoder.r,imp,j w represents the feature weights of the activation output data of the j-th neuron in the i-th layer. r,imp,k Let n be the feature weights for the activation output data of the k-th neuron in the i-th layer. r,i Let be the number of neurons in the i-th layer of the encoder.
[0032] In one possible implementation, the human pose image data samples are input into the autoencoder to perform dynamic routing decisions at each network layer based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer, thereby determining the output features of the current layer. This allows the autoencoder to be updated after the decoder reconstructs the output features of each layer to obtain a feature extraction model, including:
[0033] For any network layer, the decoder reconstructs the output features of the human pose image data sample at the current layer to obtain the reconstructed image data.
[0034] Based on the reconstructed image data and the corresponding human posture image data samples, the reconstruction error is determined.
[0035] Based on the reconstruction error, the gradient of the model parameters of the current layer is determined, and the gradient of the model parameters includes the weight gradient and the bias gradient.
[0036] The weights of the current layer are updated based on the weight gradient of the current layer, and the bias of the current layer is updated based on the bias gradient of the current layer, until the preset iteration stopping condition is reached, thus obtaining the feature extraction model.
[0037] In one possible implementation, determining the reconstruction error based on the reconstructed image data and corresponding human pose image data samples includes:
[0038] The reconstruction error is calculated using the following formula (4), including:
[0039]
[0040] Among them, L r Let m be the reconstruction error. r The number of samples in the human posture image data is [number]. The input is the l-th human pose image data sample to the autoencoder. This is a sample of the reconstructed human pose image data for the l-th person;
[0041] The step of determining the gradient of the model parameters of the current layer based on the reconstruction error of the current layer includes:
[0042] The weight gradient is calculated using the following formula (5), including:
[0043]
[0044] Wherein, ΔW r,i Let η be the weight gradient of the i-th layer of the autoencoder. r W is the learning rate of the autoencoder. r,i The current weights of the i-th layer of the autoencoder;
[0045] The bias gradient is calculated using the following formula (6), including:
[0046]
[0047] Where, Δb r,i Let b be the bias gradient of the i-th layer of the autoencoder. r,i This is the current bias of the i-th layer of the autoencoder;
[0048] The process of updating the weights of the current layer based on the weight gradient of the current layer and updating the bias of the current layer based on the bias gradient of the current layer, until a preset iteration stopping condition is met, to obtain the feature extraction model, includes:
[0049] The bias gradient is calculated using the following formula (7), including:
[0050]
[0051] in, For the updated weights of the i-th layer of the autoencoder, S r,i λ is a measure of the sparsity of neurons in the i-th layer of the autoencoder. r,s The preset sparsity pruning threshold, Indicates an indicator function;
[0052] The bias gradient is calculated using the following formula (8), including:
[0053]
[0054] in, This is the bias of the i-th layer of the updated autoencoder.
[0055] In one possible implementation, a measure of sparsity of neurons in the current layer is obtained through the following steps:
[0056] For any network layer, obtain the activation output data of any human pose image data sample in the current layer;
[0057] Based on the activation output data of the human pose image data sample in the current layer, the number of samples of the human pose image data sample, and the preset sparsity threshold, the sparsity measure of the neurons in the current layer is calculated.
[0058] The bias gradient is calculated using the following formula (9), including:
[0059]
[0060] In the formula, a r,i,l For the activation output data of the l-th human pose image data sample in the i-th layer, τ r The sparsity threshold is denoted as .
[0061] Secondly, this application provides a driver status monitoring method for a processing device, the method comprising:
[0062] Acquire human posture image data sent by at least one camera device deployed inside the vehicle, the human posture image data carrying a collection time tag;
[0063] The human pose image data is subjected to feature dimensionality reduction using a feature extraction model generated by the training method of the model described in the first aspect or any possible implementation of the first aspect, to obtain image feature data.
[0064] The image feature data is identified using a classification model generated by the training method of the model described in the first aspect or any possible implementation of the first aspect, to obtain the state category result of the driver inside the vehicle.
[0065] Thirdly, this application provides a driver status monitoring system, the system including a processing device and at least one camera device installed in the 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. The human posture image data carries a collection time tag.
[0067] The processing device is used to acquire the human posture image data;
[0068] The human pose image data is subjected to feature dimensionality reduction using a feature extraction model generated by the training method of the model described in the first aspect or any possible implementation of the first aspect, to obtain image feature data.
[0069] The image feature data is identified using a classification model generated by the training method of the model described in the first aspect or any possible implementation of the first aspect, to obtain the state category result of the driver inside the vehicle.
[0070] The training method, driver state monitoring method, and system proposed in this application obtain a feature extraction model by training an autoencoder. During training, dynamic routing decisions are made based on the output features of the previous layer and the feature importance scores of the current layer of human posture image data samples to determine the output features of the current layer. This selectively transmits informative features, enhances the model's ability to reconstruct the original data, reduces information loss, and improves the flexibility and accuracy of model training. By installing cameras at multiple angles inside the vehicle to collect human posture image data, more comprehensive driver and passenger behavior data can be obtained from multiple perspectives. Furthermore, the introduction of acquisition time labels, considering the temporal nature of the data, enables accurate analysis of driver behavior changes. The trained feature extraction model and classification model are used to extract features from the human posture image data and then classify them, improving the real-time performance and accuracy of driver state monitoring. Attached Figure Description
[0071] Figure 1 A flowchart illustrating a model training method provided in an embodiment of this application;
[0072] Figure 2 This is a schematic flowchart of encoder processing provided in an embodiment of this application;
[0073] Figure 3 This is a schematic diagram of the decoder processing provided in the embodiments of this application;
[0074] Figure 4 A flowchart illustrating a driver status monitoring method provided in an embodiment of this application;
[0075] Figure 5 This is a schematic diagram of a driver status monitoring system provided in an embodiment of this application. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0077] It should be noted that although functional modules are divided in the device schematic diagram and a 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 aforementioned 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 commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0079] First, let's analyze some of the terms used in this application:
[0080] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0081] An autoencoder (AE) is a type of artificial neural network (ANN) used in semi-supervised and unsupervised learning. Its function is to learn representations of the input information by using the input information as the learning target. An autoencoder consists of two parts: an encoder and a decoder. The encoder is responsible for mapping the input data to a low-dimensional latent space, often called the encoded feature or bottleneck layer. This process is achieved through a multi-layer neural network, with each layer performing certain transformations and compressions on the data. The decoder remaps the encoded low-dimensional representation back to the original input space, reconstructing 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 route selection for nodes based on the current state information of the network.
[0083] Activation function: In artificial neural networks, it is a function that performs a non-linear transformation on the input of each neuron.
[0084] Currently, existing driver state monitoring methods often rely on single-view camera systems, resulting in limited data acquisition angles and an inability to comprehensively capture complex driving behaviors. Furthermore, the lack of temporal analysis prevents effective analysis of dynamic behavioral changes, limiting the real-time nature of monitoring. Therefore, existing driver state monitoring methods suffer from low accuracy and pose significant safety risks.
[0085] To address the aforementioned issues, this application provides a model training method, a driver state monitoring method, and a system. An autoencoder is trained using dynamic routing decisions to obtain a feature extraction model, improving the accuracy of model training. Human posture image data is collected by installing cameras at multiple angles inside the vehicle, and time stamps are introduced to account for the temporal nature of the data, enabling accurate analysis of driver behavior changes. The trained feature extraction model and classification model are used to extract features from the human posture image data and then classify them, improving the real-time performance and accuracy of driver state monitoring.
[0086] The model training method, driver state monitoring method and system provided in this application are specifically described through the following embodiments. First, the model training method and driver state monitoring method in this application embodiment are described.
[0087] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0088] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0089] The model training method and driver state monitoring method provided in this application relate to the field of artificial intelligence technology. The model training method and driver state monitoring method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, vehicle terminal, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the model training method and driver state monitoring method, but is not limited to the above forms.
[0090] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: 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, and distributed computing environments including any of the above systems or devices. This 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. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0091] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0092] Figure 1 This is a schematic flowchart illustrating a model training method provided in an embodiment of this application. Figure 1The method may include, but is not limited to, steps S101 to S104.
[0093] S101. Obtain human posture image data samples, wherein the human posture image data samples are identified with a state category label and a collection time label.
[0094] In this application, the human posture image data samples originate from multiple camera devices installed inside the vehicle, which can be high-resolution cameras. Therefore, by installing high-resolution cameras at multiple angles inside the vehicle to collect human posture image data, this application can obtain more comprehensive driver and passenger behavior data from multiple perspectives. Compared with traditional single-view acquisition, this significantly enhances the coverage and diversity of the data, helping the model to more comprehensively learn and understand different driving behaviors and states.
[0095] Optionally, human pose image data samples are stored in the form of an image matrix, where each image is represented as a three-dimensional array in the format M. a ×N a ×3 represents the image height M. a Width N a It contains three color channels. The images are stored on a cloud server using a standard image file format, and each frame is timestamped to create a capture time stamp. This capture time stamp includes the camera used to capture the image data and the time the image data was captured.
[0096] In this application, the image data in the human posture image data sample is labeled using a labeling method, which can be manual labeling. For example, the state category labels may include "normal driving", "using a mobile phone", "talking to passengers", "observing the vehicle dashboard", and "fatigue driving".
[0097] Therefore, this application uses human posture image data samples labeled with state category labels and acquisition time labels for model training, which improves the accuracy of data labeling. Furthermore, it introduces timestamps to take into account the temporal nature of the data, thereby enhancing the ability to analyze dynamic changes in driving behavior and 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 multiple network layers arranged in a cascaded 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 compression on the human pose 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 from the encoder's output.
[0100] Optionally, the decoder may have multiple network layers corresponding to the encoder. For example, in this application, the network layers may be hidden layers.
[0101] S103. Input the human posture image data sample into the autoencoder, so that in each network layer, dynamic routing decision is made based on the output features of the human posture image data sample in the previous layer and the feature importance score of the current layer to determine the output features of the current layer, so that the autoencoder is updated after the output features of each layer are reconstructed by the decoder to obtain the feature extraction model.
[0102] In this application, a dynamic routing-based autoencoder algorithm is used for feature dimensionality reduction during encoder training. Specifically, a dynamic routing mechanism based on feature importance scoring automatically determines the transmission path of each feature in different layers of the encoder, enhancing the model's ability to reconstruct the original data while reducing information loss. More specifically, the input human pose image data samples are transmitted through each layer of the encoder. Each layer makes dynamic routing decisions based on the output features of the previous layer and the feature importance score of the current layer, selectively transmitting the most informative features.
[0103] For decoder training, data reconstruction is performed using output features from different coding layers. The autoencoder model parameters are then updated based on the reconstructed data until a preset iteration stopping condition is met, completing the autoencoder training and obtaining the feature extraction model. The model parameters include the weights and biases of each layer.
[0104] Therefore, by training the encoder and decoder, this application can selectively transmit information-rich features, 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. It is suitable for complex or variable 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 feature extraction model after extracting features from the human posture image data samples, and the classification model is used to distinguish the driver's state category.
[0106] In this application, the feature extraction model is used to perform operations such as feature reduction and feature extraction on the input data. When human pose image data samples are input into the feature extraction model, the model outputs feature information of the human pose image data samples. Optionally, this feature information can be used to train a preset classifier to obtain a classification model, which can reduce the amount of data processing and improve the accuracy and efficiency of classification model training. Optionally, using the human pose image data samples to train a preset classifier to obtain a classification model effectively improves the accuracy of the classification model. Optionally, the feature information and the human pose image data samples can also be used to train a preset classifier to obtain a classification model, further improving the accuracy and efficiency of classification model training.
[0107] The training method of the model proposed in this application obtains a feature extraction model by training an autoencoder. 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 of the current layer to determine the output features of the current layer. This enables the selective transmission of information-rich features, enhances the model's ability to reconstruct the original data, reduces information loss, and improves the flexibility and accuracy of model training, which is beneficial for improving the real-time performance and accuracy of driver status monitoring.
[0108] In some embodiments, Figure 2 This is a schematic diagram of the encoder processing provided in the embodiment of this 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, obtain the output features of the human pose image data sample in the previous layer, the weights of the current layer, and the biases.
[0110] S202. Based on the output features of the previous layer, the weights of the current layer, and the bias, determine the linear transformation output of the current layer;
[0111] S203. Input the linear transformation output of the current layer into the preset activation function for calculation, and output the activation function output features of the current layer.
[0112] S204. 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;
[0113] S205. Based on the output features of the activation function of the current layer and the corresponding feature importance score, a dynamic routing decision is made to determine the output features of the human pose image data sample in 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 using the following formula:
[0115]
[0116] In the formula, Let n be the initial weights of the i-th layer in the autoencoder. r,i Let n be the number of neurons in the i-th layer of the encoder. r,i-1 randn(n) represents the number of neurons in the (i-1)th layer of the encoder. r,i ,n r,i-1 ) represents a shape of n r,i ×n r,i-1 Standard normally distributed random numbers;
[0117] The initial bias of any layer of the autoencoder can be obtained using the following formulas, including:
[0118]
[0119] In the formula, Let zeros(n) be the initial bias of the i-th layer in the autoencoder. r,i ) indicates a length of n t,i The zero vector.
[0120] Furthermore, human posture image data samples are input into the encoder. The human posture image data samples are then processed through each network layer of the encoder, including transformation and compression, before being transmitted. Specifically, for each network layer, dynamic routing decisions are made based on the output features of the human posture image data sample in the previous layer and the feature importance score of the current layer. After determining the output features of the human posture image data sample in the current layer, it is transmitted to the next network layer, thus selectively transmitting information-rich features.
[0121] Based on the above embodiments, in some embodiments, step S202 includes:
[0122] The linear transformation output of the current layer is calculated using 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 W is the linear transform output of the i-th layer in the encoder. r,i Let b be the weight of the i-th layer. r,i For the bias of the i-th layer, x r,i-1 Let be the output feature of the (i-1)th 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 Re(*) represents the output features of the activation function of the current layer. Re(*) represents the activation function, such as the ReLU activation function.
[0129] In some embodiments, step S205 includes:
[0130] The output features of the current layer are calculated using the following formula (2), including:
[0131] x r,i =route(a r,i ,imp(a r,i (2)
[0132] Where, x r,i a represents the output feature of the human pose image data sample in the current layer. r,i imp(a) is the output feature of the activation function of the current layer. r,i ) represents the feature importance score corresponding to the activation function output feature of the current layer; route(*) represents the dynamic routing function, specifically a dynamic routing function based on feature importance; imp(*) represents the importance score function used to calculate the activation function output feature / activation output data of the autoencoder.
[0133] Therefore, in this embodiment, in each network layer of the encoder, the linear transformation output of the current layer is determined based on the output features of the previous layer, the weights of the current layer, and the bias. Then, the activation function output features of the current layer are obtained through the activation function, and the feature importance score corresponding to the activation function output features of the current layer is determined. Thus, dynamic routing decisions are made based on the activation function output features of the current layer and the corresponding feature importance score to determine the output features of the human pose image data samples in the current layer. This achieves selective transmission of informative features, reducing the amount of data for model training while retaining as much effective information as possible, thereby improving the accuracy and efficiency of model training.
[0134] In some embodiments, step S205 further includes:
[0135] Obtain the activation output data of any neuron in the current layer and the neuron feature importance score based on the activation output data. The activation output data is obtained by processing the input data of the neuron using the activation function.
[0136] The importance score of each neuron's features is used to calculate the weight. The activated output data is then weighted based on the calculated weight to obtain the output features of the human pose image data sample in the current layer.
[0137] In this embodiment, the dynamic routing function integrates the activation output data of each neuron's features using a weighted average. Therefore, this embodiment determines the importance of a neuron's features by calculating the neuron feature importance score. Based on the weight of each neuron's activation output data, a weighted calculation is performed between the neuron feature importance score and the activation output data to obtain the output features of the human pose image data sample in the current layer.
[0138] The output features of the human pose image data samples at the current layer are calculated using the following formulas:
[0139]
[0140] In the formula, a r,i,j For the activation output data of the j-th neuron in the i-th layer of the encoder, imp(a) r,i,j ) represents the neuron feature importance score of the j-th neuron in the i-th layer of the encoder.
[0141] In some embodiments, step S204 includes:
[0142] Obtain the feature weights of the activation output data of any neuron in the current layer;
[0143] Based on the activation output data and corresponding feature weights of each neuron in the current layer, calculate the feature importance score of the activation function output feature of the current layer;
[0144] The feature importance score is calculated using the following formula (3), including:
[0145]
[0146] Among them, a r,i,j For the activation output data of the j-th neuron in the i-th layer of the encoder, a r,i,k This refers to the activation output data of the k-th neuron in the i-th layer of the encoder; w r,imp,j The feature weights for the activation output data of the j-th neuron in the i-th layer are obtained through training and characterize the importance of the j-th feature; w r,imp,kThe feature weights for the activation output data of the k-th neuron in the i-th layer are obtained through training and characterize the importance of the k-th feature; n r,i Let be the number of neurons in the i-th layer of the encoder.
[0147] In some embodiments, Figure 3 This is a schematic diagram of the decoder processing provided in the embodiment of this 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, the decoder is used to reconstruct the output features of the human pose image data sample in the current layer to obtain the reconstructed image data.
[0149] S302. Based on the reconstructed image data and the corresponding human posture image data samples, determine the reconstruction error;
[0150] S303. Based on the reconstruction error, determine the model parameter gradient of the current layer, wherein the model parameter gradient includes the weight gradient and the bias gradient;
[0151] S304. Update the weights of the current layer according to the weight gradient of the current layer, and update the bias of the current layer according to the bias gradient of the current layer, until the preset iteration stopping condition is reached, and obtain the feature extraction model.
[0152] In this embodiment, for decoder training, the decoder reconstructs the output features of different encoder network layers to obtain reconstructed data, and the reconstruction error is calculated accordingly. Then, based on the reconstruction error, the autoencoder's model parameters, such as weights and biases, are updated using the backpropagation algorithm until the iteration stopping condition is reached, thus obtaining the feature extraction model. For example, the iteration stopping condition characterizes the stopping condition for updating the autoencoder (i.e., updating the autoencoder's model parameters), indicating that the autoencoder training is complete. Optionally, the iteration stopping condition can be reaching a preset maximum number of iterations. For example, the maximum number of iterations is set to 1000.
[0153] In one specific embodiment, step S302 includes:
[0154] The reconstruction error is calculated using the following formula (4), including:
[0155]
[0156] Among them, L r Let m be the reconstruction error, i.e., the loss function; r The number of samples in the human posture image data is [number]. The input is the l-th human pose image data sample to the autoencoder. This is a sample of the reconstructed human pose image data for the lth person.
[0157] Furthermore, the weights and biases of the autoencoder are updated using the backpropagation algorithm. It should be noted that the backpropagation algorithm updates the parameters in the network by calculating gradients, thereby continuously optimizing the model's performance. In an autoencoder network, the encoder encodes high-dimensional input data into low-dimensional latent variables, while the decoder attempts to restore the latent variables to their initial dimensions to reconstruct the original input data. The backpropagation algorithm ensures that the parameters of the encoder and decoder are continuously adjusted, gradually reducing the reconstruction error and thus improving the model's accuracy.
[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 weights, and the bias gradient can be the update increment of the biases. Then, the weights of the corresponding layer are updated based on the weight gradients, and the biases of the corresponding layer are updated based on the weight gradients, thus updating the autoencoder.
[0159] Therefore, this embodiment reconstructs data through a decoder and calculates the reconstruction error. Based on the reconstruction error, it calculates the weight gradient and bias gradient, thereby updating the weights and biases of the autoencoder. This can effectively improve the training accuracy and efficiency of the obtained feature extraction model and is applicable to various application scenarios.
[0160] Optionally, step S303 includes:
[0161]
[0162] Wherein, ΔW r,i Let η be the weight gradient of the i-th layer of the autoencoder. r W is the learning rate of the autoencoder. r,i The current weights of the i-th layer of the autoencoder;
[0163] The bias gradient is calculated using the following formula (6), including:
[0164]
[0165] Where, Δb r,i Let b be the bias gradient of the i-th layer of the autoencoder. r,i This is the current bias of the i-th layer of the autoencoder.
[0166] Optionally, step S304 includes:
[0167] The bias gradient is calculated using the following formula (7), including:
[0168]
[0169] in, For the updated weights of the i-th layer of the autoencoder, S r,i λ is a measure of the sparsity of neurons in the i-th layer of the autoencoder. r,s The preset sparsity pruning threshold, Indicates an indicator function;
[0170] The bias gradient is calculated using the following formula (8), including:
[0171]
[0172] in, This is the bias of the i-th layer of the updated autoencoder.
[0173] It should be noted that the principle of the indicator function is to take 1 when the condition inside the parentheses is true, and 0 otherwise.
[0174] For example, λ r,s Setting it to 0.8 means that the weights will be pruned when the sparsity metric is above 80%.
[0175] In some embodiments, the sparsity measure of neurons in the current layer is obtained through the following steps:
[0176] For any network layer, obtain the activation output data of any human pose image data sample in the current layer;
[0177] Based on the activation output data of the human pose image data sample in the current layer, the number of samples of the human pose image data sample, and a preset sparsity threshold, the sparsity measure of the neurons in the current layer is calculated.
[0178] In this embodiment, redundant weights are dynamically pruned to improve the computational efficiency and generalization ability of the model. That is, the weights corresponding to neurons that activate smaller output data in most cases will be dynamically pruned, thereby simplifying the model structure. Specifically, the importance of neurons is determined by the sparsity of activation values. The sparsity measure of neurons in the i-th layer of the autoencoder is calculated as follows (9):
[0179]
[0180] In the formula, a r,i,l For the activation output data of the l-th human pose image data sample in the i-th layer, τ r The sparsity threshold is denoted as .
[0181] Figure 4 This is a flowchart illustrating a driver status monitoring method provided in an embodiment of this application. Figure 4The method may include, but is not limited to, steps S401 to S403.
[0182] S401. Acquire human posture image data sent by at least one camera device installed in the vehicle, wherein the human posture image data carries a collection time tag.
[0183] S402. The feature extraction model generated by the training method of the above model is used to perform feature dimensionality reduction on the human posture image data to obtain image feature data.
[0184] S403. The classification model generated by the training method of the above model is used to identify the image feature data to obtain the state category result of the driver in the vehicle.
[0185] The driver state monitoring method proposed in this embodiment acquires more comprehensive driver and passenger behavior data by installing cameras at multiple angles inside the vehicle to collect human posture image data. Furthermore, it incorporates time stamps to accurately analyze driver behavior changes, taking into account the temporal nature of the data. By using a trained feature extraction and classification model to extract features from the human posture image data and then classify them, the real-time performance and accuracy of driver state monitoring are improved.
[0186] Figure 5 This is a schematic diagram of a driver status monitoring system provided in an embodiment of the present application. The driver status monitoring system 500 includes a processing device 501 and at least one camera device 502 installed in the 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 acquire the human posture image data;
[0189] The feature extraction model generated by the training method of the above model is used to perform feature dimensionality reduction on the human pose image data to obtain image feature data;
[0190] The classification model generated by the training method of the above model is used to identify the image feature data to obtain the state category result of the driver in the vehicle.
[0191] In some embodiments, the processing device 501 is used to acquire human posture image data samples, wherein the human posture image data samples are identified with a state category label and an acquisition time label.
[0192] Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes multiple network layers arranged in a cascaded order;
[0193] The human pose image data samples are input into the autoencoder so that in each network layer, dynamic routing decisions are made based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer to determine the output features of the current layer. The autoencoder is then updated after the output features of each layer are reconstructed by the decoder to obtain the feature extraction model.
[0194] Using the human posture image data samples and / or sample feature data, a preset classifier is trained to obtain a classification model. The sample feature data is obtained by a feature extraction model after extracting features from the human posture image data samples. The classification model is used to distinguish the driver's state category.
[0195] In some embodiments, the processing device 501 is configured to acquire, in each network layer, the output features of the human pose image data sample in the previous layer, the weights of the current layer, and the bias;
[0196] Based on the output features of the previous layer, the weights of the current layer, and the bias, determine the linear transformation output of the current layer;
[0197] The linear transformation output of the current layer is input into a preset activation function for calculation, and the activation function output features of the current layer are output.
[0198] The importance score is calculated based on the preset importance scoring model to obtain the corresponding feature importance score.
[0199] Dynamic routing decisions are made based on the output features of the activation function of the current layer and the corresponding feature importance scores to determine the output features of the human pose image data sample in 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 features of the previous layer, the weights of the current layer, and the bias, including:
[0201] The linear transformation output of the current layer is calculated using 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,iW is the linear transform output of the i-th layer in the encoder. r,i Let b be the weight of the i-th layer. r,i For the bias of the i-th layer, x r,i-1 The output feature of the (i-1)th layer in the encoder;
[0204] The dynamic routing decision based on the activation function output features of the current layer and the corresponding feature importance score, to determine the output features of the human pose image data sample in the current layer, includes:
[0205] The output features of the current layer are calculated using the following formula (2), including:
[0206] x r,i =route(a r,i ,imp(a r,i (2)
[0207] Where, x r,i a represents the output feature of the human pose image data sample in the current layer. r,i imp(a) is the output feature of the activation function of the current layer. r,i ) represents the feature importance score 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 acquire activation output data of any neuron in the current layer and neuron feature importance scores related to the activation output data, wherein the activation output data is obtained by processing the input data of the neuron by the activation function;
[0209] The importance score of each neuron's features is used to calculate the weight. The activated output data is then weighted based on the calculated weight to obtain the output features of the human pose image data sample in the current layer.
[0210] In some embodiments, the processing device 501 is used to obtain feature weights for the activation output data of any neuron in the current layer;
[0211] Based on the activation output data and corresponding feature weights of each neuron in the current layer, calculate the feature importance score of the activation function output feature of the current layer;
[0212] The feature importance score is calculated using the following formula (3), including:
[0213]
[0214] Among them, a r,i,jFor the activation output data of the j-th neuron in the i-th layer of the encoder, a r,i,k w represents the activation output data of the k-th neuron in the i-th layer of the encoder. r,imp,j w represents the feature weights of the activation output data of the j-th neuron in the i-th layer. r,imp,k Let n be the feature weights for the activation output data of the k-th neuron in the i-th layer. r,i Let be the number of neurons in the i-th layer of the encoder.
[0215] In some embodiments, the processing device 501 is configured to, for any network layer, reconstruct the output features of the human pose image data sample at the current layer through the decoder to obtain reconstructed image data;
[0216] Based on the reconstructed image data and the corresponding human posture image data samples, the reconstruction error is determined.
[0217] Based on the reconstruction error, the gradient of the model parameters of the current layer is determined, and the gradient of the model parameters includes the weight gradient and the bias gradient.
[0218] The weights of the current layer are updated based on the weight gradient of the current layer, and the bias of the current layer is updated based on the bias gradient of the current layer, until the preset iteration stopping condition is reached, thus obtaining the feature extraction model.
[0219] In some embodiments, the processing device 501 is configured to calculate the reconstruction error using the following formula (4), including:
[0220]
[0221] Among them, L r Let m be the reconstruction error. r The number of samples in the human posture image data is [number]. The input is the l-th human pose image data sample to the autoencoder. This is a sample of the reconstructed human pose image data for the l-th person;
[0222] The weight gradient is calculated using the following formula (5), including:
[0223]
[0224] Wherein, ΔW r,i Let η be the weight gradient of the i-th layer of the autoencoder. r W is the learning rate of the autoencoder. r,i The current weights of the i-th layer of the autoencoder;
[0225] The bias gradient is calculated using the following formula (6), including:
[0226]
[0227] Where, Δb r,i Let b be the bias gradient of the i-th layer of the autoencoder. r,i This is the current bias of the i-th layer of the autoencoder;
[0228] The bias gradient is calculated using the following formula (7), including:
[0229]
[0230] in, For the updated weights of the i-th layer of the autoencoder, S r,i λ is a measure of the sparsity of neurons in the i-th layer of the autoencoder. r,s The preset sparsity pruning threshold, Indicates an indicator function;
[0231] The bias gradient is calculated using the following formula (8), including:
[0232]
[0233] in, This is the bias of the i-th layer of the updated autoencoder.
[0234] In some embodiments, the processing device 501 is configured to acquire, for any network layer, the activation output data of any human pose image data sample in the current layer;
[0235] Based on the activation output data of the human pose image data sample in the current layer, the number of samples of the human pose image data sample, and the preset sparsity threshold, the sparsity measure of the neurons in the current layer is calculated.
[0236] The bias gradient is calculated using the following formula (9), including:
[0237]
[0238] In the formula, a r,i,l For the activation output data of the l-th human pose image data sample in the i-th layer, τ r The sparsity threshold is denoted as .
[0239] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0240] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0241] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0242] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0243] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0244] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0245] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0246] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0247] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0248] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0249] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0250] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for training a model, characterized in that, For use in processing equipment, the method includes: Acquire human posture image data samples, wherein the human posture image data samples are identified with a state category label and an acquisition time label; Obtain a preset autoencoder, wherein the autoencoder includes an encoder and a decoder connected to each other, and the encoder includes multiple network layers arranged in a cascaded order; The human pose image data samples are input into the autoencoder. In each network layer, dynamic routing decisions are made based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer to determine the output features of the current layer. This allows the autoencoder to be updated after the decoder reconstructs the output features of each layer, thereby obtaining a feature extraction model, including: In each network layer, the output features of the human pose image data sample in the previous layer, the weights of the current layer, and the bias are obtained. Based on the output features of the previous layer, the weights of the current layer, and the bias, the linear transformation output of the current layer is determined. The linear transformation output of the current layer is calculated using the following formula (1), including: (1) in, This is the linear transform output of the i-th layer in the encoder. Let be the weight of the i-th layer. For the bias of the i-th layer, The output feature of the (i-1)th layer in the encoder; The linear transformation output of the current layer is input into a preset activation function for calculation, and the activation function output features of the current layer are output. The importance score is calculated based on the preset importance scoring model to obtain the corresponding feature importance score. Dynamic routing decisions are made based on the output features of the activation function of the current layer and the corresponding feature importance scores to determine the output features of the human pose image data samples in the current layer, including: The output features of the current layer are calculated using the following formula (2), including: (2) in, The output features of the human pose image data sample in the current layer. The activation function of the current layer outputs features. This is the feature importance score corresponding to the output feature of the activation function of the current layer. Indicates a dynamic routing function; Using the human posture image data samples and sample feature data, a preset classifier is trained to obtain a classification model. The sample feature data is obtained by a feature extraction model after extracting features from the human posture image data samples. The classification model is used to distinguish the driver's state category.
2. The training method for the model according to claim 1, characterized in that, The network layer contains multiple neurons; the dynamic routing decision based on the activation function output features of the current layer and the corresponding feature importance score, to determine the output features of the human pose image data sample in the current layer, includes: Obtain the activation output data of any neuron in the current layer and the neuron feature importance score based on the activation output data. The activation output data is obtained by processing the input data of the neuron using the activation function. The neuron feature importance score of each neuron is used to calculate the weight, and the activated output data is weighted based on the calculated weight to obtain the output features of the human pose image data sample in the current layer.
3. The training method for the model according to claim 2, characterized in that, The method calculates the corresponding feature importance score value by analyzing the output features of the activation function of the current layer based on a preset importance scoring model, including: Obtain the feature weights of the activation output data of any neuron in the current layer; Based on the activation output data and corresponding feature weights of each neuron in the current layer, calculate the feature importance score of the activation function output feature of the current layer; The feature importance score is calculated using the following formula (3), including: (3) in, This refers to the activation output data of the j-th neuron in the i-th layer of the encoder. This refers to the activation output data of the k-th neuron in the i-th layer of the encoder. Let the feature weights be the activation output data of the j-th neuron in the i-th layer. Let the feature weights be the activation output data of the k-th neuron in the i-th layer. Let be the number of neurons in the i-th layer of the encoder.
4. The training method for the model according to claim 3, characterized in that, The process involves inputting the human pose image data samples into the autoencoder, and in each network layer, performing dynamic routing decisions based on the output features of the human pose image data samples in the previous layer and the feature importance score of the current layer to determine the output features of the current layer. This allows the autoencoder to be updated after the decoder reconstructs the output features of each layer to obtain a feature extraction model. The process includes: For any network layer, the decoder reconstructs the output features of the human pose image data sample at the current layer to obtain the reconstructed image data. Based on the reconstructed image data and the corresponding human posture image data samples, the reconstruction error is determined. Based on the reconstruction error, the gradient of the model parameters of the current layer is determined, and the gradient of the model parameters includes the weight gradient and the bias gradient. The weights of the current layer are updated based on the weight gradient of the current layer, and the bias of the current layer is updated based on the bias gradient of the current layer, until the preset iteration stopping condition is reached, thus obtaining the feature extraction model.
5. The training method for the model according to claim 4, characterized in that, The determination of reconstruction error based on the reconstructed image data and corresponding human pose image data samples includes: The reconstruction error is calculated using the following formula (4), including: (4) in, The reconstruction error is... The number of samples in the human posture image data is [number]. For the input to the autoencoder Individual human posture image data samples, For the reconstructed first Individual human posture image data samples; The step of determining the gradient of the model parameters of the current layer based on the reconstruction error of the current layer includes: The weight gradient is calculated using the following formula (5), including: (5) in, Let be the weight gradient of the i-th layer of the autoencoder. The learning rate of the autoencoder. The current weights of the i-th layer of the autoencoder; The bias gradient is calculated using the following formula (6), including: (6) in, The bias gradient of the i-th layer of the autoencoder is This is the current bias of the i-th layer of the autoencoder; The process of updating the weights of the current layer based on the weight gradient of the current layer and updating the bias of the current layer based on the bias gradient of the current layer, until a preset iteration stopping condition is met, to obtain the feature extraction model, includes: The bias gradient is calculated using the following formula (7), including: (7) in, For the updated weights of the i-th layer of the autoencoder, This is a measure of the sparsity of the neurons in the i-th layer of the autoencoder. The preset sparsity pruning threshold, Indicates an indicator function; The bias gradient is calculated using the following formula (8), including: (8) in, This is the bias of the i-th layer of the updated autoencoder.
6. The training method for the model according to claim 5, characterized in that, The sparsity measure of neurons in the current layer is obtained through the following steps: For any network layer, obtain the activation output data of any human pose image data sample in the current layer; Based on the activation output data of the human pose image data sample in the current layer, the number of samples of the human pose image data sample, and the preset sparsity threshold, the sparsity measure of the neurons in the current layer is calculated. The bias gradient is calculated using the following formula (9), including: (9) In the formula, For the first The activation output data of the individual human pose image data sample in the i-th layer. The sparsity threshold is denoted as .
7. A method for monitoring driver status, characterized in that, The method for processing equipment includes: Acquire human posture image data sent by at least one camera device deployed inside the vehicle, the human posture image data carrying a collection time tag; The human pose image data is subjected to feature dimensionality reduction using a feature extraction model generated by the training method of the model as described in any one of claims 1 to 6, to obtain image feature data. The image feature data is identified using a classification model generated by the training method of the model as described in any one of claims 1 to 6, to obtain the state category result of the driver inside the vehicle.
8. A driver status monitoring system, characterized in that, The system includes a processing device and at least one camera device installed inside 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. The human posture image data carries a collection time tag. The processing device is used to acquire the human posture image data; The human pose image data is subjected to feature dimensionality reduction using a feature extraction model generated by the training method of the model as described in any one of claims 1 to 6, to obtain image feature data. The image feature data is identified using a classification model generated by the training method of the model as described in any one of claims 1 to 6, to obtain the state category result of the driver inside the vehicle.
Citation Information
Patent Citations
Training method and device of image recognition model and image recognition method and device
CN119580358A