Generalized pedestrian retrieval feature learning method and device

By constructing identity-oriented positive sample pairs and maximum weight bipartite graph matching problems, the existing pedestrian retrieval technology solves the problems of adaptability to new scenes and high labeling costs, realizes pedestrian retrieval feature learning in any scene, and improves recognition Accuracy and robustness.

CN118587735APending Publication Date: 2024-09-03TSINGHUA UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410490877.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing pedestrian retrieval technology suffers from the problems of adaptability to new scenes and high labeling costs. It is difficult to learn universal pedestrian retrieval features with strong generalization, the recognition accuracy is low, and the robustness of unsupervised methods is insufficient.

Method used

By determining the unlabeled pedestrian retrieval video training set, sampling video frame intervals, constructing identity-oriented positive sample pairs, and adjusting the loss function based on the maximum weight bipartite graph matching problem, conducting unsupervised feature learning and training, and improving the performance of the pedestrian retrieval network model. Generalization performance.

Benefits of technology

The learned features are identity-discriminating and generalizable and can be used directly in any scenario, improving the generalization performance of pedestrian retrieval feature learning and reducing the linear complexity of the training data scale.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587735A
    Figure CN118587735A
Patent Text Reader

Abstract

The invention provides a generalized pedestrian retrieval feature learning method and device. The method comprises the following steps: determining an unmarked pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training sample into a pedestrian retrieval network model, and determining a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model; adjusting a loss function of the pedestrian retrieval network model according to the training positive sample pair so as to perform unsupervised feature learning training on the pedestrian retrieval network model; and the sampling step, the sample input step and the adjustment step are repeatedly and iteratively executed until the preset training frequency is reached, and the generalization feature learning training process of the pedestrian retrieval network model is completed. The features learned by the method have identity identification and generalization, and can be directly used in any scene without fine tuning, so that the generalization performance of pedestrian retrieval feature learning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information technology, and in particular to a generalized pedestrian retrieval feature learning method and device. Background Art

[0002] Pedestrian retrieval (Pedestrian Re-ID) technology aims to identify the identity of a target pedestrian from multiple different camera views. This technology has great potential in many fields such as intelligent video surveillance, intelligent security, behavior analysis and human-computer interaction, and has attracted increasing attention in recent years. Pedestrian retrieval is very challenging due to factors such as background clutter, partial occlusion, shooting angle, lighting and body posture changes.

[0003] Existing pedestrian retrieval technology is mainly based on a fully supervised setting, which trains a stable and reliable model based on a large amount of labeled video image data in specific scenarios. This type of supervised learning method ignores the adaptability of the model to new scenarios in practical applications and requires a large amount of manually labeled data. However, due to the high cost of labeling, the scale of labeled data is small, making it difficult to learn general pedestrian retrieval features with strong generalization.

[0004] In recent years, researchers have proposed unsupervised pedestrian retrieval methods. The unsupervised setting means that each pedestrian data sample is not labeled or is labeled with a pseudo-label. The pseudo-label is only used to represent a pedestrian data sample image and does not have any guiding significance. Through the automatic pedestrian detection algorithm, all pedestrian images detected in each video clip are taken as an independent unsupervised sample and labeled with corresponding pseudo-labels. This method balances the needs of labeled data and recognition performance. Although the existing unsupervised pedestrian retrieval methods have reduced the annotation cost of pedestrian retrieval tasks to a certain extent, the recognition accuracy is still not high compared to the fully supervised method. This is mainly because in the unsupervised setting, the correspondence between samples and identities is unclear, making it difficult for the network to fully learn important information. In addition, unsupervised data samples are randomly extracted, and each sample may have a different trajectory from the corresponding one. This situation will reduce the robustness of the algorithm, and related technologies are in urgent need of breakthroughs. Summary of the invention

[0005] In order to solve the technical problems existing in the prior art, the present invention provides a generalized pedestrian retrieval feature learning method and device. The features learned by the present invention have identity identification and generalization, and can be directly used in any scene without fine-tuning, thereby improving the generalization performance of pedestrian retrieval feature learning.

[0006] The present invention provides a generalized pedestrian retrieval feature learning method, comprising: determining an unlabeled pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training samples into a pedestrian retrieval network model to determine pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; the identity-oriented images are different images corresponding to the same identity in different video frames; adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; repeatedly and iteratively executing the sampling step, the sample input step and the adjustment step until a preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

[0007] According to a generalized pedestrian retrieval feature learning method provided by the present invention, the determination of an unlabeled pedestrian retrieval video training set includes: collecting pedestrian video data of different scenes; dividing the pedestrian video data into multiple initial segments according to shot jumps; performing pedestrian detection frame by frame on the multiple initial segments to obtain pedestrian detection segments; the pedestrian detection segments are video segments in which the average number of pedestrians in each frame of the pedestrian image is greater than a preset number threshold; repeatedly and iteratively executing the collecting step, the segmenting step and the detecting step until the number of the pedestrian detection segments meets the preset segment threshold, and using the multiple pedestrian detection segments whose number meets the preset segment threshold as the unlabeled pedestrian retrieval video training set.

[0008] According to a generalized pedestrian retrieval feature learning method provided by the present invention, the video frame interval sampling of the training set is performed to obtain video frame training samples, including: setting an initial first fused pedestrian image frame and an initial second fused pedestrian image frame; determining to randomly select a front frame and a rear frame of the pedestrian detection segment, and selecting pedestrian images in the front frame and the rear frame; the front frame and the rear frame are two frames with a time interval within a preset time threshold; fusing the pedestrian image in the front frame with the initial first fused pedestrian image frame to obtain an updated first fused pedestrian image frame; fusing the pedestrian image in the rear frame with the initial second fused pedestrian image frame, An updated second fused pedestrian image frame is obtained; the random selection step and the fusion step are repeatedly and iteratively performed until the updated first fused pedestrian image frame and the updated second fused pedestrian image frame meet a preset condition, and the updated first fused pedestrian image frame and the updated second fused pedestrian image frame that meet the preset condition are used as the video frame training samples; the preset condition is that the number of pedestrians in the updated first fused pedestrian image frame and the number of pedestrians in the updated second fused pedestrian image frame are both greater than a preset pedestrian number threshold; the video frame training samples include the final first fused pedestrian image frame and the final second fused pedestrian image frame.

[0009] According to a generalized pedestrian retrieval feature learning method provided by the present invention, the video frame training samples are input into a pedestrian retrieval network model to determine a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model, including: respectively inputting the final first fused pedestrian image frame and the final second fused pedestrian image frame into the pedestrian retrieval network model to extract pedestrian features to obtain a first fused pedestrian feature and a second fused pedestrian feature; modeling the feature matching between the first fused pedestrian feature and the second fused pedestrian feature as a maximum weighted bipartite graph matching problem, solving a Boolean optimal matching strategy, and using the features matched in the optimal matching strategy as the pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model.

[0010] According to a generalized pedestrian retrieval feature learning method provided by the present invention, the loss function of the pedestrian retrieval network model is adjusted according to the training positive sample pairs, including: determining the reliability score of the training positive sample pairs; using the reliability score as the weight for adjusting the loss function of the pedestrian retrieval network model; the loss function of the pedestrian retrieval network model is:

[0011]

[0012] in, To truncate p in the back propagation γ (x i ), γ is a hyperparameter that controls the strictness of reliability, The loss function of the pedestrian retrieval network model, x i is the feature of the first fused pedestrian feature corresponding to the i-th pedestrian image, p(x i ) is the reliability score of the training positive sample pair, and i is the number of the pedestrian image in the first fused pedestrian image frame.

[0013] According to a generalized pedestrian retrieval feature learning method provided by the present invention, the determining of the reliability score of the training positive sample pair includes: performing calculation based on the reliability score calculation formula according to the first fused pedestrian feature and the second fused pedestrian feature to obtain the reliability score of the training positive sample pair; the reliability score calculation formula is:

[0014]

[0015] in, is the Boolean optimal matching strategy, x i is the feature of the i-th pedestrian image in the first fused pedestrian feature, y j is the feature corresponding to the j-th pedestrian image in the second fused pedestrian feature, τ is the temperature hyperparameter, and j is the number of the pedestrian image in the second fused pedestrian image frame.

[0016] The present invention also provides a generalized pedestrian retrieval feature learning device, including: a training set determination module, used to determine an unlabeled pedestrian retrieval video training set; a sampling module, used to perform video frame interval sampling on the training set to obtain video frame training samples; a positive sample pair determination module, used to input the video frame training samples into a pedestrian retrieval network model, and determine the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; the identity-oriented images are different images corresponding to the same identity in different video frames; a model training module, used to adjust the loss function of the pedestrian retrieval network model according to the training positive sample pairs, so as to perform unsupervised feature learning training on the pedestrian retrieval network model; an iteration module, used to repeatedly iteratively execute the sampling steps, the sample input steps and the adjustment steps until a preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the generalized pedestrian retrieval feature learning method as described above is implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the generalized pedestrian retrieval feature learning methods described above.

[0019] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the generalized pedestrian retrieval feature learning method as described in any one of the above is implemented.

[0020] The present invention provides a generalized pedestrian retrieval feature learning method and device, the method comprising: determining an unlabeled pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training samples into a pedestrian retrieval network model to determine the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; repeatedly iteratively executing the sampling step, the sample input step and the adjustment step until a preset number of training times is reached, completing the generalized feature learning training process for the pedestrian retrieval network model. The features learned by the present invention have identity identification and generalization, can be directly used in any scene without fine-tuning, and improve the generalization performance of pedestrian retrieval feature learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a flowchart of a generalized pedestrian retrieval feature learning method provided by the present invention;

[0023] Figure 2 It is a flowchart of another generalized pedestrian retrieval feature learning method provided by the present invention;

[0024] Figure 3 It is a structural schematic diagram of a generalized pedestrian retrieval feature learning device provided by the present invention;

[0025] Figure 4 It is a structural schematic diagram of another generalized pedestrian retrieval feature learning device provided by the present invention;

[0026] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] Pedestrians are an important target with important information value. Identifying pedestrians, retrieving target pedestrians at a specific time and place, and understanding the movement trajectory of target pedestrians are of great significance to public security, Safe China, and new retail.

[0029] The performance of existing pedestrian retrieval (pedestrian re-identification technology) methods drops significantly when the test data and training data come from different distributions or scenarios, which seriously limits the practical application and deployment of pedestrian retrieval methods. The direct reason is that the generalization of pedestrian retrieval features is not strong. Existing pedestrian retrieval feature learning methods and systems can be roughly divided into two types. One is to use labeled training data for training. However, due to the high cost of labeling, the scale of labeled data is small, and it is difficult to learn general pedestrian retrieval features with strong generalization. The other is to use unsupervised data for training and obtain pseudo labels through clustering-based methods. However, since the data complexity of clustering is at least O(NlogN), which is higher than the linear complexity, it is also difficult to expand the scale of training data, which also leads to insufficient generalization of learned features.

[0030] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a generalized pedestrian retrieval feature learning method provided by the present invention.

[0031] Please refer to Figure 2 , Figure 2 A schematic flow chart of another generalized pedestrian retrieval feature learning method provided by the present invention.

[0032] Please refer to Figure 3 , Figure 3 A schematic diagram of the structure of a generalized pedestrian retrieval feature learning device provided by the present invention.

[0033] In order to solve the technical problems existing in the prior art, the present invention provides a generalized pedestrian retrieval feature learning method, comprising:

[0034] 101: Determine the unlabeled pedestrian retrieval video training set;

[0035] 102: performing video frame interval sampling on the training set to obtain video frame training samples;

[0036] 103: inputting the video frame training samples into the pedestrian retrieval network model, and determining the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; and the identity-oriented images are different images corresponding to the same identity in different video frames;

[0037] 104: Adjusting the loss function of the pedestrian retrieval network model according to the training positive samples to perform unsupervised feature learning training on the pedestrian retrieval network model;

[0038] 105: Repeat the iterative execution of the sampling step, the sample input step and the adjustment step until the preset number of training times is reached, and the generalized feature learning training process of the pedestrian retrieval network model is completed.

[0039] In order to use large-scale data training, the feature learning method must be unsupervised, and in order to ensure that the training cost is linear. In view of the above problems, the purpose of the present invention is to provide a generalized pedestrian retrieval feature learning method, so that the learned pedestrian features can be directly used for retrieval in any scene without fine-tuning, overcome the limitation of the existing pedestrian retrieval method that the training data and test data must be in the same distribution, and promote the actual deployment and application of the pedestrian retrieval system. First, a large-scale acquisition of unlabeled pedestrian videos from different distributions and a method for constructing training data are designed to provide sufficient and rich distribution information for training; secondly, an identity-oriented unsupervised feature learning method is designed to construct positive sample pairs across video frames based on the spatiotemporal continuity of the video, and learn similar features for images from different video frames belonging to the same identity. The learned features are suitable for pedestrian retrieval. Finally, the feature learning method designed in this patent is roughly linearly related to the scale of the training data, and can effectively drive large-scale data for unsupervised training, thereby learning features with strong generalization and improving the performance of pedestrian retrieval.

[0040] Based on the above embodiments:

[0041] As a preferred embodiment, determining an unlabeled pedestrian retrieval video training set includes: collecting pedestrian video data of different scenes; dividing the pedestrian video data into multiple initial segments according to shot jumps; performing pedestrian detection frame by frame on the multiple initial segments to obtain pedestrian detection segments; the pedestrian detection segments are video segments in which the average number of pedestrians in each frame of the pedestrian image is greater than a preset number threshold; repeatedly and iteratively executing the collection step, the segmentation step and the detection step until the number of pedestrian detection segments meets the preset segment threshold, and using the multiple pedestrian detection segments whose number meets the preset segment threshold as the unlabeled pedestrian retrieval video training set.

[0042] In this embodiment, first, the video acquisition module acquires public pedestrian videos that comply with relevant legal copyrights and are distributed in different locations from the Internet. For example, it can collect videos of cities from all over the world and search for videos on the Internet using "city name + street view" as the search term.

[0043] Then, the video segmentation module performs segmentation on the pedestrian video data, for example, detecting the shot jump nodes in the video, and dividing the video into multiple initial segments according to the shot jump nodes.

[0044] Afterwards, the pedestrian detection module performs pedestrian detection on multiple initial segments, for example, detecting pedestrians in the initial segments frame by frame, and counting the average number of pedestrians in each frame in each initial segment, deleting video segments with an average number of pedestrians per frame less than 5, and then storing the pedestrian images in the pedestrian detection segments in the format of "video number-segment number-frame number-pedestrian number".

[0045] The steps of collecting by the video acquisition module, segmenting by the video splitting module, and detecting by the pedestrian detection module are repeated until the number of pedestrian detection segments meets the preset segment threshold, and the multiple pedestrian detection segments that meet the preset segment threshold are used as the unlabeled pedestrian retrieval video training set. The large-scale unlabeled video training data of this embodiment provides rich distribution information, and the acquisition cost is extremely low, which effectively promotes the generalization of the learned features.

[0046] As a preferred embodiment, the training set is sampled at video frame intervals to obtain video frame training samples, including: setting an initial first fused pedestrian image frame and an initial second fused pedestrian image frame; determining the front frame and the rear frame of the randomly selected pedestrian detection segment, and selecting pedestrian images in the front frame and the rear frame; the front frame and the rear frame are two frames with a time interval within a preset time threshold; fusing the pedestrian image in the front frame with the initial first fused pedestrian image frame to obtain an updated first fused pedestrian image frame; fusing the pedestrian image in the rear frame with the initial second fused pedestrian image frame to obtain an updated second fused pedestrian image frame; repeatedly iteratively executing the random selection step and the fusion step until the updated first fused pedestrian image frame and the updated second fused pedestrian image frame meet preset conditions, and using the updated first fused pedestrian image frame and the updated second fused pedestrian image frame that meet the preset conditions as video frame training samples; the preset condition is that the number of pedestrians in the updated first fused pedestrian image frame and the number of pedestrians in the updated second fused pedestrian image frame are both greater than the preset pedestrian number threshold; the video frame training samples include the final first fused pedestrian image frame and the final second fused pedestrian image frame.

[0047] In this embodiment, the sample selection module selects appropriate video frame training samples for pedestrian retrieval network model training. Specifically, a plurality of pedestrian detection segments are randomly selected, and the time interval for randomly selecting each pedestrian detection segment is no more than δ max The two frames (preset time threshold) are regarded as the front frame and the back frame respectively, and the pedestrian images in the front frame and the back frame are selected. The pedestrian images in the front frame and the back frame of these pedestrian detection clips are fused respectively to form a video frame training sample including the first fused pedestrian image frame and the second fused pedestrian image frame, providing relatively rich information for each training iteration.

[0048] As a preferred embodiment, video frame training samples are input into a pedestrian retrieval network model to determine a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model, including: respectively inputting the final first fused pedestrian image frame and the final second fused pedestrian image frame into the pedestrian retrieval network model to extract pedestrian features to obtain first fused pedestrian features and second fused pedestrian features; modeling the feature matching between the first fused pedestrian features and the second fused pedestrian features as a maximum weighted bipartite graph matching problem, solving the Boolean optimal matching strategy, and using the features matched in the optimal matching strategy as the pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model.

[0049] In this embodiment, pedestrian features are extracted from video frame training samples by a feature extraction module. Specifically, the first fused pedestrian image frame and the second fused pedestrian image frame are respectively input into the pedestrian retrieval network model to extract pedestrian features.

[0050] Then the positive sample pair mining module mines positive sample pairs across video frames in pedestrian features. Specifically, assuming that the features extracted from the first fused pedestrian image frame are X = [x1, x2, ..., x m ]∈R d×m , the feature extracted from the second fused pedestrian image frame is Y=[y1,y2,…,y n ]∈R d×n , where d is the feature dimension, m and n are the number of features in X and Y respectively. The mining of positive sample pairs is regarded as the instance association between X and Y, and is modeled as a maximum weighted bipartite graph matching problem. The matching weight is calculated by using the inner product similarity between the two features. By solving the maximum weighted bipartite graph matching problem, positive sample pairs for pedestrian retrieval training can be mined.

[0051] The maximum weight matching of a bipartite graph means that in a bipartite graph, each edge has a weight, and what is asked is the maximum weight after matching rather than the maximum number of matches. The KM and minimum cost flow methods can be used, and the present invention does not make any special limitations here.

[0052] As a preferred embodiment, adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs includes: determining the reliability score of the training positive sample pairs; using the reliability score as the weight for adjusting the loss function of the pedestrian retrieval network model; the loss function of the pedestrian retrieval network model is:

[0053]

[0054] in, To truncate p in the back propagation γ (x i ), γ is a hyperparameter that controls the strictness of reliability, is the loss function of the pedestrian retrieval network model, x i is the feature of the i-th pedestrian image in the first fused pedestrian feature, p(x i ) is the reliability score of the training positive sample pair, and i is the number of the pedestrian image in the first fused pedestrian image frame.

[0055] As a preferred embodiment, determining the reliability score of the training positive sample pair includes: performing calculation based on the reliability score calculation formula according to the first fused pedestrian feature and the second fused pedestrian feature to obtain the reliability score of the training positive sample pair; the reliability score calculation formula is:

[0056]

[0057] in, is the Boolean optimal matching strategy, x i is the feature of the i-th pedestrian image in the first fused pedestrian feature, y j is the feature corresponding to the jth pedestrian image in the second fused pedestrian feature, τ is the temperature hyperparameter, and j is the number of the pedestrian image in the second fused pedestrian image frame.

[0058] In this embodiment, the reliability calculation module calculates the reliability of each mined positive sample pair. Specifically, assuming is a Boolean correlation matrix, which is the optimal correlation matrix solved in the positive sample pair mining module, where Represents x i and j Matches; otherwise

[0059] If two images belong to the same person, their similarity should be high. The similarity of two samples in a positive pair can reflect reliability. If the similarity between two samples in a mined positive pair is very low, then this positive pair may be noise. In addition, since positive pairs are mined by solving the bipartite graph matching problem, reliability should also consider the similarity between the target sample and other samples. Considering these two factors, for x i For example, the reliability score of the corresponding positive sample pair satisfies the reliability score calculation formula. Among them, τ can be set according to the actual scenario and data.

[0060] Considering that the mined positive sample pairs inevitably contain noise, the noise positive sample pair suppression module reduces the influence of the noise positive sample pairs in the training process according to the calculated reliability, trains the model, and learns the features. Specifically, the reliability score p(x i ) is used as a regulation factor to reduce the weight of noisy positive sample pairs, so as to focus the training on reliable positive sample pairs. At the same time, the regulation factor should not interfere with the gradient of the loss function, so its gradient is disconnected in the back propagation to ensure the stability of the training process. Specifically, the reliability-guided contrast loss satisfies the loss function of the pedestrian retrieval network model. Among them, γ≥0, the larger γ is, the more the loss function focuses on reliable positive sample pairs.

[0061] The identity-oriented unsupervised feature learning method proposed in the present invention has a learning complexity that is roughly linearly related to the size of the training data. It can drive large-scale unlabeled video data for training and effectively learn identity identification, and is suitable for pedestrian retrieval tasks.

[0062] The generalized pedestrian retrieval feature learning device provided by the present invention is described below. The generalized pedestrian retrieval feature learning device described below and the generalized pedestrian retrieval feature learning method described above can be referenced to each other.

[0063] Please refer to Figure 4 , Figure 4 A schematic diagram of the structure of another generalized pedestrian retrieval feature learning device provided by the present invention.

[0064] The present invention also provides a generalized pedestrian retrieval feature learning device, including: a training set determination module 1, used to determine an unlabeled pedestrian retrieval video training set; a sampling module 2, used to perform video frame interval sampling on the training set to obtain video frame training samples; a positive sample pair determination module 3, used to input the video frame training samples into a pedestrian retrieval network model, and determine the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; identity-oriented images are different images corresponding to the same identity in different video frames; a model training module 4, used to adjust the loss function of the pedestrian retrieval network model according to the training positive sample pairs, so as to perform unsupervised feature learning training on the pedestrian retrieval network model; an iteration module 5, used to iteratively execute the sampling steps, the sample input steps and the adjustment steps repeatedly until a preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

[0065] Figure 5 An example of a structural diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 communicate with each other through the communication bus 504. The processor 501 may call the logic instructions in the memory 503 to execute the generalized pedestrian retrieval feature learning method, which includes: determining an unlabeled pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training samples into the pedestrian retrieval network model to determine the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; the identity-oriented images are different images corresponding to the same identity in different video frames; adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; and repeatedly iteratively executing the sampling steps, the sample input steps and the adjustment steps until the preset number of training times is reached to complete the generalized feature learning training process of the pedestrian retrieval network model.

[0066] In addition, the logic instructions in the above-mentioned memory 503 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0067] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the generalized pedestrian retrieval feature learning method provided by the above methods, which includes: determining an unlabeled pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training samples into a pedestrian retrieval network model to determine the pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; identity-oriented images are different images corresponding to the same identity in different video frames; adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; repeatedly iteratively executing the sampling steps, the sample input steps and the adjustment steps until the preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

[0068] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the generalized pedestrian retrieval feature learning method provided by the above-mentioned methods, the method comprising: determining an unlabeled pedestrian retrieval video training set; performing video frame interval sampling on the training set to obtain video frame training samples; inputting the video frame training samples into a pedestrian retrieval network model to determine pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model; the training positive sample pairs are features of identity-oriented images; identity-oriented images are different images corresponding to the same identity in different video frames; adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; repeatedly and iteratively executing the sampling steps, the sample input steps and the adjustment steps until a preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

[0069] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A generalized pedestrian retrieval feature learning method, characterized in that: include: Determine the unlabeled pedestrian retrieval video training set; Performing video frame interval sampling on the training set to obtain video frame training samples; Inputting the video frame training samples into a pedestrian retrieval network model, and determining a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model; the training positive sample pair is a feature of an identity-oriented image; and the identity-oriented image is a different image corresponding to the same identity in different video frames; Adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pairs to perform unsupervised feature learning training on the pedestrian retrieval network model; The sampling step, the sample input step and the adjustment step are repeatedly and iteratively executed until a preset number of training times is reached, thereby completing the generalized feature learning training process for the pedestrian retrieval network model.

2. The generalized pedestrian retrieval feature learning method according to claim 1, characterized in that: The step of determining an unlabeled pedestrian retrieval video training set includes: Collect pedestrian video data in different scenes; Dividing the pedestrian video data into a plurality of initial segments according to shot jumps; Performing pedestrian detection frame by frame on the plurality of initial segments to obtain pedestrian detection segments; the pedestrian detection segments are video segments in which the number of pedestrians in the pedestrian image per frame is greater than a preset number threshold on average; The acquisition step, the segmentation step and the detection step are repeatedly and iteratively performed until the number of the pedestrian detection segments meets a preset segment threshold, and the multiple pedestrian detection segments whose number meets the preset segment threshold are used as the unlabeled pedestrian retrieval video training set.

3. The generalized pedestrian retrieval feature learning method according to claim 2, characterized in that: The step of performing video frame interval sampling on the training set to obtain video frame training samples includes: Setting an initial first fused pedestrian image frame and an initial second fused pedestrian image frame; Determine to randomly select a front frame and a rear frame of the pedestrian detection segment, and select pedestrian images in the front frame and the rear frame; the front frame and the rear frame are two frames with a time interval within a preset time threshold; Fusing the pedestrian image in the previous frame with the initial first fused pedestrian image frame to obtain an updated first fused pedestrian image frame; fusing the pedestrian image in the subsequent frame with the initial second fused pedestrian image frame to obtain an updated second fused pedestrian image frame; The random selection step and the fusion step are repeatedly and iteratively performed until the updated first fused pedestrian image frame and the updated second fused pedestrian image frame meet a preset condition, and the updated first fused pedestrian image frame and the updated second fused pedestrian image frame that meet the preset condition are used as the video frame training samples; the preset condition is that the number of pedestrians in the updated first fused pedestrian image frame and the number of pedestrians in the updated second fused pedestrian image frame are both greater than a preset pedestrian number threshold; the video frame training samples include the final first fused pedestrian image frame and the final second fused pedestrian image frame.

4. The generalized pedestrian retrieval feature learning method according to claim 3, characterized in that: The step of inputting the video frame training samples into a pedestrian retrieval network model and determining a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model comprises: Inputting the final first fused pedestrian image frame and the final second fused pedestrian image frame into the pedestrian retrieval network model to extract pedestrian features, thereby obtaining first fused pedestrian features and second fused pedestrian features; The feature matching between the first fused pedestrian feature and the second fused pedestrian feature is modeled as a maximum weighted bipartite graph matching problem, a Boolean optimal matching strategy is solved, and the features matched in the optimal matching strategy are used as pedestrian retrieval training positive sample pairs output by the pedestrian retrieval network model.

5. The generalized pedestrian retrieval feature learning method according to claim 4, characterized in that: The step of adjusting the loss function of the pedestrian retrieval network model according to the training positive sample pair includes: Determining a reliability score of the training positive sample pair; Using the reliability score as a weight for adjusting the loss function of the pedestrian retrieval network model; The loss function of the pedestrian retrieval network model is: in, To truncate p in the back propagation γ (x i ), γ is a hyperparameter that controls the strictness of reliability, The loss function of the pedestrian retrieval network model, x i is the feature of the first fused pedestrian feature corresponding to the i-th pedestrian image, p(x i ) is the reliability score of the training positive sample pair, and i is the number of the pedestrian image in the final first fused pedestrian image frame.

6. The generalized pedestrian retrieval feature learning method according to claim 5, characterized in that: Determining the reliability score of the training positive sample pair includes: According to the first fused pedestrian feature and the second fused pedestrian feature, a reliability score calculation formula is used to calculate to obtain a reliability score of the training positive sample pair; The reliability score calculation formula is: in, is the Boolean optimal matching strategy, x i is the feature of the first fused pedestrian feature corresponding to the i-th pedestrian image, y j is the feature corresponding to the j-th pedestrian image in the second fused pedestrian feature, τ is the temperature hyperparameter, and j is the number of the pedestrian image in the final second fused pedestrian image frame.

7. A generalized pedestrian retrieval feature learning device, characterized in that: include: The training set determination module is used to determine the unlabeled pedestrian retrieval video training set; A sampling module, used for performing video frame interval sampling on the training set to obtain video frame training samples; A positive sample pair determination module is used to input the video frame training sample into a pedestrian retrieval network model to determine a pedestrian retrieval training positive sample pair output by the pedestrian retrieval network model; the training positive sample pair is a feature of an identity-oriented image; the identity-oriented image is different images corresponding to the same identity in different video frames; A model training module, used for adjusting the loss function of the pedestrian retrieval network model according to the training positive samples, so as to perform unsupervised feature learning training on the pedestrian retrieval network model; The iteration module is used to repeatedly iteratively execute the sampling step, the sample input step and the adjustment step until a preset number of training times is reached to complete the generalized feature learning training process of the pedestrian retrieval network model.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the generalized pedestrian retrieval feature learning method as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the generalized pedestrian retrieval feature learning method as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the generalized pedestrian retrieval feature learning method as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Pedestrian search method and system with high generalization ability, terminal and medium

    CN117612211A