A pedestrian re-identification method and device based on semi-supervised learning and a storage medium
By using a semi-supervised learning method and generating a pseudo-label dataset through clustering, the pedestrian re-identification network model is iteratively trained, which solves the problems of high cost and low accuracy in existing technologies and achieves efficient pedestrian re-identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ATHENAEYES CO LTD
- Filing Date
- 2022-08-26
- Publication Date
- 2026-05-01
AI Technical Summary
Existing pedestrian re-identification technologies based on supervised learning require a large amount of labeled data, resulting in high costs and low re-identification accuracy.
A semi-supervised learning method is adopted. By acquiring a pedestrian image dataset, performing clustering processing to generate a pseudo-label dataset, and inputting it into the pedestrian re-identification network model for iterative training, the final pedestrian re-identification network model is obtained. Pedestrian re-identification is completed by training with a small number of labeled images.
This significantly reduces the workload of manually labeling pedestrian re-identification data and improves the accuracy of pedestrian re-identification algorithms.
Smart Images

Figure CN115457652B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence recognition technology, and in particular to a pedestrian re-identification method, device and storage medium based on semi-supervised learning. Background Technology
[0002] In today's era of rapid development in artificial intelligence and deep learning technologies, computer vision technology has played a significant role in applications such as video surveillance, security, and criminal investigation.
[0003] The sheer volume of video surveillance data has rendered human eyesight insufficient for searching for pedestrians within videos. This necessitates the use of artificial intelligence (AI) computer vision technology to accomplish this complex task. Person re-identification (Re-ID) is a technique that utilizes computer vision to search for and determine the presence of specific pedestrians within large-scale distributed surveillance systems. In surveillance videos, due to variations in camera resolution and field of view, images often fail to meet the requirements for facial recognition. When facial recognition fails, person re-identification becomes a crucial technology for identifying pedestrians.
[0004] Current pedestrian re-identification learning models are trained based on supervised learning. Supervised learning-based pedestrian re-identification algorithms require a large amount of labeled data for training. However, labeled data is relatively difficult to obtain. When the amount of data to be labeled is large, manually labeling pedestrian data from different cameras and in different poses will incur huge human and material costs. It is almost impossible for humans to complete the required dataset labeling. Due to this limitation, the accuracy and precision of pedestrian re-identification still need to be improved.
[0005] Therefore, existing pedestrian re-identification technologies based on supervised learning require a large amount of labeled data, resulting in high costs and low re-identification accuracy. Summary of the Invention
[0006] To overcome the problems of high cost and low accuracy caused by the need for a large amount of labeled data in the existing supervised learning-based pedestrian re-identification technology, this invention provides a pedestrian re-identification method, device and storage medium based on semi-supervised learning.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] A pedestrian re-identification method based on semi-supervised learning includes the following steps:
[0009] Obtain a pedestrian image dataset, and select several images from the pedestrian image dataset as a training classification dataset;
[0010] Clustering is performed on the training classification dataset to obtain a pseudo-label dataset;
[0011] The pseudo-label dataset is used as a training dataset and input into a preset person re-identification network model for iterative training to obtain the final person re-identification network model.
[0012] The pedestrian image dataset is input into the final pedestrian re-identification network model for recognition, and the pedestrian re-identification result is obtained.
[0013] Preferably, the step of clustering the training classification dataset to obtain the pseudo-label dataset specifically includes:
[0014] Feature extraction is performed on the training classification dataset to obtain the training classification data features;
[0015] Calculate the similarity between the training classification data features, compare the similarity between the training classification data features with a preset first judgment threshold, filter and retain the training classification data features that meet the requirements of the first judgment threshold, and obtain a pseudo-label dataset.
[0016] Preferably, the step of calculating the similarity between the training classification data features, comparing the similarity between the training classification data features with a preset first judgment threshold, and filtering and retaining the training classification data features that meet the requirements of the first judgment threshold to obtain the pseudo-label dataset specifically includes:
[0017] Calculate the similarity between the features of the training classification data, and construct an undirected feature graph network for the training classification dataset based on the similarity between the features of the training classification data;
[0018] Based on the feature-based undirected graph network, the similarity between the training classification data features corresponding to the associated nodes is compared with a preset first judgment threshold.
[0019] The training classification data features with similarity greater than or equal to the first judgment threshold are retained, and the training classification data features with similarity less than the first judgment threshold are removed to obtain a pseudo-label dataset.
[0020] Preferably, the step of inputting the pseudo-label dataset as a training dataset into a preset person re-identification network model for iterative training to obtain the final person re-identification network model specifically includes:
[0021] The pseudo-label dataset is used as a training dataset and input into a preset person re-identification network model for training.
[0022] Step A: Input the pseudo-label dataset into the pedestrian re-identification network model trained with the pseudo-label dataset to extract data features and obtain pseudo-label data features;
[0023] Step B: Cluster the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset;
[0024] Step C: Input the new pseudo-label dataset as the training dataset into the person re-identification network model for training;
[0025] Repeat steps A through C until the preset convergence condition is met to obtain the final pedestrian re-identification network model.
[0026] Preferably, step B: clustering the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset, specifically includes:
[0027] Calculate the similarity between the pseudo-label data features and each data feature of the pseudo-label dataset, construct a feature undirected graph network based on the similarity between each data feature, and obtain the clustering result;
[0028] The clustering results are checked to see if there is a cluster center in each cluster. If there is a cluster center, the cluster is classified into strongly correlated data.
[0029] Based on all the strongly correlated data, a new pseudo-label dataset is determined.
[0030] Preferably, the step of determining a new pseudo-label dataset based on all the strongly correlated data specifically includes:
[0031] Extract the data features corresponding to the data cluster centers of each cluster in the strongly correlated data to obtain the center data features;
[0032] Calculate the similarity between all the central data features, and construct a feature undirected graph network of the strongly correlated data based on the similarity between the central data features;
[0033] Based on the feature-based undirected graph network, the similarity between the central data features corresponding to the associated nodes is compared with a preset second judgment threshold.
[0034] The central data features with similarity greater than or equal to the second judgment threshold are retained to obtain a new pseudo-label dataset.
[0035] Preferably, the step of retaining the central data features with a similarity greater than or equal to the second judgment threshold and removing the central data features with a similarity lower than the second judgment threshold to obtain a new pseudo-label dataset further includes:
[0036] The central data features with similarity less than the second judgment threshold are added as difficult sample data to a new pseudo-label dataset for use in the next iteration of training.
[0037] Preferably, in the step of repeatedly executing steps A to C until a preset convergence condition is met to obtain the final person re-identification network model, when iteratively training the person re-identification network model by repeatedly executing steps A to C, the similarity judgment threshold during clustering is adjusted, including but not limited to.
[0038] The present invention also provides a pedestrian re-identification device based on semi-supervised learning, comprising:
[0039] The data acquisition module is used to acquire a pedestrian image dataset and select several images from the pedestrian image dataset as a training classification dataset.
[0040] The clustering processing module is used to perform clustering processing on the training classification dataset to obtain a pseudo-label dataset.
[0041] The model training module is used to input the pseudo-label dataset as a training dataset into a preset person re-identification network model for iterative training to obtain the final person re-identification network model.
[0042] The recognition output module is used to input the pedestrian image dataset into the final pedestrian re-identification network model for recognition, and obtain the pedestrian re-identification result.
[0043] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the pedestrian re-identification method based on semi-supervised learning described in the present invention.
[0044] This invention provides a pedestrian re-identification method, apparatus, and storage medium based on semi-supervised learning. It acquires a pedestrian image dataset, selects several images from the dataset as a training classification dataset, performs clustering on the training classification dataset to obtain a pseudo-label dataset, inputs the pseudo-label dataset as a training dataset into a preset pedestrian re-identification network model for iterative training, obtains the final pedestrian re-identification network model, and inputs the pedestrian image dataset into the final pedestrian re-identification network model for recognition, obtaining the pedestrian re-identification result. This method achieves pedestrian re-identification by using a small number of labeled images as a training classification dataset for semi-supervised learning, thereby enabling the model to complete pedestrian re-identification on a large amount of unlabeled data. Compared to supervised learning, this significantly reduces the workload of manually labeling pedestrian re-identification data and improves the accuracy of the pedestrian re-identification algorithm. Attached Figure Description
[0045] Figure 1 This is a schematic diagram illustrating the application environment of a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention.
[0046] Figure 2 The flowchart below shows an overall process for a pedestrian re-identification method based on semi-supervised learning, as provided in Embodiment 1 of the present invention.
[0047] Figure 3 This is a detailed flowchart of step S2 in a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention.
[0048] Figure 4 The detailed flowchart of step S22 in a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention;
[0049] Figure 5 This is a detailed flowchart of step S3 in a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention.
[0050] Figure 6 This is a detailed flowchart of step B in a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention.
[0051] Figure 7 This is a detailed flowchart of step B3 in a pedestrian re-identification method based on semi-supervised learning provided in Embodiment 1 of the present invention.
[0052] Figure 8 This is a structural block diagram of a pedestrian re-identification device based on semi-supervised learning, provided in Embodiment 2 of the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0054] Figure 1 This is an application environment diagram of the pedestrian re-identification method based on semi-supervised learning provided in the embodiments of the present invention, such as... Figure 1 As shown, this application environment includes a terminal 110 and a computer device 120.
[0055] Terminal 110 may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 110 and computer device 120 can be connected via a network, which is not limited herein.
[0056] Computer equipment 120 can be an independent physical server or terminal, a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0057] It should be noted that the pedestrian re-identification method based on semi-supervised learning provided in this embodiment of the invention can be executed by computer device 120, and correspondingly, the pedestrian re-identification device based on semi-supervised learning is set in computer device 120.
[0058] It should be noted that the pedestrian re-identification method based on semi-supervised learning provided in the embodiments of the present invention can also be executed by a server. Accordingly, the pedestrian re-identification device based on semi-supervised learning is set in the server.
[0059] It should be understood that Figure 1 The number of terminals, computer devices, networks, and servers described are merely illustrative. Depending on the implementation needs, there can be any number of terminals, computer devices, networks, and servers. The terminal devices in the embodiments of this invention can specifically correspond to application systems in actual production.
[0060] It should also be noted that the semi-supervised learning mentioned in this invention is mainly based on a learning model between supervised and unsupervised learning. Supervised learning refers to learning a model from labeled training data and then using the model to predict the label of a given new data set. Unsupervised learning refers to solving various problems in pattern recognition based on training samples with unknown categories (unlabeled). Semi-supervised learning lies between the two, using a large amount of unlabeled data and a small amount of labeled data simultaneously for pattern recognition. In this embodiment, the main focus is on using a small amount of labeled data to achieve pedestrian re-identification from a large amount of unlabeled data, i.e., based on the principles of semi-supervised learning.
[0061] Example 1
[0062] like Figure 2 As shown, in one embodiment, a pedestrian re-identification method based on semi-supervised learning is proposed. This embodiment mainly applies this method to the above-mentioned... Figure 1 Let's take computer device 120 as an example.
[0063] A pedestrian re-identification method based on semi-supervised learning may specifically include the following steps:
[0064] Step S1: Obtain the pedestrian image dataset and select several images from the pedestrian image dataset as the training classification dataset.
[0065] In this embodiment, the acquired pedestrian image dataset can be specific image data collected according to the scenario of the pedestrian re-identification application, such as pedestrian images collected through surveillance camera capture. It is also understood that before executing the semi-supervised learning-based pedestrian re-identification method provided in this embodiment or after acquiring the pedestrian image dataset, the pedestrian image dataset can be preprocessed. For example, pedestrian detection algorithms can be used to detect pedestrians in the images, and the detected pedestrian images can be retained. If there are some false detection images or images with incorrect detection positions in the pedestrian images, automatic filtering combined with manual supervision can be used to select and classify the entire dataset to remove interference data for pedestrian re-identification, forming a pedestrian image dataset. Then, a portion of the pedestrian image dataset can be randomly selected as the training classification dataset. Furthermore, it is understood that conventional methods in the existing technology can be used for pedestrian image preprocessing. Preprocessing of pedestrian images is not the focus of this embodiment and will not be further described here.
[0066] Step S2: Cluster the training classification dataset to obtain the pseudo-label dataset.
[0067] In this embodiment, clustering is the process of dividing a collection of physical or abstract objects into multiple classes composed of similar objects. The principles and basic applications of clustering are relatively mature in this field, and will not be described in detail here. The main point is that the cluster generated by clustering is a collection of data objects. These objects are similar to objects in the same cluster and different from objects in other clusters. In the specific application of training and recognition, the data is mainly clustered based on similarity. Data with similarity within a certain range are divided into one class. The data included in each class are combined to obtain a pseudo-label dataset. Here, pseudo-labels actually refer to the labels to which the data belongs after clustering. The pseudo-label dataset is a collection of data classified according to pseudo-labels. More explanations of pseudo-label technology and pseudo-label data can be obtained from existing technologies, and will not be described in detail here.
[0068] In this embodiment, as Figure 3 As shown, step S2 may specifically include the following steps:
[0069] Step S21: Extract features from the training classification dataset to obtain the training classification data features;
[0070] In this embodiment, feature extraction of the training classification dataset can be performed using a preset feature extraction model. For example, a pre-trained model of a mature pedestrian re-identification dataset that is already publicly available in the prior art can be used. The obtained training classification data features are mainly image features, including but not limited to color features, texture features, shape features, and spatial features commonly used in image recognition. These features are mainly used for image recognition processing. As for the specific data feature categories and combinations, they can be selected and adopted according to actual needs. The definition and operation of data feature extraction in the image recognition process are conventional technical means in this field and will not be further described here.
[0071] Step S22: Calculate the similarity between training classification data features, compare the similarity between training classification data features with a preset first judgment threshold, filter and retain training classification data features that meet the first judgment threshold requirements, and obtain a pseudo-label dataset.
[0072] As mentioned earlier, the basic principle of clustering is mainly based on the similarity between data features. Therefore, the clustering result can be obtained directly by calculating the similarity between data features and comparing the similarity result with a preset first judgment threshold, ultimately resulting in a pseudo-label dataset. Specifically, the application of clustering in this field mainly includes four similarity comparison methods: distance similarity measure, density similarity measure, connectivity similarity measure, and concept similarity measure. This embodiment does not limit the similarity calculation method or comparison method; only a simple example is given here, and the specific implementation will not be further described.
[0073] The first judgment threshold can be a custom data point based on actual conditions. It can be continuously adjusted during model training based on the training results, ultimately resulting in a fixed threshold or threshold range after training. For example, using a small subset of training classification data features, an M:N comparison can be used to iterate through the data and obtain the optimal threshold for that subset of training classification data features. This threshold is then used as the first judgment threshold for similarity. M:N comparison is a process where a computer performs facial recognition on all people in a scene and compares it with a human image database. M:N, as a dynamic face comparison method, is widely used and can be applied to various scenarios, such as greeting guests and robot applications, which will not be further described here. Furthermore, besides fixing the specific value of the first judgment threshold, those skilled in the art can also set the range of the first judgment threshold according to actual needs. For example, the effective range of the first judgment threshold can be designed as 0.7 to 0.8, defining data feature similarity within the range of 0.7 to 0.8 as relatively strong correlation, greater than 0.8 as strong correlation, and less than 0.7 as low correlation, etc. Specific examples will not be further elaborated here.
[0074] In this embodiment, as Figure 4 As shown, step S22 may specifically include the following steps:
[0075] Step S221: Calculate the similarity between features of the training classification data, and construct an undirected graph network of features of the training classification dataset based on the similarity between features of the training classification data.
[0076] In this embodiment, the feature-based undirected graph network is an undirected graph structure built based on the similarity between data features. The graph structure includes multiple nodes, each corresponding to a data feature. Nodes with similar features are connected by lines. A node can be linked to any other node. The structure formed by all connected nodes is the graph structure. An undirected graph structure means that the relationships between data features in this graph structure are not directional. The basic principles and construction of undirected graphs are relatively mature in this field and will not be described in more detail here.
[0077] Step S222: Based on the feature-based undirected graph network, compare the similarity between the training classification data features corresponding to the associated nodes with a preset first judgment threshold.
[0078] Step S223: Retain training classification data features with similarity greater than or equal to the first judgment threshold, and remove training classification data features with similarity less than the first judgment threshold to obtain a pseudo-label dataset. As mentioned earlier, in this embodiment, when comparing similarity with the first judgment threshold, the constructed undirected graph network can be pruned based on the comparison results. Connections between nodes with similarity lower than the first judgment threshold are removed. The pruned undirected graph network will form clusters resembling "islands," retaining only the strongly correlated data features that meet the first judgment threshold requirements. After the processing in step S223, the obtained data features form a small batch of pseudo-label datasets with labeled tags. The label accuracy of this dataset is significantly improved compared to before, thereby further improving the recognition accuracy of the final trained person re-identification network model.
[0079] In practical applications, this implementation provides an example for understanding. For instance, an undirected graph network contains three data features: A, B, and C. The similarity between A and B is 0.9, and the similarity between B and C is 0.8. Therefore, the similarity between A and C is 0.72. If the first judgment threshold is 0.75, then A and C are considered to have low correlation scores, and the connection between A and C is broken, indicating that A and C are not strongly correlated.
[0080] Step S3: Input the pseudo-label dataset as the training dataset into the preset person re-identification network model for iterative training to obtain the final person re-identification network model.
[0081] In this embodiment, the preset pedestrian re-identification network can be a mature network in the prior art. It does not specifically refer to a certain pedestrian re-identification network. One of the existing technologies can be selected as the training object in this embodiment.
[0082] In this embodiment, as Figure 5 As shown, step S3 may specifically include the following steps:
[0083] Step S31: Input the pseudo-label dataset as the training dataset into the preset pedestrian re-identification network model for training;
[0084] Step A: Input the pseudo-label dataset into the pedestrian re-identification network model trained with the pseudo-label dataset to extract data features and obtain pseudo-label data features;
[0085] Step B: Cluster the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset;
[0086] Step C: Input the new pseudo-label dataset as the training dataset into the person re-identification network model for training;
[0087] Step S32: Repeat steps A to C until the preset convergence condition is met to obtain the final pedestrian re-identification network model.
[0088] In this embodiment, the steps S31-S32 mainly utilize the fact that the correlation of data features in the pseudo-label dataset becomes stronger after each iteration. At the same time, after each iteration, further clustering is performed on the collected original pseudo-label dataset. Each clustering will have different clustering results. As the number of iterations increases, the clustering accuracy will also increase. After multiple iterations, a more accurate training dataset and pedestrian re-identification network model can be obtained, thereby improving the accuracy of pedestrian re-identification network model recognition.
[0089] It is understood that in this embodiment, the preset convergence conditions for obtaining the final pedestrian re-identification network model can be parameters reaching preset values, reaching preset times, reaching preset accuracy, etc. These are all common technical means, which will not be described or specifically limited here. Those skilled in the art can understand and select them according to actual needs.
[0090] In addition, when determining the pseudo-label dataset in this embodiment, those skilled in the art can also open a window for manual inspection and supervision, display or store the pseudo-label dataset obtained in the above steps for manual supervision, and if necessary, manually modify and correct the data before returning to the software process for subsequent steps.
[0091] In this embodiment, as Figure 6 As shown, step B specifically includes the following steps:
[0092] Step B1: Calculate the similarity between each data feature of the pseudo-labeled data features and the pseudo-labeled dataset, and construct a feature undirected graph network based on the similarity between each data feature to obtain the clustering results;
[0093] It is understood that the feature undirected network graph in this step follows the same principle as described above, and will not be explained further here.
[0094] Step B2: Detect whether there is a data cluster center in each cluster of data in the clustering results. If there is a data cluster center in the cluster, then classify the cluster data into strongly correlated data.
[0095] It can be understood that a data cluster center is a specific sample determined during the clustering process to represent a certain class. Other samples determine whether they belong to that class by calculating their distance from it, essentially acting as a data representative. In this embodiment, mapped to a feature-based undirected graph network, the data feature node with the most connections to its neighbors can be used as the data cluster center.
[0096] By further organizing the data features of the pseudo-label dataset based on the existence of data cluster centers, the correlation of data features in the pseudo-label dataset can be further improved, thereby improving the training accuracy and the recognition accuracy of the final pedestrian re-identification network model.
[0097] Step B3: Based on all strongly correlated data, determine the new pseudo-label dataset.
[0098] In this embodiment, as Figure 7 As shown, step B3 specifically includes the following steps:
[0099] Step B31: Extract the data features corresponding to the cluster centers of each cluster in the strongly correlated data to obtain the center data features;
[0100] Step B32: Calculate the similarity between all central data features, and construct a feature undirected graph network of strongly correlated data based on the similarity between central data features;
[0101] Step B33: Based on the feature-based undirected graph network, compare the similarity between the central data features corresponding to the associated nodes with a preset second judgment threshold;
[0102] Step B34: Retain the center data features whose similarity is greater than or equal to the second judgment threshold to obtain a new pseudo-label dataset.
[0103] It is understood that the undirected graph network and the second judgment threshold involved in steps B31-B33 above can be understood with reference to the aforementioned content, and will not be described again here.
[0104] By further extracting features from strongly correlated data and judging similarity correlation, the correlation of data features in the pseudo-label dataset can be further strengthened, thereby improving the accuracy of training and the recognition accuracy of the final pedestrian re-identification network model.
[0105] In this embodiment, step B34 further includes:
[0106] Center data features with similarity less than the second judgment threshold are added to the new pseudo-label dataset as difficult sample data for use in the next iteration of training.
[0107] It is understood that the difficult sample data in this embodiment mainly refers to samples with large errors from the true label during prediction. By taking the central data features (low correlation) with similarity less than the second judgment threshold as difficult sample data after each iteration and adding them to the training dataset of this iteration, the model's recognition ability on some special pedestrian images, such as pedestrian overlap, shadows, etc., can be improved, and the recognition accuracy of the final pedestrian re-identification network model can be further improved.
[0108] In this embodiment, when step S32 repeats steps A to C to iteratively train the pedestrian re-identification network model, it includes, but is not limited to, adjusting the similarity judgment threshold during clustering.
[0109] Specifically, in this embodiment, in addition to adjusting other parameters of the model during training, the focus is on changes in thresholds, including a first judgment threshold and a second judgment threshold. Furthermore, in a preferred embodiment of the invention, the threshold can be adjusted by proportionally decreasing the threshold based on the number of iterations, avoiding excessive data loss after repeated data processing.
[0110] Step S4: Input the pedestrian image dataset into the final pedestrian re-identification network model for recognition, and obtain the pedestrian re-identification result.
[0111] It is understood that the method by which the final person re-identification network model in this embodiment identifies the pedestrian image dataset can be determined based on the type of person re-identification network initially selected for training. For example, the person re-identification network type may involve extracting features from the pedestrian image dataset, then calculating features based on similarity, Euclidean distance, or other commonly used recognition criteria, and finally outputting the pedestrian image recognition result based on the results of feature similarity, Euclidean distance, or other commonly used recognition criteria. That is, the semi-supervised learning-based person re-identification method provided in this embodiment does not limit the structural type of the person re-identification network. Currently, all existing network types can be trained using the method in this embodiment and used as the final person re-identification network model to execute the person re-identification method in this embodiment.
[0112] This invention provides a semi-supervised learning-based person re-identification method. It acquires a pedestrian image dataset, selects several images from the dataset as a training classification dataset, performs clustering on the training classification dataset to obtain a pseudo-label dataset, and inputs this pseudo-label dataset as a training dataset into a pre-defined person re-identification network model for iterative training to obtain the final person re-identification network model. The pedestrian image dataset is then input into the final person re-identification network model for recognition, yielding the person re-identification result. This method achieves semi-supervised learning by using a small number of labeled images as the training classification dataset to train the person re-identification network model, thereby enabling the model to complete person re-identification on a large amount of unlabeled data. Compared to supervised learning, this significantly reduces the workload of manually labeling pedestrian re-identification data and improves the accuracy of the person re-identification algorithm.
[0113] Example 2
[0114] like Figure 8 As shown, in one embodiment, a pedestrian re-identification device based on semi-supervised learning is proposed. This embodiment mainly applies this device to the above-mentioned... Figure 1 Let's take computer device 120 as an example. A pedestrian re-identification device based on semi-supervised learning includes:
[0115] Data acquisition module 81 is used to acquire a pedestrian image dataset and select several images from the pedestrian image dataset as a training classification dataset;
[0116] Clustering processing module 82 is used to perform clustering processing on the training classification dataset to obtain a pseudo-label dataset;
[0117] The model training module 83 is used to input the pseudo-label dataset as a training dataset into a preset person re-identification network model for iterative training to obtain the final person re-identification network model.
[0118] The recognition output module 84 is used to input the pedestrian image dataset into the final pedestrian re-identification network model for recognition, and obtain the pedestrian re-identification result.
[0119] Furthermore, the clustering processing module 82 specifically includes:
[0120] The feature extraction submodule is used to extract features from the training classification dataset to obtain training classification data features;
[0121] The data filtering submodule is used to calculate the similarity between the training classification data features, compare the similarity between the training classification data features with a preset first judgment threshold, filter and retain the training classification data features that meet the requirements of the first judgment threshold, and obtain a pseudo-label dataset.
[0122] Furthermore, the pseudo-label data filtering submodule specifically includes:
[0123] The first undirected graph network construction unit is used to calculate the similarity between the features of the training classification data and construct the feature undirected graph network of the training classification dataset based on the similarity between the features of the training classification data.
[0124] The first comparison and judgment unit is used to compare the similarity between the training classification data features corresponding to the associated nodes with a preset first judgment threshold based on the feature undirected graph network.
[0125] The first classification data filtering unit is used to retain the training classification data features with a similarity greater than or equal to the first judgment threshold, and to remove the training classification data features with a similarity less than the first judgment threshold, so as to obtain a pseudo-label dataset.
[0126] Furthermore, the model training module 83 specifically includes:
[0127] The model training unit submodule is used to input the pseudo-label dataset as a training dataset into a preset person re-identification network model for training.
[0128] The pseudo-label data update submodule is used to execute steps A to C, wherein:
[0129] Step A: Input the pseudo-label dataset into the pedestrian re-identification network model trained with the pseudo-label dataset to extract data features and obtain pseudo-label data features;
[0130] Step B: Cluster the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset;
[0131] Step C: Use the new pseudo-label dataset as the training dataset and input it into the pedestrian re-identification network model through the model training submodule for training;
[0132] Repeat steps A through C until the preset convergence condition is met to obtain the final pedestrian re-identification network model.
[0133] Furthermore, the pseudo-label data update submodule specifically includes the following units to execute step B:
[0134] An undirected graph network update unit is used to calculate the similarity between the pseudo-label data features and each data feature of the pseudo-label dataset, and to construct a feature undirected graph network based on the similarity between each data feature to obtain the clustering result.
[0135] A strongly correlated data classification unit is used to detect whether there is a data cluster center in each cluster of data in the clustering results. If there is a data cluster center in the cluster, the cluster is classified into strongly correlated data.
[0136] The associated data filtering unit is used to determine a new pseudo-label dataset based on all the strongly associated data.
[0137] Furthermore, the associated data filtering unit specifically includes:
[0138] The central data feature extraction unit is used to extract the data features corresponding to the data cluster centers of each type of cluster data in the strongly correlated data to obtain the central data features.
[0139] The second undirected graph network construction unit is used to calculate the similarity between all the central data features and construct the feature undirected graph network of the strongly correlated data based on the similarity between the central data features.
[0140] The second comparison and judgment unit is used to compare the similarity between the central data features corresponding to the associated nodes with a preset second judgment threshold based on the feature undirected graph network.
[0141] The second classification data filtering unit is used to retain the central data features whose similarity is greater than or equal to the second judgment threshold, so as to obtain a new pseudo-label dataset.
[0142] Furthermore, the second classification data filtering unit also includes adding the center data features with similarity less than the second judgment threshold as difficult sample data to the new pseudo-label dataset for use in the next iteration of training.
[0143] Furthermore, when the pseudo-label data update submodule iteratively trains the pedestrian re-identification network model by repeatedly executing steps A to C, it includes, but is not limited to, adjusting the similarity judgment threshold during clustering.
[0144] It is understood that the pedestrian re-identification device based on semi-supervised learning provided in this embodiment is a software and hardware combination device specifically used to implement the pedestrian re-identification method based on semi-supervised learning in Embodiment 1. The above modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module. Repeated technical concepts in this embodiment can be understood and implemented with reference to Embodiment 1, and will not be further described here.
[0145] This invention provides a pedestrian re-identification device based on semi-supervised learning. A data acquisition module 81 acquires a pedestrian image dataset, selects several images from the dataset as a training classification dataset, and performs clustering processing on the training classification dataset using a clustering processing module 82 to obtain a pseudo-label dataset. A model training module 83 inputs the pseudo-label dataset as a training dataset into a preset pedestrian re-identification network model for iterative training to obtain the final pedestrian re-identification network model. A recognition output module 84 inputs the pedestrian image dataset into the final pedestrian re-identification network model for recognition, obtaining the pedestrian re-identification result. This device achieves semi-supervised learning by using a small number of labeled images as a training classification dataset to train a pedestrian re-identification network model, thereby enabling the model to complete pedestrian re-identification on a large amount of unlabeled data. Compared to supervised learning, this significantly reduces the workload of manually labeling pedestrian re-identification data and improves the accuracy of the pedestrian re-identification algorithm.
[0146] Example 3
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the following steps:
[0148] Obtain a pedestrian image dataset, and select several images from the pedestrian image dataset as a training classification dataset;
[0149] Clustering is performed on the training classification dataset to obtain a pseudo-label dataset;
[0150] The pseudo-label dataset is used as a training dataset and input into a preset person re-identification network model for iterative training to obtain the final person re-identification network model.
[0151] The pedestrian image dataset is input into the final pedestrian re-identification network model for recognition, and the pedestrian re-identification result is obtained.
[0152] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0154] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0155] The above embodiments merely illustrate several implementation methods of the present invention and should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A pedestrian re-identification method based on semi-supervised learning, characterized in that, Includes the following steps: Obtain a pedestrian image dataset, and select several images from the pedestrian image dataset as a training classification dataset; Feature extraction is performed on the training classification dataset to obtain the training classification data features; Calculate the similarity between the features of the training classification data, and construct an undirected feature graph network for the training classification dataset based on the similarity between the features of the training classification data; Based on the feature-based undirected graph network, the similarity between the training classification data features corresponding to the associated nodes is compared with a preset first judgment threshold. The training classification data features that meet the requirements of the first judgment threshold are filtered and retained to obtain a pseudo-label dataset. The pseudo-label dataset is used as the training dataset and input into a pre-defined person re-identification network model for iterative training to obtain the final person re-identification network model; wherein each iteration of training includes: Step A: Input the pseudo-label dataset into the pedestrian re-identification network model trained with the pseudo-label dataset to extract data features and obtain pseudo-label data features; Step B: Cluster the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset; Step C: Input the new pseudo-label dataset as the training dataset into the person re-identification network model for training; Repeat steps A to C above until the preset convergence condition is met to obtain the final pedestrian re-identification network model. Step B involves clustering the pseudo-label data features and the pseudo-label dataset to obtain a new pseudo-label dataset, including: Calculate the similarity between the pseudo-label data features and each data feature of the pseudo-label dataset, construct a feature undirected graph network based on the similarity between each data feature, and obtain the clustering result; The clustering results are checked to see if there is a cluster center in each cluster. If there is a cluster center, the cluster is classified into strongly correlated data. Based on all the strongly correlated data, a new pseudo-label dataset is determined; The pedestrian image dataset is input into the final pedestrian re-identification network model for recognition, and the pedestrian re-identification result is obtained.
2. The pedestrian re-identification method based on semi-supervised learning as described in claim 1, characterized in that, The step of determining a new pseudo-label dataset based on all the strongly correlated data specifically includes: Extract the data features corresponding to the data cluster centers of each cluster in the strongly correlated data to obtain the center data features; Calculate the similarity between all the central data features, and construct a feature undirected graph network of the strongly correlated data based on the similarity between the central data features; Based on the feature-based undirected graph network, the similarity between the central data features corresponding to the associated nodes is compared with a preset second judgment threshold. The central data features with similarity greater than or equal to the second judgment threshold are retained to obtain a new pseudo-label dataset.
3. The pedestrian re-identification method based on semi-supervised learning as described in claim 2, characterized in that, The step of retaining the central data features with a similarity greater than or equal to the second judgment threshold and removing the central data features with a similarity lower than the second judgment threshold to obtain a new pseudo-label dataset further includes: The central data features with similarity less than the second judgment threshold are added as difficult sample data to a new pseudo-label dataset for use in the next iteration of training.
4. The pedestrian re-identification method based on semi-supervised learning as described in claim 1, characterized in that, In the step of repeatedly executing steps A to C until the preset convergence condition is met to obtain the final pedestrian re-identification network model, the iterative training of the pedestrian re-identification network model by repeatedly executing steps A to C includes, but is not limited to, adjusting the similarity judgment threshold during clustering.
5. A pedestrian re-identification device based on semi-supervised learning, characterized in that, The apparatus comprising, using the method of claim 1, includes: The data acquisition module is used to acquire a pedestrian image dataset and select several images from the pedestrian image dataset as a training classification dataset. The clustering processing module is used to perform clustering processing on the training classification dataset to obtain a pseudo-label dataset. The model training module is used to input the pseudo-label dataset as a training dataset into a preset person re-identification network model for iterative training to obtain the final person re-identification network model. The recognition output module is used to input the pedestrian image dataset into the final pedestrian re-identification network model for recognition, and obtain the pedestrian re-identification result.
6. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the pedestrian re-identification method based on semi-supervised learning as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Cross-domain pedestrian re-identification method based on neighbor sample information guidance
CN111898665A
Weak supervision training method of pedestrian re-identification model based on micrograph learning
CN112395997A