A method for improving clustering precision of pedestrian re-identification based on semi-supervised learning
By combining DBSCAN clustering and re-clustering operations with camera information to optimize the neural network model, the problem of insufficient clustering accuracy in semi-supervised learning is solved, enabling efficient recognition and rapid deployment of pedestrian re-identification tasks.
Patent Information
- Application Number
- CN202211526656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing semi-supervised learning methods rely on an excessive number of labeled samples in pedestrian re-identification tasks, resulting in insufficient clustering accuracy and an inability to effectively utilize sparse labeled information, leading to low training sample quality.
The DBSCAN clustering algorithm is used to generate pseudo-labels, and the original clusters are merged or split through re-clustering operations. Combined with camera information and centroid calculation, the neural network model parameters are optimized using the contrastive learning loss function to improve clustering accuracy.
It significantly improves the clustering accuracy and recognition capability of pedestrian re-identification tasks, is suitable for rapidly deployed pedestrian re-identification systems, and can effectively utilize scarce labeled data and reduce the impact of noise.
Smart Images

Figure CN115965992B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of pedestrian re-identification, and particularly relates to a method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning. BACKGROUND
[0002] Pedestrian re-identification is an important research field in computer vision, and is widely applied to security monitoring in large public places, such as finding people in amusement parks, monitoring the action tracks of suspicious persons, etc. The goal of the pedestrian re-identification task is to identify the target pedestrian from a set of images or video clips collected by multiple overlapping cameras. In actual monitoring videos, due to the influence of a series of factors such as camera resolution, illumination, shooting distance and angle, etc., high-quality face pictures cannot be obtained, thus causing the failure of face recognition technology, and in this case, pedestrian re-identification plays an important role. Since there already exist mature pedestrian detection tools, the pedestrian re-identification task is widely considered as an image retrieval problem, that is, given an image, all images of a specific pedestrian in the image data set are retrieved.
[0003] In deep learning, supervised learning is the training method with better model performance. However, the annotation data is very time-consuming and laborious, for example, in the pedestrian re-identification task, the cost of manually distinguishing the same pedestrian under different cameras is very high, so complete supervised learning cannot be applied in actual scenarios. In order to solve this problem, more and more researchers have begun to focus on semi-supervised learning, aiming to study the training of neural networks through weak supervision signals. Semi-supervised learning can be divided into three types: incomplete supervision, uncertain supervision and inaccurate supervision, and existing methods are mostly for incomplete supervision settings. Incomplete supervision training data only has part of the data with correct labels, and most of the data has not undergone the annotation process. For this kind of semi-supervised data, existing methods mainly fall into two categories: using labeled samples to constrain network learning; clustering all samples to obtain pseudo labels.
[0004] The network learning with the annotated samples usually focuses on the important characteristic of cross-camera, such as ensuring that the distance between the current sample and the most difficult-to-distinguish positive sample is less than the distance with the most easily mistaken negative sample. In addition, the image of the current sample under other cameras is predicted by the feature distribution of the images taken by different cameras, and the labeled images of pedestrians under all cameras are generated by using the GAN network, which are the mainstream methods of using only labeled data. However, such methods are too dependent on the number of labeled samples, and the learned features are limited. The method of clustering all samples to obtain pseudo labels is widely used in pedestrian re-identification. The model uses a clustering algorithm to cluster images with similar features together and obtains a clustering label, i.e. a pseudo label for network learning. Obviously, the accuracy of clustering is very important for the trained model, and existing methods usually filter reliable clusters by requiring the independence and compactness of clustering. Although such methods can effectively avoid the influence of most noise, they also have some disadvantages, such as too many discrete values, abandoning the learning of samples of the same pedestrian with insufficient similarity under different cameras, etc. In summary, in the semi-supervised pedestrian re-identification task, how to use limited completely correct labeled information to improve the clustering quality of training samples is worth further studying. SUMMARY
[0005] In view of the deficiencies in the prior art, the present application provides a method for improving the clustering accuracy of pedestrian re-identification based on semi-supervised learning. The method uses the existing small amount of labeled samples to guide the clustering of all samples, thereby improving the reliability of clustering. In the process of guiding clustering, more reliable small clusters are obtained by re-clustering, specifically by splitting and merging the original clustering operation. At the same time, the influence of different cameras is considered, so that the model learns more effective features about pedestrians.
[0006] To achieve the above purpose, the technical scheme provided by the present application is a method for improving the clustering accuracy of pedestrian re-identification based on semi-supervised learning, comprising the following steps:
[0007] Step 1, obtain a pedestrian re-identification dataset, divide it into a training set and a test set, and manually label a small amount of data in the training set to obtain a labeled training dataset;
[0008] Step 2, use the DBSCAN clustering algorithm to cluster all training set data in step 1, and obtain the pseudo label of the sample data;
[0009] Step 3, compare the pseudo label of the labeled data after clustering with the manually labeled label, and re-cluster all sample data with clustering errors to obtain new pseudo labels;
[0010] Step 4, if the labeled data in multiple original clusters all come from the same pedestrian, the multiple original clusters are merged to obtain a large cluster.
[0011] Step 5, if the label data in a certain original cluster comes from different pedestrians, the original cluster is split into multiple smaller pure clusters;
[0012] Step 6, the centroid of the cluster is taken as the positive sample, the discrete value is taken as the negative sample, and the contrast learning loss function is used for back propagation to iteratively update the neural network model parameters;
[0013] Step 7, repeat steps 2-6, when the number of clusters and the accuracy difference between the two iterations is less than μ, the network model is considered to be converged, and the neural network model for pedestrian re-identification is output;
[0014] Step 8, test the clustering and classification effect of the network model using the test set data.
[0015] Moreover, in step 1, the existing automatic pedestrian detection tool is used to detect the monitoring videos taken by multiple cameras to obtain a large number of images of different pedestrians under multiple cameras, and divide them into training set and test set, and label a small number of images in a short period of time in the training set, and label the ID of different pedestrians to obtain a small number of labeled training data sets.
[0016] Moreover, after the initial clustering is completed by using the DBSCAN clustering algorithm in step 2, the data set x i is a single sample, is the pseudo-label corresponding to the sample, and the samples that can be clustered together i , the corresponding pseudo-label is assigned a number from 0 to Num-1, Num is the number of clusters, and the samples that cannot be clustered and are far away are identified as discrete values, and the corresponding pseudo-label is assigned as -1.
[0017] Moreover, after clustering in step 3, the data set is obtained , which includes labeled samples K , the corresponding correct manual annotation label is {y1, y2,... y K}, by comparing the pseudo-labels of the labeled data after clustering with the manually annotated labels, it is found that there are two errors: pictures with different label IDs are clustered into one class, and pictures with the same label ID are clustered into different classes. Re-cluster all sample data in these incorrect clusters.
[0018] Moreover, in step 4, when the labeled images of the same pedestrian are scattered into multiple clusters, and these clusters do not contain other pedestrians' labeled samples, these original clusters are merged into one large cluster, and the calculation method is as follows:
[0019]
[0020] where Cluster new denotes the new cluster after merging, denotes the labeled samples in the i-th cluster that is merged, j denotes the unlabeled samples in the i-th cluster that is merged, i N denotes the number of labeled samples in the i-th cluster that is merged, i N denotes the number of unlabeled samples in the i-th cluster that is merged, K denotes the number of original clusters that need to be merged.
[0021] Further, in the step 5, if the labeled images in the original cluster come from different pedestrians, the centroids of the small clusters after splitting are first calculated using these labeled images, then the distance between each unlabeled sample in the original cluster and each centroid is calculated, and the unlabeled sample is assigned to the small cluster to which the nearest centroid belongs.
[0022] The centroid of the small cluster after classification is the average of all labeled samples, and is calculated as follows:
[0023]
[0024] where E S denotes the centroid of the s-th small cluster, N denotes the number of small cluster centroids, denotes the labeled sample, denotes the feature value of the sample , K denotes the number of labeled samples in the s-th small cluster, denotes the true label of the labeled sample, y s denotes the true label of the labeled sample in the s-th small cluster.
[0025] When performing the splitting operation, not only the distance between the centroids of the small clusters needs to be considered, but also the camera information. If the labeled images of different pedestrians come from the same camera, the unlabeled samples from the same camera are taken as discrete values, the label becomes -1, and are taken as a separate category when calculating the loss function; if the labeled images of different pedestrians come from multiple cameras, the unlabeled samples taken by a certain camera are assigned to the small clusters of other cameras.
[0026] Further, in the step 6, the neural network model uses the ImageNet pre-trained ResNet-50 as a feature encoder to extract features, the batchsize is set to 64, the initial learning rate is 0.00035, and the loss function calculation formula is:
[0027]
[0028] where N is the number of training set images, Y is the number of all classes composed of clusters and discrete values, tau is a parameter for controlling the smoothness of the probability distribution, <·,·> represents the inner product of two features, v i is the image x i After network coding, the feature z i is v i the centroid of the belonging class, z j represents the centroid of the jth cluster.
[0029] Moreover, the accuracy in step 7 is calculated by the average accuracy mAP and Rank-1, mAP is the ratio of the number of correctly classified samples after clustering to the total number of samples, and Rank-1 refers to the probability that the sample with the highest confidence in the classification result is correctly classified; when the final number of clusters in the current training differs from the number of clusters in the last round of training by less than mu, and the difference between mAP and Rank-1 in the two iterations is less than mu, the model converges, and a neural network model for pedestrian re-identification is obtained.
[0030] Compared with the prior art, the present application has the following advantages:
[0031] 1) A strategy for improving clustering accuracy using sparse labeled data is proposed, which greatly improves the ability of the model to identify pedestrians in the semi-supervised pedestrian re-identification task; 2) It makes up for the shortcomings of the basic clustering strategy, and performs merging or splitting operations for different types of clustering errors, significantly improving the clustering accuracy; 3) It takes into account the influence of different cameras, enabling the pedestrian re-identification network model to learn more effective features about pedestrians; 4) It has the characteristics of high adaptability and simple optimization of clustering, and can be effectively applied to scenarios that require rapid deployment of pedestrian re-identification systems. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is the flowchart of the embodiment of the present application. DETAILED DESCRIPTION
[0033] The present application provides a method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning, which will be further described in conjunction with the accompanying drawings.
[0034] As Figure 1 shown, the flow of the embodiment of the present application includes the following steps:
[0035] Step 1, obtain a pedestrian re-identification dataset, divide it into a training set and a test set, and manually label a small amount of data in the training set to obtain a labeled training dataset.
[0036] The existing automatic pedestrian detection tool is used to detect the monitoring video shot by multiple cameras to obtain a large number of images of different pedestrians under multiple cameras, and the images are divided into a training set and a test set. A small number of images in a short period of time in the training set are labeled, and the IDs of different pedestrians are obtained to obtain a small number of labeled training data sets. Since there is a certain distance between different cameras, by default, in a short period of time, the same pedestrian will not appear under different cameras, and therefore each pedestrian will only have labeled information under one camera.
[0037] Step 2, the DBSCAN clustering algorithm is used to cluster all the training data sets in step 1, and pseudo labels of sample data are obtained.
[0038] In this embodiment, the DBSCAN algorithm is directly called by from sklearn.cluster import DBSCAN, and the important parameters are eps and min_samples. When the data set is relatively complex and the negative influence of the camera is large (for example, the MSMT17 data set), eps is set to 0.7, the clustering radius is widened, and the influence of the interference factor on clustering is weakened. On the contrary, for the data set in which the training pictures are relatively clear and the pedestrian features are obvious, eps is set to 0.5, and the clustering standard is strictly improved, so that more effective clustering results are obtained; min_samples is set to 4 according to experience. After the initial clustering is completed, the data set x i is a single sample, is the pseudo label corresponding to the sample. For samples x i that can be clustered together, the pseudo label is assigned a number from 0 to Num-1, Num is the number of clusters, for example, the pseudo label corresponding to the sample in the first cluster is 0, and the pseudo label corresponding to the sample in the Num cluster is Num-1. For samples that cannot be clustered and are far away, they are identified as discrete values, and the corresponding pseudo label is assigned as -1.
[0039] Step 3, compare the pseudo label of the labeled data after clustering with the manually labeled label, re-cluster all sample data that are clustered incorrectly, and obtain a new pseudo label.
[0040] The data set obtained after step 2 clustering includes labeled samples The correct manual annotation label corresponding to the sample is {y1, y2,... y K} By comparing the pseudo labels of the labeled data after clustering with the manually labeled labels, it is found that there are two errors: pictures of different label IDs are clustered into one class, and pictures of the same label ID are clustered into different classes. These two errors correspond to similar pedestrian pictures that are difficult to distinguish and similar pictures of the same pedestrian, which are two main factors affecting clustering accuracy. Therefore, re-clustering operations need to be performed on all sample data in the erroneous clusters.
[0041] Step 4: If the labeled data in multiple original clusters are from the same pedestrian, the multiple original clusters are merged to obtain one large cluster.
[0042] When the labeled images of the same pedestrian (with the same ID) are scattered in multiple clusters and these clusters do not contain labeled samples of other pedestrians, the original clusters are merged into one large cluster.
[0043]
[0044] In the formula, Cluster new represents the new cluster after merging, represents the labeled sample in the i-th cluster subjected to the merging operation, x j represents the unlabeled sample in the i-th cluster subjected to the merging operation, N′ i is the number of labeled samples in the i-th cluster subjected to the merging operation, N i is the number of unlabeled samples in the i-th cluster subjected to the merging operation, N K is the number of original clusters that need to be merged.
[0045] For example, cluster 1 has 5 samples, and the pseudo label set is {A1, A'2, A3, A4, A5}. Cluster 2 has 6 samples, and the pseudo label set is {B'1, B2, B3, B'4, B5, B6}. The second sample of cluster 1 and the first and fourth samples of cluster 2 are labeled samples and come from the same ID. Therefore, cluster 1 and cluster 2 are merged into one large cluster, and the pseudo labels of all samples in the cluster are changed to the new pseudo label set {C1, C2, C3, C, C5, C6, C7, C8, C9, C 10 , C 11}.
[0046] During the clustering process, due to different capture angles, backgrounds, or occlusions, images of the same pedestrian may be classified into different clusters due to low visual similarity. The merging operation effectively solves this problem.
[0047] Step 5: If the labeled data in a certain original cluster come from different pedestrians, the original cluster is split into multiple smaller pure clusters.
[0048] Without the supervision of annotation information, clustering can only divide images according to the visual appearance of the images, however, pedestrians can be visually similar, thus similar images of different pedestrians can be clustered together. In order to reduce this kind of clustering errors, under the assistance of semi-supervised limited single camera annotation information, the original noisy cluster is divided into several smaller reliable clusters.
[0049] If the labeled images in the original cluster come from different pedestrians, first, the centroids of the small clusters after splitting are calculated using these labeled images, then the distance between each unlabeled sample in the original cluster and each centroid is calculated, and the unlabeled sample is assigned to the small cluster to which the nearest centroid belongs.
[0050] The centroid of the small cluster after classification is the average of all labeled samples, and the calculation method is as follows:
[0051]
[0052] In the formula, E S represents the centroid of the s-th small cluster, N is the number of small cluster centroids, is a labeled sample, is the feature value of the sample , K is the number of labeled samples in the s-th small cluster, is the true label of the labeled sample, y s is the true label of the labeled sample in the s-th small cluster.
[0053] For example, the current cluster sample set is where X represents an unlabeled sample, X a represents a pedestrian image with a real ID of a, and X b represents a pedestrian image with a real ID of b. First, the images of the same person are selected as a separate class Then, the average value of multiple features in each class is taken as the centroid, that is, The remaining samples {X3, X5, X6} of the original cluster are matched with the centroids E A , E B , and the similarity results are as shown in Table 1, and the final re-clustering result is:
[0054] Table 1
[0055]
[0056] When performing splitting operation, not only the distance of the centroid of the small cluster needs to be considered, but also the camera information needs to be considered.
[0057] If the labeled images of different pedestrians come from the same camera, the unlabeled samples from the same camera are taken as discrete values, and the label becomes -1, which is taken as a separate class when calculating the loss function. For example, based on the above example, add camera information, represents a labeled sample with ID a and sequence number 1 from camera 1, X 23 represents an unlabeled sample with sequence number 3 from camera 2. Assume that the current clustering sample set is Referring to the above results, the final split is into three classes: {X 16}, where {X 16} is a discrete value, and the corresponding label is -1, which is taken as a class with a sample number of 1 in the subsequent loss function calculation.
[0058] If the labeled images of different pedestrians come from multiple cameras, the unlabeled samples taken by a certain camera are assigned to small clusters of other cameras. Assume that the current clustering sample set is The similarity results are shown in Table 1, and the final split is into two classes: where X 13 Even if it is closer to the A cluster centroid, it comes from camera 1, and cannot be merged into A.
[0059] Step 6: Use the contrastive learning loss function to perform backpropagation and iteratively update the neural network model parameters, taking the centroid of the cluster as the positive sample and the discrete value as the negative sample.
[0060] The neural network model uses ResNet-50 pre-trained on ImageNet as a feature encoder to extract features, with a batch size of 64 and an initial learning rate of 0.00035. The loss function calculation formula is:
[0061]
[0062] where N is the number of training set images, Y is the number of all classes composed of clusters and discrete values, τ is a parameter that controls the smoothness of the probability distribution, <·,·> represents the inner product of two features, v i is the feature obtained after network encoding of image x i , z i is the centroid of the v i class, and z j represents the centroid of the jth class.
[0063] Step 7: Repeat steps 2-6, and when the difference between the number of clusters and the accuracy before and after two iterations is less than 2%, the network model is considered to have converged, and the neural network model for pedestrian re-identification is output.
[0064] The accuracy is calculated by the average accuracy mAP and Rank-1, the mAP is the ratio of the number of correctly classified samples to the total number of samples after clustering, and the Rank-1 refers to the probability that the sample with the highest confidence in the classification result is correctly classified. When the final number of clusters in the current training is less than 2% different from the number of clusters in the last round of training, and the difference between mAP and Rank-1 in the two iterations is less than 2%, the model converges, and a neural network model for pedestrian re-identification is obtained.
[0065] Step 8, test the clustering and classification effect of the model by using the test set data.
[0066] Comparative experiment:
[0067] The Market1501, DukeMTMC-reID and MSMT17 pedestrian re-identification data sets are obtained from an open source channel, a small amount of data in the data sets are manually labeled according to the SCT (Single Camera Training, only label all images of each pedestrian under one camera), and Table 2 is the sample statistical data of the three mainstream data sets under the SCT.
[0068] Table 2
[0069]
[0070] The average accuracy mAP and Rank-1 are used as evaluation indexes, and three published methods are compared, and MATE, CCFP and TSSML are respectively the best methods under ICS (Intra-camera supervised), SCT (Single camera training) and semi-supervised (1 / 3 semi-supervised).
[0071] Table 3 comparative experiment results
[0072]
[0073] The average accuracy mAP is the ratio of the number of correctly classified samples to the total number of samples, and the Rank-1 refers to the probability that the sample with the highest confidence in the classification result is correctly classified. As shown in Table 3, the ranking of the two evaluation indexes of the method proposed in the application is good under the three data sets, which shows that the method proposed in the application has better data classification performance.
[0074] The specific embodiments described herein are merely illustrative of the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described specific embodiments or use similar ways to replace, but will not deviate from the spirit of the present application or exceed the scope defined by the appended claims.
Claims
1. A method for improving the clustering accuracy of pedestrian re-identification based on semi-supervised learning, characterized in that, Includes the following steps: Step 1: Obtain the pedestrian re-identification dataset, divide it into a training set and a test set, and manually label a small amount of data in the training set to obtain a labeled training dataset. Step 2: Use the DBSCAN clustering algorithm to cluster all training data from Step 1 and obtain pseudo-labels for the sample data. Step 3: Compare the pseudo-labels after clustering the labeled data with the manually labeled labels, and re-cluster all sample data with clustering errors to obtain new pseudo-labels; Step 4: If there are multiple original clusters where the labeled data all come from the same pedestrian, then merge these multiple original clusters to obtain a large cluster. Step 5: If the label data in a certain original cluster comes from different pedestrians, then split the original cluster into multiple smaller pure clusters. Step 6: Using the centroids of the clusters as positive samples and the discrete values as negative samples, backpropagation is performed using the contrastive learning loss function to iteratively update the parameters of the neural network model. Step 7: Repeat steps 2-6. When the difference between the number of clusters and the accuracy between two iterations is less than μ, the network model is considered to have converged, and a neural network model for pedestrian re-identification is output. Step 8: Use the test set data to test the clustering and classification performance of the network model.
2. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 1, characterized in that: In step 1, existing automatic pedestrian detection tools are used to detect surveillance videos captured by multiple cameras, obtaining a large number of images of different pedestrians under multiple cameras. These images are then divided into training and testing sets. A small number of images in the training set within a short time period are labeled with the IDs of different pedestrians, resulting in a small number of labeled training datasets.
3. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 1, characterized in that: Step 2: After initial clustering using the DBSCAN clustering algorithm, the dataset is obtained. x i For a single sample, For each sample, a pseudo-label is provided; for samples x that can cluster together... i , and its corresponding pseudo-tag Assign a number from 0 to Num-1, where Num is the number of clusters. For samples that cannot be clustered and are far apart, they are considered discrete values and their corresponding pseudo-labels are assigned -1.
4. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 3, characterized in that: The dataset obtained after clustering in step 3 Includes labeled samples The corresponding correct manually labeled tags are {y1, y2, ... y K By comparing the pseudo-labels after clustering labeled data with the manually labeled labels, two errors were found: images with different label IDs were clustered into one class, and images with the same label ID were clustered into different classes. All sample data in these erroneous clusters were then re-clustered.
5. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 4, characterized in that: In step 4, when the labeled images of the same pedestrian are scattered into multiple clusters, and these clusters do not contain labeled samples of other pedestrians, these original clusters are merged into one large cluster. The calculation method is as follows: In the formula, Cluster new This represents the new cluster after merging. Let N' represent the labeled samples in the i-th cluster where the merging operation is performed, and let xj represent the unlabeled samples in the i-th cluster where the merging operation is performed. i N represents the number of labeled samples in the i-th cluster where the merging operation is performed. i N represents the number of unlabeled samples in the i-th cluster where the merging operation is performed. K This represents the number of original clusters that need to be merged.
6. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 5, characterized in that: In step 5, if the labeled images in the original cluster come from different pedestrians, the centroids of the split sub-clusters are first calculated using these labeled images. Then, the distance between each unlabeled sample in the original cluster and each centroid is calculated, and the unlabeled sample is assigned to the sub-cluster to which its nearest centroid belongs.
7. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 6, characterized in that: In step 5, the centroids of the sub-clusters after classification are the average of all labeled samples, calculated as follows: In the formula, E S Let N represent the centroid of the s-th sub-cluster, and N be the number of centroids in the sub-clusters. For labeled samples, For the sample The feature value is K, where K is the number of labeled samples in the s-th sub-cluster. For the true labels of the labeled samples, y s Let be the true labels of the labeled samples in the s-th sub-cluster.
8. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 7, characterized in that: When performing the splitting operation in step 5, not only the centroid distance of the small clusters should be considered, but also the camera information. If the labeled images of different pedestrians come from the same camera, the unlabeled samples from the same camera are treated as discrete values, the label is changed to -1, and they are treated as a separate category when calculating the loss function. If the labeled images of different pedestrians come from multiple cameras, the unlabeled samples taken by one camera are assigned to the small clusters of other cameras.
9. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 8, characterized in that: In step 6, the neural network model uses a ResNet-50 pre-trained on ImageNet as the feature encoder to extract features. The batch size is set to 64, the initial learning rate is 0.00035, and the loss function is calculated as follows: In the formula, N is the number of images in the training set, Y is the number of all classes consisting of clusters and discrete values, τ is a parameter controlling the smoothness of the probability distribution, <·,·> represents the inner product of two features, and v i It is image x i The feature z is obtained after network encoding. i For v i The centroid of the class, z j Let represent the centroid of the j-th cluster.
10. The method for improving pedestrian re-identification clustering accuracy based on semi-supervised learning as described in claim 1, characterized in that: In step 7, the accuracy is calculated using the average accuracy mAP and Rank-1. mAP is the ratio of the number of correctly classified samples after clustering to the total number of samples. Rank-1 refers to the probability that the sample with the highest confidence in the classification results is correctly classified. The model converges when the difference between the number of clusters in the current training and the number of clusters in the previous training is less than μ, and the difference between mAP and Rank-1 between the two iterations is less than μ. This yields a neural network model for pedestrian re-identification.