Skeleton action recognition method based on prompt type contrast learning and storage medium
Through a method based on prompt-based comparative learning, the problem of the modal gap between skeleton data and text description is solved. Through feature interaction and loss function optimization, the accuracy and robustness of skeleton action recognition are improved, and cross-modal features are realized. Fusion significantly improves the accuracy of action recognition.
Patent Information
- Application Number
- CN202410859475.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-29
AI Technical Summary
Skeleton-based action recognition methods face the modal gap between skeleton data and text descriptions and action interpretation challenges when utilizing cross-modal contrastive learning, resulting in insufficient recognition accuracy and robustness.
Using a method based on hint-based contrastive learning, features are extracted through the skeleton encoder and text encoder, and the perceptual module and cross-modal attention block are used for feature interaction to construct cross-entropy loss, skeleton-text contrastive loss and bidirectional triplet Ranking loss function, optimizes the model to improve feature alignment and recognition accuracy.
It effectively reduces the modal gap, improves feature representation capabilities and recognition accuracy, significantly improves the accuracy and robustness of action recognition, and reaches industry-leading performance levels.
Smart Images

Figure CN118865490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of skeleton action recognition, and in particular to a skeleton action recognition method and a storage medium based on prompt contrast learning. Background Art
[0002] The skeleton-based action recognition task aims to predict the category of human actions using 3D skeleton representation. Due to its lightweight design and privacy protection characteristics, skeleton-based action recognition has attracted widespread attention in the fields of human-computer interaction, video content analysis, and intelligent video surveillance. Generally, most skeleton-based action recognition methods adopt graph convolutional networks and train discretized labels. However, these methods are limited to skeleton data of a single modality. At the same time, with the rise of contrastive learning cross-modal learning paradigms, such as Contrastive Language-Image Pre-training (CLIP), such methods allow the use of multiple modalities (including visual and textual data) to enhance the representation of human actions. By leveraging the rich information in different modalities, cross-modal contrastive learning has the potential to improve the performance and robustness of skeleton-based action recognition systems.
[0003] Comparative document CN118196888A discloses a fine-grained action recognition method based on cross-modal knowledge alignment, which proposes a general cross-modal knowledge alignment framework to improve the performance of fine-grained action recognition by transferring knowledge from pre-trained VLM and gesture-based recognition models. However, the two modalities cannot be completely aligned. Despite the remarkable success of large pre-trained visual-language models, skeleton-based action recognition still faces two major challenges. First, the key to the success of contrastive learning methods such as CLIP is to utilize rich text and image samples through large-scale pre-training, such as Figure 3 However, in skeleton-based action recognition, there is a significant modality gap between skeleton data and text descriptions, such as Figure 3 (b) is shown. It is challenging to exploit cross-modal contrastive learning in this task because these modalities are pre-trained in a specific domain and then jointly trained on a limited number of skeleton-text pairs. At the same time, in skeleton-based action recognition, how to guide the model to interpret the actions in the skeleton structure through language cues is also a challenging problem. Summary of the invention
[0004] The purpose of the present invention is to provide a skeleton action recognition method and storage medium based on prompt contrast learning, which improves the alignment and characterization ability of features to improve recognition accuracy.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A skeleton action recognition method based on prompt contrastive learning comprises the following steps:
[0007] Obtain a video frame to be recognized, input it into a pre-trained skeleton action recognition model for recognition, and output an action recognition result, wherein the skeleton action recognition model includes a skeleton encoder, a text encoder, a perception module, and a cross-modal attention block;
[0008] The steps of training the skeleton action recognition model include:
[0009] Model input: Get video frames and extract joint coordinates in the video frames to generate skeleton data;
[0010] Feature extraction: encoding the skeleton data using the skeleton encoder, extracting skeleton features, and constructing a text prompt including a learnable vector, encoding the text prompt using the text encoder, and extracting text features;
[0011] Feature interaction: Based on the skeleton features and text features, the perception module and the cross-modal attention block are used to perform feature interaction to generate fusion features;
[0012] Training loss: Based on the fusion features, skeleton features and text features, a cross entropy loss function, a skeleton-text contrast loss function and a bidirectional triplet sorting loss function are constructed to train the skeleton action recognition model and optimize the parameters until the training is completed.
[0013] Furthermore, the step of generating skeleton data includes:
[0014] A motion capture device or a posture estimation algorithm is used to extract joint coordinates from the video frame, and a graph G = (J, E) is generated with joint nodes as vertices and bones as edges. The graph G is used as skeleton data, where J = {j1, j2, ..., j N} is the vertex set of N joint nodes, and E is the edge set of the skeleton.
[0015] Furthermore, the skeleton encoder is a trainable graph convolutional network, and the process of extracting skeleton features is expressed as:
[0016] S E =Enc S (G)
[0017] Among them, S E is the skeleton feature, Enc S (·) is the skeleton code, and G is the skeleton data represented in graph form.
[0018] Furthermore, the text encoder is a pre-trained CLIP text encoder with frozen weights.
[0019] Furthermore, the process of extracting text features is expressed as:
[0020] T F =Enc T (T)
[0021] T={v1;v2;…;v i ;…;v M ;[Label]}
[0022] Where, T F is the text feature, Enc T (·) is the text encoder, T is the text prompt of the learnable vector, v i (i∈1,…,M) is a learnable vector with the same dimension as the word embedding, M is the number of learnable vectors, and [label] is an alternative category label.
[0023] Furthermore, the feature interaction step includes:
[0024] For the skeleton feature S E and text features T F Perform normalization;
[0025] The perceptron module is used to extract the query vector Q and the normalized skeleton feature S E Between:
[0026] S′ F =Perceiver(S E ,Q)
[0027] In the formula, S′ F is the unpooled skeleton feature, Perceiver(·) is the perceptron module;
[0028] Along the time dimension, S′ F Perform pooling to obtain the pooled skeleton feature S F ;
[0029] The pooled skeleton feature S F ={S1; ...; s B} and normalized text features T F ={t1; ...; t B} Perform feature interaction to obtain mixed feature C, where B is the training batch size;
[0030] The cross-modal attention module is used to capture the interaction in the mixed feature C and generate the fusion feature O C , the fusion feature O C It is expressed as:
[0031] O C=Multi-Attn(Q C ,K C ,V C )
[0032]
[0033] In the formula, Multi-Attn(·) is the multi-head attention mechanism, Q C For query, K C is the key, V C is the value, X C For query Q C , key K C Or value V C , is the weight matrix.
[0034] Furthermore, the expression of the bidirectional triplet sorting loss function is:
[0035]
[0036]
[0037] In the formula, is the bidirectional triplet ranking loss, m is the margin parameter of the triplet loss, and d(S,T) is (S F ,T F ) and (S C ,T C ) is the distance between the two modalities, S and T are positive samples in the training batch, S F is the skeleton feature after pooling, T F is the text feature, S C ,T C is the fusion feature O C into two features of the same size, For S and The distance between F ,t F )∈(S F ,T F ) and (s C ,t C )∈(S C ,T C ) represents the skeleton-text feature pair, α is a hyperparameter that balances the contribution of features obtained before and after the skeleton-language interaction process, and are the hard negative samples in the training batch, argmax(·) is a maximum function, x and y are the skeleton and text features in the training batch, d(x,T) is the distance between x and T, and d(S,y) is the distance between S and y.
[0038] Furthermore, the expression of the cross entropy loss function is:
[0039]
[0040] In the formula, is the cross entropy loss, y i is the action tag, is the i-th skeleton feature, and p(·) represents the predicted probability distribution.
[0041] Furthermore, the skeleton-text contrast loss function is expressed as:
[0042]
[0043]
[0044]
[0045] In the formula, is the skeleton-text contrast loss, is the expectation operator, KL is the divergence loss, g s2t (S E ) and g t2s (T F ) represents the true similarity between skeleton to text and text to skeleton, p s2t (S E ) and p t2s (T F ) is the similarity between skeleton and text and text to skeleton, sim(·,·) is the cosine similarity function, B is the training batch size, exp(·) represents the exponential function, τ is the learnable temperature parameter, is the i-th text feature, is the i-th skeleton feature, T F is the text feature, S E Skeleton features.
[0046] The present invention also provides a computer-readable storage medium, comprising one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the skeletal motion recognition method based on prompt-based contrast learning as described above.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] (1) Cross-modal feature fusion: Traditional skeleton-based action recognition methods mainly rely on skeleton data of a single modality, while this paper introduces a prompt-based contrastive learning framework that allows skeleton data to interact deeply with text descriptions. Through the interaction of skeleton features and text features, the modality gap is effectively reduced, the alignment and representation capabilities of features are improved, and thus the accuracy of recognition results is improved.
[0049] (2) Adaptive prompt generation: This paper uses prompt contrastive learning to construct text prompts containing learnable vectors, which can adaptively generate prompts that are more suitable for action recognition tasks. Compared with traditional prompt generation based on large language models, adaptive generation of text prompts provides more optimized and accurate prompts, which helps the model guide action interpretation more effectively during the learning process.
[0050] (3) Strong versatility: The present invention has achieved industry-leading performance levels on multiple authoritative datasets (including NTU RGB+D and NTU RGB+D120). Compared with traditional graph convolutional network-based methods, the present method can more comprehensively capture the multimodal features of actions, thereby significantly improving the accuracy and robustness of action recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0052] Figure 2 It is a schematic diagram of the overall architecture of skeleton action recognition of the present invention;
[0053] Figure 3 Schematic diagram for comparing the method of the present invention with the existing methods, wherein (a) is a comparative language-image pre-training method, (b) is a shallow interaction design method, and (c) is the method of the present invention. DETAILED DESCRIPTION
[0054] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0055] This embodiment provides a skeleton action recognition method based on prompt contrast learning, such as Figure 1 As shown, the method comprises the following steps:
[0056] S1. Model input:
[0057] The input to the model consists of a sequence of joint coordinates extracted from a motion capture device or obtained from a pose estimation algorithm applied to video frames. In this context, the human skeleton is represented as a graph with joints as vertices and bones as edges. The graph is denoted G = (J, E), where J = {j1, j2, …, j N} is the vertex set of N joints, and E is the edge set of bones. Joints and bones are connected by an adjacency matrix Connect, each element a i,k Reflects the two vertices j i and j k The correlation between them.
[0058] S2. Feature extraction:
[0059] S21. Use a skeleton encoder to encode the skeleton data and extract skeleton features.
[0060] Use a trainable (non-frozen weight) graph convolutional network as the skeleton encoder, denoted as Enc s (·), encode the skeleton data and extract the skeleton feature S E , the process can be expressed as S E =Enc s (G). Where G is the input skeleton data represented in graph form, where l and d f are the sequence length and feature dimension respectively.
[0061] S22. Construct a text prompt containing a learnable vector and encode it using a text encoder to obtain text features
[0062] The pre-trained CLIP (Contrastive Language-Image Pre-Training) text encoder with frozen weights is used as the text encoder of this embodiment, denoted as Enc T (·). A text prompt containing a learnable vector is constructed by random initialization as the input of the text encoder, and its learnable vector is defined as: T = {v1; v2; ...; v M ; [label]}, where each v i (i∈1,…,M) is a learnable vector with the same dimension as the word embedding, M is the number of learnable vectors, and [label] is an alternative class label, such as “jump up”, “shaking hands”, etc. The text prompt T is used as the text encoder Enc T (·) to obtain the text feature T F .
[0063] S3, feature interaction steps:
[0064] This step bridges the skeleton and text features through the perception module to generate hybrid features. Combining the bridged skeleton features and text features, the cross-modal attention module captures the interactive information and generates the final fusion features. Specifically:
[0065] First, the skeleton feature S E and text features T F Normalize for subsequent processing. In order to bridge the modality gap between the skeleton and the text, a perceptron module, denoted as Perceiver(·), is used to and skeleton features S E Between: S′ F =Perceiver(S E ,Q), where Then, S′ is F Perform pooling to obtain the pooled skeleton features Then, the feature interaction module transforms the skeleton feature S F ={s1; ...; s B} and text features T F ={t1; ...; t B} as mixed features, where B is the training batch size, Next, a cross-modal attention block is used to capture the interactions in the mixed features C. The query, key, and value components can be expressed as:
[0066]
[0067] in is a weight matrix, X can represent query q, key K or value V. The final fused feature O c Through the multi-head attention mechanism: Finally, O C is divided into two features of equal size (S C ; T C ),in and
[0068] S4. Model training steps:
[0069] The model is trained through cross entropy loss, skeleton-text contrast loss and bidirectional triplet ranking loss to optimize the model parameters.
[0070] The loss function of the model consists of three parts: cross entropy loss Skeleton-text contrast loss and the bidirectional triplet ranking loss
[0071] (1) Cross entropy loss is used to calculate the encoded skeleton feature S E The loss between y and the corresponding action label y is calculated as follows:
[0072]
[0073] where p(·) represents the predicted probability distribution.
[0074] According to this cross entropy loss, we can get that in the actual reasoning stage, we can directly use the skeleton feature S E The predicted category probability is obtained as the final recognition result.
[0075] (2) The skeleton-text contrast loss learns better cross-modal representations before interaction. It computes the cosine similarity function sim(·,·) so that the scores of matched skeleton-text pairs are higher and the scores of unmatched pairs are lower. Specifically, the similarity between skeleton-to-text and text-to-skeleton is calculated as follows:
[0076]
[0077]
[0078] where exp(·) represents the exponential function, τ is a learnable temperature parameter, and B is the training batch size. Let g s2t (S E ) and g t2s (T F ) represents the true similarity between skeleton to text and text to skeleton, with a probability of 0 for negative pairs and a probability of 1 for positive pairs. The skeleton-text contrast loss is defined as the KL divergence (Kullback-Leibler) loss between p and g, and is calculated as follows:
[0079]
[0080] in is the expectation operator and D is the entire training set.
[0081] (3) The bidirectional triplet ranking loss is calculated in two directions: from text to skeleton and from skeleton to text. Each triplet consists of an anchor point, a similar (positive) sample point, and a dissimilar (negative) sample point. In order to consider the interaction between skeleton and text features, we first define a similarity score that combines (S F ,T F ) and (S C ,T C ) is correct. Specifically, the distance between two modes is calculated as follows:
[0082] d(S,T)=s F ·t F +α(s C ·t C ),
[0083] Among them (s F ,t F )∈(S F ,t F ) and (s C ,t C )∈(S C ,T C ) represents the skeleton-text feature pair, and α is a hyperparameter that balances the contribution of features obtained before and after the skeleton-language interaction process. The bidirectional triple ranking loss can be expressed as:
[0084]
[0085] Here, m is the margin parameter of the triplet loss, and is a hard negative sample in the training batch and is defined as follows:
[0086]
[0087] where argmax(·) is a maximum function, x and y are the skeleton and text features within the training batch. By considering the similarity between the anchor sample and the positive and negative samples, the bidirectional triple ranking loss helps the model learn a highly discriminative embedding space.
[0088] The trained model can effectively recognize actions in input videos.
[0089] In the inference phase, only skeleton data is utilized for action recognition. Therefore, the model only relies on the trained skeleton encoder to predict the probability of action labels.
[0090] In order to verify the performance of the above method, the following experiment was designed in this embodiment.
[0091] This example evaluates the performance of the method of the present invention on the challenging NTU RGB+D and NTU RGB+D 120 benchmark datasets.
[0092] The NTU RGB+D dataset contains 56,880 skeleton action sequences. These action sequences involve 40 subjects and are divided into 60 action categories. The dataset provides two official benchmarks: cross-subject (X-Sub), where samples are selected from 20 subjects for training and the rest for testing; cross-view (X-View), where samples are selected from cameras 2 and 3 for training and the rest for testing.
[0093] NTU RGB+D 120 is an extended version of the NTU RGB+D dataset with 60 additional action categories. It includes 114,480 skeleton action sequences performed by 106 subjects. Similar to NTU RGB+D, this dataset provides two official benchmarks: cross-subject (X-Sub), where samples are selected from 53 subjects for training and the rest for testing; cross-setting (X-Set), where samples with even-numbered setting IDs are used for training and the rest for testing.
[0094] The results of the entire experiment are as follows:
[0095] Table 1 Comparison with the most advanced skeleton action recognition methods on NTU RGB+D
[0096] Methods References Modalities X-Sub X-View MST-GCN AAAI2021 4 91.5 96.6 CTR-GCN ICCV2021 4 92.4 96.8 Info-GCN CVPR2022 4 92.7 96.9 GAP ICCV2023 4 92.9 97.0 Koompan CVPR2023 4 92.9 96.8 FR-Head CVPR2023 4 92.8 96.8 TranSkeleton TCSVT2023 4 92.8 97.0 EfficientGCN TPAMI2023 4 91.7 95.7 This method - 4 93.1 97.2
[0097] This example compares the proposed method with the most recent state-of-the-art methods, including MST-GCN, CTR-GCN, Info-GCN, GAP, Koompan, FR-Head, TranSkeleton, and EfficientGCN. The results are shown in Tables 1 and 2.
[0098] Table 2 Comparison with the most advanced skeleton action recognition methods on NTU RGB+D 120
[0099] Methods References Modalities X-Sub X-View MST-GCN AAAI2021 4 87.5 88.8 CTR-GCN ICCV2021 4 88.9 90.6 Info-GCN CVPR2022 4 89.4 90.7 GAP ICCV2023 4 89.9 91.1 Koompan CVPR2023 4 90.0 91.3 FR-Head CVPR2023 4 89.5 90.9 TranSkeleton TCSVT2023 4 89.4 90.5 EfficientGCN TPAMI2023 4 88.3 89.1 This method - 4 90.2 91.5
[0100] (1) Results on the NTU RGB+D dataset: Our method outperforms all other models. It is worth noting that the proposed model improves the widely used CTR-GCN method in the skeleton action recognition task by 0.7% in the cross-subject (X-Sub) setting and by 0.4% in the cross-view (X-View) setting. In direct comparison with the state-of-the-art methods, the proposed model improves EfficientGCN by 1.3% and 1.5% in the cross-subject and cross-view settings, respectively.
[0101] (2) Results on the NTU RGB+D 120 dataset: Our method shows significant improvements in accuracy compared to other state-of-the-art methods. For example, the proposed method outperforms the recently proposed EfficientGCN method by 1.9% and 2.4% in the cross-subject (X-Sub) and cross-setting (X-View) settings, respectively. Overall, the proposed model achieves state-of-the-art performance on the challenging NTU RGB+D 120 dataset, showing its superiority over other existing methods.
[0102] Combination Figure 3 As shown, Figure 3 (a) shows a comparative language-image pre-training method, (b) shows a method using shallow interaction design that results in a large modality difference between skeleton data and text description, and (c) shows a skeleton action recognition method based on prompt-based contrastive learning in this embodiment that enhances feature alignment, thereby narrowing the modality gap.
[0103] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0104] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0105] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0108] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0109] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A skeleton action recognition method based on prompt contrastive learning, characterized in that: The following steps are involved: Obtain a video frame to be recognized, input it into a pre-trained skeleton action recognition model for recognition, and output an action recognition result, wherein the skeleton action recognition model includes a skeleton encoder, a text encoder, a perception module, and a cross-modal attention block; The steps of training the skeleton action recognition model include: Model input: Get video frames and extract joint coordinates in the video frames to generate skeleton data; Feature extraction: encoding the skeleton data using the skeleton encoder, extracting skeleton features, and constructing a text prompt including a learnable vector, encoding the text prompt using the text encoder, and extracting text features; Feature interaction: Based on the skeleton features and text features, the perception module and the cross-modal attention block are used to perform feature interaction to generate fusion features; Training loss: Based on the fusion features, skeleton features and text features, a cross entropy loss function, a skeleton-text contrast loss function and a bidirectional triplet sorting loss function are constructed to train the skeleton action recognition model and optimize the parameters until the training is completed.
2. The skeleton action recognition method based on prompt contrastive learning according to claim 1, characterized in that: The step of generating skeleton data comprises: A motion capture device or a posture estimation algorithm is used to extract joint coordinates from the video frame, and a graph G = (J, E) is generated with joint nodes as vertices and bones as edges. The graph G is used as skeleton data, where J = {j1, j2, ..., j N } is the vertex set of N joint nodes, and E is the edge set of the skeleton.
3. The skeleton action recognition method based on prompt contrastive learning according to claim 1, characterized in that: The skeleton encoder is a trainable graph convolutional network, and the process of extracting skeleton features is expressed as: S E =Enc S (G) Among them, S E is the skeleton feature, Enc S (·) is the skeleton code, and G is the skeleton data represented in graph form.
4. The skeleton action recognition method based on prompt contrastive learning according to claim 1, characterized in that: The text encoder is a pre-trained CLIP text encoder with frozen weights.
5. The skeleton action recognition method based on prompt contrast learning according to claim 1, characterized in that: The process of extracting text features is expressed as: T F =Enc T (T) T={v1;v2;…;v i ;…;v M ;[Label]} Where, T F is the text feature, Enc T (·) is the text encoder, T is the text prompt of the learnable vector, v i (i∈1,…,M) is a learnable vector with the same dimension as the word embedding, M is the number of learnable vectors, and [label] is an alternative category label.
6. The skeleton action recognition method based on prompt contrastive learning according to claim 1, characterized in that: The feature interaction step comprises: For the skeleton feature S E and text features T F Perform normalization; The perceptron module is used to extract the query vector Q and the normalized skeleton feature S E Between: S′ F =Perceiver(S E ,Q) In the formula, S′ F is the unpooled skeleton feature, Perciver(·) is the perceptron module; Along the time dimension, S′ F Perform pooling to obtain the pooled skeleton feature S F ; The pooled skeleton feature S F ={s1; ...; s B } and normalized text features T F ={t1; ...; t B } Perform feature interaction to obtain mixed feature C, where B is the training batch size; The cross-modal attention module is used to capture the interaction in the mixed feature C and generate the fusion feature O C , the fusion feature O C It is expressed as: O C =Multi-Attn(Q C ,K C ,V C ) In the formula, Multi-Attn(·) is the multi-head attention mechanism, Q C For query, K C is the key, V C is the value, X C For query Q C , key K C Or value V C , is the weight matrix.
7. The skeleton action recognition method based on prompt contrast learning according to claim 6, characterized in that: The expression of the bidirectional triplet sorting loss function is: d(S,T)=s F ·t F +α(s C ·t C ) In the formula, is the bidirectional triplet ranking loss, m is the margin parameter of the triplet loss, and d(S,T) is (S F ,T F ) and (S C ,T C ) is the distance between the two modalities, S and T are positive samples in the training batch, S F is the skeleton feature after pooling, T F is the text feature, S C ,T C is the fusion feature O C into two features of the same size, For S and The distance between F ,t F )∈(S F ,T F ) and (s C ,t C )∈(S C ,T C ) represents the skeleton-text feature pair, α is a hyperparameter that balances the contribution of features obtained before and after the skeleton-language interaction process, and are the hard negative samples in the training batch, argmax(·) is a maximum function, x and y are the skeleton and text features in the training batch, d(x,T) is the distance between x and T, and d(S,y) is the distance between S and y.
8. The skeleton action recognition method based on prompt contrast learning according to claim 1, characterized in that: The expression of the cross entropy loss function is: In the formula, is the cross entropy loss, y i is the action tag, is the i-th skeleton feature, and p(·) represents the predicted probability distribution.
9. The skeleton action recognition method based on prompt contrastive learning according to claim 1, characterized in that: The expression of the skeleton-text contrast loss function is: In the formula, is the skeleton-text contrast loss, is the expectation operator, KL is the divergence loss, g s2t (S E ) and g t2s (T F ) represents the true similarity between skeleton to text and text to skeleton, p s2t (S E ) and p t2s (T F ) is the similarity between skeleton and text and text to skeleton, sim(·,·) is the cosine similarity function, B is the training batch size, exp(·) represents the exponential function, τ is the learnable temperature parameter, is the i-th text feature, is the i-th skeleton feature, T F is the text feature, S E Skeleton features.
10. A computer-readable storage medium, characterized in that: It includes one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the skeleton action recognition method based on prompt contrast learning as described in any one of claims 1-9.
Citation Information
Patent Citations
Knowledge distillation and multi-task self-supervised learning-based skeleton behavior identification method
CN117152788A
Interaction data prediction method and device, electronic equipment and storage medium
CN117615180A
Cross-modal sensitive information identification method
CN117668292A
Image indication segmentation method based on pre-training model migration and prompt learning
CN117808819A
Skeleton action recognition method based on multi-center and multi-mode graph convolutional network
CN118155283A
Cited By
Cross-domain expression motion unit detection method based on text bridging
CN120145166A
Micro-posture recognition method based on multi-modal feature fusion and fine adjustment
CN120220244A
