Non-driving posture recognition method based on small sample condition

By adopting the small sample non-driving attitude recognition method in the L3 level autonomous driving scenario, using 3D convolutional neural network and metric learning method, the problem of low accuracy of existing models is solved, and high accuracy recognition under small sample conditions is achieved.

CN119763079AActive Publication Date: 2025-04-04HARBIN INST OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411842252.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing models have low accuracy in non-driving attitude recognition in L3 autonomous driving scenarios, mainly because the existing data sets are difficult to cover all non-driving attitude categories.

Method used

The non-driving attitude recognition method based on small sample conditions is adopted to extract spatiotemporal features through 3D convolutional neural network, and a small sample non-driving attitude recognition model is constructed using metric learning methods, feature adaptive adjustment and spherical manifold feature embedding, and finally the model is trained through loss function and gradient optimization module.

Benefits of technology

The accuracy of non-driving attitude recognition is improved under the small sample conditions, the dependence of model migration generalization on the number of samples in non-driving attitude categories is reduced, and the problem of lack of samples in some categories in the identification is alleviated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119763079A_ABST
    Figure CN119763079A_ABST
Patent Text Reader

Abstract

The invention discloses a non-driving posture recognition method based on a small sample condition, relates to the technical field of traffic safety, and aims to solve the problem of low non-driving posture recognition accuracy of an existing model due to the fact that an existing data set is difficult to cover all non-driving posture categories of a driver in an L3-level automatic driving scene in the prior art. Under the L3-level automatic driving condition, a small sample non-driving attitude reference library is constructed, the non-driving attitude of a driver is subjected to feature extraction based on a 3D convolutional neural network, and a small sample non-driving attitude recognition model is constructed by using a metric learning method. According to the technical scheme, non-driving posture recognition can be carried out on the video data collected under the small sample condition, the dependence of model migration generalization on the number of non-driving posture class samples is reduced, and the problem that part of classes lack samples in recognition is solved. And thus, the recognition accuracy of the non-driving posture is improved.
Need to check novelty before this filing date? Find Prior Art

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 relieved the driver's driving pressure. The driver can perform non-driving tasks in L3 autonomous driving mode. Accurate recognition of non-driving postures plays an important role in the safety of autonomous driving systems, prediction of driver takeover performance, and optimization of driving experience. However, both public and self-built private datasets can hardly cover all non-driving posture categories of drivers in L3 autonomous driving scenarios, which leads to the low accuracy of non-driving posture recognition in 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 the L3 autonomous driving scenario, resulting in low accuracy of non-driving posture recognition of the existing model.

[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] Acquire the video data of the non-driving posture of the driver to be identified, and convert the video data of the non-driving posture of the driver to be identified into an image with a coherent posture, then pre-process the image with a coherent posture to obtain a one-dimensional feature vector, and finally input 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 a coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolutional layer and a 3D pooling layer, the 3D convolutional layer is used to extract features of the input image with a 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 non-driving posture video data of drivers, then convert each sample in the small sample benchmark library into an image with a coherent posture, and then mark 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, wherein the small sample non-driving posture recognition network 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 according to the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to 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 respectively to get the adjusted feature vector and the eigenvector 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]

[0022] 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 drivers in each category 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;

[0023] The spherical manifold feature embedding module is used to embed the adjusted feature vector and the eigenvector 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;

[0024] The loss function selection module constructs a loss function using the distance d between the sample in the small sample benchmark data set and the query sample;

[0025] The gradient optimization module obtains the loss using the loss function, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and updates the model parameters using the back propagation algorithm to obtain a trained small sample non-driving posture recognition network.

[0026] Furthermore, the adjusted feature vector and the eigenvector The specific expression is:

[0027]

[0028]

[0029] Furthermore, the spherical manifold feature embedding module specifically performs the following steps:

[0030] Step 1: Given a spherical space S n and tangent point O;

[0031] 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 ;

[0032] Step 3: Add 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 ;

[0033] Step 4: Collect samples, query samples and cut points o in the small sample benchmark dataset k,j Project it onto the spherical manifold, that is, the unit sphere, and use logarithmic mapping on the tangent plane at the tangent point O to calculate the difference between the sample in the small sample benchmark dataset and the query sample, and obtain the distance d between the sample in the small sample benchmark dataset and the query sample.

[0034] Furthermore, the eigenvector center c k It is expressed as:

[0035]

[0036] The cut point o k,j It is expressed as:

[0037]

[0038] Furthermore, in step 4, the small sample benchmark data set samples, query samples and cut points o k,j Projected onto the spherical manifold, that is, the unit sphere, it is expressed as:

[0039]

[0040] 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 on the sphere.

[0041] Further, the distance d is expressed as:

[0042] d=||log o (z q )-log o (z c )||

[0043]

[0044]

[0045] 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 ).

[0046] Furthermore, the loss function is expressed as:

[0047] L total =λL enh-tc +L s

[0048] Among them, L total represents the loss function, L enh-tc represents the enhanced triple center loss function that introduces inter-class separation and intra-class compactness constraints, L s represents the combined loss function of the cross entropy loss and the softmax activation function, and λ represents a hyperparameter.

[0049] Furthermore, the L s It is expressed as:

[0050]

[0051] 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 1 when the actual category of the query sample zq is k, 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 The distance Represents the query sample z q To other categories of sample centers The closest distance.

[0052] Furthermore, the L enh-tc It is expressed as:

[0053]

[0054]

[0055]

[0056] Among them, L tc Represents the query sample z q and The difference between the distance of the nearest error class center and the distance of the nearest error class center, λ1 represents the weight factor for adjusting the separation constraint between classes, λ2 represents the weight factor for adjusting the compactness constraint within a class, 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.

[0057] Furthermore, the specific steps of converting the driver's non-driving posture video data to be identified into an image with a coherent posture are:

[0058] The video data of the driver's non-driving posture to be identified is decomposed into 2-second segments to obtain multiple video segments. 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.

[0059] The beneficial effects of the present invention are:

[0060] Under L3 autonomous driving conditions, this application constructs a small sample non-driving posture benchmark library, extracts features of the driver's non-driving posture based on a 3D convolutional neural network, and constructs a small sample non-driving posture recognition model using a metric learning method. The technical solution of this application can perform non-driving posture recognition on video data collected under small sample conditions, reducing the dependence of model transfer generalization on the number of non-driving posture category samples, which is conducive to alleviating the problem of lack of samples in some categories during recognition. This improves the recognition accuracy of non-driving postures. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is the overall flow chart of this application. DETAILED DESCRIPTION

[0062] It should be particularly noted that, in the absence of conflict, the various embodiments disclosed in this application can be combined with each other.

[0063] Specific implementation method 1: A non-driving posture recognition method based on small sample conditions described in this implementation method includes the following steps:

[0064] Acquire the video data of the non-driving posture of the driver to be identified, and convert the video data of the non-driving posture of the driver to be identified into an image with a coherent posture, then pre-process the image with a coherent posture to obtain a one-dimensional feature vector, and finally input the one-dimensional feature vector into a trained small sample non-driving posture recognition network to identify the category of the non-driving posture;

[0065] The steps of the pretreatment are:

[0066] Inputting the image with a coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolutional layer and a 3D pooling layer, the 3D convolutional layer is used to extract features of the input image with a coherent posture to obtain spatiotemporal features, and the 3D pooling layer is used to compress the spatiotemporal features into a one-dimensional feature vector;

[0067] 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;

[0068] The trained small sample non-driving posture recognition network is obtained by the following steps:

[0069] Step 1: Obtain a small sample benchmark dataset, where the samples in the small sample benchmark dataset are non-driving posture video data of drivers, then convert each sample in the small sample benchmark library into an image with a coherent posture, and then mark the non-driving posture category in the image;

[0070] Step 2: Preprocess the image with coherent posture to obtain a one-dimensional feature vector;

[0071] 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, wherein the small sample non-driving posture recognition network includes a feature adaptive adjustment module, a spherical manifold feature embedding module, a loss function selection module, and a gradient optimization module;

[0072] The feature adaptive adjustment module is used to construct a support feature set and a query feature set according to the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to 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 respectively to get the adjusted feature vector and the eigenvector Where, i = 1, 2, ..., NK, j = 1, 2, ..., NQ;

[0073] The supporting feature set is expressed as:

[0074]

[0075] The query feature set is expressed as:

[0076]

[0077] The similarity weight matrix is ​​expressed as:

[0078]

[0079]

[0080] 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 drivers in each category 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;

[0081] The spherical manifold feature embedding module is used to embed the adjusted feature vector and the eigenvector 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;

[0082] The loss function selection module constructs a loss function using the distance d between the sample in the small sample benchmark data set and the query sample;

[0083] The gradient optimization module obtains the loss using the loss function, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and updates the model parameters using the back propagation algorithm to obtain a trained small sample non-driving posture recognition network.

[0084] The small sample benchmark library is obtained by the following steps:

[0085] Step 1: Based on the actual driving and simulation environment, the camera collects the video data of the driver's non-driving posture under the condition of autonomous driving;

[0086] Step 2: Eliminate video clips with blurred images or insufficient brightness, divide the original video data into several 2s video clips, each of which contains multiple frames of images, normalize the size and pixels of each frame, and annotate the non-driving posture category corresponding to the data;

[0087] Step 3: Select a specific number of sample data for each non-driving posture to form a small sample benchmark library.

[0088] The 3D convolutional neural network is used as the feature extractor of the posture. The input layer is each sample data of each non-driving posture in the small sample benchmark library. The input size is c×f×h×w, where c represents the number of channels of 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.

[0089] Use multiple 3D convolution layers to extract spatiotemporal features. Each 3D convolution kernel can process spatial and temporal information simultaneously.

[0090] A 3D pooling layer (such as a maximum pooling layer) is added after the convolutional layer, and then the fully connected layer is replaced by 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.

[0091] 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:

[0092] ①Feature adaptive adjustment

[0093] 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 , to represent the similarity between the i-th feature of the support set and the j-th feature of the query set, and the calculation is shown in formula (1).

[0094]

[0095] In the formula, σ 2 is a scale factor used to normalize the distance. The calculation formula is shown in formula (2). Var(·) represents the variance of the Euclidean distance between samples.

[0096]

[0097] Perform two different normalization operations on the weight matrix to obtain new support and query sample features and The calculation is shown in equations (3) and (4).

[0098]

[0099]

[0100] ② Spherical manifold feature embedding

[0101] 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.

[0102] 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 of each adjusted query set sample feature as the cut point o k,j , which can ensure that each cut point is close enough to its corresponding prototype and query sample. The calculation is shown in formula (6).

[0103]

[0104]

[0105] 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).

[0106]

[0107] 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 ) means that as shown in formula (8), the log between the query sample and the cut point o (z q ) is calculated as shown in formula (9).

[0108]

[0109]

[0110] In the formula, θ co It can be obtained by arccos(z c ·z o )calculate.

[0111] On the tangent plane T o S n The distance between the query sample and the prototype is calculated as shown in formula (9).

[0112] d=||log o (z q )-log o (z c )|| (9)

[0113] ③Loss function

[0114] 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.

[0115]

[0116] Where m is the boundary value of separation, Represents the query sample z q To the kth prototype center z c k The distance Represents the query sample z q To other category centers cu The function D(·) represents the square of the Euclidean distance, and its calculation formula is shown in formula (11).

[0117]

[0118] In order to enhance the model’s ability to distinguish different categories, inter-class separation constraints and intra-class compactness constraints are introduced, the ternary center loss is optimized, and the inter-class differences and intra-class consistency are enhanced. The calculation is shown in formula (12).

[0119]

[0120] In the formula, 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.

[0121] 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 the deep learning model to calculate the deviation between the predicted value and the actual value. The specific calculation method is shown in formula (13).

[0122]

[0123] In the formula, Q represents the total number of query samples; N is the total number of categories; y q,k is the indicator function, which in sample z q The actual category of 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.

[0124] 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.

[0125]

[0126] 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):

[0127] L total =λLenh-tc +L s (15)

[0128] Where λ is a hyperparameter that controls the enhanced triple center loss L enh-tc The trade-off between λ and Softmax Loss is that the effect is best when λ = 0.01. Softmax Loss can help the model better find the center of each category.

[0129] ④ Gradient optimization

[0130] Calculate the gradient of the loss relative to the model parameters, use the deep learning mechanism to execute the back-propagation 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.

[0131] When the technical solution of the present 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 to calculate the spherical distance between the input sample and the center of the same category and the center of different categories, and the input sample is classified into the category with the smallest distance.

[0132] Example:

[0133] 15 subjects were recruited and a driving simulator was used to simulate the autonomous driving environment. Eight non-driving postures were set up in the experiment. Each person participated in two independent experiments, and a total of 30 long videos were collected. The long videos were divided into 2s short video segments, each of which contained multiple frames of images. Each frame of the image was normalized in size and pixel, and the corresponding non-driving posture category of the data was labeled.

[0134] A specific number of sample data for each non-driving posture is selected to form a small sample benchmark library. The feature vector of each sample is extracted from the benchmark library through the feature extraction network, and the average feature vector of all samples in each posture category is calculated to form the average feature vector of each category, i.e., the class center vector, and stored locally in text or binary form.

[0135] The driver's non-driving posture is selected as the input data, and feature extraction is performed through the feature extraction network. The one-dimensional vector with a length of 128 is output, and the input sample is projected onto the spherical manifold. The spherical distance between the sample and the center of the same category and the center of different categories is calculated, and then the fully connected layer is input to classify the input sample into the category with the smallest distance and compare it with the actual label value.

[0136] When the number of samples of each non-driving posture in the small sample non-driving posture benchmark library 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 library 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 categories with scarce data.

[0137] It should be noted that the specific implementation is only an explanation and description of the technical solution of the present invention, and cannot be used to limit the scope of protection of the rights. Any partial changes made according to the claims and description of the present invention should 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 in that The method comprises the following steps: Acquire the video data of the non-driving posture of the driver to be identified, and convert the video data of the non-driving posture of the driver to be identified into an image with a coherent posture, then pre-process the image with a coherent posture to obtain a one-dimensional feature vector, and finally input 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 a coherent posture into a 3D convolutional neural network, the 3D convolutional neural network includes a 3D convolutional layer and a 3D pooling layer, the 3D convolutional layer is used to extract features of the input image with a 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 non-driving posture video data of drivers, then convert each sample in the small sample benchmark library into an image with a coherent posture, and then mark 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, wherein the small sample non-driving posture recognition network 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 according to the samples, query samples and one-dimensional feature vectors in the small sample benchmark data set, and to 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 respectively to get the adjusted feature vector and the eigenvector 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 drivers in each category 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 the eigenvector 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 data set and the query sample; The gradient optimization module obtains the loss using the loss function, calculates the gradient of the loss relative to the model parameters in the small sample non-driving posture recognition network, and updates the model parameters using the back propagation algorithm 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 the eigenvector 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: Add 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: Collect samples, query samples and cut points o in the small sample benchmark dataset k,j Project it onto the spherical manifold, that is, the unit sphere, and use logarithmic mapping on the tangent plane at the tangent point O to calculate the difference between the sample in the small sample benchmark dataset and the query sample, 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 It is expressed as: The tangent point o k,j It is 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 data set, 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 on 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 triple center loss function that introduces inter-class separation and intra-class compactness constraints, L s represents the combined loss function of the cross entropy loss and the 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 It is 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, whose value is 1 when the actual category of the query sample zq is k, 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 The 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 It is expressed as: Among them, L tc Represents the query sample z q and The difference between the distance of the nearest error class center and the distance of the nearest error class center, λ1 represents the weight factor for adjusting the separation constraint between classes, λ2 represents the weight factor for adjusting the compactness constraint within a class, 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 categories, 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 2-second segments to obtain multiple video segments. 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

  • Driver posture recognition method based on depth images and virtual data

    CN108345869A

  • Driver action recognition method and device

    CN110363093A

  • Moving posture recognition method, moving posture recognition device, terminal equipment and medium

    CN110942006A

  • L3-level automatic driving vehicle driver non-driving posture recognition method and system

    CN117274960A

  • Method for estimating vehicle pose by self-supervised radar odometer in dynamic environment

    CN117724092A