Cross-camera self-distillation based pedestrian re-identification model establishment method and application thereof

Through the cross-camera self-distillation method, the feature extraction network and classifier are used to optimize the pseudo-label annotation and loss function, which solves the problem of accuracy degradation in unsupervised pedestrian re-identification in cross-camera scenarios and achieves the accuracy and stability of pedestrian re-identification in different camera scenarios.

CN116229512BActive Publication Date: 2025-10-14HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310176476.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2025-10-14
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

Existing unsupervised person re-identification methods suffer from decreased accuracy in cross-camera scenarios due to differences in data distribution, and the pseudo-labels they rely on are of poor quality, affecting the recognition effect.

Method used

Through the cross-camera self-distillation method, clustering and pseudo-labeling are performed using the feature extraction network and the classifier corresponding to the camera. The network parameters are optimized by combining the classification loss and distillation loss, and a cross-camera self-distillation pedestrian re-identification model is established to optimize the matching degree between feature extraction and classifier.

Benefits of technology

It can accurately achieve pedestrian re-identification in both same-camera and cross-camera scenarios, improving the accuracy and generalization ability of pedestrian re-identification and solving the performance degradation problem caused by camera differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116229512B_ABST
    Figure CN116229512B_ABST
Patent Text Reader

Abstract

The application discloses a pedestrian re-identification model establishment method based on cross-camera self-distillation and application thereof, and belongs to the field of pedestrian re-identification, and comprises the following steps: clustering and labeling global pseudo-labels after extracting features of pedestrian pictures by using a feature extraction network, dividing the clustering categories into multiple sub-clusters according to cameras, and labeling local pseudo-labels; obtaining a training set after the labeling is completed; constructing a supervised network comprising the feature extraction network and multiple classifiers corresponding to the cameras one by one, classifying the features by the classifiers respectively, and obtaining classification probability distribution; training the supervised network by using the training set; the training loss comprises a classification loss and a distillation loss, which respectively represent the difference between the camera classification probability distribution and the local pseudo-labels, and the difference between the cross-camera classification probability distribution and the camera classification probability distribution; the above steps are repeated until the feature extraction network converges, and the network is output. The application can improve the accuracy of unsupervised pedestrian re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of pedestrian re-identification, and more particularly relates to a pedestrian re-identification model establishment method based on cross-camera self-distillation and application thereof. BACKGROUND

[0002] In the face of a large amount of data generated by the monitoring system, manpower is unable to cope, and the use of computer vision technology to build an intelligent security system can provide a good solution. Pedestrian re-identification is an important research direction in the field of computer vision, and its purpose is to retrieve the pictures of the same pedestrian captured by multiple non-intersecting cameras. Pedestrian re-identification technology can effectively and accurately analyze personnel trajectories and plays an important role.

[0003] Existing pedestrian re-identification schemes widely adopt supervised deep learning methods. The supervised pedestrian re-identification method trains a deep neural network with good performance to extract pedestrian picture features through a large amount of labeled training data, and then performs feature comparison to complete pedestrian re-identification. Although this method has achieved quite high performance on existing data sets, there are still many defects in practical applications. The supervised pedestrian re-identification method requires a large amount of training data set with artificial label annotation, and the annotation of training data consumes a lot of manpower and resources. At the same time, due to the difference between the training data and the actual deployment scene, the trained network will have a performance decline in the actual scene. In order to solve these problems, the research on unsupervised pedestrian re-identification methods without labels has arisen.

[0004] Existing unsupervised pedestrian re-identification methods often perform clustering after feature extraction on pictures, label the class of the pictures as pseudo labels, and then train a deep neural network based on the pedestrian pictures labeled with pseudo labels to extract pedestrian picture features. The unsupervised pedestrian re-identification method can effectively solve the problems existing in the supervised deep learning method, but in actual application scenarios, the pedestrian pictures to be identified are often captured by different cameras, and there are large differences between the pedestrian pictures captured by different cameras. The data distribution under different cameras has a gap, which makes the pseudo labels generated by the clustering on which the unsupervised pedestrian re-identification depends have poor quality, and further affects the accuracy of the unsupervised pedestrian re-identification. SUMMARY

[0005] In view of the defects and improvement needs of the prior art, the present application provides a pedestrian re-identification model establishment method based on cross-camera self-distillation and application thereof, which aims to improve the accuracy of unsupervised pedestrian re-identification.

[0006] To achieve the above-mentioned purpose, according to one aspect of the present application, a pedestrian re-identification model establishment method based on cross-camera self-distillation is provided, comprising the following steps:

[0007] (S1) After extracting features of pedestrian images using a feature extraction network, clustering the extracted features, dividing each clustered category into multiple subclusters, and labeling the category and subcluster as global pseudo-labels and local pseudo-labels of the pedestrian images, respectively, to obtain a training set; the features in each subcluster are extracted from pedestrian images captured by the same camera;

[0008] (S2) constructing a supervised network comprising a feature extraction network and multiple classifiers corresponding to cameras, wherein the feature extraction network is used to extract features of the pedestrian image, and each classifier performs classification based on the features to obtain the probability that the pedestrian image belongs to each sub-cluster; if the pedestrian image and the camera corresponding to the classifier are the same, the output of the classifier is recorded as the same-camera classification probability distribution; otherwise, it is recorded as the cross-camera classification probability distribution;

[0009] (S3) Use the training set to train the supervision network to optimize the parameters of the feature extraction network; the training loss function includes the classification loss L cross_entropy and distillation loss L distill , respectively represent the difference between the same-camera classification probability distribution and the local pseudo-label, and the difference between the cross-camera classification probability distribution and the same-camera classification probability distribution;

[0010] (S4) Repeat steps (S1) to (S3) until the feature extraction network converges, and output the feature extraction network as a pedestrian re-identification model.

[0011] Furthermore, in step (S1), each category obtained by clustering is divided into multiple sub-clusters, including:

[0012] (S11) For each category, the features of pedestrian images extracted from the same camera are divided into a small cluster to obtain multiple small clusters;

[0013] (S12) calculating the compactness of each small cluster respectively, and further dividing the small clusters whose compactness is less than a threshold value λ into multiple new small clusters, so that the compactness of each small cluster is not less than the threshold value λ;

[0014] (S13) The finally obtained small clusters are regarded as sub-clusters.

[0015] Furthermore, the compactness of a small cluster is the average of the Silhouette scores of all features in the small cluster.

[0016] Furthermore, the calculation formula of the threshold λ is:

[0017] λ=mean(mSil)-0.5std(mSil)

[0018] Wherein, mean(mSil) represents the average value of the compactness of all small clusters in step (S11), and std(mSil) represents the standard deviation of the compactness of all small clusters in step (S11).

[0019] Furthermore, for any k-th classifier, after classification based on the features extracted by the feature extraction network, the probability that the obtained pedestrian image belongs to each sub-cluster is:

[0020]

[0021] in, Indicates that the global pseudo label is i, the local pseudo label is j, and the kth * Pedestrian images captured by cameras Characteristics of C k It is formed by concatenating the cluster center vectors of the sub-clusters corresponding to the k-th camera; τ is a preset parameter, and τ>0; Indicates that the kth classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each subcluster.

[0022] Furthermore, the method for establishing a person re-identification model based on cross-camera self-distillation provided by the present invention further includes:

[0023] During training, features are used The cluster center vector of the subcluster with global pseudo label i, local pseudo label j and corresponding to the kth camera After the momentum update, C k to update.

[0024] Furthermore, the distillation loss L distill The calculation expression is:

[0025]

[0026] Where N represents the total number of sample pairs; represents a pedestrian image with a global pseudo label of i and a local pseudo label of j1 captured by the k1th camera characteristics; Indicates that the k1th classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; represents a pedestrian image with a global pseudo label of i, a local pseudo label of j2, and captured by the k2th camera characteristics; Indicates that the k1th classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each subcluster; k1≠k2.

[0027] Furthermore, the classification loss L cross_entropy The calculation expression is:

[0028]

[0029] Where M represents the total number of samples; Represents the local pseudo-label of pedestrian images; represents a pedestrian image with global pseudo label i, local pseudo label j and captured by the kth camera characteristics; Indicates that the kth classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each subcluster.

[0030] According to another aspect of the present invention, a pedestrian re-identification method is provided, comprising:

[0031] Multiple target pedestrian images to be identified are input into the pedestrian re-identification model to obtain the features of each target pedestrian image. The target pedestrian images corresponding to the same pedestrian are identified through feature comparison to complete pedestrian re-identification;

[0032] Among them, the pedestrian re-identification model is established by the above-mentioned pedestrian re-identification model establishment method based on cross-camera self-distillation provided by the present invention.

[0033] According to another aspect of the present invention, a computer-readable storage medium is provided, comprising a stored computer program; when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, and / or the pedestrian re-identification method provided by the present invention.

[0034] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0035] (1) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, on the basis of clustering, further annotates local pseudo-labels on pedestrian images based on the camera, and establishes an independent classifier for each camera, thereby being able to obtain the same-camera classification probability distribution and the cross-camera classification probability distribution through each classifier; when performing network training, the loss function designed by the present invention includes both classification loss and distillation loss. By introducing the classification loss, it is ensured that the pedestrian image features extracted in the same-camera scene can accurately realize pedestrian re-identification. At the same time, by introducing the distillation loss, the same-camera classification probability distribution is distilled into the cross-camera classification probability distribution, and the data distribution under different cameras is aligned, so that the extracted pedestrian image features in the cross-camera scene can also accurately realize pedestrian re-identification. In general, the pedestrian re-identification model established by the present invention can accurately realize pedestrian re-identification with the pedestrian image features extracted in both the same-camera and cross-camera scenes, effectively solving the performance degradation problem caused by camera differences in unsupervised pedestrian re-identification.

[0036] (2) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, when pseudo-labeling pedestrian images, on the basis of dividing each cluster category into small clusters based on the camera, further combines the compactness of each small cluster to split the relatively loose small clusters into more small clusters, ensuring that each sub-cluster obtained in the end has a high compactness, thereby effectively improving the accuracy of local pseudo-labels, thereby further improving the accuracy of pedestrian re-identification.

[0037] (3) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, uses the average value of the silhouette score of the feature as the compactness of the small cluster. Since the silhouette score can effectively reflect the compactness of points in the same class compared with points in different classes, the compactness calculated by the present invention can more accurately reflect the compactness between the features in the cluster, further ensuring the accuracy of the local pseudo-label.

[0038] (4) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, after dividing the cluster categories into small clusters according to the cameras, determines the threshold λ for judging the compactness of the small clusters based on the average value and standard deviation of the compactness of each small cluster. The threshold determined in this way is adapted to the image features captured by the camera in the actual application scenario, and can more accurately identify loose small clusters.

[0039] (5) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, on the basis of completing pseudo-label annotation through sub-cluster division, the class center vectors of the sub-clusters corresponding to the same camera are spliced ​​to obtain the parameter C in the classifier corresponding to the camera. k , which can accurately complete the prediction of the probability distribution of same-camera classification and cross-camera classification.

[0040] (6) During the training process, the parameters in the feature extraction network will be gradually optimized, and the features extracted will also change compared to the pseudo-label annotation stage. The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, will update the class center vector of the corresponding sub-cluster according to the features extracted by the feature extraction network during the training process, and further update the parameters in the corresponding classifier, which can improve the matching degree between the classifier and the feature extraction network and accelerate the training process of the model.

[0041] (7) The method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided by the present invention, in its preferred embodiment, specifically Calculate the distillation loss, where is the probability distribution of the same camera classification, is the cross-camera classification probability distribution. This calculation expression can effectively ensure that during the model training process, the cross-camera classification probability distribution will gradually align with the same-camera classification probability distribution, thereby improving the accuracy of pedestrian re-identification in cross-camera scenarios.

[0042] (8) The pedestrian re-identification method provided by the present invention uses the pedestrian re-identification model established by the present invention to perform feature extraction, and then realizes pedestrian re-identification through feature comparison. Since the pedestrian image features extracted by the pedestrian re-identification model established by the present invention can be used to accurately realize pedestrian re-identification in both same-camera and cross-camera scenarios, the pedestrian re-identification method provided by the present invention can effectively improve the accuracy of pedestrian re-identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A flow chart of a method for establishing a person re-identification model based on cross-camera self-distillation provided by an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of pseudo-label marking provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of a supervised network and its training process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is 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 for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0047] In the present invention, the terms "first", "second", etc. (if any) in the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0048] In order to solve the problem of decreased pedestrian re-identification accuracy in existing unsupervised pedestrian re-identification methods due to large differences in data distribution between cameras, the present invention provides a method for establishing a pedestrian re-identification model based on cross-camera self-distillation and its application. The overall idea is to improve the process of pseudo-labeling pedestrian images so that the labeled pseudo-labels can reflect the information of the camera. At the same time, the loss function of network training using pedestrian images labeled with pseudo-labels is improved so that the classification probability distribution under cross-camera conditions is aligned with the classification probability distribution under the same camera. Therefore, the established pedestrian re-identification network can accurately realize pedestrian re-identification by extracting pedestrian image features in both same-camera and cross-camera scenarios.

[0049] The following is a brief introduction to the key technical terms and symbolic representations used in this invention:

[0050] Person Re-ID: Retrieve images of the same person captured by multiple cameras with non-overlapping fields of view.

[0051] Knowledge distillation: Generally speaking, large models are often a single complex network or a collection of several networks, with good performance and generalization capabilities, while small models have limited expression capabilities due to their small network size. Therefore, the knowledge learned by the large model can be used to guide the training of the small model, so that the small model has performance comparable to that of the large model, but the number of parameters is greatly reduced, thereby achieving model compression and acceleration. This process of using the knowledge learned by the complex model to understand the simple model is the process of knowledge distillation. In the present invention, distillation specifically refers to using the same-camera classification probability distribution learned by the classifier to guide the cross-camera classification probability distribution.

[0052] A pedestrian image with a global pseudo label of i and a local pseudo label of j captured by the kth camera In the symbolic representation of features and pedestrian images, the subscripts represent the global pseudo-label and the local pseudo-label, i.e., the cluster category and sub-cluster to which the pedestrian image belongs, and the superscript represents the corresponding camera number. It is easy to understand that this symbolic representation is universal. When the global pseudo-label, local pseudo-label, or camera changes, the superscript and subscript will change accordingly.

[0053] The cluster center vector of the subcluster with global pseudo label i, local pseudo label j, and corresponding to the k-th camera. Similarly, the subscripts represent the global pseudo label and local pseudo label, respectively, and the superscript represents the corresponding camera. It is easy to understand that this notation is universal. When the global pseudo label, local pseudo label, or camera changes, the superscript and subscript will change accordingly.

[0054] C k : The parameters used by the classifier corresponding to the kth camera for classification. In the present invention, it is composed of the class center vectors of the sub-clusters corresponding to the camera.

[0055] The following are examples.

[0056] Example 1:

[0057] A method for establishing a pedestrian re-identification model based on cross-camera self-distillation, such as Figure 1 As shown, the following steps are included:

[0058] (S1) After extracting features from pedestrian images using a feature extraction network, the extracted features are clustered, and each clustered category is divided into multiple subclusters. The category and subcluster are labeled as global pseudo-labels and local pseudo-labels of the pedestrian image, respectively, to obtain a training set; the features in each subcluster are extracted from pedestrian images captured by the same camera.

[0059] Optionally, the feature extraction network ResNet50 selected in this embodiment is a type of convolutional neural network (CNN). It should be noted that the convolutional neural network is only an optional feature extraction network and is not to be understood as the only limitation of the present invention. Other network models that can realize feature extraction, such as VGG, OSNet, Transformer, etc., can also be used in the present invention.

[0060] The pedestrian image selected in step (S1) of this embodiment is normalized to a size of 256*128 and contains only a single pedestrian. After passing through the ResNet50 network, a 2048-dimensional feature vector is generated. It should be noted that the image size and feature dimension here are only exemplary descriptions and should not be understood as the only limitation of the present invention. In actual applications, they can be set accordingly according to actual needs.

[0061] Before each round of network training, a feature extraction network is used to extract features from all person images and assign pseudo labels. Compared to traditional unsupervised person re-identification methods that only use clustering results to assign global pseudo labels to pedestrian images, this embodiment further divides clusters into subclusters based on the camera to which the pedestrian images belong. Based on the division results, the pedestrian images are assigned local pseudo labels. This allows the network to distinguish between same-camera and cross-camera scenes during training.

[0062] As an optional embodiment, in step (S1) of this embodiment, the features of the pedestrian image are clustered using the DBSCAN clustering algorithm. The DBSCAN clustering algorithm is a density clustering algorithm that can determine a data point as a noise point and discard samples determined to be noise points from the current round of network training. Based on this clustering algorithm, the accuracy of global pseudo-labels can be effectively guaranteed. It should be noted that the DBSCAN clustering algorithm is only a preferred embodiment and should not be understood as the sole limitation of the present invention. Other clustering algorithms such as K-means and spectral clustering can also be used in the present invention.

[0063] In order to further improve the accuracy of local pseudo-labels, as a preferred embodiment, this embodiment also considers the compactness of clusters when dividing sub-clusters. Accordingly, in step (S1) of this embodiment, each category obtained by clustering is divided into multiple sub-clusters, specifically including:

[0064] (S11) For each category, the features of pedestrian images extracted from the same camera are divided into a small cluster to obtain multiple small clusters;

[0065] (S12) calculating the compactness of each small cluster respectively, and further dividing the small clusters whose compactness is less than a threshold value λ into multiple new small clusters, so that the compactness of each small cluster is not less than the threshold value λ;

[0066] Optionally, in this embodiment, the average of the Silhouette scores of all features in the small cluster is used to measure the closeness of the small cluster. Since the Silhouette score can effectively reflect the closeness of points in the same class compared with points in different classes, the closeness calculated in this embodiment can more accurately reflect the closeness between features in the cluster.

[0067] In some other embodiments of the present invention, other methods such as the Davidson-Botting index and the Dunn index may also be used to measure the compactness of small clusters;

[0068] (S13) taking each small cluster finally obtained as a sub-cluster;

[0069] This embodiment further divides relatively loose small clusters (with a compactness less than a threshold λ) into multiple new small clusters, ensuring that the compactness of each small cluster is high. This ensures that each sub-cluster obtained ultimately has a high compactness, thereby effectively improving the accuracy of local pseudo-labels and further improving the accuracy of pedestrian re-identification.

[0070] In order to ensure accurate judgment of whether the compactness of small clusters is large enough, in this embodiment, the calculation formula of the threshold λ is:

[0071] λ=mean(mSil)-0.5std(mSil)

[0072] Among them, mean(mSil) represents the average value of the compactness of all small clusters in step (S11), and std(mSil) represents the standard deviation of the compactness of all small clusters in step (S11); the threshold determined in this way is adapted to the image features captured by the camera in actual application scenarios, and can more accurately identify loose small clusters; it should be noted that the calculation of the threshold here is only a preferred implementation method and should not be understood as the only limitation of the present invention. In other embodiments of the present invention, other methods may also be used for determination, for example, the threshold is set to a fixed empirical value.

[0073] Figure 2 As shown, it is an example of pseudo-labeling in this embodiment, in which each shape represents one feature; the feature cluster on the far left is the result after clustering; after division according to the above step (S11), each cluster category is further divided into two small clusters, and a total of 8 small clusters are obtained, among which the solid features are extracted from the pedestrian pictures captured by the same camera, and the non-solid features are extracted from the pedestrian pictures captured by another camera; after further division based on the density, one of the small clusters is split into two new small clusters, and finally a total of 9 sub-clusters are obtained.

[0074] It should be noted that after the cluster categories are divided according to the cameras, further division based on density is only a preferred implementation method. When the accuracy of pedestrian re-identification meets the requirements, further division based on density may not be performed. That is to say, the small clusters obtained in the above step (S11) are directly used as sub-clusters to complete the labeling of local pseudo-labels.

[0075] like Figure 1As shown, this embodiment also includes:

[0076] (S2) Constructing a supervision network including a feature extraction network and multiple classifiers corresponding to cameras one by one, wherein the feature extraction network is used to extract features of pedestrian images, and each classifier performs classification based on the features to obtain the probability that the pedestrian image belongs to each sub-cluster.

[0077] The supervision network established in this embodiment is as follows Figure 3 For ease of description, Figure 3 Only the feature extraction network and one classifier are shown. Regardless of whether the pedestrian picture input to the supervision network is captured by the camera corresponding to the classifier, the features extracted by the feature extraction network for the pedestrian picture will be input into the classifier for classification.

[0078] For ease of description, if the pedestrian image and the camera corresponding to the classifier are the same, the output of the classifier is recorded as the same-camera classification probability distribution; otherwise, it is recorded as the cross-camera classification probability distribution.

[0079] In the supervision network established in step (S2) of this embodiment, for any k-th classifier, after classification based on the features extracted by the feature extraction network, the probability that the obtained pedestrian image belongs to each sub-cluster is:

[0080]

[0081] in, Indicates that the global pseudo label is i, the local pseudo label is j, and the kth * Pedestrian images captured by cameras Characteristics of C k It is formed by concatenating the class center vectors of the sub-clusters corresponding to the k-th camera. Optionally, in this embodiment, the class center vector of the sub-cluster is obtained by averaging the features in the sub-clusters;

[0082] is a preset parameter, and τ>0. The preset parameter τ is used to adjust the training speed. Usually, in order to speed up the training speed, a smaller value is set. Optionally, in this embodiment, τ=0.05;

[0083] Indicates that the kth classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster is easy to understand. When k=k * When k=k *When , the classifier outputs a cross-camera classification probability distribution, that is, this embodiment establishes an independent classifier for each camera, and can obtain the same-camera classification probability distribution and the cross-camera classification probability distribution through each classifier.

[0084] (S3) Use the training set to train the supervision network to optimize the parameters of the feature extraction network; the training loss function includes the classification loss L cross_entropy and distillation loss L distill , respectively represent the difference between the same-camera classification probability distribution and the local pseudo-label, and the difference between the cross-camera classification probability distribution and the same-camera classification probability distribution;

[0085] Optionally, in this embodiment, the distillation loss L distill The calculation is performed using the cross entropy method, and the calculation expression is as follows:

[0086]

[0087] in, represents a pedestrian image with a global pseudo label of i and a local pseudo label of j1 captured by the k1th camera characteristics; Indicates that the k1th classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; represents a pedestrian image with a global pseudo label of i, a local pseudo label of j2, and captured by the k2th camera Features; N represents the total number of sample pairs, such as In this way, the features of pedestrian images with the same global label but extracted from different cameras are a sample pair; Indicates that the k1th classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; k1≠k2;

[0088] It is easy to understand that in the above distillation loss L distill In the expression of is the probability distribution of the same camera classification, is the cross-camera classification probability distribution. This calculation expression effectively ensures that during model training, the cross-camera classification probability distribution will gradually align with the same-camera classification probability distribution, thereby improving the accuracy of pedestrian re-identification in cross-camera scenarios.

[0089] Optionally, the classification loss L cross_entropy It is also calculated by cross entropy, and its calculation expression is as follows:

[0090]

[0091] Where M represents the total number of samples; Represents the local pseudo-label of pedestrian images; represents a pedestrian image with global pseudo label i, local pseudo label j and captured by the kth camera characteristics; Indicates that the kth classifier is based on the feature After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; it is easy to understand that is the probability distribution of classification with the same camera;

[0092] Finally, when the network is trained in this embodiment, the loss function expression is as follows:

[0093] L=L cross_entropy +βL distill

[0094] β is a parameter of the balance loss function. Optionally, in this embodiment, β = 0.5. When performing network training in this embodiment, the loss function designed includes both classification loss and distillation loss. By introducing classification loss, it is ensured that the pedestrian image features extracted in the same camera scene can accurately realize pedestrian re-identification. At the same time, by introducing distillation loss, the same-camera classification probability distribution is distilled into the cross-camera classification probability distribution, and the data distribution under different cameras is aligned, so that the extracted pedestrian image features in the cross-camera scene can also accurately realize pedestrian re-identification.

[0095] (S4) repeating steps (S1) to (S3) until the feature extraction network converges, and outputting the feature extraction network as a person re-identification model;

[0096] By repeating steps (S1) to (S3), network training and clustering pseudo-labeling processes are performed alternately. During this process, the performance of the feature extraction network is continuously improved. The resulting person re-identification model can accurately realize pedestrian re-identification using the extracted pedestrian image features in both same-camera and cross-camera scenarios, effectively solving the performance degradation problem caused by camera differences in unsupervised pedestrian re-identification.

[0097] Considering that during the training process, the parameters of the feature extraction network will be gradually optimized, and the features extracted will also change compared to the pseudo-label annotation stage, in order to further accelerate the training process of the model, this embodiment also includes:

[0098] During training, features are used The cluster center vector of the subcluster with global pseudo label i, local pseudo label j and corresponding to the kth camera After the momentum update, C k Make updates;

[0099] Class center vector The way to update momentum is:

[0100]

[0101] in, and Respectively Results before and after updating; v∈[0,1] is the preset parameter;

[0102] This embodiment updates the class center vector of the corresponding sub-cluster based on the features extracted by the feature extraction network, and further updates the parameters in the corresponding classifier, which can improve the matching degree between the classifier and the feature extraction network and accelerate the training process of the model.

[0103] In general, this embodiment further divides the pedestrian images into sub-clusters based on the density of the cameras and clusters to which they belong, based on global clustering, thereby improving the compactness of the clusters and generating more accurate local pseudo-labels. An independent classifier is set under each camera to perform classification training for each camera, and then the classification probability distribution under the same camera is distilled to align the data distribution under different cameras, solving the performance degradation problem caused by camera differences in unsupervised pedestrian re-identification. The classification probability distribution under the same camera used provides a softer and smoother supervision signal for the network than the pseudo-labels generated by clustering, alleviates the performance degradation problem caused by clustering errors, and improves the network's pedestrian re-identification performance and generalization.

[0104] Example 2:

[0105] A person re-identification method, comprising:

[0106] Multiple target pedestrian images to be identified are input into the pedestrian re-identification model to obtain the features of each target pedestrian image. The target pedestrian images corresponding to the same pedestrian are identified through feature comparison to complete pedestrian re-identification;

[0107] Among them, the pedestrian re-identification model is established by the pedestrian re-identification model establishment method based on cross-camera self-distillation provided in the above embodiment 1.

[0108] It is easy to understand that, in this embodiment, the target pedestrian image to be identified is a pre-processed pedestrian image, which only contains a single pedestrian and the size meets the input requirements of the feature extraction model.

[0109] Since the pedestrian image features extracted by the pedestrian re-identification model established in the above-mentioned embodiment 1 can be used to accurately realize pedestrian re-identification in both same-camera and cross-camera scenarios, the pedestrian re-identification method provided in this embodiment can effectively improve the accuracy of pedestrian re-identification.

[0110] Example 3:

[0111] A computer-readable storage medium includes a stored computer program; when the computer program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the method for establishing a pedestrian re-identification model based on cross-camera self-distillation provided in the above-mentioned embodiment 1, and / or the pedestrian re-identification method provided in the above-mentioned embodiment 2.

[0112] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for establishing a pedestrian re-identification model based on cross-camera self-distillation, characterized by: The steps include: (S1) After extracting features from pedestrian images using a feature extraction network, the extracted features are clustered, and each clustered category is divided into multiple subclusters. The category and subcluster are labeled as global pseudo-labels and local pseudo-labels of the pedestrian image, respectively, to obtain a training set; the features in each subcluster are extracted from pedestrian images captured by the same camera; (S2) constructing a supervision network including the feature extraction network and a plurality of classifiers corresponding to the cameras, wherein the feature extraction network is used to extract features of the pedestrian image, and each classifier classifies the pedestrian image according to the features to obtain the probability that the pedestrian image belongs to each sub-cluster; If the pedestrian image and the camera corresponding to the classifier are the same, the output of the classifier is recorded as the same-camera classification probability distribution; otherwise, it is recorded as the cross-camera classification probability distribution; (S3) training the supervisory network using the training set to optimize parameters of the feature extraction network; The training loss function includes classification loss and distillation losses , respectively represent the difference between the same-camera classification probability distribution and the local pseudo-label, and the difference between the cross-camera classification probability distribution and the same-camera classification probability distribution; (S4) repeating steps (S1) to (S3) until the feature extraction network converges, and outputting the feature extraction network as a person re-identification model; The distillation loss The calculation expression is: in, represents the total number of sample pairs; Indicates that the global pseudo label is , the local pseudo label is And by the Pedestrian images captured by cameras characteristics; Indicates the A classifier based on features After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; Indicates that the global pseudo label is , the local pseudo label is And by the Pedestrian images captured by cameras characteristics; Indicates the A classifier based on features After classification, the pedestrian pictures obtained The probability of belonging to each sub-cluster; .

2. The method for establishing a person re-identification model based on cross-camera self-distillation according to claim 1, characterized in that: In the step (S1), each category obtained by clustering is divided into multiple sub-clusters, including: (S11) For each category, the features of pedestrian images extracted from the same camera are divided into a small cluster to obtain multiple small clusters; (S12) Calculate the closeness of each small cluster respectively, and set the closeness less than the threshold The small cluster is further divided into multiple new small clusters, so that the density of each small cluster is not less than the threshold ; (S13) The finally obtained small clusters are used as the sub-clusters.

3. The method for establishing a person re-identification model based on cross-camera self-distillation according to claim 2, characterized in that: The compactness of a small cluster is the average of the Silhouette scores of all features in the small cluster.

4. The method for establishing a person re-identification model based on cross-camera self-distillation according to claim 2, wherein: The threshold The calculation formula is: in, represents the average value of the compactness of all small clusters in step (S11), represents the standard deviation of the compactness of all small clusters in step (S11).

5. The method for establishing a person re-identification model based on cross-camera self-distillation according to any one of claims 1 to 4, characterized in that: For any k After a classifier is used to classify the features extracted by the feature extraction network, the probability that the pedestrian image belongs to each sub-cluster is: in, Indicates that the global pseudo label is , the local pseudo label is And by the Pedestrian images captured by cameras characteristics; By k The class center vectors of the sub-clusters corresponding to the cameras are spliced ​​together; is the preset parameter, and ; Indicates the k A classifier based on features After classification, the pedestrian pictures obtained The probability of belonging to each subcluster.

6. The method for establishing a person re-identification model based on cross-camera self-distillation according to claim 5, characterized in that: Also includes: During training, features are used The global pseudo label is , the local pseudo label is And with the k The cluster center vectors of the sub-clusters corresponding to the cameras After momentum update, to update.

7. The method for establishing a person re-identification model based on cross-camera self-distillation according to claim 5, characterized in that: The classification loss The calculation expression is: in, represents the total number of samples; Represents the local pseudo-label of pedestrian images; Indicates that the global pseudo label is , the local pseudo label is And by the Pedestrian images captured by cameras characteristics; Indicates the A classifier based on features After classification, the pedestrian pictures obtained The probability of belonging to each subcluster.

8. A pedestrian re-identification method, characterized in that: include: Multiple target pedestrian images to be identified are input into the pedestrian re-identification model to obtain the features of each target pedestrian image. The target pedestrian images corresponding to the same pedestrian are identified through feature comparison to complete pedestrian re-identification; The person re-identification model is established by the method for establishing a person re-identification model based on cross-camera self-distillation according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that Including a stored computer program; when the computer program is executed by a processor, it controls the device where the computer-readable storage medium is located to execute the method for establishing a pedestrian re-identification model based on cross-camera self-distillation as described in any one of claims 1 to 7, and / or the pedestrian re-identification method as described in claim 8.

Citation Information

Patent Citations

  • Unsupervised pedestrian re-identification method based on knowledge distillation

    CN110414368A

  • Pedestrian re-identification model compression method and evaluation method based on knowledge distillation

    CN113297906A