Pedestrian re-identification method based on prototype guided knowledge propagation and adaptive learning
Through the method of prototype-guided knowledge propagation and adaptive parameter evolution, the problems of catastrophic forgetting and privacy leakage in lifelong pedestrian re-identification are solved, and efficient compatibility of new and old knowledge and secure lifelong pedestrian re-identification are achieved.
Patent Information
- Application Number
- CN202510737132.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-06-04
AI Technical Summary
Existing lifelong person re-identification methods face the problem of catastrophic forgetting when processing incremental and dynamic data, have difficulty balancing the learning of old and new knowledge, and suffer from problems of privacy leakage and computational overhead.
The method of prototype-guided knowledge propagation and adaptive parameter evolution is adopted. By building a prototype library, cross entropy loss, triple loss and Gaussian noise enhancement are used to dynamically update model parameters to achieve compatibility and privacy protection of new and old knowledge.
It effectively solves the problem of catastrophic forgetting, improves the adaptability and discriminability of the model, meets data privacy requirements, and provides a secure lifelong pedestrian re-identification solution.
Smart Images

Figure CN120726668A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image retrieval technology in deep learning, and relates to a lifelong pedestrian re-identification method, system and product, and specifically to a lifelong pedestrian re-identification method, system and product based on the combination of prototype-guided knowledge propagation (PKP) and adaptive parameter evolution (APE). Background Art
[0002] Person re-identification (PRED) is a fundamental task in computer vision that aims to match the same person across different locations and times (References 1, 2). Traditional PRED methods have achieved excellent results by leveraging deep learning models and large-scale static datasets where all training data is available simultaneously (References 3-6). However, in real-world scenarios, such as surveillance systems that generate continuous streaming data, these models face significant challenges due to their inability to effectively process incremental and dynamic data (References 7, 8). This limitation has led to the emergence of lifelong PRED, which aims to enable PRED models to acquire new knowledge from streaming data while retaining previously learned knowledge.
[0003] The main challenge of lifelong person re-identification lies in addressing catastrophic forgetting, a common phenomenon in lifelong learning tasks. This problem is particularly pronounced in lifelong person re-identification due to the unique characteristics of the task. First, as a fine-grained classification problem, intra-person variations caused by temporal, environmental, and camera viewpoint changes are often large. Second, subtle inter-person differences can lead to severe distribution overlap, making it difficult to retain discriminative knowledge for each individual. These factors exacerbate the forgetting of previously learned knowledge when learning from new data.
[0004] To address catastrophic forgetting, most existing lifelong person re-identification methods employ additional memory to store example data from previous tasks, which can be reused when training on new datasets (References 7-9). However, this memory-based approach raises privacy concerns and introduces additional computational overhead. These limitations are particularly pronounced given the private nature of person images. Some methods replace sample-based approaches with prototype-based approaches in category-incremental learning to address both privacy and memory concerns (Reference 10). However, these methods struggle to adapt to the training process for lifelong person re-identification, as lifelong person re-identification is framed as a retrieval task that prioritizes the embedding capabilities of feature extractors. This requires constructing a more discriminative feature space that is effective across both seen and unseen domains. Consequently, prototype-based approaches, commonly used in category-incremental learning, struggle to achieve satisfactory performance in lifelong person re-identification. After each training task, existing lifelong person re-identification methods merge the old model with the new one to ensure compatibility between the stored prototypes and the updated feature extractor. However, this static merging strategy ignores the unique characteristics of each task. This approach makes it difficult to balance the retention of old knowledge and the learning of new knowledge during training.
[0005] References: [Document 1]Wuxuan Shi and Mang Ye. Prospec-tive representation learning for non-exemplar class-incremental learning. In NeurIPS, 2024. [Literature 2] Qingming Leng, Mang Ye, and Qi Tian. A survey of open-worldperson re-identification. IEEE TCSVT, 30(4):1092–1108, 2019. [Reference 3] Zongyi Li, Jianbo Li, Yuxuan Shi, Hefei Ling, Jiazhong Chen, Runsheng Wang, and Shijuan Huang. Cross-modal generation and alignment via attribute-guided prompt for unsupervised text-based person retrieval. In Proceedings of the International Joint Conference on Artificial Intelligence. 1047–1055, 2024. [Reference 4] Pingyang Dai, Rongrong Ji, Haibin Wang, Qiong Wu, and Yuyu Huang. Cross-modality person re-identification with generative adversarial training. In IJ-CAI, volume 1, page 6, 2018. [Reference 5] Yaqing Zhang, Xi Li, Liming Zhao, and Zhongfei Zhang.Semantics-aware deep correspondence structure learning for robust person re-identification. In IJCAI, pages 3545–3551, 2016. [Reference 6] Mang Ye, Zheng Wang, Xiangyuan Lan, and Pong C Yuen. Visible-thermal person re-identification via dual-constrained top-ranking. In IJCAI, volume 1, page 2, 2018. [Reference 7] Wenhang Ge, Junlong Du, Ancong Wu, Yuqiao Xian, Ke Yan, Feiyue Huang, and Wei-Shi Zheng. Lifelong person re-identification by pseudo task knowledge preservation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 688–696, 2022. [Reference 8] Guile Wu and Shaogang Gong. Generalising without forgetting for lifelong person re-identification. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 2889–2897, 2021. [Reference 9] Chunlin Yu, Ye Shi, Zimo Liu, Shenghua Gao, and Jingya Wang. Lifelong person re-identification via knowledge refreshing and consolidation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 3295–3303, 2023. [Reference 10] Kunlun Xu, Xu Zou, Yuxin Peng, and Jiahuan Zhou. Distribution-aware knowledge prototyping for non-exemplar lifelong person re-identification. In CVPR, pages 16604–16613, 2024. Summary of the Invention In order to avoid storing historical samples, fundamentally eliminate the risk of privacy leakage, and provide an efficient and secure solution for continuous learning in dynamic networks, the present invention proposes a lifelong person re-identification method, system and product that combines prototype-guided knowledge propagation with adaptive parameter evolution.
[0006] The technical solution adopted by the method of the present invention is: a pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning, and the training process includes the following steps: Step 1: Input the image data into the model for feature extraction and use cross entropy loss Measuring the difference between the model's predictions and the true labels helps the model learn the characteristics of pedestrians of different identities; Step 2: Compute and store a prototype for each identity in the deep feature space; Step 3: Using the features obtained in step 2, use triples , bringing features of the same class closer together and features of different classes farther apart in the feature space to enhance the model’s ability to distinguish; Step 4: Randomly select a part of the stored prototype set for Gaussian sampling enhancement; Step 5: Using the enhanced prototype, by setting the margin parameter, the prototypes of different classes in the feature space are pushed away from each other, and a specific loss function L is used. pkp measure; Step 6: Calculate the loss function for each model parameter The gradient and its absolute value are used to update the model parameters through the stochastic gradient descent optimization strategy by backpropagating the gradient of the loss in the backpropagation process according to the predefined gradient amplitude threshold. Used to balance the learning of new and old knowledge; Step 7: After training the new task t, use the updated parameters to dynamically determine the fusion weights based on the relative influence of the current task dataset and perform dynamic model parameter fusion to maintain the compatibility of new and old knowledge.
[0007] Preferably, in step 1, the cross entropy loss , is used to measure the difference between the model prediction results and the true label. The smaller its value, the better the model learning effect;
[0008] When training the model, the dataset is divided into multiple batches for training. N is the number of samples in each batch. i is the sample index, ranging from 1 to N, used to traverse each sample in the batch. C represents the total number of different categories in the dataset. In the person re-identification task, it is the number of different pedestrian identities. c is the category index, ranging from 1 to C, used to traverse each category. Represents the one-hot encoding of the ground truth label of sample i: if sample i truly belongs to category c, then y_ic = 1; otherwise y_ic = 0. It represents the probability that the model predicts that the i-th sample belongs to the c-th category, and its value is between 0 and 1.
[0009] As a preference, in step 2, the prototype calculated for the new category at time t is ; where n is the new category The index of the sample in , from 1 to , used to traverse each sample in the new category; Is a function that uses the parameters The model pair belongs to the new category Sample Perform feature extraction and obtain samples Feature representation under the current model.
[0010] As a preference, in step 3, a triplet is used. , reducing the distance between embedding vectors of the same identity and increasing the distance between embedding vectors of different identities, thereby enhancing the model's ability to distinguish them and improving retrieval performance; ; in, represents the anchor feature, p represents the positive sample feature, and n represents the negative sample feature; m is a hyperparameter called the margin value, which is used to control the expected distance between the positive sample pair and the negative sample pair.
[0011] As a preference, in step 4, a portion of the prototypes is randomly selected for Gaussian sampling and enhanced to obtain an enhanced model. ; represents the prototype before enhancement, represents the enhanced prototype; is from a zero mean, covariance matrix A random noise vector drawn from a Gaussian distribution, Is a hyperparameter that controls the size of the noise; I is the unit matrix, whose dimension is the same as the prototype feature The dimensions of are the same, ensuring that the noise is independent in each feature dimension and the variance is .
[0012] In step 5, ;in, It is a margin parameter used to ensure that a minimum distance is maintained between the new task features and the enhanced prototype; Represents the number of anchor points and negative samples extracted from the enhanced prototype; represents the anchor feature, and n represents the negative sample feature.
[0013] Preferably, in step 6, the loss function L is calculated with respect to each model parameter The gradient of L, these gradients quantify the sensitivity of the loss to each parameter; the absolute value of the gradient is then calculated | L|; then a threshold is introduced , only when the gradient amplitude of a parameter is greater than the threshold When , it is selectively updated; otherwise, the parameter remains unchanged;
[0014] in, is a predefined gradient magnitude threshold.
[0015] As a preference, in step 7, after training a new task t, the fused model parameters ;in, and Represent the parameters of the new model and the old model respectively; fusion weight Dynamically determined based on the relative impact of the current task dataset, Represents the number of samples in the training dataset for task t.
[0016] The technical solution adopted by the system of the present invention is: a pedestrian re-identification system based on prototype-guided knowledge propagation and adaptive learning, comprising: one or more processors; A storage device is used to store one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning.
[0017] The technical solution adopted by the product of the present invention is: a pedestrian re-identification product based on prototype-guided knowledge propagation and adaptive learning, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning.
[0018] Compared with the prior art, the present invention has the following advantages: (1) This paper proposes a sample-independent lifelong person re-identification method that alleviates the catastrophic forgetting problem by building a prototype library, while addressing the challenges of privacy protection and storage limitations. (2) This paper designs an adaptive parameter evolution strategy, which dynamically integrates new and old knowledge by evaluating task differences and selectively updates model parameters, effectively enhancing the model's adaptability; (3) The present invention demonstrates excellent performance on benchmark datasets, and its effectiveness verification sets a new benchmark for long-term person re-identification tasks; (4) The present invention constructs a dual optimization system for feature space discriminability and model parameter adaptability through the organic combination of prototype-guided knowledge propagation and adaptive parameter learning. The prototype-guided knowledge propagation module enforces the separation of new and old task feature distributions through Gaussian enhanced prototypes and improved triplet loss, significantly improving intra-class compactness and inter-class discrimination; the adaptive parameter learning module achieves adaptive balance between new and old knowledge based on gradient amplitude screening and dynamic weight fusion, avoiding the traditional static fusion strategy's neglect of task differences; (5) This invention completely abandons the storage of historical samples and only represents old knowledge through prototypes, which meets the requirements of data privacy regulations, provides security protection for practical applications in sensitive scenarios such as security and retail, and fills the compliance loopholes of existing memory-based methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The technical solution of the present invention is further illustrated below using embodiments and specific implementation methods. In addition, some drawings are also used in the process of illustrating the technical solution. For those skilled in the art, other drawings and the intention of the present invention can be obtained based on these drawings without making any creative efforts.
[0020] Figure 1 : Method principle of the embodiment of the present invention; Figure 2 : Schematic diagram of the principle of separation loss and internal distinction loss in PKP according to an embodiment of the present invention; Figure 3 : Schematic diagram of the principle of gradient screening and dynamic fusion process in APE of an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to facilitate ordinary technicians in this field to understand and implement the present invention, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.
[0022] Please see Figure 1 、 Figure 2 and Figure 3 This embodiment provides a person re-identification method; the training process includes the following steps: Step 1: Input the image data into the model for feature extraction and use cross entropy loss Measuring the difference between the model's predictions and the true labels helps the model learn the characteristics of pedestrians of different identities; The cross entropy loss can be expressed as:
[0023] Represents classification loss (cross entropy loss), which is used to measure the difference between the model's predictions and the true labels. The smaller its value, the better the model learning effect. N represents the number of samples in a batch. When training a model, the dataset is usually divided into multiple batches for training. N is the number of samples in each batch. i is the sample index, ranging from 1 to N, used to traverse each sample in the batch. C represents the total number of different categories in the dataset. In the pedestrian re-identification task, it is the number of different pedestrian identities. c is the category index, ranging from 1 to C, used to traverse each category. Represents the one-hot encoding of the ground truth label of sample i: if sample i truly belongs to category c, then y_ic = 1; otherwise y_ic = 0. It represents the probability that the model predicts that the i-th sample belongs to the c-th category, and its value is between 0 and 1.
[0024] Step 2: Compute and store a prototype for each identity in the deep feature space;
[0025] Here Represents the prototype calculated for the new category at time t, n is the new category The index of the sample in , from 1 to , used to traverse each sample in the new category. Is a function that uses the parameters The model pair belongs to the new category Sample Perform feature extraction and obtain samples Feature representation under the current model.
[0026] Step 3: Using the features obtained in step 2, use triples , the features of the same class in the feature space are brought closer together and the features of different classes are pushed further away to enhance the model's ability to distinguish. First, the features of the same class in the feature space are brought closer together and the features of different classes are pushed further away. Specifically, it is expressed as:
[0027] in, represents the anchor feature, p represents the positive sample feature, and n represents the negative sample feature; m is a hyperparameter called the margin value, which is used to control the expected distance between the positive sample pair and the negative sample pair.
[0028] Step 4: Randomly select a portion of the stored prototype set for Gaussian sampling enhancement; specifically, it is expressed as:
[0029] represents the enhanced prototype, is from a zero mean, covariance matrix A random noise vector drawn from a Gaussian distribution, Is a hyperparameter that controls the size of the noise; I is the identity matrix, whose dimension is the same as the prototype feature The dimensions of are the same, ensuring that the noise is independent in each feature dimension and the variance is .
[0030] Step 5: Using the enhanced prototype, by setting the margin parameter, the prototypes of different classes in the feature space are pushed away from each other, and a specific loss function L is used. pkp Measure; specifically expressed as follows:
[0031] in, It is a margin parameter used to ensure that a minimum distance is maintained between the new task features and the enhanced prototype; Represents the number of anchor points and negative samples extracted from the enhanced prototype; represents the anchor feature, and n represents the negative sample feature.
[0032] Step 6: Calculate the loss function for each model parameter The gradient and its absolute value of are used to selectively update the model parameters according to the pre-defined gradient amplitude threshold to improve training efficiency and reduce the risk of overfitting. In the back-propagation process, the gradient of the back-propagation loss is used to update the model parameters through the stochastic gradient descent optimization strategy. Used to balance the learning of new and old knowledge (the default setting is 1.5); By calculating the loss function L with respect to each model parameter The gradient of L, these gradients quantify the sensitivity of the loss to each parameter and provide a way to measure the relevance of the parameters to the task. The absolute value of the gradient is then calculated, i.e. | L|. Then a threshold is introduced Only when the gradient amplitude of a parameter is greater than the threshold We selectively update it when ; otherwise, the parameter remains unchanged. This process can be expressed as:
[0033] Here, This approach not only improves the efficiency of the training process by focusing on the parameters that have the greatest impact on the current task, but also reduces the risk of overfitting by retaining parameters that are less sensitive to the current task.
[0034] Step 7: After training the new task t, use the updated parameters to dynamically determine the fusion weights based on the relative influence of the current task dataset and perform dynamic model parameter fusion to maintain the compatibility of new and old knowledge.
[0035] Fusion model parameters Determine as follows:
[0036] Fusion weight It is dynamically determined based on the relative influence of the current task dataset. Larger datasets are generally able to more comprehensively reflect the characteristics of the task, so they should have a greater impact on the model parameters. This influence is quantified by the size of the dataset, as shown below:
[0037] in, Represents the number of samples in the training dataset for task t.
[0038] Finally, after each task is trained, the mean average precision (mAP) and Rank-1 accuracy (Rank-1 Accuracy) are calculated on each validation set during the testing phase. The specific calculation method is as follows:
[0039]
[0040]
[0041] Where Q represents the total number of queries and q represents the qth query image. The image with the highest similarity in the gallery returned by the representative model for the query q, represents the set of all images in the gallery that belong to the same identity as the query q (positive sample set), is an indicator function, which has a value of 1 if the condition is met, and 0 otherwise. represents the average precision of the qth query, represents the total number of positive samples related to query q in the gallery (i.e., the number of images with the same identity). K is the number of all images in the gallery (i.e., the total length of the retrieval results), is the k-ranked image returned by the model. Precision@k(q) is the proportion of correct matches among the top k results.
[0042] The present invention provides a person re-identification system based on prototype-guided knowledge propagation and adaptive learning, comprising: one or more processors; A storage device is used to store one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning.
[0043] The present invention provides a pedestrian re-identification product based on prototype-guided knowledge propagation and adaptive learning, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning.
[0044] The deep learning framework used in this paper is Pytorch, version 1.9.0, and CUDA version 11.3. The hardware environment of the experiment is NVIDIA GeForce RTX 3090 graphics card and Intel(R) Xeon(R) Gold 6240C processor.
[0045] We conduct extensive experiments on five mainstream lifetime person re-identification benchmark datasets: Market-1501, CUHK-SYSU, DukeMTMC-ReID, MSMT17-V2, and CUHK03.
[0046] To simulate the continuous learning process in real scenarios, the present invention uses two preset training sequences for evaluation: Sequence 1: Market-1501 → CUHK-SYSU → DukeMTMC-ReID → MSMT17-V2 → CUHK03; Sequence 2: DukeMTMC-ReID → MSMT17-V2 → Market-1501 → CUHK-SYSU → CUHK03. By inputting data streams in different orders, the model's adaptability to dynamic task distributions was tested. To further evaluate the model's generalization ability, zero-shot testing was also performed on seven cross-domain datasets not used in training: CUHK01, CUHK02, VIPeR, PRID, i-LIDS, GRID, and SenseReID. This design comprehensively validated the method's robustness and knowledge transfer efficiency in open environments.
[0047] To verify the effectiveness of the present invention, the present invention is compared with existing lifelong pedestrian re-identification methods. The existing lifelong pedestrian re-identification methods mainly include: (1)Zhicheng Sun and Yadong Mu. Patch-based knowledge distillation for lifelong person re-identification. In Proceedings of the 30th ACM Interna-tional Conference on Multimedia, pages 696–707, 2022. (2)Wenhang Ge, Junlong Du, AncongWu, Yuqiao Xian, Ke Yan, FeiyueHuang, and Wei-Shi Zheng. Lifelong person re-identification by pseudo taskknowl-edge preservation. In Proceedings of the AAAI Confer-ence on ArtificialIntelligence, volume 36, pages 688–696, 2022. (3)Zhicheng Sun and Yadong Mu. Patch- based knowledge distillation for lifelong person re-identification. In Proceedings of the 30th ACM Interna-tional Conference on Multimedia, pages 696–707, 2022. (4)Nan Pu, Zhun Zhong, Nicu Sebe, and Michael S Lew. A memorizing and generalizing frame-work for lifelong person re-identification. IEEE Transac-tions on Pattern Analysis and Machine Intelligence, 2023. (5)Kunlun Xu, Xu Zou, Yuxin Peng, and Jiahuan Zhou. Distribution-aware knowledge prototyp-ing for non-exemplar lifelong person re-identification. In CVPR, pages 16604–16613, 2024. (6)Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEEtransactions on pattern analysis and machine intelligence, 40(12):2935–2947,2017. (7)Frederick Tung and Greg Mori. Similarity-preserving knowledgedistillation. In Proceed-ings of the IEEE / CVF international conference oncom-puter vision, pages 1365–1374, 2019. (8)Wuxuan Shi and Mang Ye. Prototype reminiscence and augmentedasymmetric knowledge ag-gregation for non-exemplar class-incrementallearning. In Proceedings of the IEEE / CVF International Conference on ComputerVision, pages 1772–1781, 2023. (9)Nader Asadi, MohammadRezaDavari,SudhirMudur, Rahaf Aljundi, andEugene Belilovsky. Prototype-sample relation distillation: towards replay-free continual learning. In International Conference on Ma-chine Learning, pages 1093–1106. PMLR, 2023. Tested in order 1 of the dataset, the mAP and rank-1 results are shown in Table 1: Table 1
[0048] Tested in order 2 of the dataset, the mAP and rank-1 results are shown in Table 2: Table 2
[0049] As can be seen from Tables 1 and 2, the present invention demonstrates excellent performance advantages in the lifetime person re-identification task. In terms of average mAP and Rank-1 accuracy in the seen domain, the present invention improves by 14.1% / 13.5% (rank 1) and 13% / 14.1% (rank 2) respectively compared with the existing best method. In terms of average mAP and Rank-1 accuracy in the unseen domain, the present invention improves by 14.6% / 13.7% (rank 1) and 11.9% / 11.7% (rank 2) respectively compared with the existing method. The training curve shows that its performance still maintains a steady growth in the unseen environment, indicating that the embedded features have stronger discriminability and distribution consistency. The main reasons are: (1) Parameter screening and task-aware fusion strategy based on gradient amplitude adaptively adjust the weights of the new and old models to avoid the limitations of static fusion; (2) Through noise enhancement prototype and improved triple loss, the new and old task feature spaces are forced to separate, effectively suppressing catastrophic forgetting, while improving the intra-class compactness and inter-class discrimination of the embedding space.
[0050] It should be understood that the embodiments described above are only some of the embodiments of the present invention, rather than all of the embodiments. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention may be arbitrarily combined with each other to form a feasible technical solution. Such combination is not restricted by the order of steps and / or structural composition mode, but must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is mutually inconsistent or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0051] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of protection of the patent of the present invention. Under the guidance of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested by the present invention shall be based on the attached claims.
Claims
1. A person re-identification method based on prototype-guided knowledge propagation and adaptive learning, characterized by: A sample-free approach using prototype-guided knowledge propagation and adaptive learning for lifelong person re-identification. The training process consists of the following steps: Step 1: Input the image data into the model for feature extraction and use cross entropy loss Measuring the difference between the model's predictions and the true labels helps the model learn the characteristics of pedestrians of different identities; Step 2: Compute and store a prototype for each identity in the deep feature space; Step 3: Using the features obtained in step 2, use triple loss , the features of the same class in the feature space are brought closer and the features of different classes are pushed further away to enhance the model's ability to distinguish; Step 4: Randomly select a part from the stored prototype set for Gaussian sampling enhancement; Step 5: Using the enhanced prototype, by setting the margin parameter, the prototypes of different classes in the feature space are pushed away from each other, and a specific loss function L is used. pkp measure; Step 6: Calculate the loss function for each model parameter The gradient and its absolute value are updated by the stochastic gradient descent optimization strategy during the back propagation process based on the predefined gradient amplitude threshold. Used to balance the learning of new and old knowledge; Step 7: After training the new task t, use the updated parameters to dynamically determine the fusion weights based on the relative influence of the current task dataset and perform dynamic model parameter fusion to maintain the compatibility of new and old knowledge.
2. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 1, the cross entropy loss , is used to measure the difference between the model prediction results and the true label. The smaller its value, the better the model learning effect; When training the model, the data set is divided into multiple batches for training, and N is the number of samples contained in each batch; i is the sample index, ranging from 1 to N, used to traverse each sample in the batch; C represents the total number of different categories in the dataset. In the pedestrian re-identification task, it is the number of different pedestrian identities; c is the category index, ranging from 1 to C, used to traverse each category; Represents the one-hot encoding of the true label of sample i: If sample i truly belongs to category c, then = 1; otherwise = 0; The model predicts i The probability that a sample belongs to the cth class is between 0 and 1.
3. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 2, the prototype calculated for the new category at time t is ; where n is the new category The index of the sample in , from 1 to , used to traverse each sample in the new category; Is a function that uses the parameters The model pair belongs to the new category Sample Perform feature extraction and obtain samples Feature representation under the current model.
4. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 3, triple loss is used , reducing the distance between embedding vectors of the same identity and increasing the distance between embedding vectors of different identities, thereby enhancing the model's ability to distinguish them and improving retrieval performance; ; in, represents the anchor feature, p represents the positive sample feature, and n represents the negative sample feature; m is a hyperparameter called the margin value, which is used to control the expected distance between the positive sample pair and the negative sample pair.
5. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 4, a part of the prototype is randomly selected for Gaussian sampling and enhanced to obtain the enhanced model ; represents the prototype before enhancement, represents the enhanced prototype; is from a zero mean, covariance matrix A random noise vector drawn from a Gaussian distribution, It is a hyperparameter that controls the noise level; I is the identity matrix, and its dimension is the same as the prototype feature The dimensions of are the same, ensuring that the noise is independent in each feature dimension and the variance is .
6. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 5, ;in, It is a margin parameter used to ensure that a minimum distance is maintained between the new task features and the enhanced prototype; Represents the number of anchor points and negative samples extracted from the enhanced prototype; represents the anchor feature, Represents negative sample features.
7. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to claim 1, characterized in that: In step 6, the loss function L is calculated with respect to each model parameter The gradient of L, these gradients quantify the sensitivity of the loss to each parameter; the absolute value of the gradient is then calculated | L|; then a threshold is introduced , only when the gradient amplitude of a parameter is greater than the threshold When , it is selectively updated; otherwise, the parameter remains unchanged; in, is a predefined gradient magnitude threshold.
8. The person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to any one of claims 1 to 7, characterized in that: In step 7, after training a new task t, the fused model parameters ;in, and Represent the parameters of the new model and the old model respectively; fusion weight Dynamically determined based on the relative impact of the current task dataset, Represents the number of samples in the training dataset for task t.
9. A person re-identification system based on prototype-guided knowledge propagation and adaptive learning, characterized by: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the pedestrian re-identification method based on prototype-guided knowledge propagation and adaptive learning as described in any one of claims 1 to 8.
10. A person re-identification product based on prototype-guided knowledge propagation and adaptive learning, comprising computer program instructions, characterized in that: When the computer program instructions are executed on a computer, the computer is enabled to execute the person re-identification method based on prototype-guided knowledge propagation and adaptive learning according to any one of claims 1 to 8.
Citation Information
Patent Citations
Self-adaptive teacher-student structure-based unsupervised domain pedestrian re-identification method and system
CN116935447A
