A non-driving posture recognition method based on small sample conditions
By using a non-driving posture recognition method based on small sample conditions and utilizing a 3D convolutional neural network and a small sample non-driving posture recognition network, the problem of low non-driving posture recognition accuracy in L3 autonomous driving scenarios was solved, and the recognition accuracy was improved.
Patent Information
- Application Number
- CN202411842252.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing datasets are difficult to cover all non-driving posture categories of drivers in L3 autonomous driving scenarios, resulting in low accuracy of non-driving posture recognition of existing models.
A non-driving posture recognition method based on small sample conditions is adopted. The spatiotemporal features of the driver's non-driving posture are extracted using a 3D convolutional neural network. A small sample non-driving posture recognition model is constructed by combining the small sample non-driving posture recognition network with feature adaptive adjustment, spherical manifold feature embedding, loss function selection and gradient optimization.
Under L3 autonomous driving conditions, the accuracy of non-driving posture recognition is improved, the dependence of model transfer generalization on the number of non-driving posture category samples is reduced, and the problem of lack of samples in some categories in recognition is alleviated.
Smart Images

Figure CN119763079B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic safety technology, and in particular to a non-driving posture recognition method based on small sample conditions. Background Art
[0002] The rapid development of autonomous driving technology has effectively alleviated driving stress for drivers, enabling them to perform non-driving tasks in Level 3 autonomous driving mode. Accurately identifying non-driving postures is crucial for autonomous driving system safety, predicting driver takeover performance, and optimizing the driving experience. However, neither publicly available nor proprietary datasets cover all non-driving posture categories encountered in Level 3 autonomous driving scenarios, resulting in low accuracy in non-driving posture recognition for existing models. Summary of the Invention
[0003] The purpose of the present invention is to provide a non-driving posture recognition method based on small sample conditions to address the problem in the prior art that the existing data set is difficult to cover all non-driving posture categories of the driver in L3 autonomous driving scenarios, resulting in low accuracy of non-driving posture recognition of existing models.
[0004] The technical solution adopted by the present invention to solve the above technical problems is:
[0005] A non-driving posture recognition method based on small sample conditions, the method comprising the following steps:
[0006] Obtaining video data of the driver's non-driving posture to be identified, and converting the video data of the driver's non-driving posture to be identified into an image with a coherent posture, then preprocessing the image with a coherent posture to obtain a one-dimensional feature vector, and finally inputting the one-dimensional feature vector into a trained small-sample non-driving posture recognition network to identify the category of the non-driving posture;
[0007] The steps of the pretreatment are:
[0008] Inputting the image with coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolution layer and a 3D pooling layer, the 3D convolution layer is used to extract features of the input image with coherent posture to obtain spatiotemporal features, and the 3D pooling layer is used to compress the spatiotemporal features into a one-dimensional feature vector;
[0009] The trained small sample non-driving posture recognition network calculates the spherical distance between the input one-dimensional feature vector and the one-dimensional feature vector of each non-driving posture category, and selects the non-driving posture category with the shortest spherical distance as the non-driving posture recognition result;
[0010] The trained small sample non-driving posture recognition network is obtained by the following steps:
[0011] Step 1: Obtain a small sample benchmark dataset, where the samples in the small sample benchmark dataset are video data of drivers in non-driving postures. Then, convert each sample in the small sample benchmark library into an image with a coherent posture, and then label the non-driving posture category in the image;
[0012] Step 2: Preprocess the image with coherent posture to obtain a one-dimensional feature vector;
[0013] Step 3: Using the driver's non-driving posture video data to be identified as a query sample, and inputting all the one-dimensional feature vectors obtained in Step 2 into a small-sample non-driving posture recognition network, which includes a feature adaptive adjustment module, a spherical manifold feature embedding module, a loss function selection module, and a gradient optimization module;
[0014] The feature adaptive adjustment module is used to construct a support feature set and a query feature set based on the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to calculate the support feature set and the query feature set through the similarity weight matrix W. i,j For each one-dimensional feature vector in the support feature set and each one-dimensional feature vector in the query feature set Normalize them separately to get the adjusted eigenvectors and eigenvectors Where, i = 1, 2, ..., NK, j = 1, 2, ..., NQ;
[0015] The supporting feature set is expressed as:
[0016]
[0017] The query feature set is expressed as:
[0018]
[0019] The similarity weight matrix is expressed as:
[0020]
[0021] Where N is the number of non-driving posture categories in the small sample benchmark library, K is the number of non-driving posture video data of each category of drivers in the small sample benchmark library, Q is the number of query samples, and σ 2 represents the scale factor, Var(·) represents the variance of the Euclidean distance between samples;
[0022] The spherical manifold feature embedding module is used to embed the adjusted feature vector and eigenvectors Projection onto the spherical manifold Sn On the tangent plane T o S n The distance d between the sample in the small sample benchmark dataset and the query sample is obtained;
[0023] The loss function selection module constructs a loss function using the distance d between the sample in the small sample benchmark dataset and the query sample;
[0024] The gradient optimization module uses the loss function to obtain the loss, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and uses the back propagation algorithm to update the model parameters to obtain a trained small sample non-driving posture recognition network.
[0025] Furthermore, the adjusted feature vector and eigenvectors The specific expression is:
[0026]
[0027] Furthermore, the spherical manifold feature embedding module specifically performs the following steps:
[0028] Step 1: Given a spherical space S n and tangent point O;
[0029] Step 2: Take the average of the adjusted feature vectors corresponding to each category in the support feature set, and use the average as the feature vector center c of the corresponding category k ;
[0030] Step 3: Combine each adjusted feature vector and feature vector center c in the query feature set k Take the mean as the cut point o k,j ;
[0031] Step 4: Put the samples, query samples and cut points o into the small sample benchmark dataset k,j Project it onto the spherical manifold, that is, the unit sphere, and use the logarithmic mapping to calculate the difference between the sample in the small sample benchmark dataset and the query sample on the tangent plane at the tangent point O, and obtain the distance d between the sample in the small sample benchmark dataset and the query sample.
[0032] Furthermore, the eigenvector center c k Expressed as:
[0033]
[0034] The tangent point o k,j Expressed as:
[0035]
[0036] Furthermore, in step 4, the small sample benchmark dataset samples, query samples and cut points o k,j Projected onto the spherical manifold, that is, the unit sphere, it is expressed as:
[0037]
[0038] Among them, z q represents the projection of the query sample on the sphere, z c represents the projection of the sample in the small sample benchmark dataset on the sphere, z o Represents the projection of the tangent point onto the sphere.
[0039] Furthermore, the distance d is expressed as:
[0040] d=||log o (z q )-log o (z c )||
[0041]
[0042] Among them, logo(·) represents the difference between the cut point O and the rest of the samples, θ co and θ qo represents the intermediate variable, θ co =arccos(z c ·z o ),θ qo =arccos(z q ·z o ).
[0043] Furthermore, the loss function is expressed as:
[0044] L total =λL enh-tc +L s
[0045] Among them, L total represents the loss function, L enh-tc represents the enhanced ternary center loss function that introduces inter-class separation and intra-class compactness constraints, L s represents the combined loss function of cross entropy loss and softmax activation function, and λ represents a hyperparameter.
[0046] Furthermore, the L s Expressed as:
[0047]
[0048] Among them, q represents the qth query sample, u represents the uth non-driving posture, and yq,k Represents the indicator function, which is q The actual category is k, and the value is 1, otherwise it is 0. D(·) represents the square of the Euclidean distance. Represents the query sample z q To the center of the k-th non-driving posture feature vector in the support feature set distance, Represents the query sample z q To other categories of sample centers The closest distance.
[0049] Furthermore, the L enh-tc Expressed as:
[0050]
[0051]
[0052] Among them, L tc Represents the query sample z q and The difference between the distance between the class and the distance to the nearest error class center, λ1 represents the weight factor for adjusting the inter-class separation constraint, λ2 represents the weight factor for adjusting the intra-class compactness constraint, and m represents the boundary value of the separation degree. represents the Euclidean distance between the centers of the eigenvectors of the i-th and j-th classes, Represents the Euclidean distance between the sample and the corresponding category center, represents the i-th sample in the k-th class support set, Represents the query sample z q To other category centers The closest distance.
[0053] Furthermore, the specific steps of converting the video data of the driver's non-driving posture to be identified into an image with a coherent posture are:
[0054] The video data of the driver's non-driving posture to be identified is decomposed into multiple video segments every 2 seconds. Each video segment contains multiple frames of images. Each frame of image is then size normalized and pixel standardized to obtain an image with a coherent posture.
[0055] The beneficial effects of the present invention are:
[0056] This application constructs a small-sample non-driving posture benchmark library under Level 3 autonomous driving conditions, extracts features from the driver's non-driving posture based on a 3D convolutional neural network, and constructs a small-sample non-driving posture recognition model using metric learning methods. This technical solution can identify non-driving postures using video data collected under small-sample conditions, reducing the model's transfer and generalization dependence on the number of non-driving posture category samples, helping to alleviate the problem of a lack of samples in some categories during recognition. This, in turn, improves the accuracy of non-driving posture recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is the overall flow chart of this application. DETAILED DESCRIPTION
[0058] It should be noted that, unless there is any conflict, the various embodiments disclosed in this application can be combined with each other.
[0059] Specific embodiment 1: This embodiment describes a non-driving posture recognition method based on small sample conditions, the method comprising the following steps:
[0060] Obtaining video data of the driver's non-driving posture to be identified, and converting the video data of the driver's non-driving posture to be identified into an image with a coherent posture, then preprocessing the image with a coherent posture to obtain a one-dimensional feature vector, and finally inputting the one-dimensional feature vector into a trained small-sample non-driving posture recognition network to identify the category of the non-driving posture;
[0061] The steps of the pretreatment are:
[0062] Inputting the image with coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolution layer and a 3D pooling layer, the 3D convolution layer is used to extract features of the input image with coherent posture to obtain spatiotemporal features, and the 3D pooling layer is used to compress the spatiotemporal features into a one-dimensional feature vector;
[0063] The trained small sample non-driving posture recognition network calculates the spherical distance between the input one-dimensional feature vector and the one-dimensional feature vector of each non-driving posture category, and selects the non-driving posture category with the shortest spherical distance as the non-driving posture recognition result;
[0064] The trained small sample non-driving posture recognition network is obtained by the following steps:
[0065] Step 1: Obtain a small sample benchmark dataset, where the samples in the small sample benchmark dataset are video data of drivers in non-driving postures. Then, convert each sample in the small sample benchmark library into an image with a coherent posture, and then label the non-driving posture category in the image;
[0066] Step 2: Preprocess the image with coherent posture to obtain a one-dimensional feature vector;
[0067] Step 3: Using the driver's non-driving posture video data to be identified as a query sample, and inputting all the one-dimensional feature vectors obtained in Step 2 into a small-sample non-driving posture recognition network, which includes a feature adaptive adjustment module, a spherical manifold feature embedding module, a loss function selection module, and a gradient optimization module;
[0068] The feature adaptive adjustment module is used to construct a support feature set and a query feature set based on the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to calculate the support feature set and the query feature set through the similarity weight matrix W. i,j For each one-dimensional feature vector in the support feature set and each one-dimensional feature vector in the query feature set Normalize them separately to get the adjusted eigenvectors and eigenvectors Where, i = 1, 2, ..., NK, j = 1, 2, ..., NQ;
[0069] The supporting feature set is expressed as:
[0070]
[0071] The query feature set is expressed as:
[0072]
[0073] The similarity weight matrix is expressed as:
[0074]
[0075] Where N is the number of non-driving posture categories in the small sample benchmark library, K is the number of non-driving posture video data of each category of drivers in the small sample benchmark library, Q is the number of query samples, and σ 2 represents the scale factor, Var(·) represents the variance of the Euclidean distance between samples;
[0076] The spherical manifold feature embedding module is used to embed the adjusted feature vector and eigenvectors Projection onto the spherical manifold S n On the tangent plane T o S n The distance d between the sample in the small sample benchmark dataset and the query sample is obtained;
[0077] The loss function selection module constructs a loss function using the distance d between the sample in the small sample benchmark dataset and the query sample;
[0078] The gradient optimization module uses the loss function to obtain the loss, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and uses the back propagation algorithm to update the model parameters to obtain a trained small sample non-driving posture recognition network.
[0079] The small sample benchmark library is obtained by the following steps:
[0080] Step 1: Based on actual driving and simulation environments, use a camera to collect video data of the driver's non-driving posture under autonomous driving conditions;
[0081] Step 2: Remove video clips with blurred or insufficient brightness, split the original video data into several 2-second video clips, each containing multiple frames, perform size normalization and pixel standardization on each frame, and annotate the data with the corresponding non-driving posture category;
[0082] Step 3: Select a specific number of sample data for each non-driving posture to form a small sample benchmark library.
[0083] A 3D convolutional neural network is used as a pose feature extractor. The input layer is each sample data of each non-driving pose in the small sample benchmark library. The input size is c×f×h×w, where c represents the number of channels in the video (usually 3, i.e., RGB three channels), f represents the total number of frames, and h and w correspond to the vertical resolution and horizontal resolution of the frame, respectively.
[0084] Use multiple 3D convolution layers for spatiotemporal feature extraction, and each layer of 3D convolution kernel can process spatial and temporal information simultaneously;
[0085] A 3D pooling layer (such as a maximum pooling layer) is added after the convolutional layer, and then the fully connected layer is replaced with a global average pooling layer to compress the high-dimensional features into a one-dimensional feature vector, generating a fixed-size feature vector representation for each sample of each non-driving posture in the benchmark library.
[0086] The small sample non-driving posture recognition network in this application uses a metric learning method to recognize non-driving postures. The specific steps are as follows:
[0087] ① Feature adaptive adjustment
[0088] For N-way K-shot Q-query small sample classification, the feature vectors of the support set and query set are expressed as and Adjust the features according to the relationship between the support set samples and the query set samples, and construct a similarity weight matrix W i,j, which represents the similarity between the i-th feature of the support set and the j-th feature of the query set, and is calculated as shown in formula (1).
[0089]
[0090] Where, σ 2 is a scale factor used to normalize the size of the distance. The calculation formula is shown in formula (2). Var(·) represents the variance of the Euclidean distance between samples.
[0091]
[0092] Perform two different normalization operations on the weight matrix to obtain new support and query sample features and The calculations are shown in equations (3) and (4).
[0093]
[0094] ② Spherical manifold feature embedding
[0095] On a spherical manifold, the geodesic distance between two points is obtained by calculating the length of the great-circle arc between the two points on the sphere, which can be approximated by the distance in tangent space, namely the logarithmic-Euclidean distance.
[0096] Given a spherical space S n , select the cut point O according to the sample adaptively. First, the average value of the adjusted features of each category in the support set is used as the center c of the prototype feature vector of the corresponding category k , calculated as shown in formula (5); then each prototype c k And the average value of each adjusted query set sample feature is used as the cut point o k,j , which ensures that each cut point is close enough to its corresponding prototype and query sample. The calculation is shown in formula (6).
[0097]
[0098] Project all samples (including prototypes, query samples and tangent points) onto the spherical manifold, i.e., the unit sphere, and calculate as shown in formula (7).
[0099]
[0100] On the tangent plane of the tangent point O, the logarithmic mapping is used to calculate the difference between the samples, the log between the prototype and the tangent point o (z c ) represents the log between the query sample and the cut point as shown in formula (8). o (zq ) is calculated as shown in formula (9).
[0101]
[0102] Where θ co It can be obtained by arccos(z c ·z o )calculate.
[0103] On the tangent plane T o S n The distance between the query sample and the prototype is calculated as shown in formula (9).
[0104] d=||log o (z q )-log o (z c )|| (9)
[0105] ③Loss function
[0106] Calculate the Euclidean distance d between the input query sample and the center of the same category and the center of different categories, and then calculate the triple center loss L tc The ternary center loss combines the characteristics of the ternary loss and the center loss. It uses small batches of data to update the parameter center instead of the entire dataset. For a batch of input data containing a specific number of samples, the query sample z is predicted. q The calculation of the ternary center loss when belonging to the k-th prototype is shown in formula (10), which means that the query sample z q and the center of the correct category prototype z c k The difference between the distance to the nearest error class center.
[0107]
[0108] Where m is the boundary value of separation, Represents the query sample z q To the kth prototype center z c k distance, Represents the query sample z q To other category centers c u The function D(·) represents the square of the Euclidean distance, and its calculation formula is shown in formula (11).
[0109]
[0110] In order to enhance the model’s ability to distinguish different categories, inter-class separation constraints and intra-class compactness constraints are introduced to optimize the ternary center loss, enhance inter-class differences and intra-class consistency, and the calculation is shown in Equation (12).
[0111]
[0112] Where, represents the Euclidean distance between the prototype centers of the i-th and j-th classes, λ1 is the weight factor for adjusting the inter-class separation constraint, represents the i-th sample in the k-th class support set, It represents the Euclidean distance between the sample and the center of the corresponding category, and λ2 is the weight factor for adjusting the compactness constraint within the category.
[0113] Then, the query sample features are input into the next fully connected layer, the maximum possible classification of the sample is output, and compared with the actual label value to calculate the cross entropy loss L s The cross entropy loss function is used in deep learning models to calculate the deviation between the predicted value and the actual value. Its specific calculation method is shown in formula (13).
[0114]
[0115] Where Q represents the total number of query samples; N is the total number of categories; y q,k is the indicator function, which is q The actual category is equal to k, and the value is 1, otherwise it is 0; q,k Represents the model prediction sample z q The probability of belonging to class k.
[0116] Under the action of the softmax function, the cross entropy loss function is expressed as shown in formula (14), multi-classification normalized cross entropy loss (Softmax Loss) L s It is a combination of cross entropy loss and softmax activation function.
[0117]
[0118] Step 35: Linearly combine the ternary center loss and the cross entropy loss to construct a comprehensive loss function L total , calculated as shown in formula (15):
[0119] L total =λL enh-tc +L s (15)
[0120] Where λ is a hyperparameter that controls the enhanced triple center loss L enh-tcThe trade-off between λ and Softmax Loss is that the best effect is achieved when λ = 0.01. Softmax Loss can help the model better find the center of each category.
[0121] ④ Gradient optimization
[0122] Calculate the gradient of the loss relative to the model parameters, use the deep learning mechanism to execute the backpropagation algorithm, iteratively update the parameters of each layer along the negative direction of the error gradient, and ensure that the recognition network gradually approaches a global or local minimum loss state.
[0123] When the technical solution of this application is actually applied, non-driving posture video data in actual scenes is collected, preprocessed into a network input format, and features are extracted from the data using a 3D convolutional network. The data is then input into a non-driving posture recognition model, and the spherical distance between the input sample and the center of the same category and the center of different categories is calculated, and the input sample is classified into the category with the smallest distance.
[0124] Example:
[0125] Fifteen participants were recruited and used a driving simulator to simulate an autonomous driving environment. Eight non-driving postures were set up for the experiment, with each participant participating in two independent experiments. A total of 30 long videos were collected. The long videos were segmented into 2-second segments, each containing multiple frames. Each frame was size-normalized and pixel-normalized, and the corresponding non-driving posture category was labeled.
[0126] A specific number of sample data for each non-driving posture is selected to form a small sample benchmark library. A feature extraction network is used to extract the feature vector of each sample from the benchmark library. The average feature vector of all sample vectors in each posture category is calculated to form the average feature vector for each category, which is also known as the class center vector. This is then stored locally in text or binary format.
[0127] The driver's non-driving posture is selected as input data, and features are extracted through the feature extraction network. The output is a one-dimensional vector of length 128. The input sample is projected onto the spherical manifold, and the spherical distance between the sample and the center of the same category and the center of different categories is calculated. Then, the spherical distance is input into the fully connected layer, and the input sample is classified into the category with the smallest distance and compared with the true label value.
[0128] When the number of samples of each non-driving posture in the small-sample non-driving posture benchmark is 1, the accuracy of the constructed small-sample non-driving posture recognition model is 91.59%. When the number of samples of each non-driving posture in the small-sample benchmark is 5, the accuracy of the constructed recognition model is 93.43%. This shows that the proposed model can provide reliable recognition performance even when facing data-scarce categories.
[0129] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solutions of the present invention and cannot be used to limit the scope of protection. Any minor changes made based on the claims and description of the present invention shall still fall within the scope of protection of the present invention.
Claims
1. A non-driving posture recognition method based on small sample conditions, characterized by The method comprises the following steps: Obtaining video data of the driver's non-driving posture to be identified, and converting the video data of the driver's non-driving posture to be identified into an image with a coherent posture, then preprocessing the image with a coherent posture to obtain a one-dimensional feature vector, and finally inputting the one-dimensional feature vector into a trained small-sample non-driving posture recognition network to identify the category of the non-driving posture; The steps of the pretreatment are: Inputting the image with coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolution layer and a 3D pooling layer, the 3D convolution layer is used to extract features of the input image with coherent posture to obtain spatiotemporal features, and the 3D pooling layer is used to compress the spatiotemporal features into a one-dimensional feature vector; The trained small sample non-driving posture recognition network calculates the spherical distance between the input one-dimensional feature vector and the one-dimensional feature vector of each non-driving posture category, and selects the non-driving posture category with the shortest spherical distance as the non-driving posture recognition result; The trained small sample non-driving posture recognition network is obtained by the following steps: Step 1: Obtain a small sample benchmark dataset, where the samples in the small sample benchmark dataset are video data of drivers in non-driving postures. Then, convert each sample in the small sample benchmark library into an image with a coherent posture, and then label the non-driving posture category in the image; Step 2: Preprocess the image with coherent posture to obtain a one-dimensional feature vector; Step 3: Using the driver's non-driving posture video data to be identified as a query sample, and inputting all the one-dimensional feature vectors obtained in Step 2 into a small-sample non-driving posture recognition network, which includes a feature adaptive adjustment module, a spherical manifold feature embedding module, a loss function selection module, and a gradient optimization module; The feature adaptive adjustment module is used to construct a support feature set and a query feature set based on the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to calculate the support feature set and the query feature set through the similarity weight matrix W. i,j For each one-dimensional feature vector in the support feature set and each one-dimensional feature vector in the query feature set Normalize them separately to get the adjusted eigenvectors and eigenvectors Where, i = 1, 2, ..., NK, j = 1, 2, ..., NQ; The supporting feature set is expressed as: The query feature set is expressed as: The similarity weight matrix is expressed as: Where N is the number of non-driving posture categories in the small sample benchmark library, K is the number of non-driving posture video data of each category of drivers in the small sample benchmark library, Q is the number of query samples, and σ 2 represents the scale factor, Var(·) represents the variance of the Euclidean distance between samples; The spherical manifold feature embedding module is used to embed the adjusted feature vector and eigenvectors Projection onto the spherical manifold S n On the tangent plane T o S n The distance d between the sample in the small sample benchmark dataset and the query sample is obtained; The loss function selection module constructs a loss function using the distance d between the sample in the small sample benchmark dataset and the query sample; The gradient optimization module uses the loss function to obtain the loss, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and uses the back propagation algorithm to update the model parameters to obtain a trained small sample non-driving posture recognition network.
2. The non-driving posture recognition method based on small sample conditions according to claim 1 is characterized in that The adjusted feature vector and eigenvectors The specific expression is:
3. The non-driving posture recognition method based on small sample conditions according to claim 2 is characterized in that The spherical manifold feature embedding module specifically performs the following steps: Step 1: Given a spherical space S n and tangent point O; Step 2: Take the average of the adjusted feature vectors corresponding to each category in the support feature set, and use the average as the feature vector center c of the corresponding category k ; Step 3: Combine each adjusted feature vector and feature vector center c in the query feature set k Take the mean as the cut point o k,j ; Step 4: Put the samples, query samples and cut points o into the small sample benchmark dataset k,j Project it onto the spherical manifold, that is, the unit sphere, and use the logarithmic mapping to calculate the difference between the sample in the small sample benchmark dataset and the query sample on the tangent plane at the tangent point O, and obtain the distance d between the sample in the small sample benchmark dataset and the query sample.
4. The non-driving posture recognition method based on small sample conditions according to claim 3 is characterized in that The eigenvector center c k Expressed as: The tangent point o k,j Expressed as:
5. The non-driving posture recognition method based on small sample conditions according to claim 4 is characterized in that In step 4, the samples in the small sample benchmark dataset, the query samples and the cut point o are collected. k,j Projected onto the spherical manifold, that is, the unit sphere, it is expressed as: Among them, z q represents the projection of the query sample on the sphere, z c represents the projection of the sample in the small sample benchmark dataset on the sphere, z o Represents the projection of the tangent point onto the sphere.
6. The non-driving posture recognition method based on small sample conditions according to claim 5 is characterized in that The distance d is expressed as: d=||log o (z q )-log o (z c )|| Among them, logo(·) represents the difference between the cut point O and the rest of the samples, θ co and θ qo represents the intermediate variable, θ co =arccos(z c ·z o ),θ qo =arccos(z q ·z o ).
7. The non-driving posture recognition method based on small sample conditions according to claim 6 is characterized in that The loss function is expressed as: THE total =λL enh-tc +L s Among them, L total represents the loss function, L enh-tc represents the enhanced ternary center loss function that introduces inter-class separation and intra-class compactness constraints, L s represents the combined loss function of cross entropy loss and softmax activation function, and λ represents a hyperparameter.
8. The non-driving posture recognition method based on small sample conditions according to claim 7 is characterized in that The L s Expressed as: Among them, q represents the qth query sample, u represents the uth non-driving posture, and y q,k Represents the indicator function, which is q The actual category is k, and the value is 1, otherwise it is 0. D(·) represents the square of the Euclidean distance. Represents the query sample z q To the center of the k-th non-driving posture feature vector in the support feature set distance, Represents the query sample z q To other categories of sample centers The closest distance.
9. The non-driving posture recognition method based on small sample conditions according to claim 8 is characterized in that The L enh-tc Expressed as: Among them, L tc Represents the query sample z q and The difference between the distance between the class and the distance to the nearest error class center, λ1 represents the weight factor for adjusting the inter-class separation constraint, λ2 represents the weight factor for adjusting the intra-class compactness constraint, and m represents the boundary value of the separation degree. represents the Euclidean distance between the centers of the eigenvectors of the i-th and j-th classes, Represents the Euclidean distance between the sample and the corresponding category center, represents the i-th sample in the k-th class support set, Represents the query sample z q To other category centers The closest distance.
10. The non-driving posture recognition method based on small sample conditions according to claim 1 is characterized in that The specific steps of converting the driver's non-driving posture video data to be identified into an image with a coherent posture are: The video data of the driver's non-driving posture to be identified is decomposed into multiple video segments every 2 seconds. Each video segment contains multiple frames of images. Each frame of image is then size normalized and pixel standardized to obtain an image with a coherent posture.
Citation Information
Patent Citations
Non-driving posture recognition and safety evaluation method based on lightweight architecture
CN118262339A
Driving posture behavior recognition method based on optimized multi-source linear fusion network
CN118506334A