A cross-view gait recognition method based on adversarial domain adaptive learning
Through the adversarial domain adaptive learning method, the problem of perspective change interference in cross-view gait recognition is solved, more robust and efficient gait feature extraction and recognition is achieved, and the performance of cross-view gait recognition is improved.
Patent Information
- Application Number
- CN202310711768.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2043-06-15
AI Technical Summary
Existing cross-view gait recognition methods have poor performance when dealing with unknown viewing angles, and methods based on decoupled learning severely damage the spatio-temporal related information of gait sequences, limiting recognition performance.
Adopting a method based on adversarial domain adaptive learning, through gait sample preprocessing, perspective-level subdomain division, embedded hierarchical feature aggregation strategy, perspective change adversarial elimination module and metric learning module, a cross-view gait recognition network is constructed, using adversarial Training reduces the interference of perspective changes and enhances feature expression capabilities.
It effectively eliminates the interference of viewing angle changes, improves the robustness and discriminability of gait recognition, and improves the performance of cross-viewing gait recognition, especially the recognition accuracy under different viewing angles.
Smart Images

Figure CN116704612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cross-view gait recognition method based on adversarial domain adaptive learning, and belongs to the technical field of deep learning and pattern recognition. Background Art
[0002] Gait is a physical and behavioral biometric that describes the human walking pattern. Compared with other traditional biometrics such as face, fingerprint and iris, gait can be easily captured in long-distance and non-cooperative scenarios, and it is difficult to disguise. Therefore, gait has a high application potential in the fields of monitoring and security, and gait recognition technology has received increasing attention. However, in real scenes, gait recognition is affected by many external factors, such as clothing, carrying conditions and changes in camera perspective. Among them, perspective change is one of the most important factors affecting gait recognition performance, because different perspectives will bring huge differences in appearance.
[0003] Traditional cross-view gait recognition is mainly based on transformation learning between viewpoints, which has produced encouraging performance improvements. However, this direct viewpoint conversion is constrained by the transformation model based on the current known camera viewpoint and cannot be well extended to handle gait recognition in unknown viewpoint situations.
[0004] In recent years, cross-view gait recognition methods based on deep learning have emerged, and they are committed to eliminating the influence of viewpoint changes. These methods can be divided into two categories, namely those based on forced learning and those based on decoupled learning. The first category of methods aims to learn discriminative gait representations that are independent of viewpoint changes from gait training data mixed with different viewpoints through robust spatiotemporal modeling regardless of viewpoint differences. The second category of methods aims to separate viewpoint information from other features of gait in a decoupled manner to eliminate their interference, so that the model can best learn gait features that are independent of camera viewpoint. Compared with traditional transformation-based methods, elimination-based methods show better performance advantages and are more flexible and can be well generalized to different viewpoints. However, the current viewpoint elimination-based methods still have the following disadvantages: 1) In forced learning, the viewpoint itself, that is, explicit viewpoint estimation or modeling of a specific viewpoint, is ignored and underestimated to a certain extent. 2) Decoupled learning relies on the decomposition and synthesis of gait sequences. Current methods based on decoupled learning either decompose and synthesize single-frame images in a gait sequence, or directly integrate the entire gait sequence into a single-frame template (such as GEI) and then perform decomposition and synthesis operations. This inevitably destroys the spatiotemporal correlation information in the gait sequence and limits the performance of gait recognition.
[0005] Therefore, how to better utilize the perspective information for elimination and fully explore the spatiotemporal information in the gait sequence is the key to improving the performance of cross-perspective gait recognition based on deep perspective elimination. 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 adversarial domain adaptive learning. Summary of the invention:
[0008] A cross-view gait recognition method based on adversarial domain adaptive learning, including gait sample preprocessing, gait view-level sub-domain division, feature extractor construction embedded with hierarchical feature aggregation strategy, view change adversarial elimination module design, metric learning module design, overall framework adversarial training and cross-view gait recognition.
[0009] In order to avoid the interference caused by different scales of gait sequences, the gait samples are processed with contour correction as input data. In order to make full use of the perspective change information and eliminate it, the gait samples under different perspectives are regarded as subdomains from different perspective levels, and the perspective change is regarded as the domain change between subdomains. In order to fully mine the spatiotemporal information of gait samples from different subdomains, a hierarchical feature aggregation strategy is designed and embedded in the skeleton network to construct the gait feature extractor. By organically aggregating the spatiotemporal features of each stage of the network, a more comprehensive and complementary spatiotemporal representation of gait is obtained, which effectively enhances the feature expression ability of the network. In order to eliminate the interference of perspective change and obtain a more robust local gait feature representation, a perspective change adversarial elimination module is designed to perform subdomain adaptive learning of perspective adversarial gait features of different subdomains obtained by the feature extractor to reduce the differences between subdomains. At the same time, in order to ensure the discriminative feature representation ability of the entire framework, a metric learning module is designed. On the basis of the subdomain adversarial learning loss, the triple loss and cross entropy loss are used to perform model adversarial training of the entire framework, and finally the trained model is used for cross-perspective gait recognition.
[0010] Terminology explanation:
[0011] 1. CASIA-B database: It is a widely used gait dataset with a total of 124 subjects. Each subject has 110 gait sequences, and these 110 sequences are collected under three walking conditions, namely normal conditions (NM) (6 groups, indexed as NM#01-06), backpack conditions (BG) (2 groups, indexed as BG#01-02), and wearing coats (CL) (2 groups, indexed as CL#01-02). Each group is collected at 11 different viewing angles at the same time, namely (0°-180°, interval 18°). Therefore, the CASIA-B database contains a total of 124*(6+2+2)*10=13640 gait silhouette sequences.
[0012] 2. OUISIR database: is a gait dataset with more subjects. It consists of 4007 subjects, including 2135 males and 1872 females, aged between 1 and 94 years old. Under normal walking conditions, 2 sets of gait sequences of each subject were collected, one set (indexed as #01) was used as the registration dataset, and the other set (indexed as #02) was used as the query dataset, and each set contained gait silhouette sequences collected under 4 different viewing angles (55°, 65°, 75°, 85°).
[0013] 3. Registration data set (gallery): refers to the data set consisting of gait samples with known labels that are entered in advance.
[0014] 4. Probe: refers to the data set consisting of gait samples to be identified and used as test input.
[0015] 5. Gait recognition: refers to comparing each sample in the query dataset with all samples in the registration dataset, and identifying the sample in the query dataset as the sample label closest to the registration dataset.
[0016] 6. Cross-view gait recognition: refers to the gait samples in the registration dataset and the query dataset being collected under different viewpoints, and the gait samples under a known single viewpoint in the registration dataset are used for comparison to realize the recognition of the query dataset collected under different viewpoints.
[0017] The technical solution of the present invention is as follows:
[0018] A cross-view gait recognition method based on adversarial domain adaptive learning includes the following steps:
[0019] (1) Build the entire adversarial domain adaptive learning network and train it, including:
[0020] A. Gait profile preprocessing
[0021] Perform contour correction on the gait contour image so that the human body contour is located at the center of the image, and adjust the size of the corrected gait contour image;
[0022] B. Gait perspective-level sub-domain division
[0023] According to different perspectives, the gait samples under different perspectives in a single gait database are divided into sub-domains at different perspective levels; the statistical distribution differences caused by perspective changes are regarded as domain shifts between sub-domains.
[0024] C. Building a feature extractor with a hierarchical feature aggregation strategy
[0025] The feature extractor consists of a base branch, a hierarchical feature aggregation branch, and a feature mapping head;
[0026] The gait sequence inputs of different subdomains first enter the basic branch for basic spatiotemporal feature extraction. The outputs of different network stages of the basic branch are then sent to the hierarchical feature aggregation branch for comprehensive global spatiotemporal feature extraction. Finally, the output of the hierarchical feature aggregation branch enters the feature mapping head to obtain the final part-based fine-grained gait representation.
[0027] D. Constructing a perspective change countermeasure elimination module
[0028] The view change adversarial elimination module includes multiple view-specific discriminators embedded with gradient reversal layers and an adversarial optimization objective involving the feature extractor and the view-specific discriminator;
[0029] For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, an adversarial optimization objective is designed to simultaneously train the feature extractor embedded with the hierarchical feature aggregation strategy and the specific view discriminator in the view change adversarial elimination module in a minimum-maximum manner;
[0030] E. Constructing the Metric Learning Module
[0031] The metric learning module includes grouped triplet loss and cross entropy loss;
[0032] For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, the feature extractor is trained using both the grouped triplet loss and the cross entropy loss;
[0033] F. Network adversarial training based on adversarial domain adaptive learning
[0034] The entire adversarial domain adaptive learning-based network includes a feature extractor embedded with a hierarchical feature aggregation strategy, a viewpoint change adversarial elimination module, and a metric learning module;
[0035] For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, the adversarial optimization objective in step D and the grouped triple loss and cross entropy loss in step E are combined to train the feature extractor;
[0036] (2) Cross-view gait recognition
[0037] After obtaining the gait profile sequence of the identity to be identified and preprocessing the gait profile as described in step A, the gait profile sequence of the identity to be identified is sent to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain gait features, and the identity of the sample to be tested is completed by comparing the feature similarity with the registered data set.
[0038] Preferably, according to the present invention, in step A, a gait profile sequence is acquired through the CASIA-B database and the OUISIR database.
[0039] Preferably, according to the present invention, step A, gait profile preprocessing, refers to: performing the following processing on each gait profile sequence:
[0040] a. Read each gait profile sequence, place the part including the pedestrian at the center of each frame image, and correct the image so that the pedestrian's head is placed at the top edge of the image and the foot is placed at the bottom edge of the image;
[0041] b. Adjust the corrected gait contour sequence obtained in step a to the same image size H×W to obtain the final processed pedestrian contour sequence, where H and W represent the height and width of the adjusted image, respectively.
[0042] Preferably, according to the present invention, the step B, gait perspective level sub-domain division, comprises:
[0043] The gait silhouette dataset obtained by step A is divided into a training set and a test set. For the labeled gait training set X, it is divided into V sub-domains at different perspective levels according to different perspectives. Where subdomain X v Each gait sample in Each has a corresponding identity tag N v and P v Respectively represent subdomain X v The total number of gait samples and IDs included;
[0044] Preferably, according to the present invention, the step C, constructing a feature extractor embedded with a hierarchical feature aggregation strategy, comprises:
[0045] The basic branch includes an initial layer and three stacked 3D convolution blocks; the initial layer includes two 3D convolution layers, which are used to perform preliminary spatiotemporal feature extraction on the input gait profile sequence; the three stacked 3D convolution blocks use the output features of the initial layer as input to extract spatiotemporal information at different stages;
[0046] The hierarchical feature aggregation branch includes multiple cross-stage attention aggregation blocks and a feature fusion from low to high stages. The cross-stage attention aggregation block is used to alleviate the distribution differences and semantic misalignment of heterogeneous features in different network stages. The feature fusion from low to high stages is used to fuse the local detail information of the low stage with the semantic representation of the high stage to obtain a more complementary and comprehensive spatiotemporal feature representation.
[0047] The feature map head consists of a horizontal split operation (HS), a generalized average pooling operation (GeM) and grouped fully connected mapping operations.
[0048] The cross-stage attention aggregation block consists of two learnable parameters σ1 and σ2, a cross-stage attention derivative operation Wm and a cross-stage attention aggregation operation W a ; For input x from any subdomain, x∈X v ; First, the general spatiotemporal features of two adjacent stages in the basic branch are preliminarily combined through learnable parameters, as shown in formula (I):
[0049]
[0050] In formula (I), is the output of element-wise weighted addition; represents the features extracted by the basic branch in stage l, represents the features of the previous attention aggregation of the l-1th stage in the hierarchical feature aggregation branch, 1 <l≤n,C l 、T l , H l , W l Respectively represent characteristics The number of channels, frames, height and width;
[0051] Then, a representation The soft attention mask m of the importance of each position in l It is generated by the cross-stage attention derivative operation and is expressed as shown in formula (II):
[0052]
[0053] In formula (II), W m It includes a channel pooling, a 3D convolution layer with a kernel size of 3×3×3, and a sigmoid layer; the generated soft attention mask m l Further guidance a Perform deep cross-stage attention aggregation to obtain aggregated features Indicates that after cross-stage attention aggregation The number of channels is expressed as shown in formula (III):
[0054]
[0055] In formula (III), and ⊙ represent element-by-element addition and element-by-element multiplication, respectively. a Includes a 3D convolutional layer with a kernel size of 3×3×3 and a Leaky Relu layer;
[0056] The output of each cross-stage attention aggregation block is adjusted using the bottle neck layer and concatenated by channel, and finally a maximum pooling operation is used to generate the final global spatiotemporal feature representation F c ∈RC'×H'×W' , C', H', W' represent the global spatiotemporal features F c The number of channels, height and width are expressed as shown in formula (IV):
[0057]
[0058] In formula (IV), MP represents the maximum pooling operation, and n represents the number of cross-stage attention aggregation blocks;
[0059] In the feature mapping head, first, the global spatiotemporal features F output by the hierarchical feature aggregation branch are c The horizontal direction is divided into H' part-based strip spaces, and generalized average pooling is used to extract refined features from each horizontal strip space, as shown in formula (V):
[0060] F GeM =W GeM (F c ') (V)
[0061] In formula (V), is a part-based fine-grained feature after generalized average pooling operation, where Indicates F GeM Each part-based fine-grained feature in the strip space, W GeM (·) represents generalized average pooling, F c '∈R C'×H'×W' Represents the features after horizontal segmentation;
[0062] Then, F GeM Each horizontal strip feature The grouped fully connected layer is used to map it to a more discriminative representation space, as shown in formula (VI):
[0063] F FM =W SFC (F GeM ) (VI)
[0064] In formula (VI), Represents the output after grouping feature mapping, W SFC Represents a fully connected mapping operation for a group.
[0065] Preferably, according to the present invention, step D, constructing a viewing angle change resistance elimination module, comprises:
[0066] For each subdomain of a specific view, a binary discriminator with a gradient reversal layer embedded in the head is constructed, i.e., a specific view discriminator with a gradient reversal layer embedded in the head, to discriminate all the obtained part-based fine-grained features F GeMIs it from this subdomain or other subdomains? Therefore, there are V binary discriminators in total, and the parameters of all gradient reversal layers are shared;
[0067] For all acquired part-based fine-grained features F GeM , construct an adversarial optimization objective between a feature extractor and a specific view discriminator embedded with a hierarchical feature aggregation strategy, by minimizing the loss of the specific view discriminator, so that the specific view discriminator can distinguish whether each part-based fine-grained gait feature input comes from a specific subdomain, and at the same time, maximize the loss of the specific view discriminator to fine-tune the feature extractor to produce gait features that can confuse the view discriminator;
[0068] Specifically, for a parameter The view-specific discriminator D v , all part-based fine-grained features of sample input x After normalization, they are first input into D through the gradient reversal layer (GRL) v , the corresponding output is sent to a softmax layer to obtain a two-dimensional probability output z∈R 2 , as shown in formula (VII):
[0069]
[0070] In formula (VII), Represents the softmax function, the sample input x has a total of H' probability outputs;
[0071] Subsequently, the view-specific discriminator is trained by defining a binary cross entropy loss over all part-based fine-grained features, expressed as shown in Equation (VIII):
[0072]
[0073] In formula (VIII), G F represents a feature extractor embedded with a hierarchical feature aggregation strategy, L BCE represents the binary cross entropy loss, and <·> represents the average of the subscript set; the joint minimization optimization objective of all specific view discriminators is shown in formula (IX):
[0074]
[0075] Optimize feature extractor G F The maximization objective function is shown in formula (X):
[0076]
[0077] Preferably, in step E of the present invention, a metric learning module is constructed, which enhances the discriminability of gait representation by minimizing the distance between gait samples from different view level subdomains but belonging to the same ID, including grouped triplet loss and cross entropy loss; comprising:
[0078] c. Use triplet loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the triple loss. The loss function is specifically shown in formula (XI) and formula (XII):
[0079]
[0080]
[0081] In formula (XI) and formula (XII), (P,U) represents the number of subjects in a mini-batch and the number of gait profile sequences for each subject, N tri represents the number of non-zero items in the loss, H' represents the number of fine-grained features based on the part after horizontal partitioning, and m represents the margin of the triple loss. represents the h-th level feature of the u-th gait profile sequence of the p-th subject, represents the h-th level feature of the a-th gait profile sequence of the p-th subject, represents the h-th level feature of the c-th gait profile sequence of the b-th subject, d + and d - are the Euclidean distances between positive and negative samples, respectively;
[0082] d. Use cross entropy loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the cross entropy loss. The loss function is specifically shown in formula (XIII):
[0083]
[0084] In formula (XIII), N = PU represents the total number of gait profile sequences in a mini-batch, and Respectively The true identity label and predicted identity label.
[0085] Preferably, according to the present invention, step F, training the entire network based on adversarial domain adaptive learning, comprises:
[0086] The overall objective function of the entire adversarial domain adaptive learning network is trained by combining the adversarial optimization objective with the group triplet loss and the cross entropy loss. The overall objective function is shown in Formula (XIV):
[0087]
[0088] In formula (XIV), β is a trade-off parameter used to adjust the two optimization objectives of model discriminative learning and perspective change elimination.
[0089] Preferably, according to the present invention, in step (2), the gait profile sequence is obtained by segmenting a pedestrian video captured by a camera in an actual scene.
[0090] Preferably, according to the present invention, step (2), cross-view gait recognition, includes:
[0091] e. According to the trained whole network based on adversarial domain adaptive learning, the registered data set is sent to the trained whole network based on adversarial domain adaptive learning after step A, and the H' part-based fine-grained features output by the trained feature extractor embedded with hierarchical feature aggregation strategy are cascaded as the overall feature representation of each gait profile sequence, and finally the feature database of the registered data set is obtained;
[0092] f. After step A, the samples in the query data set to be identified are sent to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain the features of the query data set; the Euclidean distance is calculated between each gait sample feature in the query data set and all the features in the registration data set obtained in step e, and finally the query sample is identified as the label of the feature in the registration data set with the smallest Euclidean distance, and the identity label of the query sample is output to complete the identification.
[0093] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a cross-view gait recognition method based on adversarial domain adaptive learning are implemented.
[0094] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a cross-view gait recognition method based on adversarial domain adaptive learning.
[0095] The beneficial effects of the present invention are:
[0096] 1. The cross-view gait recognition based on adversarial domain adaptive learning proposed in the present invention is different from the previous methods based on perspective conversion or perspective elimination. It transforms the interference problem of perspective change in cross-view gait recognition into a sub-domain adaptation problem at the perspective level, and uses a new sub-domain alignment method, so that the network can fully mine the spatiotemporal information in the gait sequence while effectively eliminating the interference of perspective changes.
[0097] 2. The feature extractor with a hierarchical feature aggregation strategy proposed in this invention realizes a more comprehensive and comprehensive spatiotemporal feature extraction of gait profile sequences. By introducing a multi-level attention aggregation mechanism, the local detail information extracted by the shallow layer of the network and the high-level semantic representation can be effectively aggregated, effectively enhancing the network's ability to extract discriminative gait features.
[0098] 3. The perspective change adversarial elimination module proposed in the present invention effectively alleviates the impact of perspective change in cross-perspective gait recognition through adversarial learning between multiple perspective-level subdomains. At the same time, the simple adversarial optimization method of this module promotes the realization and end-to-end training of the entire network, which is conducive to further improving the robustness of gait features. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] Figure 1 It is a structural schematic diagram of a feature extractor embedded with a hierarchical feature aggregation strategy in the present invention;
[0100] Figure 2 Schematic diagram of the structure of the cross-stage attention aggregation block in the present invention;
[0101] Figure 3 This is the overall framework diagram of the cross-view gait recognition based on adversarial domain adaptive learning proposed by the present invention;
[0102] Figure 4 It is a structural schematic diagram of the viewing angle change resistance elimination module in the present invention. DETAILED DESCRIPTION
[0103] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.
[0104] Example 1
[0105] A cross-view gait recognition method based on adversarial domain adaptive learning, such as Figure 3 As shown, the steps include:
[0106] (1) Build the entire adversarial domain adaptive learning network and train it, including:
[0107] A. Gait profile preprocessing
[0108] Perform contour correction on the gait contour image so that the human body contour is located at the center of the image, and adjust the size of the corrected gait contour image;
[0109] B. Gait perspective-level sub-domain division
[0110] According to different perspectives, the gait samples under different perspectives in a single gait database are divided into sub-domains at different perspective levels; the statistical distribution differences caused by perspective changes are regarded as domain shifts between sub-domains.
[0111] C. Building a feature extractor with a hierarchical feature aggregation strategy
[0112] The feature extractor embedded with a hierarchical feature aggregation strategy takes the general spatiotemporal feature network as the basic branch. By introducing a multi-level attention aggregation mechanism, it effectively aggregates the local detail information extracted by the shallow layer of the network and the high-level semantic representation, so as to achieve more comprehensive and comprehensive spatiotemporal information extraction of gait contour sequences.
[0113] The specific structure of the feature extractor embedded with the hierarchical feature aggregation strategy is shown in the attached figure. Figure 1 As shown, the feature extractor consists of a basic branch, a hierarchical feature aggregation branch, and a feature mapping head;
[0114] The gait sequence inputs of different subdomains first enter the basic branch for basic spatiotemporal feature extraction. The outputs of different network stages of the basic branch are then sent to the hierarchical feature aggregation branch for comprehensive global spatiotemporal feature extraction. Finally, the output of the hierarchical feature aggregation branch enters the feature mapping head to obtain the final part-based fine-grained gait representation.
[0115] D. Constructing a perspective change countermeasure elimination module
[0116] The view change adversarial elimination module is a key domain adaptation component in the entire cross-view gait recognition network based on adversarial domain adaptation learning. Its specific structure is as follows: Figure 4 As shown, the view change adversarial elimination module includes multiple view-specific discriminators embedded with gradient reversal layers and an adversarial optimization objective involving a feature extractor and a view-specific discriminator;
[0117] The view change adversarial elimination module attempts to challenge the gait features generated by the feature extractor embedded with a hierarchical feature aggregation strategy, and distinguishes whether they come from different subdomains through an adversarial learning process. That is, the feature extractor aims to generate gait representations that can confuse the view discriminator. At the same time, the view change adversarial elimination module feeds back to the feature extractor in an adversarial learning manner, so that it generates better subdomain-invariant gait features to confuse the view discriminator. Through the adversarial optimization learning of the feature extractor embedded with a hierarchical feature aggregation strategy and the view change adversarial elimination module, the entire cross-view gait recognition network based on adversarial domain adaptive learning can extract gait features that are both highly discriminative and subdomain invariant;
[0118] For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, an adversarial optimization objective is designed to simultaneously train the feature extractor embedded with the hierarchical feature aggregation strategy and the specific view discriminator in the view change adversarial elimination module in a minimum-maximum manner to improve the view robustness of the part-based fine-grained gait features;
[0119] E. Constructing the Metric Learning Module
[0120] The metric learning module includes grouped triplet loss and cross entropy loss;
[0121] The output of the feature extractor embedded with the hierarchical feature aggregation strategy is trained using both the grouped triplet loss and the cross entropy loss to further ensure the high discriminability of the gait representation in the feature space;
[0122] F. Network adversarial training based on adversarial domain adaptive learning
[0123] The entire adversarial domain adaptive learning-based network includes a feature extractor embedded with a hierarchical feature aggregation strategy, a viewpoint change adversarial elimination module, and a metric learning module;
[0124] For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, the adversarial optimization objective in step D and the grouped triplet loss and cross entropy loss in step E are combined to train the feature extractor to obtain a gait feature representation that is both highly discriminative and viewpoint robust.
[0125] (2) Cross-view gait recognition
[0126] After obtaining the gait profile sequence of the identity to be identified and preprocessing the gait profile as described in step A, the gait profile sequence of the identity to be identified is sent to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain gait features, and the identity of the sample to be tested is completed by comparing the feature similarity with the registered data set.
[0127] Example 2
[0128] The difference between the cross-view gait recognition method based on adversarial domain adaptive learning described in Example 1 is that:
[0129] In step A, gait profile sequences are obtained through the CASIA-B database and the OUISIR database.
[0130] Step A: gait profile preprocessing. Given a registration dataset X containing N gait profile sequences, i |i=1,2,…,N}; each gait profile sequence (a gait profile sequence is a gait profile video, including multiple / multi-frame gait profile images) is processed as follows:
[0131] a. Read each gait profile sequence and place the part including the pedestrian at the center of each frame to avoid interference caused by the different distances between the pedestrian and the camera; and correct the image so that the pedestrian's head is placed at the top edge of the image and the foot is placed at the bottom edge of the image;
[0132] b. Adjust the corrected gait contour sequence obtained in step a to the same image size H×W to obtain the final processed pedestrian contour sequence, which is used as the input of the cross-view gait recognition network based on adversarial domain adaptive learning. H and W represent the height and width of the adjusted image, respectively.
[0133] Step B, gait perspective level sub-domain division, including:
[0134] The gait silhouette dataset obtained by step A is divided into a training set and a test set. For the labeled gait training set X, it is divided into V sub-domains at different perspective levels according to different perspectives. Where subdomain X v Each gait sample in Each has a corresponding identity tag N v and P v Respectively represent subdomain X v The total number of gait samples and IDs included;
[0135] Step C, constructing a feature extractor embedded with a hierarchical feature aggregation strategy, including:
[0136] like Figure 1 As shown in Figure 1, the basic branch includes an initial layer and three stacked 3D convolution blocks; the initial layer includes two 3D convolution layers, which are used to perform preliminary spatiotemporal feature extraction on the input gait profile sequence; it is also called "stage 0"; the three stacked 3D convolution blocks use the output features of the initial layer as input to perform conventional spatiotemporal information extraction at different stages; for the convenience of subsequent description, these three consecutive 3D convolution blocks are also called "stage 1", "stage 2" and "stage 3"; the specific structure of the entire basic branch is shown in Table 1 (the LeakyRelu layer after each 3D convolution layer is omitted).
[0137] Table 1
[0138]
[0139] The hierarchical feature aggregation branch includes multiple cross-stage attention aggregation blocks and a feature fusion from low to high stages. The cross-stage attention aggregation block is used to alleviate the distribution differences and semantic misalignment of heterogeneous features in different network stages. The feature fusion from low to high stages is used to fuse the local detail information of the low stage with the semantic representation of the high stage to obtain a more complementary and comprehensive spatiotemporal feature representation.
[0140] The feature map head consists of a horizontal split operation (HS), a generalized average pooling operation (GeM) and grouped fully connected mapping operations.
[0141] like Figure 2 As shown, the cross-stage attention aggregation block includes two learnable parameters σ1 and σ2, a cross-stage attention derivative operation W m and a cross-stage attention aggregation operation W a ; For input x from any subdomain, x∈X v ; First, the general spatiotemporal features of two adjacent stages in the basic branch are preliminarily combined through learnable parameters, as shown in formula (I):
[0142]
[0143] In formula (I), is the output of element-wise weighted addition; represents the features extracted by the basic branch in stage l, represents the features of the previous attention aggregation of the l-1th stage in the hierarchical feature aggregation branch, 1 <l≤n,C l 、T l , H l , W l Respectively represent characteristics The number of channels, frames, height and width of the hierarchical feature aggregation branch is as follows: and the features aggregated by the previous attention in the hierarchical feature aggregation branch as input.
[0144] Then, a representation The soft attention mask m of the importance of each position in l It is generated by the cross-stage attention derivative operation and is expressed as shown in formula (II):
[0145]
[0146] In formula (II), W mIt includes a channel pooling, a 3D convolution layer with a kernel size of 3×3×3, and a sigmoid layer; the cross-stage attention aggregation block considers the differences in features at different stages and then generates more accurate attention weights, which is different from the commonly used direct global feature aggregation operation along multiple stages. The generated soft attention mask m l Further guidance a Perform deep cross-stage attention aggregation to obtain aggregated features Indicates that after cross-stage attention aggregation The number of channels is expressed as shown in formula (III):
[0147]
[0148] In formula (III), and ⊙ represent element-by-element addition and element-by-element multiplication, respectively. a It includes a 3D convolutional layer with a kernel size of 3×3×3 and a Leaky Relu layer. Through the above-mentioned attention aggregation, the misalignment of heterogeneous features in different stages is effectively alleviated, and more discriminative cross-stage spatiotemporal features can be extracted.
[0149] To further encourage semantic complementarity of high-level features, feature fusion from low-level to high-level is performed. The output of each cross-level attention aggregation block is channel-adjusted using a bottle neck layer and concatenated by channel, and finally a maximum pooling operation is used to generate the final global spatiotemporal feature representation F. c ∈R C'×H'×W' , C', H', W' represent the global spatiotemporal features F c The number of channels, height and width are expressed as shown in formula (IV):
[0150]
[0151] In formula (IV), MP represents the maximum pooling operation, and n represents the number of cross-stage attention aggregation blocks;
[0152] In the feature mapping head, first, the global spatiotemporal features F output by the hierarchical feature aggregation branch are c The horizontal direction is divided into H' part-based strip spaces, and generalized average pooling is used to extract refined features from each horizontal strip space, as shown in formula (V):
[0153] F GeM =W GeM (F c ')(Ⅴ)
[0154] In formula (V), is a part-based fine-grained feature after generalized average pooling operation, where Indicates F GeM Each part-based fine-grained feature in the strip space, W GeM (·) represents generalized average pooling, F c '∈R C'×H'×W' Represents the features after horizontal segmentation;
[0155] Then, F GeM Each horizontal strip feature The grouped fully connected layer is used to map it to a more discriminative representation space, as shown in formula (VI):
[0156] F FM =W SFC (F GeM ) (VI)
[0157] In formula (VI), Represents the output after grouping feature mapping, W SFC Represents a fully connected mapping operation for a group.
[0158] Step D, constructing a perspective change countermeasure elimination module, including:
[0159] For each subdomain of a specific view, a binary (1v.s. other) discriminator with a gradient reversal layer embedded in the head is constructed, i.e., a specific view discriminator with a gradient reversal layer embedded in the head, to discriminate all the obtained part-based fine-grained features F GeM Is it from this subdomain or other subdomains? Therefore, there are V binary discriminators in total, and the parameters of all gradient reversal layers are shared;
[0160] For all acquired part-based fine-grained features F GeM , construct an adversarial optimization objective between a feature extractor and a specific view discriminator embedded with a hierarchical feature aggregation strategy, and enable the specific view discriminator to distinguish whether each part-based fine-grained gait feature input comes from a specific subdomain by minimizing the loss of the specific view discriminator. At the same time, maximize the loss of the specific view discriminator to fine-tune the feature extractor to produce gait features that can confuse the view discriminator, thereby reducing subdomain differences;
[0161] The view change adversarial elimination module aims to reduce the distribution differences between multiple view level subdomains at the same time without specifying any specific source domain or target domain. In the view change adversarial elimination module, each subdomain can be regarded as a temporary target domain, and other subdomains are regarded as source domains, while adversarial optimization is used to reduce the difference between the source domain and the target domain. Through iterative training, the gait information under different camera viewpoints will eventually be mapped to a common feature embedding space.
[0162] Specifically, for a parameter The view-specific discriminator D v , all part-based fine-grained features of sample input x After normalization, they are first input into D through the gradient reversal layer (GRL) v , the corresponding output is sent to a softmax layer to obtain a two-dimensional probability output z∈R 2 , as shown in formula (VII):
[0163]
[0164] In formula (VII), Represents the softmax function, the sample input x has a total of H' probability outputs;
[0165] Subsequently, the view-specific discriminator is trained by defining a binary cross entropy loss over all part-based fine-grained features, expressed as shown in Equation (VIII):
[0166]
[0167] In formula (VIII), G F represents a feature extractor embedded with a hierarchical feature aggregation strategy, L BCE represents the binary cross entropy loss, and <·> represents the average of the subscript set; the joint minimization optimization objective of all specific view discriminators is shown in formula (IX):
[0168]
[0169] The gradient reversal layer (GRL) can automatically transform the maximization problem into minimizing the negative loss, thereby ensuring the consistency of network optimization. Therefore, the use of the gradient reversal layer can transform the maximization of the subdomain view discriminator loss (i.e., formula (IX)) into minimizing the negative loss of the view discriminator, thereby reducing the distribution differences between multiple subdomains. In this way, the optimized feature extractor G F The maximization objective function is shown in formula (X):
[0170]
[0171] During the forward propagation process, GRL is just a normal layer without introducing any additional operations. During the back-propagation process, GRL reverses the gradient of the optimization objective (Formula (IX)) with respect to the parameters in the feature extractor, and then multiplies it by a negative weight α and passes it backward. Through GRL, sub-domain adversarial alignment at the view level can be implemented in an end-to-end manner without the need to fix the generator and discriminator separately for iterative training like the generative adversarial network, which greatly simplifies the overall implementation of the network and facilitates the mining of spatiotemporal information in gait sequences. With the optimization training of the network, a robust gait feature representation that is difficult for all specific view discriminators to recognize is finally extracted, thereby effectively reducing the gap between sub-domains.
[0172] Step E: construct the metric learning module, including:
[0173] c. Use triplet loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the triple loss. The loss function is specifically shown in formula (XI) and formula (XII):
[0174]
[0175]
[0176] In formula (XI) and formula (XII), (P,U) represents the number of subjects in a mini-batch and the number of gait profile sequences for each subject, N tri represents the number of non-zero items in the loss, H' represents the number of fine-grained features based on the part after horizontal partitioning, and m represents the margin of the triple loss. represents the h-th level feature of the u-th gait profile sequence of the p-th subject, represents the h-th level feature of the a-th gait profile sequence of the p-th subject, represents the h-th level feature of the c-th gait profile sequence of the b-th subject, d + and d - are the Euclidean distances between positive and negative samples, respectively;
[0177] d. Use cross entropy loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the cross entropy loss. The loss function is specifically shown in formula (XIII):
[0178]
[0179] In formula (XIII), N = PU represents the total number of gait profile sequences in a mini-batch, and Respectively The true identity label and predicted identity label.
[0180] Step F, training the entire network based on adversarial domain adaptive learning, includes:
[0181] The overall objective function of the entire adversarial domain adaptive learning network is trained by combining the adversarial optimization objective with the group triplet loss and the cross entropy loss. The overall objective function is shown in Formula (XIV):
[0182]
[0183] In formula (XIV), β is a trade-off parameter used to adjust the two optimization goals of model discriminative learning and perspective change elimination. It can be seen from formula (XIV) that the purpose of model optimization is to minimize the triplet loss and cross entropy loss, that is, the distance between sample features of the same pedestrian from different perspectives is as small as possible, and the distance between sample features of different pedestrians is as large as possible, and all gait samples can be accurately ID classified; at the same time, the feature extractor is trained to maximize the loss of the perspective discriminator in the perspective change resistance elimination module, that is, the feature extractor is adjusted to generate gait features that can confuse the perspective discriminator and weaken the impact of perspective changes. In this way, gait features with high ID discriminability and perspective invariance can be extracted to achieve cross-perspective gait recognition.
[0184] In step (2), the gait profile sequence is obtained by segmenting the pedestrian video captured by the camera in the actual scene.
[0185] Step (2), cross-view gait recognition, includes:
[0186] e. According to the trained whole network based on adversarial domain adaptive learning, the registered data set is sent to the trained whole network based on adversarial domain adaptive learning after step A, and the H' part-based fine-grained features output by the trained feature extractor embedded with hierarchical feature aggregation strategy are cascaded as the overall feature representation of each gait profile sequence, and finally the feature database of the registered data set is obtained;
[0187] f. After step A, the samples in the query data set to be identified are sent to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain the features of the query data set; the Euclidean distance is calculated between each gait sample feature in the query data set and all the features in the registration data set obtained in step e, and finally the query sample is identified as the label of the feature in the registration data set with the smallest Euclidean distance, and the identity label of the query sample is output to complete the identification.
[0188] In this embodiment, first, the gait profile sequence is preprocessed and the size H×W of the input gait profile sequence graph is set to 64×44. All experiments in this embodiment are trained using the Adam optimizer, with the momentum set to 0.9 and the learning rate set to 1-e4. The margin of the triple loss is set to 0.2. In the training phase, 30 consecutive frames are randomly selected as model input for each preprocessed gait profile sequence. In the testing phase, all frames of the preprocessed gait profile sequence are used to obtain the final feature representation, and the Rank-1 accuracy is selected to measure the performance of the model gait recognition.
[0189] In order to verify the advancement of the cross-view gait recognition method based on adversarial domain adaptive learning proposed in the present invention, the present invention is first compared with nine existing advanced gait recognition methods on the CASIA-B gait database, including CNN-LB, GaitNet, Group-supervised DRL, GaitSet, GaitPart, GaitSlice, MT3D, ESNet and GaitGL.
[0190] Since the CASIA-B database covers a comprehensive range of perspectives, the present invention conducts sufficient experiments on cross-perspective recognition tasks on the CASIA-B dataset. CASIA-B is a widely used gait dataset, containing 113,640 videos of 124 subjects. Each subject has 10 types of gait profile sequences, including 6 types collected under normal walking conditions (indexed as NM#01-06), 2 types collected under backpack conditions (indexed as BG#01-02), and 2 types collected under coat conditions (indexed as CL#01-02). Each type includes 11 gait profile sequences with different perspectives (0°-180° intervals of 18°).
[0191] In this embodiment, all gait profile sequences of the first 74 subjects in the CASIA-B database are used for model training, and the gait profile sequences of the remaining 50 subjects are tested. In a mini-batch, the number of subjects and the number of sequences for each subject are set to (8; 8), respectively, the number of model iterations is set to 100K times, and β in formula (XIV) is set to 0.01. In the test phase, the first four types (i.e., NM#01-04) of the six types of gait profile sequences sampled under normal conditions are used as registration data sets, and the remaining NM#05-06, BG#01-02, and CL#01-02 are used as query data sets, respectively.
[0192] Table 2 lists the cross-view gait recognition rates (%) of the present invention and other six advanced gait recognition methods under three different walking conditions (including normal, backpack and coat) on the CASIA-B database. The results in Table 2 are the average Rank-1 accuracy (%) of cross-view recognition for each query view under the other 10 registered views.
[0193] Table 2
[0194]
[0195]
[0196] It can be seen from Table 2 that the method of the present invention achieves the best recognition effect under all walking conditions. Under normal walking conditions, backpack walking conditions, and wearing a coat walking conditions, the average recognition rates of the method of the present invention reach 97.8%, 95.2%, and 86.0%, respectively, which strongly demonstrates the superiority of the method of the present invention.
[0197] In order to further verify the generalization of the method of the present invention, the method of the present invention is evaluated on the OUISIR dataset. OUISIR is a gait dataset consisting of 4007 subjects. The database has four viewing angles (55°, 65°, 75°, 85°). Compared with CASIA-B, the OUIRIS database contains fewer viewing angles but more subjects, so it can be used to verify the generalization performance of each gait recognition method. Each subject collected two gait sequences under normal walking conditions (indexed as #01, #02). In this embodiment, 3836 subjects in the OUIRIS database are used for training and five-fold cross validation is used. Similarly, the gait profile sequence is preprocessed and the size H×W of the input gait profile sequence graph is set to 64×44. In a mini-batch, the number of subjects and the number of sequences for each subject are set to (32; 4) respectively, the number of model iterations is set to 60K times, and the β in formula (XIV) is set to 0.03. In the test phase, the sequence with index #01 is used as the registration data set, and the sequence with index #02 is used as the query data set.
[0198] The cross-view gait recognition results of the method of the present invention and other advanced methods including MGAN, CNNS and MT3D at various viewing angles are shown in Table 3. The results in Table 3 are the cross-view recognition Rank-1 accuracy (%) of four different query viewing angles of the OUIRIS database.
[0199] Table 3
[0200]
[0201]
[0202] It can be found from Table 3 that the method of the present invention achieves the highest accuracy in all cross-viewing situations and has obvious performance advantages. In addition, it can be seen from Table 3 that when the view angle difference between the query data set and the registration data set increases, the recognition accuracy of the CNNS, MGAN and MT3D methods will drop significantly. For example, the recognition rate of the query view angle and the registration view angle are (55°, 85°) respectively, which is significantly lower than the recognition rate of the query view angle and the registration view angle are (55°, 65°) and (55°, 75°) respectively. However, in the case where the query view angle and the registration view angle are very different, the method of the present invention can still obtain excellent and stable recognition performance, which shows that the method of the present invention is more robust to view angle changes and has better generalization ability.
[0203] Example 3
[0204] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the cross-view gait recognition method based on adversarial domain adaptive learning described in Example 1 or 2 are implemented.
[0205] Example 4
[0206] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the cross-view gait recognition method based on adversarial domain adaptive learning described in Example 1 or 2.
Claims
1. A cross-view gait recognition method based on adversarial domain adaptive learning, characterized in that: The steps include: (1) Build the entire adversarial domain adaptive learning network and train it, including: A. Gait profile preprocessing Perform contour correction on the gait contour image so that the human body contour is located at the center of the image, and adjust the size of the corrected gait contour image; B. Gait perspective-level sub-domain division According to different perspectives, the gait samples in a single gait database under different perspectives are divided into subdomains of different perspective levels; the statistical distribution differences caused by the change of perspective are regarded as domain shifts between subdomains; C. Building a feature extractor with a hierarchical feature aggregation strategy The feature extractor consists of a base branch, a hierarchical feature aggregation branch, and a feature mapping head; The gait sequence inputs of different subdomains first enter the basic branch for basic spatiotemporal feature extraction. The outputs of different network stages of the basic branch are then sent to the hierarchical feature aggregation branch for comprehensive global spatiotemporal feature extraction. Finally, the output of the hierarchical feature aggregation branch enters the feature mapping head to obtain the final part-based fine-grained gait representation. D. Constructing a perspective change countermeasure elimination module The view change adversarial elimination module includes multiple view-specific discriminators embedded with gradient reversal layers and an adversarial optimization objective involving the feature extractor and the view-specific discriminator; For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, an adversarial optimization objective is designed to simultaneously train the feature extractor embedded with the hierarchical feature aggregation strategy and the specific view discriminator in the view change adversarial elimination module in a minimum-maximum manner; E. Constructing the Metric Learning Module The metric learning module includes grouped triplet loss and cross entropy loss; For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, the feature extractor is trained using both the grouped triplet loss and the cross entropy loss; F. Network adversarial training based on adversarial domain adaptive learning The entire adversarial domain adaptive learning-based network includes a feature extractor embedded with a hierarchical feature aggregation strategy, a viewpoint change adversarial elimination module, and a metric learning module; For the output of the feature extractor embedded with the hierarchical feature aggregation strategy, the adversarial optimization objective in step D and the grouped triple loss and cross entropy loss in step E are combined to train the feature extractor; (2) Cross-view gait recognition Obtaining a gait profile sequence of the identity to be identified and preprocessing the gait profile as described in step A, sending the obtained gait profile sequence of the identity to be identified to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain gait features, and completing the identity identification of the sample to be tested by performing feature similarity comparison with the registered data set; Step D, constructing a perspective change countermeasure elimination module, including: For each subdomain of a specific view, a binary discriminator with a gradient reversal layer embedded in the head is constructed, i.e., a specific view discriminator with a gradient reversal layer embedded in the head, to discriminate all the obtained part-based fine-grained features F GeM Is it from this subdomain or other subdomains? Therefore, there are V binary discriminators in total, and the parameters of all gradient reversal layers are shared; For all acquired part-based fine-grained features F GeM , construct an adversarial optimization objective between a feature extractor and a specific view discriminator embedded with a hierarchical feature aggregation strategy, by minimizing the loss of the specific view discriminator, so that the specific view discriminator can distinguish whether each part-based fine-grained gait feature input comes from a specific subdomain, and at the same time, maximize the loss of the specific view discriminator to fine-tune the feature extractor to produce gait features that can confuse the view discriminator; Specifically, for a parameter The specific viewpoint discriminator D v , all part-based fine-grained features of sample input x After normalization, they are first input into D through the gradient reversal layer v , the corresponding output is sent to a softmax layer to obtain a two-dimensional probability output z∈R 2 , as shown in formula (VII): In formula (VII), Represents the softmax function, the sample input x has a total of H' probability outputs; Subsequently, the view-specific discriminator is trained by defining a binary cross entropy loss over all part-based fine-grained features, expressed as shown in Equation (VIII): In formula (VIII), G F represents a feature extractor embedded with a hierarchical feature aggregation strategy, L BCE represents the binary cross entropy loss, and <·> represents the average of the subscript set; the joint minimization optimization objective of all specific view discriminators is shown in formula (IX): H' refers to the height of the global spatiotemporal feature; optimize the feature extractor G F The maximization objective function is shown in formula (Ⅹ):
2. According to claim 1, a cross-view gait recognition method based on adversarial domain adaptive learning is characterized in that: In step A, gait profile sequences are obtained through the CASIA-B database and the OUISIR database.
3. According to claim 1, a cross-view gait recognition method based on adversarial domain adaptive learning is characterized in that: Step A, gait profile preprocessing, refers to: performing the following processing on each gait profile sequence: a. Read each gait profile sequence, place the part including the pedestrian at the center of each frame image, and correct the image so that the pedestrian's head is placed at the top edge of the image and the foot is placed at the bottom edge of the image; b. Adjust the corrected gait contour sequence obtained in step a to the same image size H×W to obtain the final processed pedestrian contour sequence, where H and W represent the height and width of the adjusted image, respectively.
4. According to the cross-view gait recognition method based on adversarial domain adaptive learning according to claim 1, it is characterized in that: The step B, gait perspective level sub-domain division, comprises: The gait silhouette dataset obtained by step A is divided into a training set and a test set. For the labeled gait training set X, it is divided into V sub-domains at different perspective levels according to different perspectives. Where subdomain X v Each gait sample in Each has a corresponding identity tag N v and P v Respectively represent subdomain X v The total number of gait samples and IDs included; The step C, constructing a feature extractor embedded with a hierarchical feature aggregation strategy, comprises: The basic branch includes an initial layer and three stacked 3D convolution blocks; the initial layer includes two 3D convolution layers, which are used to perform preliminary spatiotemporal feature extraction on the input gait profile sequence; the three stacked 3D convolution blocks use the output features of the initial layer as input to extract spatiotemporal information at different stages; The hierarchical feature aggregation branch includes multiple cross-stage attention aggregation blocks and a feature fusion from low to high stages. The cross-stage attention aggregation block is used to alleviate the distribution differences and semantic misalignment of heterogeneous features in different network stages. The feature fusion from low to high stages is used to fuse the local detail information of the low stage with the semantic representation of the high stage to obtain a more complementary and comprehensive spatiotemporal feature representation. The feature mapping head includes a horizontal split operation, a generalized average pooling operation and a grouped fully connected mapping operation; The cross-stage attention aggregation block consists of two learnable parameters σ1 and σ2, a cross-stage attention derivative operation W m and a cross-stage attention aggregation operation W a ; For input x from any subdomain, x∈X v ; First, the general spatiotemporal features of two adjacent stages in the basic branch are preliminarily combined through learnable parameters, as shown in formula (I): In formula (I), is the output of element-wise weighted addition; represents the features extracted by the basic branch in stage l, represents the features of the previous attention aggregation of the l-1th stage in the hierarchical feature aggregation branch, 1 <l≤n,C l 、T l , H l , W l Respectively represent characteristics The number of channels, frames, height and width; Then, a representation The soft attention mask m of the importance of each position in l It is generated by the cross-stage attention derivative operation and is expressed as shown in formula (II): In formula (II), W m It includes a channel pooling, a 3D convolution layer with a kernel size of 3×3×3, and a sigmoid layer; the generated soft attention mask m l Further guidance a Perform deep cross-stage attention aggregation to obtain aggregated features Indicates that after cross-stage attention aggregation The number of channels is expressed as shown in formula (III): In formula (III), ⊕ and ⊙ represent element-by-element addition and element-by-element multiplication respectively, W a Includes a 3D convolutional layer with a kernel size of 3×3×3 and a Leaky Relu layer; The output of each cross-stage attention aggregation block is adjusted using the bottle neck layer and concatenated by channel, and finally a maximum pooling operation is used to generate the final global spatiotemporal feature representation F c ∈R C’×H’×W’ , C', H', W' represent the global spatiotemporal features F c The number of channels, height and width are expressed as shown in formula (IV): In formula (IV), MP represents the maximum pooling operation, and n represents the number of cross-stage attention aggregation blocks; In the feature mapping head, first, the global spatiotemporal features F output by the hierarchical feature aggregation branch are c The horizontal direction is divided into H' part-based strip spaces, and generalized average pooling is used to extract refined features from each horizontal strip space, as shown in formula (V): F GeM =W GeM (F’ c ) (Ⅴ) In formula (V), is a part-based fine-grained feature after generalized average pooling operation, where Indicates F GeM Each part-based fine-grained feature in the strip space, W GeM (·) represents generalized average pooling, F' c ∈R C’×H’×W’ Represents the features after horizontal segmentation; Then, F GeM Each horizontal strip feature The grouped fully connected layer is used to map it to a more discriminative representation space, as shown in formula (VI): F FM =W SFC (F GeM ) (Ⅵ) In formula (VI), Represents the output after grouping feature mapping, W SFC Represents a fully connected mapping operation for a group.
5. The cross-view gait recognition method based on adversarial domain adaptive learning according to claim 1, characterized in that: Step E, construct a metric learning module. The metric learning module enhances the discriminability of gait representation by minimizing the distance between gait samples from different view-level subdomains but belonging to the same ID, including grouped triplet loss and cross entropy loss. include: c. Use triplet loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the triple loss. The loss function is specifically shown in formula (Ⅺ) and formula (Ⅻ): In formula (Ⅺ) and (Ⅻ), (P, U) represents the number of subjects in a mini-batch and the number of gait profile sequences for each subject, N tri represents the number of non-zero items in the loss, H' represents the number of fine-grained features based on the part after horizontal partitioning, m represents the margin of the triple loss, represents the h-th level feature of the u-th gait profile sequence of the p-th subject, represents the h-th level feature of the a-th gait profile sequence of the p-th subject, represents the h-th level feature of the c-th gait profile sequence of the b-th subject, d + and d - are the Euclidean distances between positive and negative samples, respectively; d. Use cross entropy loss to extract all the acquired part-based fine-grained features F GeM The discriminative constraints are respectively performed, and the training goal is to reduce the cross entropy loss. The loss function is specifically shown in formula (XIII): In formula (XIII), N = PU represents the total number of gait profile sequences in a mini-batch, and Respectively The true identity label and predicted identity label.
6. The cross-view gait recognition method based on adversarial domain adaptive learning according to claim 5, characterized in that: Step F, training the entire network based on adversarial domain adaptive learning, includes: The overall objective function of the entire adversarial domain adaptive learning network is trained by combining the adversarial optimization objective with the group triplet loss and the cross entropy loss. The overall objective function is shown in Formula (XIV): In formula (XIV), β is a trade-off parameter used to adjust the two optimization objectives of model discriminative learning and perspective change elimination.
7. A cross-view gait recognition method based on adversarial domain adaptive learning according to any one of claims 1 to 6, characterized in that: In step (2), the gait profile sequence is obtained by segmenting the pedestrian video captured by the camera in the actual scene.
8. The cross-view gait recognition method based on adversarial domain adaptive learning according to claim 7, characterized in that: Step (2), cross-view gait recognition, includes: e. According to the trained whole network based on adversarial domain adaptive learning, the registered data set is sent to the trained whole network based on adversarial domain adaptive learning after step A, and the H' part-based fine-grained features output by the trained feature extractor embedded with hierarchical feature aggregation strategy are cascaded as the overall feature representation of each gait profile sequence, and finally the feature database of the registered data set is obtained; f. After step A, the samples in the query data set to be identified are sent to a trained feature extractor embedded with a hierarchical feature aggregation strategy to obtain the features of the query data set; the Euclidean distance is calculated between each gait sample feature in the query data set and all the features in the registration data set obtained in step e, and finally the query sample is identified as the label of the feature in the registration data set with the smallest Euclidean distance, and the identity label of the query sample is output to complete the identification.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the cross-view gait recognition method based on adversarial domain adaptive learning as described in any one of claims 1-8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cross-view gait recognition method based on adversarial domain adaptive learning as described in any one of claims 1 to 8 are implemented.
