A cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction

Through the multi-scale skeleton spatio-temporal feature extraction method, combined with natural and self-attention matrices, the perspective invariance features in cross-view gait recognition are extracted, which solves the problem of gait recognition accuracy under the influence of perspective changes in the existing technology, and achieves More efficient gait feature extraction and recognition effects.

CN118135659BActive Publication Date: 2024-09-20SHANDONG UNIV +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410326441.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2024-09-20
Estimated Expiration
2044-03-21

AI Technical Summary

Technical Problem

Existing cross-view gait recognition methods have difficulty in extracting skeletal gait features with view invariance when dealing with changes in viewing angles, and traditional methods ignore high-order relationships and insufficient processing of temporal information when extracting local skeletal features, resulting in recognition accuracy. affected.

Method used

A multi-scale skeleton spatio-temporal feature extraction method is used to extract explicit and implicit relationships between joint points through skeleton data preprocessing, global and local spatial feature extraction networks, multi-scale temporal feature extraction networks, and combined with natural and self-attention matrices. Multi-scale features are extracted through temporal convolution with different expansion rates, and model training is performed by combining triplet loss and cross-entropy loss.

Benefits of technology

It significantly improves the accuracy of cross-view gait recognition, can more effectively utilize the spatio-temporal information in the skeleton, extract perspective-invariant features, and enhances the model's discriminative ability and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118135659B
    Figure CN118135659B
Patent Text Reader

Abstract

The present invention relates to a cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction, which belongs to the field of deep learning and pattern recognition technology, including skeleton data preprocessing, global spatial feature extraction network construction, local spatial feature extraction network construction, multi-scale temporal feature extraction network construction, overall framework training and cross-view gait recognition. A global spatial feature extraction network is constructed to extract global spatial features, and a local spatial feature extraction network based on hypergraph representation is constructed to fully model joint-part and part-part level local spatial relationships. In order to efficiently extract multi-scale temporal features, a multi-scale temporal feature extraction network is constructed. In order to improve the discrimination ability of the entire framework structure, the entire model is trained by combining triplet loss and cross entropy loss. Finally, the trained model is used for cross-view gait recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction, and belongs to the technical field of deep learning and pattern recognition. Background Art

[0002] Gait recognition refers to determining an individual's identity based on their unique walking motion characteristics. Compared with already mature biometric recognition technologies such as face recognition and fingerprint recognition, gait recognition has many unique advantages. For example, gait features can be obtained from videos captured by existing surveillance cameras without the need to deploy new equipment, can be recognized from a relatively long distance, do not require the explicit cooperation of the person being identified, and are difficult to disguise or hide. Based on the above characteristics, gait recognition has broad application prospects in security monitoring, criminal investigation, public transportation, daily attendance, and other fields. On the other hand, the unconstrained collection environment in real scenes also makes gait recognition often affected by many covariates such as viewing angle, clothing, and carrying objects. Due to the uncertainty of the camera installation position and the walking direction of the person being identified in unconstrained scenes, viewing angle is the most common covariate in practical applications and will significantly change the appearance of pedestrians. Especially when the viewing angle span is large, the difference between samples of the same identity at different viewing angles is often greater than the difference between samples of different identities at the same viewing angle, which will have a serious impact on the accuracy of gait recognition. Therefore, achieving cross-perspective gait recognition is an extremely challenging and urgent problem, and it is also the key to the commercialization of gait recognition technology from the laboratory.

[0003] According to whether the human body structure is explicitly modeled when extracting gait features, existing cross-view gait recognition methods can be roughly divided into two categories: model-based methods and appearance-based methods. Most appearance-based methods directly take pedestrian contours as input and focus on the visual appearance of gait. Contours refer to the set of binary images obtained after the original pedestrian video is processed by pedestrian detection, pedestrian segmentation, cropping, binarization and other techniques. According to whether the contours are compressed in the temporal dimension before extracting gait features, appearance-based methods can be further divided into template-based methods and contour set-based methods. Template-based methods compress temporal information according to specific rules and integrate contour sets into one image. By representing contour sets with a single image, template-based methods reduce the complexity of the model and the computational cost. However, a lot of temporal information will inevitably be lost during the integration process, which is an inherent problem of this method. Contour set-based methods directly take contour frames as input and process temporal information in the feature space. According to whether the input contour frames are ordered, contour set-based methods can be subdivided into unordered set-based and sequence-based gait recognition methods. The gait recognition method based on unordered sets does not require the input contour frames to maintain the original time order, so it is more flexible and efficient. The gait recognition method based on sequences regards the contour set as a sequence with additional order information, which can extract richer dynamic features from it. Since the contour contains the appearance information of the pedestrian, such as body shape and clothing, the appearance-based method is more susceptible to the appearance changes caused by covariates.

[0004] Model-based gait recognition methods focus on analyzing the underlying physical structure and movement of the human body, and use this to construct a clear human model as gait data. Skeleton sequence is one of the most commonly used human models. It can estimate the coordinates of joint points from the video as gait representation. This compact data form ignores a lot of redundant information related to appearance in the outline, is more robust to covariates such as viewpoint, clothing, and carrying objects, and can reflect more essential gait information. However, the skeleton is essentially a graph structure data in a non-Euclidean space, which is difficult to process in conventional convolutional neural networks (CNNs). The graph convolutional network (GCN) that has emerged in recent years extends CNN to graphs, extracts gait features that do not change with viewpoints from skeleton sequences, and makes important progress in skeleton-based cross-view gait recognition methods. Li et al. used a spatiotemporal graph convolutional network (ST-GCN) to extract gait features from skeletons, then divided these features into different sub-regions according to the body structure, and mapped them to a more discriminative space through independent full connections. In another work, they designed a periodicity-inspired temporal feature pyramid aggregator (PTP) based on prior knowledge of gait cycles, and further extracted multi-scale temporal features through parallel temporal convolutions of multiple kernel sizes. Observing that gait features have unique symmetry, Liu et al. introduced symmetric connections in the adjacency matrix based on prior knowledge to enhance the connection between related joints. Recently, GaitTR and GaitMixer adopted the self-attention mechanism to model the relationship between arbitrary joint points, significantly improving the model performance. GaitGP added mask operations to the self-attention adjacency matrix to efficiently realize local and global feature extraction. However, these methods all have some shortcomings: First, the spatiotemporal graph convolutional network based on the traditional adjacency matrix is ​​difficult to model the complex implicit relationship between joints that are not directly connected to the skeleton, while the self-attention adjacency matrix ignores the uniqueness of the skeleton data, that is, the explicit connection between joints determined by the physical structure of the skeleton; Second, the existing methods only model the relationship between nodes in a specific part when extracting local skeleton features, while the high-order relationship between nodes and parts, and between parts is not fully explored; Third, in terms of processing temporal information, either directly use maximum pooling to aggregate frame-level features, or use temporal convolution with different convolution kernel sizes to extract temporal features of different scales, which cannot achieve a good balance between model performance and computational complexity.

[0005] Therefore, how to extract skeleton gait features with view invariance and effectively utilize the rich spatiotemporal information in the gait skeleton is the key to improving the accuracy of skeleton-based cross-view gait recognition. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction. Summary of the invention:

[0008] A cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction, including skeleton data preprocessing, global spatial feature extraction network construction, local spatial feature extraction network construction, multi-scale temporal feature extraction network construction, overall framework training and cross-view gait recognition.

[0009] In order to obtain rich gait skeleton representation, a skeleton data preprocessing module is designed. In terms of spatial feature extraction, in order to obtain explicit and implicit global spatial relationships between joints, a global spatial feature extraction network is constructed to extract global spatial features. In order to make full use of high-order local skeleton features, a local spatial feature extraction network based on hypergraph representation is constructed to fully model joint-part and part-part level local spatial relationships. In order to efficiently extract multi-scale temporal features, a multi-scale temporal feature extraction network is constructed. In order to improve the discriminative ability of the entire framework structure, the entire model is trained by combining triplet loss and cross entropy loss. Finally, the trained model is used for cross-view gait recognition.

[0010] The technical solution of the present invention is as follows:

[0011] A cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction includes the following steps:

[0012] A. Skeleton Data Preprocessing

[0013] Preprocess the gait skeleton sequence data, including skeleton data enhancement, skeleton descriptor calculation, and multi-granularity skeleton division strategy;

[0014] B. Global spatial feature extraction network construction

[0015] The global spatial feature extraction network is used to extract explicit and implicit global spatial relationships between joints. For the skeleton sequence data obtained after preprocessing in step A, the natural adjacency matrix based on explicit bone connection and the self-attention adjacency matrix based on the self-attention mechanism are calculated respectively, and they are combined as the adjacency matrix of the graph convolution network for the construction of the global spatial feature extraction network.

[0016] C. Local spatial feature extraction network construction

[0017] The local spatial feature extraction network is used to extract the interaction relationship between body parts of different granularities. For the skeleton sequence data and multi-granularity skeleton partitioning strategy obtained after preprocessing in step A, the body part partitioning relationship of different granularities is represented by a hypergraph, and the joint-part attention adjacency matrix and the part-part attention adjacency matrix are designed respectively. They are combined together as the adjacency matrix of the graph convolutional network for the construction of the local spatial feature extraction network.

[0018] D. Multi-scale temporal feature extraction network construction

[0019] The multi-scale time feature extraction network is used to extract multi-scale time features; for the global or local spatial features obtained in step B or step C, the multi-scale time features are extracted by dilated time convolution with different dilation rates; in addition, a bottleneck structure is designed to improve the multi-scale time modeling capability while reducing the computational cost;

[0020] E. Overall framework training

[0021] The overall framework of the model includes a global branch and several local branches of different granularities. The global branch is composed of several step B and step D networks alternately stacked to extract global spatiotemporal features, and then pooled and fully connected to map as the final global feature representation; the local branch is composed of several step C and step D networks alternately stacked to extract local spatiotemporal features, and then pooled and fully connected to map as the final local feature representation; the local branch is similar to the global branch, except that the global spatial feature extraction network of step B is replaced by the local spatial feature extraction network of step C. Preferably, residual connections are added between each layer of feature extraction networks to make model optimization easier. The names of each layer of the network in each branch are Layer-1, Layer-2, Layer-3, Layer-4, pooling layer, fully connected layer 1, and fully connected layer 2. The feature output dimensions (T×N×C) of each layer of the network in each branch are 60×17×72, 60×17×72, 60×17×144, 60×17×288, 1×288, 1×74, and 1×128, respectively, as shown in Table 1.

[0022] Table 1 Feature output dimensions of each layer of the network

[0023] Layer Name Output dimension (T×N×C) Layer-1 60×17×72 Layer-2 60×17×72 Layer-3 60×17×144 Layer-4 60×17×288 Pooling Layer 1×288 Fully connected layer 1 1×74 Fully connected layer 2 1×128

[0024] Independently calculate the triplet loss and cross entropy loss of the global feature representation and the local feature representation of each local branch, and use the average of all branch losses to supervise the model training process;

[0025] F. Cross-view gait recognition

[0026] The gait skeleton sequences of the registration set and the query set are sent to the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction to extract gait features, and the identity of the query sample is completed by comparing the similarity between the features of the sample to be queried and the features of the registration set.

[0027] According to a preferred embodiment of the present invention, in step A, the gait skeleton sequence data is preprocessed, including the following steps:

[0028] a. Skeleton data enhancement: The skeleton data is enhanced by adding noise and mirror flipping to expand the sample. Specifically, Gaussian noise with a standard deviation of 0.3 is added to the coordinates of each joint point. At the same time, the center of mass coordinate value is obtained by calculating the average value of the coordinates of all relevant nodes in the skeleton graph, and then the coordinates of each joint point are flipped with the center of mass as the center with a probability of 0.1.

[0029] b. Calculation of skeleton descriptors: For the enhanced skeleton image sequence in step a, four skeleton descriptors, namely relative joint position, movement speed, bone length and bone angle, are calculated and concatenated according to the channel dimension. These different descriptors complement each other to achieve a more complete and accurate skeleton gait representation.

[0030] Specifically, the human skeleton graph can be expressed as in are N nodes representing human joints; ε is the edge representing the explicit connection between joints (i.e. bones), which can be expressed by the adjacency matrix It means that if v i and v j There are edges connecting them, A i,j =1, otherwise A i,j = 0; the skeleton descriptor calculation takes a set of such graph sequences as input, and its node feature set It can be expressed as a tensor as where x t,n =X t,n,: is the joint point v at time t in the T-frame skeleton graph n The C-dimensional feature vector of is usually the 2D or 3D coordinates of the joint points in the original data; thus the skeleton graph sequence can be described by X and A;

[0031] The relative joint position represents each joint relative to the center joint x of the skeleton. t,c The relative position of the nose is used to normalize the joint position coordinates; the relative joint position set Its corresponding tensor is expressed as where r t,n It can be calculated by the following formula:

[0032] r t,n =x t,n -x t,c (1)

[0033] x t,c Represents the coordinates of the center joint point (nose) of the skeleton;

[0034] The movement speed can be obtained by subtracting the coordinates of the same joint in different frames. This paper calculates the slow movement and fast movement There are two descriptors, and their corresponding tensor representations are in:

[0035]

[0036]

[0037] Bone length available joint x t,n and the joint x connected to it t,adj The bone length set is expressed as the difference in coordinates. Its corresponding tensor is expressed as b t,n It can be calculated by the following formula:

[0038] b t,n =x t,n -x t,adj (4)

[0039] x t,adj Represents the joint x t,n The coordinates of the connected joints;

[0040] Bone angle refers to the angle between the bone and the coordinate axis. Its corresponding tensor is expressed as e t,n It can be calculated by the following formula:

[0041]

[0042] Where ‖·‖ represents the magnitude of the vector; b t,n,: Indicates the bone length b t,n The value of each channel;

[0043] Finally, the tensors corresponding to the original data X and the four descriptors are represented as X R ,X S ,X F ,X B ,X E By splicing according to the channel dimension, we can get the skeleton representation f after enriching the features. in ;

[0044] f in =Concat(X R ,X S ,X F ,X B ,X E ) (6) Among them C in =5C, Concat(·) means concatenation by channel dimension;

[0045] c. Multi-granularity skeleton division: For the skeleton representation of 17 joint points estimated by HRNet, three granularity body part division methods are given, which are recorded as Part-2, Part-3, and Part-5 respectively;

[0046] In Part-2, the joints are divided into two parts: the upper body and the lower body. The joint numbers and names of the upper body are 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear, 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist. The lower body includes 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, 16 right ankle.

[0047] In Part-3, the joints are divided into three parts: head, arms and legs. The head includes 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear. The arms include 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist. The legs include 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, 16 right ankle.

[0048] In the Part-5 division, the joints are divided into five parts: head, left arm, right arm, left leg, and right leg. The head includes 0 nose, 1 left eye, 2 right eye, 3 left ear, and 4 right ear. The left arm includes 5 left shoulder, 7 left elbow, and 9 left wrist. The right arm includes 6 right shoulder, 8 right elbow, and 10 right wrist. The left leg includes 11 left hip, 13 left knee, and 15 left ankle. The right leg includes 12 right hip, 14 right knee, and 16 right ankle.

[0049] Preferably, according to the present invention, in step B, the global spatial feature extraction network is constructed, including:

[0050] d. Natural adjacency matrix construction; in addition to the original adjacency matrix Rich spatial features are also extracted through H-hop adjacency matrix; for the h-hop adjacency matrix A h , which is defined as:

[0051]

[0052] Where d(v i ,v j ) represents the node v in the skeleton graph i To node v j The minimum number of edges passed, h∈{0,…,H-1}; obviously, A0=I, A1=A;

[0053] right After normalization, it is combined with a learnable parameter matrix Multiply element-wise and assign a learnable weight to each connection as the h-th hop natural adjacency matrix

[0054]

[0055]

[0056] Where ⊙ represents element-wise multiplication, D h(i,i) =∑ j A h(i,j) , D h(i,i) It means D h The element in the i-th row and i-th column of ; is the normalized h-hop adjacency matrix;

[0057] e. Self-attention adjacency matrix construction; for dynamic topology construction, input node features C Gin Represents the channel dimension of the input feature. First, it passes through two independent linear layers, then performs matrix multiplication, and then obtains the self-attention matrix after normalization and Softmax function. As a self-attention adjacency matrix:

[0058]

[0059] in, is the learnable parameter matrix of the linear layer. In order to make the model learn rich relationships from different subspaces, the H-head self-attention is calculated. In order to facilitate subsequent calculations, the number of self-attention heads and the number of natural connection hops are taken to be the same value. More preferably, H=4 is taken here. k Represents the channel dimension of the output tensor of the Linear layer.

[0060] f. Perform graph convolution operation; fuse the natural connection adjacency matrix and the self-attention adjacency matrix by adding them together for the final graph convolution operation:

[0061]

[0062] in is the output of the global spatial feature extraction network, C Gout represents the channel dimension of the output feature of the global spatial feature extraction network; σ is the Mish activation function; is the learnable parameter matrix.

[0063] Preferably, according to the present invention, in step C, the local space feature extraction network is constructed, comprising the following steps:

[0064] g. Part feature representation; the present invention uses a hypergraph association matrix to represent the division of body parts; the hypergraph can be defined as in It is a node set consisting of N nodes representing human joints. is a hyperedge set consisting of M hyperedges representing body parts, each hyperedge p m are all node sets consisting of the nodes contained in this body part; the degree matrix of the hyperedge It is a diagonal matrix consisting of the number of nodes contained in each hyperedge; the incidence matrix of the hypergraph Its definition is as follows:

[0065]

[0066] Through the association matrix, the division relationship of body parts in step c can be described;

[0067] For the node features of the input local spatial feature extraction module C Lin The channel dimension of the feature input to the local spatial feature extraction module is first compared with the normalized correlation matrix Multiply and aggregate into hyperedge features

[0068]

[0069] Then multiply the hyperedge feature P by the association matrix H, assign the hyperedge feature to each node it contains, and get the part feature

[0070]

[0071] At this time, f parts Each node in the graph aggregates the features of all nodes in its hyperedge (i.e., body part) and can be used as a representation of the body part;

[0072] h. Part attention calculation: Based on step g, joint-part and part-part attention are designed as two high-order local relationship representations; first, the node feature f Lin and part characteristics f parts Input three linear layers with independent parameters to obtain the joint query tensor Q joints , part query tensor Q parts and the position bond tensor K parts .

[0073] Q joints =f Lin W jq (15)

[0074] Q parts =f parts W pq (16)

[0075] Kparts =f parts W pk (17)

[0076] in are the parameter matrices of the three linear layers; The joint query tensor and the part query tensor are multiplied and then normalized and the Softmax function is used to obtain the joint-part attention adjacency matrix A. VP , multiply the part key tensor and the part query tensor, normalize and apply the Softmax function to get the part-part attention adjacency matrix A PP ;

[0077]

[0078]

[0079] i. Perform graph convolution operation; transform the H head joint-part attention adjacency matrix and H-head part-part attention adjacency matrix Add together for the final graph convolution operation:

[0080]

[0081] where σ(·) is the Mish activation function, is the learnable parameter matrix; C Lout Represents the channel dimension of the network output features.

[0082] Preferably, according to the present invention, in step D, the multi-scale time feature extraction network is constructed, comprising the following steps:

[0083] j. The network structure contains three branches. For each branch, 1D dilated convolution with the same convolution kernel size and different dilation rates is used to extract temporal features of different scales, thereby reducing the increase in parameters caused by using larger convolution kernel sizes. In addition, in order to reduce the computational cost generated by the additional branches, a bottleneck design is introduced. The channel dimension is first reduced by 1×1 convolution, and then the outputs of multi-scale dilated convolutions are spliced ​​according to the channel dimension to restore the original number of channels; for the node features of the input local spatial feature extraction module, C Tin Represents the channel dimension of the features input to the multi-scale temporal feature extraction network. The above process can be expressed as:

[0084] f i =Conv_1D i (Conv i (f Tin )) (twenty one)

[0085] f Tout =Concat(f1,f2,f3) (22)

[0086] Among them, Conv i and Conv_1D i They represent the 1×1 convolution of the i-th branch and the 1-dimensional dilated convolution with different dilation rates respectively; They represent the output of the i-th branch and the final output of the network respectively, and Concat(·) represents concatenation by channel dimension.

[0087] Preferably, according to the present invention, the step E, overall framework training, comprises the following steps:

[0088] k. The features extracted by the last layer of step D network for each branch Perform temporal pooling and spatial pooling operations respectively, T out The time dimension of the feature, C inner Represents the channel dimension of the feature; the pooling process can be expressed by the formula:

[0089]

[0090]

[0091] in Respectively represent the output features of the b-th branch after time and space pooling; TP(·) represents the pooling operation in the time dimension, where the maximum pooling is used; MP(·) and AP(·) represent the maximum and average pooling in the spatial dimension, respectively; Finally, Through two fully connected layers respectively, the output features of this branch used to calculate the triplet loss are obtained and features used to calculate the cross entropy loss C class is the number of categories (i.e. the number of pedestrian identities in the training set), C out Represents the channel dimension of the output feature used to calculate the triplet loss; the output features of each branch are concatenated to obtain the final output features of the network B represents the number of model branches; the above process can be expressed by the formula:

[0092]

[0093]

[0094]

[0095] Among them, FC1(·) and FC2(·) represent fully connected layers, and Concat(·) represents concatenation by branch dimension.

[0096] Further preferably, for the design of the loss function, the present invention uses triplet loss and cross entropy loss to train the model, which improves the convergence speed while ensuring the accuracy of the model. In order to fully retain the discriminative information of each branch, the triplet loss of each branch is calculated independently. and cross entropy loss The average value of all branch losses is used to supervise the model training process. The above process can be expressed as follows:

[0097]

[0098]

[0099] Where B is the total number of branches in the model, and λ is a hyperparameter used to balance the weights of the two losses. represents the loss of the b-th branch; Indicates the final loss.

[0100] The triplet loss is calculated as:

[0101]

[0102] in, is the triplet loss of the b-th branch, N tri Represents the total number of triplets that can be formed in a batch, is the anchor sample gait feature of the bth branch of the i-th triplet in the batch, is the gait feature of the positive sample with the same identity as the anchor sample, is the gait feature of the negative sample with different identity from the anchor sample, d(·) represents the Euclidean distance metric, and m represents the margin of triple loss;

[0103] The cross entropy loss is calculated as:

[0104]

[0105] in, is the cross entropy loss of the b-th branch, represents the output feature of the kth sample in the batch in the bth branch, K is the number of samples in a batch, is the true label, represented by a one-hot vector, and log is the natural logarithm.

[0106] Preferably, according to the present invention, the step F, cross-view gait recognition, comprises:

[0107] m. Send the gait skeleton sequence of the registration set into the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction, and use the final output features of the network in step k as the feature representation of each gait skeleton sequence to obtain the feature database of the registration set;

[0108] n. Send the query sample to be identified that is different from the registered set perspective to the trained cross-perspective gait recognition network based on multi-scale skeleton spatiotemporal feature extraction through the same steps to obtain the query sample features. The Euclidean distance between the query sample features and all the features in the registered set feature database is calculated, and finally the identity of the query sample is identified as the label of the feature with the smallest distance to it in the registered set feature database, and the identity label of the query sample is output to complete the cross-perspective recognition.

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

[0110] 1. The global spatial feature extraction network involved in the present invention combines the natural adjacency matrix based on explicit skeletal connections and the self-attention adjacency matrix based on the self-attention mechanism to fully extract the explicit and implicit global spatial relationships between joint points.

[0111] 2. The local spatial feature extraction network involved in the present invention uses a hypergraph to represent the division of body parts of different granularities, and fully models the high-order local spatial relationships between joints and parts and parts and parts between pairs of joints through the attention mechanism.

[0112] 3. The multi-scale temporal feature extraction network involved in the present invention extracts temporal features of different scales through temporal convolutions with different expansion rates, and introduces a bottleneck design to extract rich temporal features while reducing the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0113] Figure 1a This is a schematic diagram of the division method of body parts Part-2 in the present invention;

[0114] Figure 1b This is a schematic diagram of the division method of body parts Part-3 in the present invention;

[0115] Figure 1c This is a schematic diagram of the division method of body parts Part-5 in the present invention;

[0116] Figure 2 This is a global spatial feature extraction network structure diagram proposed by the present invention;

[0117] Figure 3 This is a schematic diagram of the incidence matrix and hyperedge degree matrix corresponding to Part-5 division in the present invention;

[0118] Figure 4 This is the local space feature extraction network structure diagram proposed by the present invention;

[0119] Figure 5 This is the multi-scale time feature extraction network structure diagram proposed by the present invention;

[0120] Figure 6 This is the overall framework diagram of the cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction proposed in the present invention. DETAILED DESCRIPTION

[0121] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but is not limited thereto.

[0122] Embodiment 1:

[0123] A cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction includes the following steps:

[0124] A. Skeleton Data Preprocessing

[0125] Preprocess the gait skeleton sequence data, including:

[0126] a. Skeleton data enhancement. The skeleton data was enhanced by adding noise and mirror flipping to expand the sample. Specifically, Gaussian noise with a standard deviation of 0.3 was added to the coordinates of each joint point; at the same time, the center of mass coordinate value was obtained by calculating the average value of all the node coordinates in the skeleton graph, and then the coordinates of each joint point were flipped with the center of mass as the center with a probability of 0.1.

[0127] b. Calculation of skeleton descriptors. For the enhanced skeleton image sequence in step a, four skeleton descriptors, namely relative joint position, movement speed, bone length, and bone angle, are calculated and concatenated according to the channel dimension. These different descriptors complement each other to achieve a more complete and accurate skeleton gait representation.

[0128] Specifically, the human skeleton graph can be expressed as in are N nodes representing human joints; ε is the edge representing the explicit connection between joints (i.e. bones), which can be expressed by the adjacency matrix It means that if v i and v j There are edges connecting them, A i,j =1, otherwise A i,j = 0. The skeleton descriptor calculation takes a set of such graph sequences as input, whose node feature set It can be expressed as a tensor as where x t,n =X t,n,: is the joint point v at time t in the T-frame skeleton graph nThe C-dimensional feature vector of , which is usually the 2D or 3D coordinates of the joint points in the original data. In this way, the skeleton graph sequence can be described by X and A.

[0129] The relative joint position represents each joint relative to the center joint x of the skeleton. t,c The relative position of the nose, used to normalize the joint position coordinates. Relative joint position set Its corresponding tensor is expressed as where r t,n It can be calculated by the following formula:

[0130] r t,n =x t,n -x t,c (1)

[0131] The movement speed can be obtained by subtracting the coordinates of the same joint in different frames. This paper calculates the slow movement and fast movement There are two descriptors, and their corresponding tensor representations are in:

[0132]

[0133]

[0134] Bone length available joint x t,n and the joint x connected to it t,adj The bone length set is expressed as the difference in coordinates. Its corresponding tensor is expressed as b t,n It can be calculated by the following formula:

[0135] b t,n =x t,n -x t,adj (4)

[0136] x t,adj Represents the joint x t,n The coordinates of the connected joints;

[0137] Bone angle refers to the angle between the bone and the coordinate axis. Its corresponding tensor is expressed as e t,n It can be calculated by the following formula:

[0138]

[0139] Where ‖·‖ represents the magnitude of the vector; b t,n,: Indicates the bone length b t,n The value of each channel.

[0140] Finally, the tensors corresponding to the original data X and the four descriptors are represented as X R ,X S ,X F ,X B ,X E By splicing according to the channel dimension, we can get the skeleton representation f after enriching the features. in .

[0141] f in =Concat(X R ,X S ,X F ,X B ,X E ) (6) Among them C in =5C, Concat(·) means concatenation by channel dimension.

[0142] c. Multi-granularity skeleton division: For the skeleton representation of the 17 joints estimated by HRNet, three granularity body part division methods are given as shown in Figure 1, which are denoted as Part-2, Part-3, and Part-5 respectively.

[0143] In Part-2, the joints are divided into two parts: the upper body and the lower body. The joint numbers and names of the upper body are 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear, 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist. The lower body includes 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, and 16 right ankle.

[0144] In Part-3 division, the joints are divided into three parts: head, arms and legs. The head includes 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear, the arms include 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist, and the legs include 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, and 16 right ankle.

[0145] In Part-5, the joints are divided into five parts: head (0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear), left arm (5 left shoulder, 7 left elbow, 9 left wrist), right arm (6 right shoulder, 8 right elbow, 10 right wrist), left leg (11 left hip, 13 left knee, 15 left ankle), and right leg (12 right hip, 14 right knee, 16 right ankle).

[0146] B. Global spatial feature extraction network construction

[0147] The global spatial feature extraction network is used to extract explicit and implicit global spatial relationships between joints. For the skeleton sequence data obtained after preprocessing in step A, the natural adjacency matrix based on explicit bone connections and the self-attention adjacency matrix based on the self-attention mechanism are calculated respectively, and they are combined as the adjacency matrix of the graph convolution network for the construction of the global spatial feature extraction network, including:

[0148] d. Natural adjacency matrix construction. In addition to the original adjacency matrix We also extract rich spatial features through H-hop adjacency matrix. h , which is defined as:

[0149]

[0150] Where d(v i ,v j ) represents the node v in the skeleton graph i To node v j The minimum number of edges passed is h∈{0,…,H-1}. Obviously, A0=I, A1=A.

[0151] right After normalization, it is combined with a learnable parameter matrix Multiply element-wise and assign a learnable weight to each connection as the h-th hop natural adjacency matrix

[0152]

[0153]

[0154] Where ⊙ represents element-wise multiplication, D h(i,i) =∑ j A h(i,j) , D h(i,i) It means D h The element in the i-th row and i-th column of ; is the normalized h-hop adjacency matrix.

[0155] e. Self-attention adjacency matrix construction. For the construction of dynamic topology, input node features C Gin Represents the channel dimension of the input feature. First, it passes through two independent linear layers, then performs matrix multiplication, and then obtains the self-attention matrix after normalization and Softmax function. As a self-attention adjacency matrix:

[0156]

[0157] in, is the learnable parameter matrix of the linear layer. In order to make the model learn rich relationships from different subspaces, the H-head self-attention is calculated. In order to facilitate subsequent calculations, the number of self-attention heads and the number of natural connection hops are taken to be the same value, here H = 4. k Represents the channel dimension of the output tensor of the Linear layer.

[0158] f. Perform graph convolution operations. The entire network structure is shown in the attached figure. Figure 2 As shown, the natural connection adjacency matrix and the self-attention adjacency matrix are fused by addition for the final graph convolution operation:

[0159]

[0160] in is the output of the global spatial feature extraction network, C Gout represents the channel dimension of the output feature of the global spatial feature extraction network; σ is the Mish activation function; is the learnable parameter matrix.

[0161] C. Local spatial feature extraction network construction

[0162] The local spatial feature extraction network is used to extract the interaction relationship between body parts of different granularities. For the skeleton sequence data obtained after preprocessing in step A and the multi-granularity skeleton partitioning strategy, the body part partitioning relationship of different granularities is represented by a hypergraph, and the joint-part attention adjacency matrix and the part-part attention adjacency matrix are designed respectively. They are combined as the adjacency matrix of the graph convolution network for the construction of the local spatial feature extraction network, including:

[0163] g. Part feature representation. The present invention uses a hypergraph association matrix to represent the division of body parts. The hypergraph can be defined as in It is a node set consisting of N nodes representing human joints. is a hyperedge set consisting of M hyperedges representing body parts, each hyperedge p m are all node sets consisting of the nodes contained in this body part. The degree matrix of the hyperedge It is a diagonal matrix consisting of the number of nodes contained in each hyperedge. The incidence matrix of the hypergraph Its definition is as follows:

[0164]

[0165] Through the association matrix, we can describe the division relationship of body parts in step c. Taking Part-5 division as an example, Figure 3 The corresponding incidence matrix and hyperedge degree matrix are shown.

[0166] For the node features of the input local spatial feature extraction module C Lin The channel dimension of the feature input to the local spatial feature extraction module is first compared with the normalized correlation matrix Multiply and aggregate into hyperedge features

[0167]

[0168] Then multiply the hyperedge feature P by the association matrix H, assign the hyperedge feature to each node it contains, and obtain the part feature

[0169]

[0170] At this time, f parts Each node in the graph aggregates the features of all nodes in its hyperedge (i.e., body part) and can be used as a representation of the body part.

[0171] h. Part attention calculation. Based on step g, joint-part and part-part attention are designed as two high-order local relationship representations. First, the node feature f Lin and part characteristics f parts Input three linear layers with independent parameters to obtain the joint query tensor Q joints , part query tensor Q parts and the position bond tensor K parts .

[0172] Q joints =f Lin W jq (15)

[0173] Q parts =f parts W pq (16)

[0174] K parts =f parts W pk (17)

[0175] in are the parameter matrices of the three linear layers; The joint query tensor and the part query tensor are multiplied and then normalized and the Softmax function is used to obtain the joint-part attention adjacency matrix A. VP , multiply the part key tensor and the part query tensor, normalize and apply the Softmax function to get the part-part attention adjacency matrix A PP .

[0176]

[0177]

[0178] i. Perform graph convolution operations. The entire network structure is shown in the attached figure. Figure 4 As shown in the figure, the network consists of part feature representation, joint-part and part-part attention calculation, and graph convolution operation, which are described in detail in steps g, h, and i. The H head joint-part attention adjacency matrix and H-head part-part attention adjacency matrix Add together for the final graph convolution operation:

[0179]

[0180] where σ(·) is the Mish activation function, is the learnable parameter matrix, C Lout Represents the channel dimension of the network output features.

[0181] D. Multi-scale temporal feature extraction network construction

[0182] The multi-scale temporal feature extraction network is used to extract multi-scale temporal features. For the global or local spatial features obtained in step B or step C, multi-scale temporal features are extracted through dilated temporal convolutions with different dilation rates. In addition, a bottleneck structure is designed to improve the multi-scale temporal modeling capability while reducing the computational cost, including:

[0183] j. The network structure is shown in the attached Figure 5 The network consists of three branches. For each branch, 1D dilated convolution with the same convolution kernel size and different dilation rates is used to extract temporal features of different scales, thereby reducing the increase in parameters caused by using larger convolution kernel sizes. In addition, in order to reduce the computational cost caused by the additional branches, a bottleneck design is introduced. The channel dimension is first reduced by 1×1 convolution, and then the outputs of multi-scale dilated convolutions are spliced ​​according to the channel dimension to restore the original number of channels. For the node features of the input local spatial feature extraction module C Tin Represents the channel dimension of the features input to the multi-scale temporal feature extraction network. The above process can be expressed as:

[0184] f i =Conv_1D i (Conv i (f Tin )) (twenty one)

[0185] f Tout=Concat(f1,f2,f3) (22)

[0186] Among them, Conv i and Conv_1D i They represent the 1×1 convolution of the i-th branch and the 1-dimensional dilated convolution with different dilation rates respectively; They represent the output of the i-th branch and the final output of the network respectively, and Concat(·) represents concatenation by channel dimension.

[0187] E. Overall framework training

[0188] The overall framework of the model is as follows Figure 6 As shown in Figure 1, it consists of a global branch and several local branches of different granularities. The global branch consists of 4 layers of step B and step D networks alternately stacked to extract global spatiotemporal features, which are then pooled and fully connected to form the final global feature representation. The local branch is similar to the global branch, except that the global spatial feature extraction network of step B is replaced by the local spatial feature extraction network of step C. Residual connections are added between each layer of feature extraction networks to make model optimization easier. The feature output dimensions of each layer of each branch are shown in Table 1.

[0189] Table 1 Feature output dimensions of each layer of the network

[0190] Layer Name Output dimension (T×N×C) Layer-1 60×17×72 Layer-2 60×17×72 Layer-3 60×17×144 Layer-4 60×17×288 Pooling Layer 1×288 Fully connected layer 1 1×74 Fully connected layer 2 1×128

[0191] The triplet loss and cross entropy loss of the global feature representation and the local feature representation of each local branch are calculated independently, and the average of all branch losses is used to supervise the training process of the model, including:

[0192] k. The features extracted by the last layer of step D network for each branch Perform temporal pooling and spatial pooling operations respectively, T out The time dimension of the feature, C inner Represents the channel dimension of the feature; the pooling process can be expressed by the formula:

[0193]

[0194]

[0195] in Respectively represent the output features of the b-th branch after time and space pooling; TP(·) represents the pooling operation in the time dimension, where the maximum pooling is used; MP(·) and AP(·) represent the maximum and average pooling in the spatial dimension, respectively. Through two fully connected layers respectively, the output features of this branch used to calculate the triplet loss are obtained and features used to calculate the cross entropy loss C class is the number of categories (i.e. the number of pedestrian identities in the training set), C out Represents the channel dimension of the output feature used to calculate the triplet loss; the output features of each branch are concatenated to obtain the final output features of the network B represents the number of model branches; the above process can be expressed by the formula:

[0196]

[0197]

[0198]

[0199] Among them, FC1(·) and FC2(·) represent fully connected layers, and Concat(·) represents concatenation by branch dimension.

[0200] For the design of loss function, the present invention uses triple loss and cross entropy loss to train the model, which improves the convergence speed while ensuring the accuracy of the model. In order to fully retain the discriminative information of each branch, the triple loss of each branch is calculated independently. and cross entropy loss The average value of all branch losses is used to supervise the model training process. The above process can be expressed as follows:

[0201]

[0202]

[0203] Where B is the total number of branches in the model, and λ is a hyperparameter used to balance the weights of the two losses. represents the loss of the b-th branch; Indicates the final loss.

[0204] The triplet loss is calculated as:

[0205]

[0206] in, is the triplet loss of the b-th branch, N tri Represents the total number of triplets that can be formed in a batch, is the anchor sample gait feature of the bth branch of the i-th triplet in the batch, is the gait feature of the positive sample with the same identity as the anchor sample, is the gait feature of the negative sample with different identity from the anchor sample, d(·) represents the Euclidean distance metric, and m represents the margin of the triplet loss.

[0207] The cross entropy loss is calculated as:

[0208]

[0209] in, is the cross entropy loss of the b-th branch, represents the output feature of the kth sample in the batch in the bth branch, K is the number of samples in a batch, is the true label, represented by a one-hot vector, and log is the natural logarithm.

[0210] F. Cross-view gait recognition

[0211] The gait skeleton sequences of the registration set and the query set are sent to the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction to extract gait features. The identity of the query sample is identified by comparing the similarity between the query sample features and the registration set features, including:

[0212] m. Send the gait skeleton sequence of the registration set into the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction, and use the final output features of the network in step k as the feature representation of each gait skeleton sequence to obtain the feature database of the registration set;

[0213] n. Send the query sample to be identified that is different from the registered set perspective to the trained cross-perspective gait recognition network based on multi-scale skeleton spatiotemporal feature extraction through the same steps to obtain the query sample features. The Euclidean distance between the query sample features and all the features in the registered set feature database is calculated, and finally the identity of the query sample is identified as the label of the feature with the smallest distance to it in the registered set feature database, and the identity label of the query sample is output to complete the cross-perspective recognition.

[0214] In this embodiment, local branches of Part-2 and Part-5 division methods are used. The number of attention heads of each branch spatial feature extraction network is 4. The convolution kernel size of the temporal convolution in the multi-scale temporal feature extraction network is set to 5, and the expansion rates are 1, 2, and 3, respectively. The loss weight λ is 0.5. The experiment uses the Adam optimizer for training, and the weight decay is set to 2e-5; a single-cycle learning rate scheduler is used, and the initial learning rate, maximum learning rate, and final learning rate are set to 1e-5, 1e-3, and 1e-8, respectively, and the proportion of the rising part of the learning rate is 0.475; the number of iterations is 40,000 times. In the training phase, 60 consecutive frames are randomly selected as input for each preprocessed gait skeleton sequence, and the batch size is (64, 4); in the testing phase, the gait skeleton sequences of all preprocessed frames are used to obtain the final feature representation, and the Rank-1 accuracy is selected to measure the accuracy of the model's gait recognition performance.

[0215] In order to verify the advancedness of the cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction proposed in the present invention, the present invention is compared with 7 advanced skeleton-based gait recognition methods, including PoseGait, JointsGait, GaitGraph, MSGG, SDHF-GCN, CycleGait and GPGait. CASIA-B is one of the most widely used cross-view gait datasets, so the present invention conducts sufficient experiments on the CASIA-B dataset. The dataset collects gait samples of 124 subjects in a laboratory environment, and each subject includes 110 gait sequences obtained from 11 camera viewing angles (0°, 18°, ..., 180°). For each viewing angle, each subject has 10 sequences of 3 walking conditions, namely 6 normal walking sequences (NM01, NM02, NM03, NM04, NM05, NM06), 2 backpack walking sequences (BG01, BG02) and 2 coat walking sequences (CL01, CL02). The training and testing of this embodiment on this data set follow the commonly used large sample training settings, that is, all sequences of the first 74 subjects are used as training sets, and the sequences of the remaining 50 subjects are used as test sets. In the test phase, the first 4 normal walking gait sequences (NM01, NM02, NM03, NM04) of each subject in each perspective are the registration set, and the remaining sequences (NM05, NM06, BG01, BG02, CL01, CL02) are the query sets. This embodiment uses HRNet to estimate the skeleton data of 17 joints from the RGB video provided by the CASIA-B data set. Table 2 lists the cross-view gait recognition accuracy of the present invention and other 7 advanced gait recognition methods under normal walking, backpack walking and wearing a coat. The accuracy here is the average Rank-1 accuracy of each query perspective under other registered perspectives excluding the same perspective.

[0216] It can be seen from Table 2 that the method of the present invention achieves the best cross-view recognition effect under all walking conditions, with the average recognition accuracy reaching 95.4%, 89.4% and 87.8% respectively.

[0217] Table 2 Cross-view recognition Rank-1 accuracy of different query perspectives in CASIA-B database (%)

[0218]

Claims

1. A cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction, characterized in that: The steps include: A. Skeleton Data Preprocessing Preprocess the gait skeleton sequence data, including skeleton data enhancement, skeleton descriptor calculation, and multi-granularity skeleton division strategy; B. Global spatial feature extraction network construction The global spatial feature extraction network is used to extract explicit and implicit global spatial relationships between joints. For the skeleton sequence data obtained after preprocessing in step A, the natural adjacency matrix based on explicit bone connection and the self-attention adjacency matrix based on the self-attention mechanism are calculated respectively, and they are combined as the adjacency matrix of the graph convolution network for the construction of the global spatial feature extraction network. C. Local spatial feature extraction network construction The local spatial feature extraction network is used to extract the interaction relationship between body parts of different granularities. For the skeleton sequence data and multi-granularity skeleton partitioning strategy obtained after preprocessing in step A, the body part partitioning relationship of different granularities is represented by a hypergraph, and the joint-part attention adjacency matrix and the part-part attention adjacency matrix are designed respectively. They are combined together as the adjacency matrix of the graph convolutional network for the construction of the local spatial feature extraction network. D. Multi-scale temporal feature extraction network construction The multi-scale temporal feature extraction network is used to extract multi-scale temporal features; for the global or local spatial features obtained in step B or step C, the multi-scale temporal features are extracted by dilated temporal convolutions with different dilation rates; in addition, a bottleneck structure is designed; In step D, a multi-scale temporal feature extraction network is constructed, including the following steps: j. The network structure consists of three branches. For each branch, 1D dilated convolution with the same convolution kernel size and different dilation rates is used to extract temporal features of different scales. A bottleneck design is introduced. The channel dimension is first reduced by 1×1 convolution, and then the outputs after multi-scale dilated convolution are spliced ​​according to the channel dimension to restore the original number of channels. For the node features of the input local spatial feature extraction module, C Tin Represents the channel dimension of the features input into the multi-scale temporal feature extraction network; the above process is expressed by the formula: f i =Conv_1D i (Conv i (f Tin )) (21) f Tout =Concat(f1,f2,f3) (22) Among them, Conv i and Conv_1D i They represent the 1×1 convolution of the i-th branch and the 1D dilated convolution with different dilation rates respectively; They represent the output of the i-th branch and the final output of the network respectively, and Concat(·) represents concatenation by channel dimension; E. Overall framework training The overall framework of the model includes a global branch and several local branches of different granularities. The global branch is composed of several step B and step D networks alternately stacked to extract global spatiotemporal features, which are then pooled and fully connected as the final global feature representation; the local branch is composed of several step C and step D networks alternately stacked to extract local spatiotemporal features, which are then pooled and fully connected as the final local feature representation; residual connections are added between each layer of feature extraction networks, and the names of each layer of each branch are Layer-1, Layer-2, Layer-3, Layer-4, pooling layer, fully connected layer 1, and fully connected layer 2. The feature output dimensions (T×N×C) of each layer of each branch are 60×17×72, 60×17×72, 60×17×144, 60×17×288, 1×288, 1×74, and 1×128 respectively; Independently calculate the triplet loss and cross entropy loss of the global feature representation and the local feature representation of each local branch, and use the average of all branch losses to supervise the model training process; The step E, overall framework training, includes the following steps: k. The features extracted by the last layer of step D network for each branch Perform temporal pooling and spatial pooling operations respectively, T out The time dimension of the feature, C inner Represents the channel dimension of the feature; the pooling process is expressed by the formula: in Respectively represent the output features of the b-th branch after time and space pooling; TP(·) represents the pooling operation in the time dimension, using maximum pooling; NP(·) and AP(·) represent the maximum and average pooling in the spatial dimension, respectively; Finally, Through two fully connected layers respectively, the output features of this branch used to calculate the triplet loss are obtained and features used to calculate the cross entropy loss C class is the number of pedestrian identities in the training set, C out Represents the channel dimension of the output feature used to calculate the triplet loss; the output features of each branch are concatenated to obtain the final output features of the network B represents the number of model branches; the above process is expressed by the formula: Among them, FC1(·) and FC2(·) represent fully connected layers, and Concat(·) represents concatenation by branch dimension; F. Cross-view gait recognition The gait skeleton sequences of the registration set and the query set are sent to the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction to extract gait features, and the identity of the query sample is completed by comparing the similarity between the features of the sample to be queried and the features of the registration set.

2. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 1 is characterized in that: In step A, the gait skeleton sequence data is preprocessed, including the following steps: a. Skeleton data enhancement: The skeleton data is enhanced by adding noise and mirror flipping to expand the sample. Specifically, Gaussian noise with a standard deviation of 0.3 is added to the coordinates of each joint point. At the same time, the center of mass coordinate value is obtained by calculating the average value of the coordinates of all relevant nodes in the skeleton graph, and then the coordinates of each joint point are flipped with the center of mass as the center with a probability of 0.

1. b. Skeleton descriptor calculation; For the enhanced skeleton image sequence in step a, four skeleton descriptors, namely relative joint position, motion speed, bone length and bone angle, are calculated and concatenated according to the channel dimension, so that these different descriptors complement each other. Specifically, the human skeleton graph is represented as in There are N nodes representing human joints; ε is the edge representing the explicit connection between joints, using the adjacency matrix It means that if v i and v j There are edges connecting A i,j =1, otherwise A i,j = 0; the skeleton descriptor calculation takes a set of such graph sequences as input, and its node feature set The tensor is represented as where x t,n =X t,n,: is the joint point v at time t in the T-frame skeleton graph n The c-dimensional feature vector is the two-dimensional or three-dimensional coordinates of the joint points in the original data; thus, the skeleton graph sequence is described by X and A; The relative joint position represents each joint relative to the center joint x of the skeleton. t,c The relative position of is used to normalize the joint position coordinates; Relative joint position set Its corresponding tensor is expressed as where r t,n Calculated by the following formula: r t,n =x t,n -x t,c (1) x t,c Represents the coordinates of the center joint point of the skeleton; The movement speed is obtained by subtracting the coordinates of the same joint in different frames to calculate slow movement and fast movement There are two descriptors, and their corresponding tensor representations are in: Bone length in joint x t,n and the joint x connected to it t,adj The bone length set is expressed as the difference in coordinates. Its corresponding tensor is expressed as b t,n Calculated by the following formula: b t,n =x t,n -x t,adj (4) x t,adj Represents the joint x t,n The coordinates of the connected joints; Bone angle refers to the angle between the bone and the coordinate axis. Its corresponding tensor is expressed as e t,n Calculated by the following formula: where ||·|| represents the magnitude of the vector; b t,n, Indicates the bone length b t,n The value of each channel; Finally, the tensors corresponding to the original data X and the four descriptors are represented as X R , X s , X F , X B , X E Concatenate by channel dimension to get the skeleton representation f after enriching features in ; f in =Concat(X R ,X s ,X F ,X B ,X E ) (6) in C in =5C, Concat(·) means concatenation by channel dimension; c. Multi-granularity skeleton division: For the skeleton representation of 17 joints, three granularity body part division methods are given, which are recorded as Part-2, Part-3, and Part-5 respectively; In Part-2, the joints are divided into two parts: the upper body and the lower body. The joint numbers and names of the upper body are 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear, 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist. The lower body includes 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, 16 right ankle. In Part-3, the joints are divided into three parts: head, arms and legs. The head includes 0 nose, 1 left eye, 2 right eye, 3 left ear, 4 right ear. The arms include 5 left shoulder, 6 right shoulder, 7 left elbow, 8 right elbow, 9 left wrist, 10 right wrist. The legs include 11 left hip, 12 right hip, 13 left knee, 14 right knee, 15 left ankle, 16 right ankle. In the Part-5 division, the joints are divided into five parts: head, left arm, right arm, left leg, and right leg. The head includes 0 nose, 1 left eye, 2 right eye, 3 left ear, and 4 right ear. The left arm includes 5 left shoulder, 7 left elbow, and 9 left wrist. The right arm includes 6 right shoulder, 8 right elbow, and 10 right wrist. The left leg includes 11 left hip, 13 left knee, and 15 left ankle. The right leg includes 12 right hip, 14 right knee, and 16 right ankle.

3. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 1 is characterized in that: In step B, the global spatial feature extraction network is constructed, including: d. Natural adjacency matrix construction; in addition to the original adjacency matrix Rich spatial features are also extracted through H-hop adjacency matrix; for the h-hop adjacency matrix A h , which is defined as: Where d(v i , v j ) represents the node v in the skeleton graph i To node v j The minimum number of edges passed, h∈{0,...,H-1}; obviously, A0=I, A1=A; right After normalization, it is combined with a learnable parameter matrix Multiply element-wise and assign a learnable weight to each connection as the h-th hop natural adjacency matrix Where ⊙ represents element-wise multiplication, D h(i,i) =∑ j A h(i,j) , D h(i,i) It means D h The element in the i-th row and i-th column of ; is the normalized h-hop adjacency matrix; e. Self-attention adjacency matrix construction; for dynamic topology construction, input node features C Gin Represents the channel dimension of the input feature. First, it passes through two independent linear layers, then performs matrix multiplication, and then obtains the self-attention matrix after normalization and Softmax function. As a self-attention adjacency matrix: in, is the learnable parameter matrix of the linear layer, calculating the self-attention of the H head h∈{0,...,H-1}, the number of self-attention heads and the number of natural connection hops are the same, C k Represents the channel dimension of the output tensor of the linear layer; f. Perform graph convolution operation; fuse the natural connection adjacency matrix and the self-attention adjacency matrix by adding them together for the final graph convolution operation: in is the output of the global spatial feature extraction network, C Gout represents the channel dimension of the output feature of the global spatial feature extraction network; σ is the Mish activation function; is the learnable parameter matrix.

4. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 3 is characterized in that: In step e, take H=4.

5. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 1 is characterized in that: In step C, the local spatial feature extraction network is constructed, including the following steps: g. Part feature representation; use the hypergraph association matrix to represent the division of body parts; the hypergraph is defined as in It is a node set consisting of N nodes representing human joints. is a hyperedge set consisting of M hyperedges representing body parts, each hyperedge p m are all node sets consisting of the nodes contained in this body part; the degree matrix of the hyperedge It is a diagonal matrix consisting of the number of nodes contained in each hyperedge; the incidence matrix of the hypergraph Its definition is as follows: Describe the division relationship of body parts in step c through the association matrix; For the node features of the input local spatial feature extraction module C Lin The channel dimension of the feature input to the local spatial feature extraction module is first compared with the normalized correlation matrix Multiply and aggregate into hyperedge features Then multiply the hyperedge feature P by the association matrix H, assign the hyperedge feature to each node it contains, and obtain the part feature At this time, f parts Each node in the graph aggregates the features of all nodes in its hyperedge as a representation of the body part; h. Part attention calculation: Based on step g, joint-part and part-part attention are designed as two high-order local relationship representations; first, the node feature f Lin and part characteristics f parts Input three linear layers with independent parameters to obtain the joint query tensor Q joints , part query tensor Q parts and the position bond tensor K parts ; Q joints =f Lin W jq (15) Q parts =f parts W pq (16) K parts =f parts W pk (17) in are the parameter matrices of the three linear layers; The joint query tensor and the part query tensor are multiplied and then normalized and the Softmax function is used to obtain the joint-part attention adjacency matrix A. VP , multiply the part key tensor and the part query tensor, normalize and apply the Softmax function to get the part-part attention adjacency matrix A PP ; i. Perform graph convolution operation; transform the H head joint-part attention adjacency matrix and H-head part-part attention adjacency matrix Add together for the final graph convolution operation: where σ(·) is the Mish activation function, is the learnable parameter matrix; C Lout Represents the channel dimension of the network output features.

6. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 1 is characterized in that: For the design of loss function, triplet loss and cross entropy loss are used to train the model, and the triplet loss of each branch is calculated independently. and cross entropy loss And use the average of all branch losses to supervise the model training process; the above process is expressed as follows: Where B is the total number of branches in the model, and λ is a hyperparameter used to balance the weights of the two losses. represents the loss of the b-th branch; Indicates the final loss; The triplet loss is calculated as: in, is the triplet loss of the b-th branch, N tri Represents the total number of triplets that can be formed in a batch, is the anchor sample gait feature of the bth branch of the i-th triplet in the batch, is the gait feature of the positive sample with the same identity as the anchor sample, is the gait feature of the negative sample with different identity from the anchor sample, d(·) represents the Euclidean distance metric, and m represents the margin of triple loss; The cross entropy loss is calculated as: in, is the cross entropy loss of the b-th branch, represents the output feature of the kth sample in the batch in the bth branch, K is the number of samples in a batch, is the true label, represented by a one-hot vector, and log is the natural logarithm.

7. The cross-view gait recognition method based on multi-scale skeleton spatiotemporal feature extraction according to claim 1 is characterized in that: The step F, cross-view gait recognition, comprises: m. Send the gait skeleton sequence of the registration set into the trained cross-view gait recognition network based on multi-scale skeleton spatiotemporal feature extraction, and use the final output features of the network in step k as the feature representation of each gait skeleton sequence to obtain the feature database of the registration set; n. Send the query sample to be identified, which is different from the registration set perspective, into the trained cross-perspective gait recognition network based on multi-scale skeleton spatiotemporal feature extraction through the same steps to obtain the query sample features; calculate the Euclidean distance between the query sample features and all the features in the registration set feature database, and finally identify the identity of the query sample as the label of the feature with the smallest distance to it in the registration set feature database, output the identity label of the query sample, and complete cross-perspective recognition.