Model-independent single-domain generalization cross-domain gait recognition method, device and product
By employing a model-independent, single-domain generalized cross-domain gait recognition method, fine-grained features and domain-invariant identity features are extracted, solving the performance degradation problem of gait recognition technology under domain shift. This achieves accuracy and robustness in cross-domain recognition, making it suitable for scenarios such as smart homes and medical health monitoring.
Patent Information
- Application Number
- CN202411902924.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Existing gait recognition technologies exhibit a high degree of dependence on data acquisition and testing in different scenarios, leading to a significant performance drop when the model shifts across domains. Furthermore, existing methods suffer from issues such as dependence on dataset diversity, high model complexity, and large computational overhead, making it difficult to achieve cross-domain generalization.
A model-agnostic single-domain generalized cross-domain gait recognition method is adopted. By collecting gait data from multiple source domains, extracting fine-grained features, calculating identity-invariant domain features and centroids, generating sub-domain labels, and using adversarial training and self-supervised learning to extract domain-invariant identity features, cross-domain gait recognition is achieved.
It significantly improves the model's adaptability to different environments and conditions, reduces dependence on specific training datasets, and enhances recognition accuracy and robustness. It is suitable for resource-constrained environments and practical applications such as smart homes and medical health monitoring.
Smart Images

Figure CN119919997B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology and relates to a single-domain generalized cross-domain gait recognition method, device, and product, specifically a model-independent single-domain generalized cross-domain gait recognition method, device, and product. Background Technology
[0002] In today's society, with the rapid development of artificial intelligence and deep learning technologies, gait recognition, as a biometric identification technology, has received widespread attention due to its advantages such as long-distance recognition and difficulty in spoofing. Gait recognition identifies different people by analyzing their walking patterns, which has significant application value in fields such as video surveillance, forensic identification, and crime prevention. In recent years, with the rise of deep learning technology, significant progress has been made in the field of gait recognition, and many methods have shown high accuracy on specific datasets. However, due to domain shifts caused by scene changes, such as changes in viewing angle and clothing, the performance of these models drops significantly on unseen data, limiting the widespread application of gait recognition technology.
[0003] In existing gait recognition technologies, researchers have been exploring ways to improve the adaptability of models under different conditions. Gait recognition, as a biometric identification technology, relies on the unique movement patterns of individuals during walking. However, traditional gait recognition methods often face challenges such as insufficient datasets and environmental variations. To enhance the robustness and accuracy of the system, researchers have adopted the following methods:
[0004] 1. Multimodal Approach: In recent years, researchers have begun to combine data from different types of sensors, such as video cameras, electromyography (EMG) signals, posture information, acceleration, gyroscopes, and ground reaction force sensors, to comprehensively capture gait features. This multimodal approach, by fusing data from different sensors, can improve the accuracy of feature extraction and enhance the model's adaptability to environmental changes (such as lighting, background, and individual state). Furthermore, the use of multimodal data can compensate for errors that may occur with a single sensor, thereby improving overall recognition performance.
[0005] Regarding multimodal gait recognition technology, Chinese Patent Document No. CN118349949A, published on July 16, 2024, describes a multimodal gait recognition method and system. This invention utilizes an encoder to extract deep features from electromyography (EMG) and posture signals; a fusion module fuses these deep features to obtain deep fused features; and a decoder decodes these deep fused features to obtain the gait recognition result. This technology has the following problems: First, feature extraction has limitations. In practical applications, the acquisition of EMG and posture signals may be affected by environmental noise (such as other people's activities, background noise, etc.), leading to unstable extracted features. Furthermore, differences in EMG activity and posture among different individuals can cause the same movement to produce different signals, increasing the complexity of recognition. This inter-individual variability may cause bias in model training. Second, the fusion strategy is insufficient. Although deep feature fusion is used, if the fusion module fails to fully utilize the complementary information between different modalities, the amount of information after feature fusion may be insufficient, affecting the final recognition performance. If the fusion process fails to consider the nonlinear relationships between features, it may lead to the loss of some important information and affect the accuracy of the model.
[0006] 2. Multi-view recognition: Since gait can vary significantly from different viewing angles, researchers are exploring cross-view recognition methods. By collecting gait data from multiple perspectives, researchers can integrate information from different angles to extract more stable and view-invariant gait features. Some researchers have introduced view prediction mechanisms into their models to identify gait feature changes under different perspectives, thereby helping the system to accurately recognize gait from unseen perspectives. Using deep learning techniques such as deep convolutional neural networks (CNNs), by constructing specific network structures, the model can learn the mapping relationship between different perspectives, thus enabling more effective feature extraction from different viewpoints.
[0007] Regarding gait recognition technology based on multiple perspectives, Chinese patent document CN114360058A, published on May 28, 2024, describes a cross-perspective gait recognition method based on walking perspective prediction. This invention adds a perspective prediction network to the existing deep convolutional network method, using sample perspective information as a supervision signal to effectively model the perspective information in the gait energy map, thus assisting in network model training and ultimately extracting gait features with perspective invariance. This technology has the following problems: First, it relies heavily on the diversity of the dataset. The performance of the perspective prediction network is highly dependent on the quality of the training data. If the training dataset lacks diversity (e.g., different scenes, lighting conditions, and individual differences), it may lead to inaccurate perspective prediction, affecting subsequent feature extraction. If the model fails to effectively cover various perspective changes during training, it may be unable to correctly identify new or unseen perspectives in practical applications, leading to recognition failure. Second, model complexity: Adding a perspective prediction network increases the complexity of the model, potentially leading to higher computational overhead, especially in scenarios requiring real-time processing, which may affect the system's response speed. Complex network architectures can lead to increased training and inference times, especially when dealing with large datasets, which can affect the system's usability and practicality.
[0008] Existing gait recognition methods exhibit a high degree of dependence on data acquisition and testing across different scenarios. When tested with data from different scenarios, the performance of existing methods degrades significantly due to domain shift. Domain shift refers to the difference in distribution between training data (i.e., the source domain) and test data (i.e., the target domain). For example, variations in clothing, viewing angle, and even the segmentation method used to generate the contour can lead to distributional differences between datasets. Therefore, some researchers use unsupervised domain adaptation (UDA) techniques to improve the performance of cross-domain recognition. UDA methods train a model using some labeled source domain data and some unlabeled target domain data, achieving knowledge transfer from the labeled source domain to the unlabeled target domain. However, when dealing with new data from an unseen target domain, UDA methods need to be updated with this new data, which is often difficult to achieve in practical applications due to privacy policies. Therefore, it is crucial that the model, trained in older scenarios, can generalize to data in newer scenarios. Domain generalization (DG) is a promising solution to address these challenges. Domain generalization aims to learn a model from one or more different but related source domains, enabling it to perform well on unseen target domains without requiring further updates on new data. It has attracted widespread attention in many vision domains, such as face recognition and pedestrian re-identification. The practicality of gait recognition systems depends on their ability to generalize to previously unencountered data. However, domain generalization in gait recognition has not been fully studied. Summary of the Invention
[0009] To address the model dependency and domain offset issues in current gait recognition technologies, this invention provides a model-independent single-domain generalized cross-domain gait recognition method, apparatus, and product. This method learns a model from one or more different but related source domains, enabling it to perform well in unseen domains without requiring further updates on new data.
[0010] The technical solution adopted by the method of the present invention is: a model-independent single-domain generalized cross-domain gait recognition method, comprising the following steps:
[0011] Step 1: Collect gait data from multiple source domains and extract fine-grained features;
[0012] Step 2: Extract identity-invariant domain features from fine-grained features;
[0013] Step 3: Calculate the centroid of each sub-domain based on the extracted identity-invariant domain features;
[0014] Step 4: Generate sub-domain labels using the calculated centroids;
[0015] Step 5: Extract domain-invariant identity features to obtain cross-domain gait recognition results.
[0016] Preferably, in step 1, the encoder f is first used to extract gait features, and then fine-grained features are used to extract the head h. fine The gait features obtained from encoder f will be converted into a fine-grained representation.
[0017] The fine-grained feature extraction head h fine It is a pre-trained model; during training, gait data is first collected from multiple source domains and fine-grained features are extracted, and then an identity classifier is used. and domain classifier
[0018] Assign fine-grained features to the corresponding identity label y I and sub-domain tags y D The loss function L used in training fine for:
[0019]
[0020] Where f(x) represents the feature vector after gait data encoding, h fine L represents the fine-grained feature extraction head. ce Cross-entropy;
[0021] During training, backpropagation is used to update model parameters, and the classification accuracy and F1 score are evaluated using a validation set to ensure the effectiveness of fine-grained feature extraction. Finally, the key gait features extracted by the model are analyzed by visualizing the intermediate layer output to further optimize the model structure.
[0022] As a preferred option, in step 2, a domain classifier and an identity discriminator are used to extract identity-invariant domain features from the fine-grained features;
[0023] The "domain classifier and identity discriminator" mentioned are pre-trained models; during training, the domain classifier g... D and domain discriminator d I , will the top h in the field D The output is categorized into corresponding subdomain labels. D During the training process, d I and h D Participate in combat training, d I Try h D The output is categorized into corresponding identity tags. I , and h D To minimize this classification error and thus reduce the differences between identities, we obtain identity-invariant domain features. The loss function used in training is:
[0024] L domain =L ce (g D (h D (f(x i ))),y D )+λL ce (d I (R λ (h D (f(x i )))),y I );
[0025] Among them, L ce For cross-entropy, g D For the domain classifier, h D As the head of the domain, f(x) i y is the feature vector after encoding the gait data. D Subdomain label; λ is a hyperparameter, d I R is an identity discriminator. λ This indicates a gradient inversion layer, y I For identity labels; during training, the parameters of encoder f are frozen, and only the domain head h is processed. D and domain discriminator d I Optimize.
[0026] As a preferred embodiment, step 3 includes the following sub-steps:
[0027] Step 3.1: Data augmentation and style transfer to obtain an augmented dataset;
[0028] First, different segmentation models S1, S2, ..., S are used. N To generate gait data x i The silhouette of the image is then transferred based on the StarGAN segmentation model to convert the generated silhouette image into a uniform style;
[0029] Step 3.2: After obtaining the augmented dataset, perform feature extraction to obtain identity-invariant domain features;
[0030] Step 3.3: Initialize a centroid μ for each sub-neighborhood k. k ;
[0031] Step 3.4: Calculate the centroid using a weighted average.
[0032] Where represents the domain label of the i-th sample, k represents the index of the sub-domain; represents the indicator function, which is 1 when sample i belongs to domain k, and 0 otherwise; represents the feature vector after gait data encoding; is the domain classifier, and is the domain head.
[0033] As a preferred embodiment, step 4 includes the following sub-steps:
[0034] Step 4.1: For each x i Calculate its centroid μ with all sub-domains. k The distance between them;
[0035] Step 4.2: Obtain x i subdomain tag y P =arg min dist(h D (f(x i )),μ k ); where f(x) i ) represents x i The resulting feature vector after encoding, dist() represents each x i with sub-domain centroid μ k The distance between them; h D It is a leader in the field.
[0036] As a preferred option, in step 5, an identity classifier and a domain discriminator are used to extract domain-invariant identity features;
[0037] The "identity classifier and domain discriminator" mentioned are pre-trained models; during training, the identity classifier g... I and domain discriminator dD , will the identity header h I The output is categorized into corresponding identity tags. I During the training process, d D and h I Participate in combat training, d D Try h I The output is categorized into the corresponding domain label y. D , and h I The goal is to maximize this classification error, thereby minimizing the differences between domains and obtaining domain-invariant identity features. The loss function used during training is:
[0038] L i dentity =
[0039] L ce (g I (h I (f(x))),y I )+L trp (x,x n ,x p )+L ce (d D (R λ (h I (f(x))),y D );
[0040] Among them, L ce For cross-entropy, g I It is an identity classifier, h I It is the identity header, f(x) represents the feature vector after gait data encoding, and y I For identity label; L frp Denotes the triplet loss, x n This represents a sample with a different identity from x. p d represents a sample with the same identity as x; D Representation domain discriminator, λ is a hyperparameter, R λ This indicates a gradient inversion layer, y D For subdomain tags.
[0041] Preferably, in step 5, after extracting the domain-invariant identity features, these features are compared with existing features in the database. Specifically, for each gait feature in the database, the distance between the data to be identified and the feature is calculated. If the distance is within a suitable range, the identification is successful, and the gait recognition result is returned.
[0042] Preferably, in step 4, the sub-domain label y P y is a trained subdomain label P Computational model;
[0043] The training includes: (1) self-supervised learning: using generated pseudo-labels for self-supervised learning to improve label quality; (2) cross-validation: using cross-validation techniques to verify the effectiveness of generated labels, ensuring the accuracy and reliability of labels; (3) based on the validation results, adjusting the sub-domain labels y P The computational model parameters were adjusted to optimize model performance and improve the accuracy of gait recognition.
[0044] The technical solution adopted by the device of the present invention is: a model-independent single-domain generalized cross-domain gait recognition device, including a user dynamic data uploading module, a sub-domain centroid calculation module, a sub-domain label generation module, a self-supervised learning and model optimization module, and a domain-invariant identity feature learning module;
[0045] The user dynamic data upload module is used to receive dynamic data generated by users in different fields or environments;
[0046] The subdomain centroid module is used to calculate the centroid of each subdomain based on different data distributions;
[0047] The subdomain label generation module is used to generate corresponding labels based on the output of the subdomain centroid calculation module to identify different data points in each subdomain. At the same time, the subdomain label generation module optimizes the labels by adjusting the boundaries and distribution of the labels to reduce label conflicts between different domains and ensure that the labels can accurately reflect the true distribution of the data.
[0048] The self-supervised learning and model optimization module employs a self-supervised learning method to improve the model's learning performance by utilizing the inherent features of the data without relying on manual labeling. This module uses cross-validation and a triple loss mechanism to calculate the distance relationship between samples, ensuring that the model can better distinguish between different categories of data. This allows for training and validation of the model under different data partitions, further reducing the model's overfitting problem. Simultaneously, the self-supervised learning and model optimization module also feeds back the optimized model information to the sub-domain label generation module to adjust the label generation strategy, forming a closed-loop optimization.
[0049] The domain-invariant identity feature learning module is used to extract domain-invariant features from the optimized model.
[0050] The technical solution adopted by the product of the present invention is: a model-independent single-domain generalized cross-domain gait recognition product, including computer program instructions, which, when the computer program instructions are run on a computer, cause the computer to execute the model-independent single-domain generalized cross-domain gait recognition method.
[0051] Compared with the prior art, the beneficial effects of the present invention include:
[0052] 1. Revealing the underlying data distribution: Through adversarial training, the latent distribution characteristics of the dataset were deeply mined and revealed, successfully separating identity information and domain information. This process not only improved the model's recognition ability but also provided a more accurate foundation for subsequent gait analysis.
[0053] 2. Enhanced adaptability and robustness: This method significantly improves the model's adaptability under different environments and conditions, enabling it to accurately identify unseen gait data.
[0054] 3. Reduced Data Dependence and Costs: Through model-agnostic design, the reliance on specific training datasets is significantly reduced, lowering the costs of data annotation and collection. This feature makes the model easier to deploy in resource-constrained environments and suitable for various practical applications, including smart homes and healthcare monitoring.
[0055] 4. Optimized Feature Extraction and Consistency: The feature extraction process is optimized in a cross-domain environment to ensure consistency of gait features, thereby improving recognition accuracy. By introducing fine-grained feature learning and domain invariance, the model can extract more reliable gait features, improving overall performance.
[0056] 5. Enhanced Reliability and Broad Applicability: This method effectively addresses the differences between data from various sources, improving the reliability of gait recognition in complex situations. It can adapt to various practical application scenarios, such as surveillance, health monitoring, and intelligent assistants, not only meeting security requirements but also supporting personalized services, demonstrating broad application potential and market value. Attached Figure Description
[0057] The technical solutions of the present invention will be further illustrated below using embodiments and specific implementation methods. In addition, some accompanying drawings are used in the description of the technical solutions. Those skilled in the art can obtain other drawings and the intent of the present invention from these drawings without any creative effort.
[0058] Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation
[0059] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0060] This invention, primarily based on the development needs of biometric recognition technology, addresses the performance degradation of existing gait recognition methods due to domain shifts in different scenarios. It proposes a single-domain generalization framework called GaitDG. This framework fully reveals the latent distribution within the dataset, employs adversarial training to effectively separate identity and domain information, and combines data augmentation with diverse dataset distributions to improve model generalization ability. As a model-agnostic method, GaitDG can directly enhance the cross-domain recognition performance of gait recognition models without altering their structure. Experiments on public gait datasets demonstrate that GaitDG significantly improves the cross-domain performance of several state-of-the-art gait recognition models. This invention achieves high generalization and practicality of gait recognition models without requiring target domain data, providing strong support for the application of gait recognition technology in real-world, complex environments.
[0061] Please see Figure 1 This embodiment provides a model-independent single-domain generalized cross-domain gait recognition method, which includes the following steps:
[0062] Step 1: Collect gait data from multiple source domains and extract fine-grained features;
[0063] In one implementation, gait data is collected from multiple source domains, and fine-grained features are extracted. To ensure data diversity and comprehensiveness, this embodiment collects data from different angles and under different lighting conditions. Subsequently, an encoder f is used to perform in-depth analysis on these data, extracting fine-grained features representative of an individual's gait using advanced signal processing and machine learning techniques, including key parameters such as gait cycle, stride length, and gait speed. This embodiment trains two classifiers: one for identifying individual identity and the other for identifying the domain of the data source. The model is trained using a cross-entropy loss function to accurately classify these features, while the backpropagation algorithm is used to optimize the model parameters. During training, a validation set is continuously used to evaluate the classification accuracy and F1 score to ensure the effectiveness of feature extraction.
[0064] In one implementation, gait features are first extracted using encoder f, and then head h is extracted using fine-grained features. fine The gait features obtained from encoder f will be converted into a fine-grained representation.
[0065] The fine-grained feature extraction head h fine It is a pre-trained model; during training, gait data is first collected from multiple source domains and fine-grained features are extracted, and then an identity classifier is used. and domain classifier
[0066] Assign fine-grained features to the corresponding identity label y I and sub-domain tags yD The loss function L used in training fine for:
[0067]
[0068] Where, f(x), h fine (f(x)) represent the gait feature encoding result and the extracted fine-grained features, respectively, L ce Cross-entropy;
[0069] During training, backpropagation is used to update model parameters, and the classification accuracy and F1 score are evaluated using a validation set to ensure the effectiveness of fine-grained feature extraction. Finally, the key gait features extracted by the model are analyzed by visualizing the intermediate layer output to further optimize the model structure.
[0070] Step 2: Extract identity-invariant domain features from fine-grained features;
[0071] In one implementation, a domain classifier and discriminator are used to extract identity-invariant domain features from fine-grained features;
[0072] The "domain classifier and discriminator" mentioned are pre-trained models; during training, the domain classifier g... D and domain discriminator d I , will the top h in the field D The output is categorized into corresponding subdomain labels. D During the training process, d I and h D Participate in combat training, d I Try h D The output is categorized into corresponding identity tags. I , and h D The goal is to minimize this classification error, thereby reducing the differences between identities and obtaining identity-invariant domain features. This adversarial process is achieved through a gradient inversion layer, maximizing the objective of the discriminator module and minimizing the objective of the encoder. The loss function used during training is:
[0073] L domain =L ce (g D (h D (f(x i ))),y D )+λL ce (d I (R λ (h D (f(x i )))),y I );
[0074] Where, f(x)i ) represents the gait feature encoding result, L ce R is the cross-entropy; λ is the hyperparameter, and R is the cross-entropy. λ This represents the gradient reversal layer; the hyperparameter λ determines the weights of the gradients during backpropagation. Furthermore, to ensure that identity-invariant domain features are obtained without affecting the encoder's learning process, the encoder's parameters are frozen in this stage, and only the domain head h is processed. D and domain discriminator d I Optimization is then performed. This allows training to focus on improving the learning of domain features, thereby enhancing the model's robustness to identity changes and effectively mitigating inter-domain shift issues. Through this step, the model can extract domain features with high generalization ability, laying the foundation for subsequent cross-domain gait recognition.
[0075] Step 3: Calculate the centroid of each sub-domain based on the extracted identity-invariant domain features;
[0076] In one implementation, step 3 specifically includes the following sub-steps:
[0077] Step 3.1: Data Augmentation and Style Transfer. To improve the model's generalization ability across different perspectives, this embodiment employs randomized perspective transformation to convert gait data to different perspectives. This allows the model to be trained on a wider range of perspectives, effectively mitigating the domain shift problem caused by perspective changes.
[0078] Due to privacy policy restrictions, the original RGB images of many data points are unavailable, making it impossible to process the data using a segmentation model specific to the target domain and generate a consistent silhouette model style. Therefore, this embodiment utilizes a transfer model based on StarGAN to convert the generated silhouette images into a unified style, thereby enhancing the diversity and robustness of the dataset.
[0079] Specifically, this embodiment has a dataset containing different segmentation models, and uses these segmentation models S1, S2, ..., S... N This method generates silhouettes of these images. Then, in this embodiment, a starGAN is trained to achieve style transfer between two segmentation models. During training, the silhouettes are randomly converted to the styles of different segmentation models to enhance the model's robustness and reduce style optimization. This embodiment denotes these enhanced datasets as χ². aug , where χ aug The specific representation is as follows:
[0080] χ aug ={A p (x i )|x i ∈χ},
[0081] Among them, Ap These are enhancement operations, including random perspective transformation and segmentation model transfer, where the hyperparameter p represents the probability of applying the enhancement.
[0082] Step 3.2: Feature Extraction. After obtaining the augmented dataset, feature extraction is performed to obtain identity-invariant domain features. The specific process includes: (1) Using encoder f: Input the augmented gait data into encoder f to extract basic feature representations. (2) Generating domain features: Through the domain head h D Extract identity-invariant domain features from the features output by the encoder.
[0083] Step 3.3: Initialize a centroid μ for each sub-neighborhood k. k ;
[0084] Step 3.4: Calculate the centroid using a weighted average.
[0085] Among them, e i δ represents the domain label of the i-th sample, and k represents the index of the subdomain; k This represents the indicator function, δ, when sample i belongs to neighborhood k. k =1, otherwise 0; f(x) i ) represents the feature vector after gait data encoding; g D For the domain classifier, h D It is a leader in the field.
[0086] Step 4: Generate sub-domain labels using the calculated centroids;
[0087] In one implementation, step 4 specifically includes the following sub-steps:
[0088] Step 4.1: For each x i Calculate its centroid μ with all sub-domains. k The distance between them;
[0089] Step 4.2: Obtain x i subdomain tag y P =arg min dist(h D (f(x i )),μ k ); where f(x) i ) represents x i The resulting feature vector after encoding, dist() represents each x i with sub-domain centroid μ k The distance between them; h D It is a leader in the field.
[0090] In one implementation, the subdomain label y Py is a trained subdomain label P Computational model;
[0091] The training includes: (1) Self-supervised learning: Self-supervised learning is performed using generated pseudo-labels to improve label quality. (2) Cross-validation: The effectiveness of generated labels is verified through cross-validation technology to ensure the accuracy and reliability of the labels. (3) Model optimization: Based on the validation results, the model parameters are adjusted to optimize model performance and improve the accuracy of gait recognition.
[0092] Step 5: Extract domain-invariant identity features to obtain cross-domain gait recognition results.
[0093] In one implementation, similar to step 2, an identity classifier and a domain discriminator are used to extract domain-invariant identity features;
[0094] The "identity classifier and domain discriminator" mentioned are pre-trained models; during training, the identity classifier g... I and domain discriminator d D , will the identity header h I The output is categorized into corresponding identity tags. I During the training process, d D and h I Participate in combat training, d D Try h I The output is categorized into the corresponding domain label y. D , and h I The goal is to maximize this classification error, thereby minimizing the differences between domains and obtaining domain-invariant identity features. The loss function used during training is:
[0095] L identity =L ce (g I (h I (f(x))),y I )+L trp (x,x n ,x p )+L ce (d D (R λ (h I (f(x))),y D );
[0096] Among them, L ce For cross-entropy, g I It is an identity classifier, h I It is the identity header, f(x) represents the feature vector after gait data encoding, and y I For identity label; L trp Denotes the triplet loss, xn This represents a sample with a different identity from x. p d represents a sample with the same identity as x; D Representation domain discriminator, λ is a hyperparameter, R λ This indicates a gradient inversion layer, y D For subdomain tags.
[0097] The triple loss function improves the model's recognition ability, enabling it to accurately identify gait data across different domains. This process not only enhances the model's generalization ability but also reduces its dependence on specific training datasets, thereby reducing the cost of data labeling and collection and enhancing the model's adaptability and robustness.
[0098] After extracting the domain-invariant identity features, these features are compared with existing features in the database. Specifically, for each gait feature in the database, the distance between the data to be identified and the feature is calculated. If the distance is within a suitable range, the identification is successful, and the gait recognition result is returned.
[0099] This embodiment also provides a model-independent single-domain generalized cross-domain gait recognition device, including: a user dynamic data upload module, a sub-domain centroid calculation module, a sub-domain label generation module, a self-supervised learning and model optimization module, and a domain-invariant identity feature learning module. These modules work closely together to process the user-uploaded dynamic data, ultimately achieving identity feature extraction and model optimization in a cross-domain environment.
[0100] The user dynamic data upload module is primarily responsible for receiving dynamic data generated by users in different fields or environments. The uploaded data will serve as the basis for subsequent sub-domain analysis and tag generation, ensuring the system can accurately process data from different domains.
[0101] The subdomain centroid module is primarily responsible for calculating the centroid of each subdomain based on different data distributions. The centroid represents the central position of the data in each subdomain. Centroid calculation not only reflects the differences in data across domains but also provides crucial support for further label generation and optimization.
[0102] The subdomain label generation module is primarily responsible for generating corresponding labels based on the output of the subdomain centroid calculation module to identify different data points within each subdomain. To ensure the stability and accuracy of the generated labels under different data distributions, the subdomain label generation module optimizes the labels by adjusting their boundaries and distribution to reduce label conflicts between different domains. This ensures that the labels accurately reflect the true distribution of the data, thereby improving the system's generalization ability.
[0103] The self-supervised learning and model optimization module employs a self-supervised learning approach, utilizing the inherent features of the data itself without relying on manually labeled data to improve the model's learning performance. This module employs cross-validation and a triple loss mechanism, calculating the distance relationships between samples to ensure the model can better distinguish between different categories of data. This allows for training and validation of the model under different data partitions, further reducing overfitting. Simultaneously, the self-supervised learning and model optimization module feeds back the optimized model information to the sub-domain label generation module, adjusting the label generation strategy and forming a closed-loop optimization process. In this closed-loop optimization process, label generation and model optimization interact, ensuring the system can dynamically adjust for data from different domains, improving overall recognition accuracy.
[0104] The domain-invariant identity feature learning module is primarily responsible for extracting domain-invariant features from the optimized model. Domain-invariant features are those that maintain consistency across different domains or distributions, ensuring the system can accurately identify user identity features in cross-domain data environments. By learning domain-invariant features, the system can maintain accurate identity feature recognition even when faced with data from different domains or environments, demonstrating strong robustness and consistency.
[0105] Through the collaborative work of the aforementioned modules, this invention effectively achieves cross-domain identity feature learning and model optimization, ensuring accurate identification and classification in multi-domain environments. The system forms a closed-loop optimization process through sub-domain centroid calculation, label generation, self-supervised learning, and feature extraction, extracting domain-invariant identity features from data across different domains, significantly improving the system's generalization ability and recognition accuracy.
[0106] This embodiment also provides a model-independent single-domain generalized cross-domain gait recognition product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the model-independent single-domain generalized cross-domain gait recognition method.
[0107] The invention will be further illustrated below through specific experiments.
[0108] This invention evaluates the proposed method on three gait recognition datasets, including two widely used datasets, CASIA-B and OUMVLP, and a large-scale real-world dataset, grow.
[0109] CASIA-B comprises 10 gait sequences: 6 normal gait (NM), 2 backpack gait (BG), and 2 coat gait (CL). Each sequence includes 11 visual angles (from 0° to 180°, in 18° intervals). Each subject had 3 clothing variations. Fifty subjects were selected for this experiment.
[0110] The OUMVLP dataset contains 14 perspectives (0°-90° and 180°-270°, one perspective every 15°), with two normal gait (NM) sets for each perspective. 5153 subjects were used in the experiment.
[0111] The GREW dataset is a large-scale, real-world gait dataset containing 102,887 gait sequences with rich gait variations and diverse real-world conditions. In this experiment, 20,000 subjects were selected from the GREW dataset for training, and the model's performance on cross-domain gait recognition tasks was evaluated.
[0112] In the experimental setup, the source domain was trained using the GREW dataset, and the target domains were the CASIA-B and OUMVLP datasets for testing. All gait images were resized to 64×44 pixels, and each gait sequence contained 30 frames. For comparative experiments, three benchmark models were selected: GaitSet, GaitPart, and GaitGL. GaitDG (the method of this invention) was improved upon these benchmark models, and the improved models were compared with PSIM (another domain adaptation framework). For training and optimization settings, all models used the Adam optimizer with a learning rate of 0.0001. The GaitDG training pipeline consisted of 60,000 iterations of the baseline model followed by 400 GaitDG iterations, with 600 parameter updates per iteration. In the experiments, λ = 1.0, p = 0.2, and K = 8 were chosen, where K is a hyperparameter controlling the number of sub-domains. For data augmentation, two methods were used: Random Viewpoint Transformation (RPT) and Segmentation Model Transfer (SMT). Four segmentation models, namely JPPNet, SAM, YOLOv8, and DeeplabV3+, were used to segment CASIA-B images, generating four training datasets for training.
[0113] The experiment was conducted on an Ubuntu 22.04 system equipped with an NVIDIA GeForce RTX 4090 GPU and an Intel i9-12900K processor. Three benchmark models, GaitSet, GaitPart, and GaitGL, were used to evaluate the effect of the GaitDG method in improving the generalization ability of the models.
[0114] On the CASIA-B dataset, the GaitDG method significantly improves the performance of three baseline models: GaitSet (71.2%), GaitPart (70.2%), and GaitGL (73.4%), representing improvements of 4.9%, 5.1%, and 2.9% respectively compared to the original models. Under both BG and CL conditions, GaitDG outperforms other baseline models in most perspectives, especially under the GaitGL model, where it performs exceptionally well.
[0115] On the OU-MVLP dataset, GaitDG also showed significant improvements compared to the original model and PSIM. Specifically, GaitSet improved by 1.7%, GaitPart by 0.8%, and GaitGL by 1.7%. Although its performance on this dataset is slightly inferior to CASIA-B, GaitDG still demonstrates strong cross-domain recognition capabilities.
[0116] In addition, an ablation experiment was conducted in this embodiment to further explore the impact of each component on the performance of GaitDG.
[0117] First, fine-grained feature learning and data augmentation played a crucial role in improving the model. Experimental results show that removing fine-grained feature learning reduced the average rank-1 accuracy by 1.4%, removing random viewpoint transformation reduced the accuracy by 0.6%, and removing segmentation model transfer reduced the accuracy by 1.2%. These results demonstrate that FGFL and data augmentation play a significant role in helping the model extract more refined features and enhancing its generalization ability, significantly improving the performance of GaitDG in gait recognition.
[0118] Secondly, the number of subdomains, K, also significantly impacts model performance. Experiments show that model performance is poor when K=2 or K=10, indicating that too few or too many subdomains affect the model's performance in cross-domain transfer. Too few subdomains may fail to fully capture the inherent distribution of the data, while too many subdomains may introduce redundant features, increasing the difficulty of model learning. Therefore, setting a reasonable K value is crucial for extracting domain-invariant features and improving cross-domain recognition capabilities.
[0119] Finally, the size of the unseen data also significantly impacted model performance. Specifically, GaitDG showed the most significant performance improvement when the OU-MVLP dataset was small (e.g., 1% of the dataset size), with a rank-1 accuracy increase of 4.2%, while the improvement was only 1.7% when the dataset size reached 100%. This result indicates that GaitDG is better able to adapt to data diversity and improve generalization ability when dealing with small-scale datasets, especially exhibiting stronger adaptability and recognition capabilities when faced with unseen data.
[0120] This invention, through experimental verification on multiple gait datasets, significantly improves the accuracy and robustness of gait recognition. Compared with existing technologies, this invention can effectively identify more unseen gait data under the same conditions and can adapt to changes in different environments and conditions. Furthermore, by reducing dependence on specific training datasets, this invention lowers the cost of data annotation and collection, facilitating the widespread adoption of gait recognition technology.
[0121] It should be understood that the embodiments described above are only some, not all, of the embodiments of the present invention. Furthermore, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form feasible technical solutions. Such combinations are not constrained by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0122] It should be understood that the above description of the preferred embodiments is quite detailed, but it should not be considered as a limitation on the scope of protection of this invention. Those skilled in the art, under the guidance of this invention, can make substitutions or modifications without departing from the scope of protection of the claims of this invention, and all such substitutions or modifications fall within the scope of protection of this invention. The scope of protection of this invention should be determined by the appended claims.
Claims
1. A model-independent single-domain generalized cross-domain gait recognition method, characterized in that, Includes the following steps: Step 1: Collect gait data from multiple source domains and extract fine-grained features; Step 2: Extract identity-invariant domain features from fine-grained features; Step 3: Calculate the centroid of each sub-domain based on the extracted identity-invariant domain features; Step 3 includes the following sub-steps: Step 3.1: Data augmentation and style transfer to obtain an augmented dataset; First, different segmentation models were used. To generate gait data The silhouette of the image is then transferred based on the StarGAN segmentation model to convert the generated silhouette image into a uniform style; Step 3.2: After obtaining the augmented dataset, perform feature extraction to obtain identity-invariant domain features; Step 3.3: Initialize a centroid for each sub-domain k. ; Step 3.4: Calculate the centroid using a weighted average. ; in, Let k represent the domain label of the i-th sample, and k represent the index of the subdomain. This indicates the indicator function, which states that when sample i belongs to neighborhood k, =1, otherwise 0; Representing gait data Encoded feature vector; For the domain classifier, As a leader in the field; Step 4: Generate sub-domain labels using the calculated centroids; Step 5: Extract domain-invariant identity features to obtain cross-domain gait recognition results.
2. The model-independent single-domain generalized cross-domain gait recognition method according to claim 1, characterized in that: In step 1, encoder f is first used to extract gait features, and then fine-grained features are used to extract the head. The gait features obtained from encoder f will be converted into a fine-grained representation. The fine-grained feature extraction head It is a pre-trained model; during training, gait data is first collected from multiple source domains and fine-grained features are extracted, and then an identity classifier is used. and domain classifier Assign fine-grained features to the corresponding identity labels Sub-domain tags The loss function used during training for: ; in, This represents the feature vector after gait data encoding. This indicates the fine-grained feature extraction head. Cross-entropy; During training, backpropagation is used to update model parameters, and the classification accuracy and F1 score are evaluated using a validation set to ensure the effectiveness of fine-grained feature extraction. Finally, the key gait features extracted by the model are analyzed by visualizing the intermediate layer output to further optimize the model structure.
3. The model-independent single-domain generalized cross-domain gait recognition method according to claim 1, characterized in that: In step 2, a domain classifier and an identity discriminator are used to extract identity-invariant domain features from fine-grained features; The domain classifier and identity discriminator are pre-trained models; During training, a domain classifier is used. and identity detector To become the leader in the field The output is categorized into corresponding subdomain labels. During the training process, and Participate in combat training, Try to The output is categorized into corresponding identity tags. ,and To maximize this classification error, thereby minimizing the differences between identities and obtaining identity-invariant domain features; The loss function used in training is: ; in, For cross-entropy, For the domain classifier, As a leader in the field, Gait data Encoded feature vector, For subdomain tags; For hyperparameters, For identity verification, This indicates a gradient inversion layer. For identity tags; During training, the parameters of encoder f are frozen, and only the neighborhood head is used. and Domain Discriminator Optimize.
4. The model-independent single-domain generalized cross-domain gait recognition method according to claim 1, characterized in that, Step 4 includes the following sub-steps: Step 4.1: For each gait data Calculate its centroid with all subdomains. The distance between them; Step 4.2: Obtain subdomain tags ;in, express The feature vector obtained after encoding Indicate each With subdomain centroid The distance between them; It is a leader in the field.
5. The model-independent single-domain generalized cross-domain gait recognition method according to claim 1, characterized in that: In step 5, an identity classifier and a domain discriminator are used to extract domain-invariant identity features; The identity classifier and domain discriminator are pre-trained models; During training, an identity classifier is used. and Domain Discriminator , to identify the head The output is categorized into corresponding identity tags. ; During the training process, and Participate in combat training, Try to The output is categorized into corresponding domain labels. ,and The goal is to maximize this classification error, thereby minimizing the differences between domains and obtaining domain-invariant identity features. The loss function used in training is: ; in, For cross-entropy, It is an identity classifier. It is the head of the identity. This represents the feature vector after gait data encoding. For identity tags; Indicates the loss of the triplet. Indicates and x Samples from different identities, Indicates and x Samples with the same identity; Discriminator for the domain, For hyperparameters, This indicates a gradient inversion layer. For subdomain tags.
6. The model-independent single-domain generalized cross-domain gait recognition method according to claim 1, characterized in that: In step 5, after extracting the domain-invariant identity features, the features are compared with existing features in the database. For each gait feature in the database, the distance between the data to be identified and the feature is calculated. If the distance between the two is within a certain appropriate range, the identification is successful and the gait identification result is returned.
7. The model-independent single-domain generalized cross-domain gait recognition method according to any one of claims 1-6, characterized in that: In step 4, the sub-domain label These are pre-trained subdomain labels. Computational model; The training includes: (1) self-supervised learning: using generated pseudo-labels for self-supervised learning to improve label quality; (2) cross-validation: verifying the effectiveness of generated labels through cross-validation technology to ensure the accuracy and reliability of labels; (3) based on the validation results, adjusting sub-domain labels. The computational model parameters were adjusted to optimize model performance and improve the accuracy of gait recognition.
8. A model-independent single-domain generalized cross-domain gait recognition device, used to implement the method described in any one of claims 1-7; characterized in that: It includes a user dynamic data upload module, a subdomain centroid calculation module, a subdomain label generation module, a self-supervised learning and model optimization module, and a domain-invariant identity feature learning module; The user dynamic data upload module is used to receive dynamic data generated by users in different fields or environments; The subdomain centroid module is used to calculate the centroid of each subdomain based on different data distributions; The subdomain label generation module is used to generate corresponding labels based on the output of the subdomain centroid calculation module to identify different data points in each subdomain. At the same time, the subdomain label generation module optimizes the labels by adjusting the boundaries and distribution of the labels to reduce label conflicts between different domains and ensure that the labels can accurately reflect the true distribution of the data. The self-supervised learning and model optimization module employs a self-supervised learning method to improve the model's learning performance by utilizing the inherent features of the data without relying on manual labeling. This module uses cross-validation and a triple loss mechanism to calculate the distance relationship between samples, ensuring that the model can better distinguish between different categories of data. This allows for training and validation of the model under different data partitions, further reducing the model's overfitting problem. Simultaneously, the self-supervised learning and model optimization module also feeds back the optimized model information to the sub-domain label generation module to adjust the label generation strategy, forming a closed-loop optimization. The domain-invariant identity feature learning module is used to extract domain-invariant features from the optimized model.
9. A model-independent single-domain generalized cross-domain gait recognition product, comprising computer program instructions, characterized in that: When the computer program instructions are executed on a computer, the computer performs the model-independent single-domain generalized cross-domain gait recognition method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Cross-view-angle gait recognition method based on walking view angle prediction
CN114360058A
Multi-modal gait recognition method and system
CN118349949A
Cross-domain gait re-identification method based on optimized clustering algorithm
CN111931619A
Cross-domain video action recognition method, device and equipment and computer readable storage medium
CN115439791A