Self-supervised group behavior recognition method and recognition system based on sparse graph causal temporal coding

Through sparse graph causal sequential coding technology, the problem of dependence on manual annotation data and insufficient generalization ability in group behavior recognition is solved, and a more comprehensive representation of group behavior characteristics and improvement of recognition accuracy are achieved.

CN116797972BActive Publication Date: 2024-09-06ZHONGKE (HEILONGJIANG) DIGITAL ECONOMY RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310756691.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-09-06
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

Existing group behavior recognition technology relies on a large amount of manually labeled data, which is costly and has limited generalization capabilities. It performs poorly especially when dealing with complex temporal relationships and spatial location relationships.

Method used

Adopt a self-supervised learning method based on sparse graph causal temporal coding, build a network structure through feature extraction network, encoder and decoder, use sparse graph SGTransformer and causal temporal CTTransformer to model spatial and temporal relationships, and combine the attention mechanism to predict future group behavior .

Benefits of technology

It achieves a more comprehensive representation of group behavior characteristics, reduces the dependence on manual annotation data, and improves the recognition accuracy and generalization ability. The experimental results show that it is better than traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116797972B
    Figure CN116797972B
Patent Text Reader

Abstract

The present invention is in the field of video analysis, and discloses a self-supervised group behavior recognition method based on sparse graph causal temporal coding and a recognition device thereof. Group behavior video data is obtained; based on sparse graph causal temporal prediction coding, a network structure describing the changes in the spatiotemporal information of the group state is constructed, and the network structure includes a feature extraction network, an encoder and a decoder. The feature extraction network is used to extract a feature vector group based on the group behavior video data; the encoder is a sparse graph of individuals in the scene constructed based on the group behavior video data; the decoder uses the attention mechanism to model the dependency relationship between long-term clues to focus on the most relevant historical dynamics for predicting future group changes; a loss function is constructed for the network structure describing the changes in the spatiotemporal information of the group state to enhance the effect of self-supervised learning; and the optimized network structure is used to realize group behavior recognition under self-supervised conditions. The present invention can model and identify group behaviors with complex temporal relationships and spatial position relationships, so as to solve the problem that commonly used models based on recurrent neural networks are insufficient in representing the dynamic characteristics of behavior and have poor recognition performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of video analysis, and in particular relates to a self-supervised group behavior recognition method based on sparse graph causal temporal coding and a recognition system thereof. Background Art

[0002] In the field of computer vision and multimedia, group behavior recognition is a high-level motion strategy perception task with great application value in smart sports and intelligent military. Existing group behavior recognition technologies based on deep learning algorithms have achieved remarkable results, but most of them are based on supervised learning methods and require a large amount of manually annotated label data as the basis for model optimization. However, in actual scientific research and production scenarios, data labeling not only consumes a lot of manpower and time, but also faces difficulties such as poor quality and uneven quality of labeled data. Therefore, supervised methods have limitations in practical applications.

[0003] To solve the cost problem caused by manual annotation, many researchers use self-supervised learning methods to eliminate the dependence on manually annotated label data. Self-supervised learning methods try to explore the intrinsic structure of videos and design specific proxy tasks. Early self-supervised methods include detecting video rotation, estimating frame / clip order, and identifying video playback speed. Although these methods have achieved considerable results, their generalization ability is limited. Recently, with the great success of contrastive learning in the field of images, researchers have tried to extend these results to the field of videos. However, these self-supervised methods have not yet fully utilized the temporal evolution characteristics of video content. To alleviate this problem, the predictive coding scheme based on contrastive learning considers the temporal evolution characteristics by predicting reasonable future changes. This method attempts to predict the correct future time state, where the predicted future state should be more similar to the corresponding real future than other interferences. However, traditional predictive coding schemes such as recurrent neural networks and long short-term memory networks are weak in the face of building complex multi-person multi-temporal and multi-spatial relationships. To solve this problem, the present invention further proposes a predictive coding scheme based on sparse graph causal timing. Through experimental comparison, this method has a very excellent performance compared with traditional video self-supervised methods.

[0004] Group behavior recognition is challenging while having both application value and development potential. Therefore, group behavior recognition has long received extensive attention from industry and academia. With the rapid development of deep learning, methods based on deep learning models have replaced traditional representation extraction methods. However, most existing methods rely on a large number of manually annotated data sets for training, which is costly. To solve this problem, the present invention proposes a predictive coding scheme based on contrastive learning to achieve self-supervised learning. However, due to the complex temporal and spatial position relationships in group behavior, commonly used methods based on recurrent neural networks (RNNs), such as long short-term memory networks (LSTMs), perform poorly in predicting future videos. To solve this problem, the present invention proposes a predictive coding scheme for sparse graph temporal causality. It is designed as an encoder-decoder architecture, in which the encoder constructs the group state information in the observed video frames, and the decoder is used to predict future states.

[0005] In summary, the present invention provides a self-supervised group behavior recognition method based on sparse graph causal temporal prediction coding to address the technical problems mentioned above. The present invention constructs and predicts the complex spatial relationships and time-deduced changes of group behaviors through sparse graph causal temporal prediction coding, and performs self-learning of group behavior representation to achieve self-supervised group behavior recognition. Summary of the invention

[0006] The present invention provides a self-supervised group behavior recognition method based on sparse graph causal temporal coding, which is used to solve the problems that most existing methods rely on a large number of manually annotated data sets for training, which is costly; and due to the complex temporal relationship and spatial position relationship in group behavior, the commonly used recurrent neural network-based methods perform poorly in predicting future videos.

[0007] The present invention provides a self-supervised group behavior recognition system based on sparse graph causal temporal coding, which is used to solve the problem that most existing methods rely on a large number of manually annotated data sets for training, which is costly.

[0008] The present invention is achieved through the following technical solutions:

[0009] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, the self-supervised group behavior recognition method comprising:

[0010] Obtain group behavior video data;

[0011] Based on sparse graph causal temporal prediction coding, a network structure describing the changes in spatiotemporal information of group states is constructed. The network structure includes a feature extraction network, an encoder and a decoder. The feature extraction network is used to extract a feature vector group according to group behavior video data; the encoder is a sparse graph of individuals in a scene constructed according to group behavior video data; the decoder uses an attention mechanism to model the dependency between long-term clues to focus on the most relevant historical dynamics, so as to predict future group changes;

[0012] For the network structure describing the changes in spatiotemporal information of the group state, a loss function is constructed to enhance the effect of self-supervised learning;

[0013] Self-supervised group behavior recognition is achieved using an optimized network structure that describes the spatiotemporal information changes of group states.

[0014] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the feature extraction network is specifically:

[0015] The pre-trained I3D network is used as the backbone to extract feature maps for feature extraction of input video clips;

[0016] According to the result of feature extraction, a D-dimensional feature vector group is obtained through RoiAlign.

[0017] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the encoder is specifically:

[0018] The encoder’s sparse graph SGTransformer is used to model the spatial state and construct individuals in the scene, and each individual is represented by a high-dimensional vector;

[0019] In the sparse graph SGTransformer, each node updates the group interaction pattern by passing messages to its neighbor nodes;

[0020] The D-dimensional feature vector group is input into the encoder’s sparse graph SGTransformer to model the spatial state information.

[0021] A self-supervised group behavior recognition method based on sparse graph causal temporal coding is proposed. The modeled spatial state information is input into the causal temporal CTTransformer of the encoder to output the spatiotemporal state transition information of a video clip.

[0022] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the decoder is specifically:

[0023] The decoder adopts a multi-head self-attention mechanism model.

[0024] The decoder accepts the output of the causal temporal CTTransformer from the encoder and utilizes the attention mechanism to model the dependencies between long-term cues to focus on the most relevant historical dynamics.

[0025] A self-supervised group behavior recognition method based on sparse graph causal temporal coding. The encoder-decoder processing flow is as follows:

[0026] For multiple consecutive video frames, after feature extraction, they are input into the sparse graph subnetwork SGTransformer and the group state feature g in the i-th video frame is obtained. i , the feature g corresponding to each video frame i Input to the temporal causal CTTransformer and finally output the spatiotemporal information change characteristics of the group state It contains the temporal relationship pattern of multiple video frames and the spatial position relationship pattern between individuals in a single frame video. Input into the decoder for state attention calculation and state attention update, and predict the future group state.

[0027] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the loss function includes a reconstruction loss function and a contrast loss function;

[0028] The reconstruction loss function is used for the periodic action state at the single individual level, and encourages the predicted individual action state characteristics to be close to the real individual action state characteristics;

[0029] The contrast loss function is used to use a discriminator to check the consistency between the predicted behavior change state and the actual behavior change state at the predicted multiple video frame levels, and use this as a standard to encourage the predicted state characteristics to be as consistent as possible with the actual state characteristics.

[0030] A self-supervised group behavior recognition system based on spatiotemporal serial-parallel relationship encoding, comprising:

[0031] An acquisition module, used to acquire group behavior video data;

[0032] A construction module is used to construct a network structure describing the changes in spatiotemporal information of group states based on sparse graph causal temporal prediction coding, wherein the network structure includes a feature extraction network, an encoder and a decoder. The feature extraction network is used to extract a feature vector group according to group behavior video data; the encoder is used to construct a sparse graph of individuals in a scene according to the group behavior video data; and the decoder is used to model the dependency between long-term clues using an attention mechanism to focus on the most relevant historical dynamics.

[0033] The training module is used to optimize the network structure describing the changes in the spatiotemporal information of the group state, and enhance the effect of self-supervised learning by constructing a loss function; and realize self-supervised group behavior recognition using the network structure of the optimized group state spatiotemporal information change model.

[0034] An electronic device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0035] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

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

[0037] The present invention provides a new end-to-end architecture, called a self-supervised group behavior recognition model with sparse graph temporal causal predictive coding, for self-learning of group behavior representation.

[0038] The present invention is based on predictive coding, which not only takes into account the spatial position interaction relationship, but also takes into account the temporal evolution relationship of the overall scene, thereby obtaining a more comprehensive representation of group behavior characteristics.

[0039] The present invention is compared in detail with other video self-supervision methods and supervised group behavior recognition methods on volleyball datasets and daily group behavior datasets. Among them, the video self-supervision method mainly uses a method based on a pre-task, such as a playback rate recognition method, which automatically captures and recognizes behavior representations by estimating the frame rate of the video. For supervised group behavior recognition methods, we compared popular Transformer-based models, which are designed to use complete group and individual behavior labels for model optimization. In the testing phase, for all methods, we only used 10% of the labeled data to train the model and compared them on the same test set. The experiments all used the average recognition accuracy as the comparison standard. The experimental results show that the self-supervised group behavior recognition accuracy of the present invention is better than that of existing methods, which confirms the effectiveness and generalization of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a flow chart of a method for self-learning of group behavior characteristics provided by the present invention.

[0041] Figure 2 The present invention provides a flow chart of a group behavior recognition method. DETAILED DESCRIPTION

[0042] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0043] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0044] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.

[0045] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0047] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, the self-supervised group behavior recognition method comprising:

[0048] Obtain group behavior video data;

[0049] Based on sparse graph causal temporal prediction coding, a network structure describing the changes in spatiotemporal information of group states is constructed. The network structure includes a feature extraction network, an encoder and a decoder. The feature extraction network is used to extract a feature vector group based on group behavior video data; the encoder is used to construct a sparse graph of individuals in the scene based on the group behavior video data; the decoder uses an attention mechanism to model the dependency between long-term clues and pays attention to the most relevant historical dynamics, so as to predict future group changes;

[0050] Constructing a loss function for the network structure of the group feature space state information model to enhance the effect of self-supervised learning;

[0051] The optimized network structure that describes the spatiotemporal information changes of group states is used to realize group behavior recognition under self-supervision conditions.

[0052] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the group behavior video data is obtained by using a Volleyball dataset, which consists of 4830 clips collected from 55 volleyball games, including 3493 training clips and 1337 test clips; each sample belongs to one of 8 group behavior labels, and in addition to the group behavior labels, the dataset also provides ground truth player bounding boxes and their actions;

[0053] The behavior tags include right set, right spike, right pass, right winning point, left set, left spike, left pass, and left winning point;

[0054] The ground truth player bounding boxes and their actions include wait, set, dig, fail, spike, block, jump, move, and stand.

[0055] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the feature extraction network is specifically:

[0056] The pre-trained I3D network is used as the backbone to extract feature maps for feature extraction of input video clips;

[0057] According to the result of feature extraction, a D-dimensional feature vector group is obtained through RoiAlign.

[0058] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the encoder is specifically: the encoder comprises a sparse graph SGTransformer and a causal temporal CTTransformer,

[0059] The encoder’s sparse graph SGTransformer is used to model the spatial state and construct individuals in the scene, and each individual is represented by a high-dimensional vector;

[0060] In the sparse graph SGTransformer, each node updates the group interaction pattern by passing messages to its neighbor nodes;

[0061] The D-dimensional feature vector group obtained by the feature extraction network is input into the sparse graph SGTransformer of the encoder for spatial state information modeling.

[0062] A self-supervised group behavior recognition method based on sparse graph causal temporal coding is proposed. The modeled spatial state information is input into the causal temporal CTTransformer of the encoder to output the spatiotemporal state transition information of a video clip.

[0063] The sparse graph TransformerSGT includes constructing a sparse graph, updating nodes, and global state modeling;

[0064] Specifically, the sparse graph is constructed as follows: at frame t, the present invention has a set of individuals where p i ∈R d , represents the characteristics of the i-th individual, and N represents the number of individuals;

[0065] Specifically, for a node on a sparse graph, the sparse graph Transformer updates each node by passing messages to its neighboring nodes; essentially, in this process, the neighboring nodes can be considered as a specific sequence, so the attention mechanism can be applied to it. In the Transformer architecture, the input is an embedding sequence of length N And the attention mechanism can be viewed as a message passed on an undirected fully connected graph;

[0066] For the embedding representation h i , learn the corresponding query, keyword and value vectors, where q i =f Q (h i ), k i =f K (h i ) and v i =f V (h i ), where f represents a fully connected layer; the present invention converts the fully connected graph from node p j Pass to p i The message is defined as The self-attention operation can be written as:

[0067]

[0068] in, Yes i Update embedding, d k It is a scaled dot product term for numerical stability. Unlike fully connected graphs, sparse graphs pay great attention to local range relationships; therefore, when updating each node, the present invention only needs to pass messages among its neighboring nodes, and does not need to perform this process in all other nodes.

[0069] For a sparse graph G = (V, E), where E={(i,j)|p i ,p j connected}, the attention operation can be written as:

[0070]

[0071] Among them, p i is the updated embedding of node i, i.e., the new individual feature. In SGT, there are additional operations, including layer normalization, skip connection, multi-head cascade, etc., which are ignored in the above formula;

[0072] The global state modeling is specifically as follows: after updating each node, SGT generates an updated sparse graph, which contains the states of the individuals in frame t; the group state g t It can be obtained by aggregating node information in a sparse graph;

[0073] The specific form is as follows:

[0074]

[0075] where f o , Norm are the fully connected layer and the normalization layer respectively.

[0076] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein given the spatial state features extracted by the sparse graph Transformer, the temporal state evolution is modeled using causal temporal coding (CTTransformer);

[0077] The transformation in the causal temporal Transformer can be written as

[0078]

[0079] in, is the group state characteristic g t The corresponding generated features, which are considered g t At the same time, we also pay attention to the previous g1,…g t-1 All features of.

[0080] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, the present invention adopts a mask mechanism to realize causal temporal modeling when implementing CTTransformer;

[0081] First, the temporal position encoding is added to the group state features, which is learnable during training;

[0082] Then, the embedded features are output through multiple CTTransformer layers, where each CTTransformer layer consists of a multi-head attention layer with mask, layer normalization, and a multi-layer perceptron (MLP);

[0083] Unlike ordinary Transformers, the Temporal Causal Transformer utilizes a “causal” mask in the multi-head attention, which ensures that the model only focuses on specific parts of the input. When the present invention sets the mask to focus only on g1,…g t ;

[0084] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the decoder is specifically:

[0085] The decoder adopts a multi-head self-attention mechanism model.

[0086] The decoder accepts the output of the causal temporal CTTransformer from the encoder, which extracts the spatiotemporal state transition information of a video clip. The decoder uses the attention mechanism to model the dependencies between long-term cues to focus on the most relevant historical dynamics.

[0087] A self-supervised group behavior recognition method based on sparse graph causal temporal coding. The encoder-decoder processing flow is as follows:

[0088] For multiple consecutive video frames, they are input into the sparse graph Transformer after feature extraction and get g i , the g corresponding to each video frame i Input to the temporal causal Transformer and finally output The temporal relationship of multiple video frames and the spatial position relationship between individuals in a single frame of video are included in the present invention. Input to the decoder for state attention calculation and state attention update;

[0089] The state evolution of CTTransformer generating T frames can be expressed as Take the last frame

[0090] For the decoder, we have W q , Three types of matrices, using W q and The matrices are Do matrix multiplication to get Q, K i , and use Q, K i To calculate the attention score, and then compare the score with Vi Do the weighted sum and get Q, K i , V i It can be expressed as follows:

[0091]

[0092] For each K i , the attention score is calculated as follows:

[0093]

[0094] To avoid the gradient vanishing problem, the present invention normalizes the attention score by the sum of the attention scores instead of the softmax function. In order to make the sum of the attention scores equal to 1, the present invention uses ReLU to further limit f q , The output of is non-negative, and the output of the attention model is This output incorporates relevant historical information, which is used to make current predictions.

[0095] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, wherein the reconstruction loss function is specifically: considering that the state at the level of a single individual is usually periodic, the predicted individual state characteristics can be encouraged to be close to the real individual state characteristics. Therefore, the present invention uses the reconstruction loss to reduce the Euclidean distance of the corresponding individual feature pairs;

[0096] is the output of the real value at frame t after the sparse graph Transformer. As a reference standard, it makes the predicted features at frame t and Similar to the following:

[0097]

[0098] Where N is the number of people, is the feature of the jth individual extracted by the encoder from the same time frame t, and is the feature predicted by the model.

[0099] A self-supervised group behavior recognition method based on sparse graph causal temporal coding, the adversarial loss function is specifically that it is difficult to predict human behavior over a long time span, and due to error accumulation, group relationship prediction is even more difficult. Inspired by the adversarial training mechanism in GAN, the present invention introduces a consistency discriminator and uses the discriminator to check the consistency between the predicted state and the real state at the level of multiple predicted video frames, and uses this as a standard to encourage the predicted state characteristics to be as consistent as possible with the actual state characteristics. The discriminator D shares the same architecture as the temporal causal Transformer and outputs the probability that the input sequence is true; the present invention will be represented as G T The basic true state dynamics of is regarded as a real sample and is expressed as The prediction dynamics of are considered as pseudo samples;

[0100] The predicted state is generated from the model G, i.e., under the encoder-decoder architecture, while the state information used as the label is extracted by the encoder from the video frame at the same time position; then, the quality of the generator G is judged by evaluating the degree to which the fake samples fool the discriminator D; formally, the present invention solves the minimax optimization problem as follows:

[0101]

[0102] In summary, the total target loss function is the sum of the above two loss functions, expressed as:

[0103]

[0104] Embodiment 2

[0105] The embodiment of the present invention provides a self-supervised group behavior recognition system based on spatiotemporal serial-parallel relationship coding, including:

[0106] An acquisition module, used to acquire group behavior video data;

[0107] The construction module is used to construct a network structure that describes the changes in the spatiotemporal information of the group state. The network structure includes a feature extraction network, an encoder, and a decoder. The feature extraction network is used to extract feature vector groups based on the group behavior video data; the encoder is a sparse graph of individuals in the scene constructed based on the group behavior video data; the decoder uses the attention mechanism to model the dependencies between long-term clues and pays attention to the most relevant historical dynamics to predict future group changes;

[0108] The training module is used to construct a loss function for the network structure describing the changes in the spatiotemporal information of the group state, so as to enhance the effect of self-supervised learning; and to realize self-supervised group behavior recognition using the optimized network structure.

[0109] As can be seen from the above, the embodiment of the present invention constructs and predicts the complex spatial relationship and time evolution change of group behavior through sparse graph causal temporal prediction coding, performs group behavior representation self-learning, and realizes self-supervised group behavior recognition. Experimental results show that the accuracy of self-supervised group behavior recognition of this method is better than that of existing methods, which proves the effectiveness and generalization of the method.

[0110] Embodiment 3

[0111] An embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the memory is used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and the processor are connected via a bus. Specifically, the processor implements any step in the first embodiment above by running the computer program stored in the memory.

[0112] It should be understood that in the embodiments of the present invention, the processor referred to may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0113] The memory may include a read-only memory, a flash memory, and a random access memory, and provides instructions and data to the processor. A part or all of the memory may also include a nonvolatile random access memory.

[0114] As can be seen from the above, the electronic device provided by the embodiment of the present invention can implement the self-supervised group behavior recognition method as described in Example 1 by running a computer program, and obtain a new end-to-end framework, called a group feature self-supervised model, for group behavior representation learning. The contextual relationship is captured by context-aware relationship prediction coding, which not only considers the spatial interaction contextual relationship, but also the overall scene time change contextual relationship, thereby obtaining a more comprehensive group behavior feature representation.

[0115] It should be understood that if the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0116] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0117] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0118] It should be noted that the methods and detailed examples provided in the above embodiments can be combined with the devices and equipment provided in the embodiments, and references can be made to each other, and no further details will be given.

[0119] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0120] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / equipment embodiments described above are only illustrative, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0121] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A self-supervised group behavior recognition method based on sparse graph causal temporal coding, characterized in that: The self-supervised group behavior recognition method comprises: Obtain group behavior video data; Based on sparse graph causal temporal prediction coding, a network structure describing the changes in spatiotemporal information of group states is constructed, wherein the network structure includes a feature extraction network, an encoder and a decoder, and the feature extraction network is used to extract a feature vector group according to group behavior video data; The encoder constructs a sparse graph of individuals in a scene based on group behavior video data; the decoder uses an attention mechanism to model dependencies between long-term cues to focus on the most relevant historical dynamics; For the network structure that describes the spatiotemporal information changes of the group state, a loss function is constructed to enhance the effect of self-supervised learning; Self-supervised group behavior recognition is achieved using an optimized network structure that describes the spatiotemporal information changes of group states; The encoder is specifically: The encoder’s sparse graph subnetwork SGTransformer is used to model the spatial state and construct the dynamic interaction pattern between individuals in the scene, where each individual is represented by a high-dimensional vector. In the sparse graph subnetwork SGTransformer, each node updates the group interaction pattern by passing messages to its neighbor nodes; The D-dimensional feature vector group is input into the encoder's sparse graph subnetwork SGTransformer to model the spatial group state information; The decoder is specifically: The decoder adopts a multi-head self-attention mechanism model. The decoder accepts the output of the causal temporal CTTransformer from the encoder, and the decoder uses the attention mechanism to model the dependencies between long-term clues to focus on the most relevant historical dynamics; The specific processing flow of the encoder-decoder is as follows: For multiple consecutive video frames, after feature extraction, they are input into the sparse graph sub-network SGTransformer and the group state features in the i-th video frame are obtained. , the features corresponding to each video frame Input to the temporal causal CTTransformer and finally output the spatiotemporal information change characteristics of the group state ,Will Input into the decoder for state attention calculation and state attention update, and predict the future group state.

2. According to claim 1, a self-supervised group behavior recognition method based on sparse graph causal temporal coding is characterized in that: The feature extraction network is specifically: The pre-trained dilated 3D convolutional network I3D is used as the backbone network to extract feature maps and perform feature extraction on the input video clips; According to the feature map extracted by the feature, the regional alignment technology RoiAlign is used to obtain a D-dimensional individual feature vector group.

3. According to claim 1, a self-supervised group behavior recognition method based on sparse graph causal temporal coding is characterized in that: The modeled spatial group state information is input into the causal temporal CTTransformer of the encoder to extract the spatiotemporal state transition information of a video clip.

4. According to claim 2, a self-supervised group behavior recognition method based on sparse graph causal temporal coding is characterized in that: The loss function includes a reconstruction loss function and a contrast loss function; The reconstruction loss function is used for the periodic action state at the single individual level, and encourages the predicted individual action state characteristics to be close to the real individual action state characteristics; The contrast loss function is used to use a discriminator to check the consistency between the predicted behavior change state and the actual behavior change state at the predicted multiple video frame levels, and use this as a standard to encourage the predicted state characteristics to be as consistent as possible with the actual state characteristics.

5. A self-supervised group behavior recognition system based on sparse graph causal temporal coding, characterized in that: include: An acquisition module, used to acquire group behavior video data; A construction module is used to construct a network structure describing the changes in spatiotemporal information of group states based on sparse graph causal temporal prediction coding, wherein the network structure includes a feature extraction network, an encoder and a decoder, and the feature extraction network is used to extract a feature vector group according to group behavior video data; The encoder constructs a sparse graph of individuals in a scene based on group behavior video data; the decoder uses an attention mechanism to model dependencies between long-term cues to focus on the most relevant historical dynamics; A training module is used to optimize the network structure describing the spatiotemporal information change of the group state, and enhance the effect of self-supervised learning by constructing a loss function; and realize self-supervised group behavior recognition by using the network structure of the optimized group state spatiotemporal information change model; The encoder is specifically: The encoder’s sparse graph subnetwork SGTransformer is used to model the spatial state and construct the dynamic interaction pattern between individuals in the scene, where each individual is represented by a high-dimensional vector. In the sparse graph subnetwork SGTransformer, each node updates the group interaction pattern by passing messages to its neighbor nodes; The D-dimensional feature vector group is input into the encoder's sparse graph subnetwork SGTransformer to model the spatial group state information; The decoder is specifically: The decoder adopts a multi-head self-attention mechanism model. The decoder accepts the output of the causal temporal CTTransformer from the encoder, and the decoder uses the attention mechanism to model the dependencies between long-term clues to focus on the most relevant historical dynamics; The specific processing flow of the encoder-decoder is as follows: For multiple consecutive video frames, after feature extraction, they are input into the sparse graph sub-network SGTransformer and the group state features in the i-th video frame are obtained. , the features corresponding to each video frame Input to the temporal causal CTTransformer and finally output the spatiotemporal information change characteristics of the group state ,Will Input into the decoder for state attention calculation and state attention update, and predict the future group state.

6. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.