Pedestrian re-identification feature extraction model construction and pedestrian re-identification method and device

By performing camera-invariant clustering and global clustering in cross-domain person re-identification tasks, and training the model, the problem of low accuracy caused by excessive differences in sample features between cameras is solved, thus improving the accuracy of person re-identification.

CN119832589BActive Publication Date: 2026-05-08CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2024-12-04
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In cross-domain pedestrian re-identification tasks, the large differences in sample features between cameras due to different camera parameters result in low accuracy of pedestrian feature extraction models.

Method used

By acquiring feature vectors from image samples from multiple different cameras, we perform camera-invariant clustering and global clustering to construct a camera-invariant dataset. This dataset is then used to train the feature extraction model, reducing the model's sensitivity to changes in camera field of view and focusing on changes in pedestrian identity rather than camera changes.

Benefits of technology

It improves the accuracy of pedestrian re-identification, solves the problem of excessive differences in sample features caused by factors such as camera shooting angle, background and camera parameters misleading the model recognition, and achieves more accurate pedestrian identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832589B_ABST
    Figure CN119832589B_ABST
Patent Text Reader

Abstract

The present application relates to the field of electronic technology, and discloses a pedestrian re-identification feature extraction model construction method and a pedestrian re-identification method and device.The pedestrian re-identification feature extraction model construction method provided by the present application can more fully explore the potential relationship between the identities of pedestrians by performing camera internal sample clustering, and can further select samples that remain unchanged with the camera for camera invariance learning of the model by constructing the correlation between the pedestrian identity information of a plurality of cameras through camera internal sample clustering and overall sample clustering, thereby reducing the sensitivity of the model to changes in the camera field of view, causing the pedestrian re-identification model to pay more attention to changes in the identity of the pedestrian rather than changes in the camera, and solving the problem of excessive sample feature difference between cameras caused by different camera shooting angles, backgrounds, camera parameters and other factors in the related art, which misleads the model to identify the identity of the pedestrian.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic technology, specifically to the construction of a pedestrian re-identification feature extraction model and a pedestrian re-identification method and apparatus. Background Technology

[0002] As a crucial application of image retrieval, pedestrian re-identification aims to retrieve a given target pedestrian image from numerous non-overlapping images captured by cameras. With increasingly sophisticated urban surveillance systems, pedestrian re-identification technology can quickly retrieve and locate individual pedestrians among a large volume of surveillance images and accurately identify their identities. The advent of pedestrian re-identification technology provides strong technical support for various fields such as social security and intelligent transportation.

[0003] Currently, cross-domain person re-identification tasks are achieved using clustering algorithms. For a model pre-trained in the source domain, clustering algorithms are used to assign pseudo-labels as "identity information" to samples in the target domain. This "identity information" guides the model's fine-tuning and updates in the target domain, allowing the model to adapt to the style of the target domain samples, resulting in a person feature extraction model. Clustering-based methods offer greater flexibility and generalization. Although cross-domain person re-identification research has improved the model's adaptability to different data domains, besides the impact of inter-domain differences on cross-domain models, the camera shift problem caused by different camera distributions within the same data domain also hinders model performance improvement. Camera shift causes the model to tend to classify pedestrians from different identities under the same camera into the same identity rather than classifying the same pedestrians from different cameras into the same identity. Due to the large differences in sample features between cameras caused by different camera parameters in cross-domain person re-identification tasks, the accuracy of the final person feature extraction model is low. Summary of the Invention

[0004] In view of this, the present invention provides a pedestrian re-identification feature extraction model construction and a pedestrian re-identification method and apparatus to solve the problem that the large differences in sample features between cameras caused by different camera parameters in cross-domain pedestrian re-identification tasks result in low accuracy of the final pedestrian feature extraction model.

[0005] In a first aspect, the present invention provides a method for constructing a pedestrian re-identification feature extraction model. The method includes: acquiring first feature vectors and second feature vectors corresponding to multiple image samples from multiple different cameras, wherein the first feature vectors are obtained by feature extraction based on image samples corresponding to a pre-constructed first feature extraction model, and the second feature vectors are obtained by feature extraction based on image samples corresponding to a pre-constructed second feature extraction model; clustering the multiple image sample data of each camera based on the first feature vectors of the multiple image samples from each camera to obtain multiple first clusters for the corresponding cameras; and globally clustering the multiple image sample data of different cameras based on the first feature vectors of the multiple image samples corresponding to different cameras to obtain multiple second feature vectors. The clustering method involves globally clustering multiple image sample data from different cameras based on the second feature vectors corresponding to multiple image samples from different cameras, resulting in multiple third clusters. The method calculates the camera variation difference values ​​between each first cluster and each second and third cluster for each camera. A camera invariance dataset is constructed based on at least one target first cluster from the multiple first clusters corresponding to different cameras. The target first cluster is defined as the first cluster whose camera variation difference value is greater than a preset threshold. The first and second feature extraction models are trained using the image data and corresponding feature vectors in the camera invariance dataset until preset conditions are met, resulting in a pedestrian re-identification feature extraction model.

[0006] The pedestrian re-identification feature extraction model construction method provided by this invention clusters multiple image sample data of each camera based on the first feature vector of multiple image samples of each camera to obtain multiple first clusters for the corresponding camera; performs global clustering of multiple image sample data of different cameras based on the first feature vector of multiple image samples corresponding to different cameras to obtain multiple second clusters; performs global clustering of multiple image sample data of different cameras based on the second feature vector of multiple image samples corresponding to different cameras to obtain multiple third clusters; calculates the camera change difference value between each first cluster and each second and third cluster of each camera; and constructs a camera invariant dataset based on the first clusters whose camera change difference value is less than a preset threshold. The image sample data in the constructed camera invariant dataset are samples that maintain camera invariance. By performing intra-camera sample clustering, the potential relationships between pedestrian identities can be explored more fully. By combining intra-camera sample clustering with overall sample clustering, the pedestrian identity information of numerous cameras can be correlated, and samples that maintain camera invariance can be selected for the model's camera invariance learning. This reduces the model's sensitivity to changes in camera field of view, making the pedestrian re-identification model focus more on changes in pedestrian identity rather than changes in camera. This solves the problem in related technologies where pedestrian re-identification tasks involve large differences in sample features between cameras due to factors such as camera shooting angle, background, and camera parameters, which mislead the model in identifying pedestrian identities.

[0007] In one optional implementation, the step of obtaining the first feature vector and the second feature vector corresponding to multiple image samples from multiple different cameras includes: obtaining multiple image samples corresponding to multiple different cameras, a pre-constructed first feature extraction model and a second feature extraction model; inputting the multiple image samples from each camera into the first feature extraction model and the second feature extraction model, so that the first feature extraction model outputs the first feature vector corresponding to each image sample from the camera; inputting the multiple image samples from each camera into the second feature extraction model, so that the second feature extraction model outputs the second feature vector corresponding to each image sample from the camera.

[0008] In one optional implementation, the first feature extraction model and the second feature extraction model are constructed through the following steps: obtaining a source domain dataset; dividing the source domain dataset to obtain a first training set and a second training set; training the first preset model using the first training set until the prediction accuracy of the model meets the first preset requirement, thereby obtaining the first feature extraction model; and training the second preset model using the second training set until the prediction accuracy of the model meets the second preset requirement, thereby obtaining the second feature extraction model.

[0009] In one optional implementation, the step of training a first feature extraction model and a second feature extraction model using image data and corresponding feature vectors in the camera-invariant dataset until a preset condition is met to obtain a pedestrian re-identification feature extraction model includes: dividing the camera-invariant dataset into a third training set and a fourth training set based on the camera identifiers of each image sample in the camera-invariant dataset; training the first feature extraction model using the third training set to obtain a third feature model; training the second feature model using the third training set to obtain a fourth feature model; training the third feature model using the fourth training set until the model loss converges to obtain a fifth feature model; training the fourth feature model using the fourth training set until the model loss converges to obtain a sixth feature model; and using the fifth feature model and / or the sixth feature model as the pedestrian re-identification feature extraction model.

[0010] Secondly, the present invention provides a pedestrian re-identification method, the method comprising: acquiring image data to be identified and a pedestrian re-identification feature extraction model, wherein the pedestrian re-identification feature extraction model is constructed by the pedestrian re-identification feature extraction model construction method of the first aspect or any corresponding embodiment thereof; inputting the image data to be identified into the pedestrian re-identification feature extraction model so that the pedestrian re-identification feature extraction model outputs a feature vector of the image data to be identified; comparing the feature vector of the image data to be identified with the feature vectors corresponding to different identities in a pre-constructed database to obtain a comparison result; and determining the pedestrian re-identification result in the image data to be identified based on the comparison result.

[0011] The pedestrian re-identification method provided by this invention utilizes a pedestrian re-identification feature extraction model to extract feature vectors from the image data to be identified. The pedestrian re-identification feature extraction model focuses more on changes in pedestrian identity than changes in the camera, solving the problem in related technologies where large differences in sample features between cameras due to factors such as camera shooting angle, background, and camera parameters mislead the model in identifying pedestrian identities. Through the pedestrian re-identification feature extraction model, the feature vectors of the image data to be identified can be accurately extracted, thereby effectively improving the accuracy of pedestrian re-identification.

[0012] Thirdly, the present invention provides a pedestrian re-identification feature extraction model construction device, the device comprising: a first acquisition module, configured to acquire first feature vectors and second feature vectors corresponding to multiple image samples from multiple different cameras, wherein the first feature vectors are obtained by feature extraction based on image samples corresponding to a pre-constructed first feature extraction model, and the second feature vectors are obtained by feature extraction based on image samples corresponding to a pre-constructed second feature extraction model; a first clustering module, configured to cluster the multiple image sample data of each camera based on the first feature vectors of the multiple image samples from each camera, thereby obtaining multiple first clusters for the corresponding cameras; and a second clustering module, configured to perform global clustering of the multiple image sample data from different cameras based on the first feature vectors of the multiple image samples corresponding to different cameras, thereby obtaining multiple... A second clustering module is used to globally cluster multiple image sample data from different cameras based on the second feature vectors of multiple image samples corresponding to different cameras, resulting in multiple third clustering clusters; a calculation module is used to calculate the camera change difference value between each first clustering cluster and each second and third clustering cluster for each camera; a construction module is used to construct a camera invariant dataset based on at least one target first clustering cluster from the multiple first clustering clusters corresponding to different cameras, wherein the target first clustering cluster is the first clustering cluster whose camera change difference value is greater than a preset threshold; and a training module is used to train the first feature extraction model and the second feature extraction model respectively using each image data and the corresponding feature vector in the camera invariant dataset until a preset condition is met, thereby obtaining a pedestrian re-identification feature extraction model.

[0013] Fourthly, the present invention provides a pedestrian re-identification device, the device comprising: a second acquisition module, configured to acquire image data to be identified and a pedestrian re-identification feature extraction model, wherein the pedestrian re-identification feature extraction model is constructed by the pedestrian re-identification feature extraction model construction method of the first aspect or any corresponding embodiment thereof; a first determination module, configured to input the image data to be identified into the pedestrian re-identification feature extraction model, so that the pedestrian re-identification feature extraction model outputs a feature vector of the image data to be identified; a comparison module, configured to compare the feature vector of the image data to be identified with feature vectors corresponding to different identities in a pre-constructed database, and obtain a comparison result; and a second determination module, configured to determine the pedestrian re-identification result in the image data to be identified based on the comparison result.

[0014] Fifthly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the pedestrian re-identification feature extraction model construction method of the first aspect or any corresponding embodiment thereof, or to perform the pedestrian re-identification method of the second aspect.

[0015] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the pedestrian re-identification feature extraction model construction method of the first aspect or any corresponding embodiment thereof, or to execute the pedestrian re-identification method of the second aspect.

[0016] In a seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the pedestrian re-identification feature extraction model construction method of the first aspect or any corresponding embodiment thereof, or to execute the pedestrian re-identification method of the second aspect. Attached Figure Description

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the pedestrian re-identification feature extraction model construction method according to an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram illustrating a specific instance of constructing a camera invariant dataset in the embodiments of this application;

[0020] Figure 3 This is a schematic diagram illustrating yet another specific example of constructing a camera invariant dataset in the embodiments of this application;

[0021] Figure 4 This is a flowchart illustrating another method for constructing a pedestrian re-identification feature extraction model according to an embodiment of the present invention;

[0022] Figure 5 This is a flowchart illustrating another method for constructing a pedestrian re-identification feature extraction model according to an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram illustrating a specific example of the pedestrian re-identification feature extraction model construction method in this application embodiment;

[0024] Figure 7 This is a flowchart illustrating the pedestrian re-identification method according to an embodiment of the present invention;

[0025] Figure 8 This is a structural block diagram of a pedestrian re-identification feature extraction model construction device according to an embodiment of the present invention;

[0026] Figure 9 This is a structural block diagram of a pedestrian re-identification device according to an embodiment of the present invention;

[0027] Figure 10 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] In related technologies, clustering algorithms are used to achieve cross-domain person re-identification tasks. For a model pre-trained in the source domain, a clustering algorithm is executed to assign pseudo-labels as "identity information" to samples in the target domain. This "identity information" is used to guide the model's fine-tuning and updating in the target domain, enabling the model to adapt to the style of the target domain samples and obtain a person feature extraction model. Clustering-based methods have greater flexibility and generalization. Although cross-domain person re-identification research has improved the model's adaptability to different data domains, in addition to the impact of inter-domain differences on cross-domain models, the camera shift problem caused by different camera distributions within the same data domain also hinders the improvement of model performance. Camera shift causes the model to tend to classify pedestrians from different identities under the same camera into the same identity rather than classifying the same pedestrians from different cameras into the same identity during inference. Due to the large differences in sample features between cameras caused by different camera parameters in cross-domain person re-identification tasks, the accuracy of the final person feature extraction model is low.

[0030] In view of this, the pedestrian re-identification feature extraction model construction method provided in this application embodiment can be applied to a server to realize the construction of the pedestrian re-identification feature extraction model. The method provided by the present invention explores the potential relationship between pedestrian identities more fully by performing intra-camera sample clustering, and constructs the association between pedestrian identity information of many cameras by combining intra-camera sample clustering and overall sample clustering, thereby selecting samples that maintain camera invariance for the model's camera invariance learning. This can reduce the model's sensitivity to changes in camera field of view, making the pedestrian re-identification model pay more attention to changes in pedestrian identity rather than changes in camera, solving the problem in related technologies where pedestrian re-identification tasks involve excessive differences in sample features between cameras due to differences in factors such as camera shooting angle, background, and camera parameters, which mislead the model in identifying pedestrian identities.

[0031] According to an embodiment of the present invention, a method for constructing a pedestrian re-identification feature extraction model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] This embodiment provides a method for constructing a pedestrian re-identification feature extraction model, which can be used in the aforementioned server. Figure 1 This is a flowchart of a pedestrian re-identification feature extraction model method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0033] Step S101: Obtain the first feature vector and the second feature vector corresponding to multiple image samples from multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed second feature extraction model.

[0034] For example, the feature vector is used to characterize the identity features of pedestrians in the image sample. The first feature extraction model and the second feature extraction model are trained based on the source domain training set samples. In this embodiment, multiple different cameras correspond to multiple image samples taken by different cameras. The first feature extraction model is obtained by training the backbone network F, and the second feature extraction model is obtained by training the backbone network G. In this embodiment, the source domain training set samples are divided into a training set T. f and T g They are used for the pre-training of the two backbone networks F and G respectively, which endows the backbone networks with excellent feature extraction capabilities while ensuring that the feature encoders of each network pay different attention to the features.

[0035] Step S102: Based on the first feature vector of multiple image samples from each camera, cluster the multiple image sample data of the camera to obtain multiple first clusters for the corresponding camera.

[0036] For example, in this embodiment of the application, multiple different cameras correspond to multiple image samples, which can also be referred to as target domain datasets S. Assuming that the number of cameras covered in the target domain dataset S is P, the backbone network F is used to process each camera P. i After extracting feature vectors from the samples, perform clustering once separately, and assign pseudo-labels to the samples based on the clustering results. Finally, a labeled dataset is obtained for each camera. Each camera It contains multiple first clusters. Pedestrians in image samples in different first clusters have different identities, while pedestrians in image samples in the same first cluster have the same identity. Performing intra-camera sample clustering can alleviate the problem of pedestrians with the same identity being assigned to different clusters.

[0037] Step S103: Global clustering of multiple image sample data from different cameras is performed based on the first feature vectors of multiple image samples corresponding to different cameras to obtain multiple second clusters. Global clustering of multiple image sample data from different cameras is performed based on the second feature vectors of multiple image samples corresponding to different cameras to obtain multiple third clusters.

[0038] For example, in this embodiment of the application, global clustering is performed on all samples based on the first feature vector of all image samples, and pseudo-labels y are assigned to the samples according to the clustering results. f Obtain the dataset D containing all labeled samples. f Dataset D f The image sample contains multiple secondary clusters. Pedestrian identities differ within image samples from different secondary clusters, while pedestrian identities are the same within image samples from the same secondary cluster. Global clustering is performed on all samples based on their secondary feature vectors, and pseudo-labels y are assigned to the samples according to the clustering results. g Obtain the dataset D containing all labeled samples. g Dataset D is used for subsequent selection of the camera invariant sample set. g It contains multiple third clusters. The pedestrian identities in the image samples are different in different third clusters, while the pedestrian identities are the same in the image samples within the same third cluster.

[0039] Step S104: Calculate the camera change difference values ​​between each first cluster and each second and third cluster for each camera.

[0040] For example, in this embodiment of the application, the camera variation difference value between each first cluster and each second and third cluster of each camera is calculated by the following steps:

[0041] Based on three datasets D with pseudo-labels from different feature spaces camera D f and D g Based on the clustering results of different feature spaces, diversity information is provided to calculate the differences in camera variations between clusters:

[0042]

[0043] in, Indicates at camera P iThe sample set from cluster J during the internal clustering process. This represents the set of samples from cluster K during the overall sample clustering process of encoder F. Let G represent the set of samples from cluster L during the overall sample clustering process of encoder G. This represents the number of samples in the set obtained by the intersection operation. This represents the number of samples in the set obtained by the union operation. Indicates camera P i The sample set of cluster J and and The difference in camera variations between them.

[0044] Step S105: Construct a camera invariance dataset based on at least one target first cluster from multiple first clusters corresponding to different cameras. The target first cluster is the first cluster whose camera change difference value is greater than a preset threshold.

[0045] For example, in this embodiment of the application, the inter-cluster camera variation difference of each cluster after clustering the samples within each camera is calculated one by one, and the image sample set with variation difference less than a preset threshold is... Added to camera invariance dataset D invariant Used for subsequent model updates:

[0046]

[0047] Where threshold represents the threshold for the difference in camera variations among clusters, D invariant This indicates the dataset used for subsequent model training; the process of merging datasets is as follows: Figure 2 As shown, cluster A is the cluster corresponding to the set of image samples with a variation difference less than a preset threshold, and samples that maintain high camera invariance are continuously added to cluster D. invariant In the middle. For example Figure 3 As shown, cluster B corresponds to the set of image samples with a variation difference greater than a preset threshold. Clusters with variations greater than the preset threshold are not included in the camera invariance dataset. As the training process continues, the camera variation differences between different clusters decrease, and more and more clusters generated by intra-camera clustering will be included in dataset D. invariant It is used for model optimization.

[0048] Step S106: Use the image data and corresponding feature vectors in the camera invariance dataset to train the first feature extraction model and the second feature extraction model respectively until the preset conditions are met, and obtain the pedestrian re-identification feature extraction model.

[0049] For example, in this embodiment of the application, the first feature extraction model and the second feature extraction model are trained using each image data and the corresponding feature vector in the camera invariant dataset, until the training loss of the first feature extraction model and the second feature extraction model converges, and the first feature extraction model and / or the second feature extraction model are used as the pedestrian re-identification feature extraction model.

[0050] The pedestrian re-identification feature extraction model construction method provided in this embodiment explores the potential relationships between pedestrian identities more fully by performing intra-camera sample clustering. It also establishes a correlation between pedestrian identity information from numerous cameras by combining intra-camera sample clustering with overall sample clustering, and selects samples that maintain camera invariance for the model's camera invariance learning. This reduces the model's sensitivity to changes in camera field of view, allowing the pedestrian re-identification model to focus more on changes in pedestrian identity rather than changes in the camera. This solves the problem in related technologies where pedestrian re-identification tasks involve excessive differences in sample features between cameras due to factors such as camera shooting angle, background, and camera parameters, which mislead the model in identifying pedestrian identities.

[0051] This embodiment provides a method for constructing a pedestrian re-identification feature extraction model, which can be used in the aforementioned server. Figure 4 This is a flowchart of a pedestrian re-identification feature extraction model construction method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:

[0052] Step S401: Obtain the first feature vector and the second feature vector corresponding to multiple image samples from multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed second feature extraction model.

[0053] Specifically, step S401 includes:

[0054] Step S4011: Obtain multiple image samples corresponding to multiple different cameras, as well as a pre-constructed first feature extraction model and a second feature extraction model.

[0055] In some optional implementations, the first feature extraction model and the second feature extraction model are constructed through the following steps:

[0056] Step a1: Obtain the source domain dataset. For example, in this embodiment, the source domain dataset is a dataset containing multiple pedestrian images and corresponding labels for each pedestrian image.

[0057] Step a2 involves partitioning the source domain dataset to obtain a first training set and a second training set. Exemplarily, in this embodiment, the source domain dataset with known labels is partitioned into two training sets T with similar total sample sizes. f T g These are used as training samples for the collaborative networks F and G, respectively.

[0058] Step a3: Train the first preset model using the first training set until the prediction accuracy of the model meets the first preset requirement, and obtain the first feature extraction model.

[0059] Step a4: Train the second preset model using the second training set until the prediction accuracy of the model meets the second preset requirements, and obtain the second feature extraction model.

[0060] For example, based on the training set T f and T g Using the samples, calculate the triplet loss of the backbone networks F and G on their respective training sets. and

[0061]

[0062] in and These are the feature representations of the anchor box samples in encoders F and G, respectively. and For anchor box-difficult positive samples, the feature representation in encoders F and G is used. and The anchor box hard negative samples are represented by the encoder features F and G, where E(*,*) is the Euclidean distance between feature vectors, m is the marginal coefficient, and D... f and D g This represents the number of samples in a batch. Similarly, calculate the identity loss for the backbone networks F and G. and

[0063]

[0064] Among them, y a,i To represent the true identity of the sample, P(y) a,i |f(x a,i Model F predicts the category y to which a sample belongs. a,i The probability, P(y) a,i |g(x a,i Model G predicts the category y of a sample. a,i The probability of [the loss of the model] is calculated. The overall loss of the model during training in the source domain is then obtained, and the model is updated accordingly.

[0065]

[0066]

[0067] in, For the source domain loss of encoder F, Let F be the source domain loss of encoder G. The backbone network is updated according to the respective loss function values, and F and G after the source domain training are used for fine-tuning of the target domain dataset.

[0068] Step S4012: Input multiple image samples from each camera into the first feature extraction model and the second feature extraction model, so that the first feature extraction model outputs the first feature vector corresponding to each image sample from the camera.

[0069] For example, in this embodiment of the application, a first feature extraction model is used to extract features from each camera P in the target domain dataset S. i Feature vectors are extracted from the image samples to obtain the first feature vector of each image sample.

[0070] In step S4013, multiple image samples from each camera are input into the second feature extraction model, and the second feature extraction model outputs the second feature vector corresponding to each image sample from the camera.

[0071] For example, in this embodiment of the application, a second feature extraction model is used to extract features from samples in the target domain dataset S to obtain the second feature vector of each image sample corresponding to each camera.

[0072] Step S402: Based on the first feature vectors of multiple image samples from each camera, cluster the multiple image sample data of that camera to obtain multiple first clusters for the corresponding camera. For details, please refer to [link to details]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.

[0073] Step S403: Based on the first feature vectors of multiple image samples corresponding to different cameras, perform global clustering on the multiple image sample data from different cameras to obtain multiple second clusters. Then, based on the second feature vectors of multiple image samples corresponding to different cameras, perform global clustering on the multiple image sample data from different cameras to obtain multiple third clusters. For details, please refer to [link to details]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.

[0074] Step S404: Calculate the camera variation difference values ​​between each first cluster and each second and third cluster for each camera. See details below. Figure 1 Step S104 of the illustrated embodiment will not be described again here.

[0075] Step S405: Construct a camera invariance dataset based on at least one target first cluster from multiple first clusters corresponding to different cameras. The target first cluster is the first cluster whose camera change difference value is greater than a preset threshold. For details, please refer to... Figure 1 Step S105 of the illustrated embodiment will not be described again here.

[0076] Step S406: Using the image data and corresponding feature vectors in the camera invariant dataset, train the first feature extraction model and the second feature extraction model respectively until the preset conditions are met, thus obtaining the pedestrian re-identification feature extraction model. For details, please refer to... Figure 1 Step S106 of the illustrated embodiment will not be described again here.

[0077] This embodiment provides a method for constructing a pedestrian re-identification feature extraction model, which can be used in the aforementioned server. Figure 5 This is a flowchart of a pedestrian re-identification feature extraction model construction method according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:

[0078] Step S501: Obtain first and second feature vectors for multiple image samples corresponding to multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to a pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to a pre-constructed second feature extraction model. For details, please refer to [link to details]. Figure 4 Step S401 of the illustrated embodiment will not be described again here.

[0079] Step S502: Based on the first feature vectors of multiple image samples from each camera, cluster the multiple image sample data of that camera to obtain multiple first clusters for the corresponding camera. For details, please refer to [link to details]. Figure 2 Step S402 of the illustrated embodiment will not be described again here.

[0080] Step S503: Based on the first feature vectors of multiple image samples corresponding to different cameras, perform global clustering on the multiple image sample data from different cameras to obtain multiple second clusters. Then, based on the second feature vectors of multiple image samples corresponding to different cameras, perform global clustering on the multiple image sample data from different cameras to obtain multiple third clusters. For details, please refer to [link to details]. Figure 4 Step S403 of the illustrated embodiment will not be described again here.

[0081] Step S504: Calculate the camera variation difference values ​​between each first cluster and each second and third cluster for each camera. See details below. Figure 4 Step S404 of the illustrated embodiment will not be described again here.

[0082] Step S505: Construct a camera invariance dataset based on at least one target first cluster from multiple first clusters corresponding to different cameras. The target first cluster is the first cluster whose camera change difference value is greater than a preset threshold. For details, please refer to [link to relevant documentation]. Figure 4 Step S405 of the illustrated embodiment will not be described again here.

[0083] Step S506: Use the image data and corresponding feature vectors in the camera invariance dataset to train the first feature extraction model and the second feature extraction model respectively until the preset conditions are met, and obtain the pedestrian re-identification feature extraction model.

[0084] Specifically, step S506 includes:

[0085] Step S5061: The camera invariant dataset is divided into a third training set and a fourth training set based on the camera identifiers of each image sample in the camera invariant dataset.

[0086] For example, in this embodiment of the application, based on the camera invariance dataset D invariant The dataset was then divided into the initial training set based on the camera IDs. With the second training set Used as actual training samples during one round of iterative training. For the third training set, This is the fourth training set.

[0087] Step S5062: Train the first feature extraction model using the third training set to obtain the third feature model.

[0088] Step S5063: Train the second feature model using the third training set to obtain the fourth feature model.

[0089] For example, in this embodiment of the application, the parameter models of the first feature extraction model and the second feature extraction model are θ and ω, respectively, and the first feature extraction model and the second feature extraction model are calculated based on the third training dataset. training loss and

[0090]

[0091] in, The centroid contrast loss, taking the backbone network F as an example, is calculated as follows:

[0092]

[0093] Where f iFor the feature representation of the anchor box, f p f is the feature representation of the centroid of the cluster to which the anchor box belongs. j For the characteristic representation of all cluster centroids, γ cen N is the temperature coefficient. image N represents the number of samples in a batch. class This represents the number of categories. The sample contrast loss is represented by the following calculation method:

[0094]

[0095] Where, N positive γ represents the number of negative samples in the anchor box. ins The temperature coefficient is used. After calculating the initial training loss, the network parameters F and G are temporarily updated, and the updated temporary model parameters are represented as f. θ′ g ω′ f θ′ For the model parameters of the third feature model, g ω′ These are the model parameters for the fourth feature model.

[0096] Step S5064: Train the third feature model using the fourth training set until the model loss converges to obtain the fifth feature model.

[0097] Step S5065: Train the fourth feature model using the fourth training set until the model loss converges to obtain the sixth feature model.

[0098] For example, in this embodiment of the application, the secondary training set is... The image samples are input into the third feature model and the fourth feature model respectively, and the secondary training loss of the two network models is calculated:

[0099]

[0100] in, This represents the second-order training loss of the backbone network F. Let G represent the secondary training loss of the backbone network G. The primary and secondary training losses are used together for backpropagation and parameter updates of the original model parameters θ and ω.

[0101]

[0102] in, and Indicates the loss during the first training session. and This represents the second training loss. Finally, the chain rule is used to calculate the loss based on... and The parameters updated by numerical values ​​to the original model parameters θ and ω are used as the initial parameters for the next round of training.

[0103] Step S5066: Use the fifth feature model and / or the sixth feature model as the pedestrian re-identification feature extraction model.

[0104] For example, in this embodiment of the application, the fifth feature model is selected as the backbone network for the final inference after the model loss has converged.

[0105] The following specific embodiment illustrates the pedestrian re-identification feature extraction model construction method provided by the present invention.

[0106] The model construction method provided in this application embodiment can be illustrated as follows: Figure 6 As shown, it includes the following steps:

[0107] (1) Collaborative network source domain pre-training: The source domain training set samples are divided into training set T. f and T g They are used for the pre-training of the two backbone networks F and G respectively, which endows the backbone networks with excellent feature extraction capabilities while ensuring that the feature encoders of each network pay different attention to the features.

[0108] (2) Intra-camera sample clustering and overall sample clustering: First, based on the different camera numbers, network F is used to cluster each camera P. i Perform intra-camera clustering on the samples below and assign pseudo-labels. Then, the backbone network F is used to perform a clustering of the overall samples and assign pseudo-labels y. f Finally, the backbone network G is used to perform a clustering of the overall samples and assign pseudo-labels y. g ;

[0109] (3) Evaluation of camera differences between clusters, based on the intra-camera clustering results y camera Overall sample clustering results y f and y g The differences in camera distribution between different clusters are calculated. For cluster samples with low differences, a camera-invariant sample dataset is constructed for model training. For cluster samples with high differences, the dataset will be used for subsequent loss calculation and model update as training progresses.

[0110] (4) Camera invariance learning: The dataset obtained in step (3) is divided according to the camera number. The first training loss of the model is calculated to update the temporary parameters. Then, the second loss value is calculated based on the temporary parameters for the final update of the model. After the loss value converges, the model is used to complete the pedestrian re-identification task.

[0111] The method provided in this application has the following beneficial effects:

[0112] a. Intra-camera sample clustering, because the samples for each clustering come from the same camera, is not limited by camera migration caused by camera field of view and parameter issues, and focuses more on comparing the distinctive features between different pedestrians. Performing intra-camera sample clustering can alleviate the problem of pedestrians with the same identity being classified into different clusters. In addition, it can also prevent pedestrians with different identities from being classified into the same cluster. Compared with overall sample clustering, it has higher accuracy and provides more informative auxiliary clues to guide subsequent overall sample clustering.

[0113] b. Different source domain pre-training samples endow the two backbone networks with different learning capabilities. During model updates, the collaborative network ensures the parameter differences between the two networks according to its own loss update strategy. The different clustering results obtained from the different model parameters guarantee the invariance of the selected samples in the camera distribution. The intra-camera sample clustering and the overall sample clustering of the two backbone networks come from three different feature spaces. The differences in camera variation between clusters are evaluated by comparing the cluster similarity of the three different feature spaces to determine whether the clusters of intra-camera sample clusters have higher camera invariance, thus selecting high-confidence samples for subsequent training and mitigating the continuous accumulation of false label noise during training. Compared with single feature extraction networks, the design of the dual collaborative network structure also reduces the impact of fitting noise instances in traditional single feature extraction networks on model training.

[0114] c. The strategy of updating the original model parameters by calculating the secondary training loss based on temporary parameters is to split the camera invariant dataset and use different camera samples for training in two training processes. This aims to promote the model's learning of the camera invariant features of the samples. When the model's temporary parameters fit the camera samples of the first training, an excessively large secondary training loss value can inhibit the model from favoring the camera samples of the first training. Instead, it can shift the learning focus to the camera-independent features of the samples, thereby avoiding the final model being more affected by camera changes than by identity changes.

[0115] This embodiment provides a pedestrian re-identification method that can be used on a server to identify pedestrians. Figure 7 This is a flowchart of a pedestrian re-identification feature extraction model construction method according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following steps:

[0116] Step S701: Obtain the image data to be identified and the pedestrian re-identification feature extraction model. The pedestrian re-identification feature extraction model is constructed using the pedestrian re-identification feature extraction model construction method described in the above embodiment.

[0117] For example, the image data to be identified can be any image data that needs to be used for pedestrian identification. For details on the pedestrian re-identification feature extraction model, please refer to the description of the relevant content in the above embodiments, which will not be repeated here.

[0118] Step S702: Input the image data to be identified into the pedestrian re-identification feature extraction model so that the pedestrian re-identification feature extraction model outputs the feature vector of the image data to be identified.

[0119] For example, the feature vector of the image data to be identified is used to characterize the identity features of pedestrians in the image to be identified.

[0120] Step S703: Compare the feature vector of the image data to be identified with the feature vectors corresponding to different identities in the pre-built database to obtain the comparison result.

[0121] For example, a pre-built database contains feature vectors corresponding to different pedestrian identities. By calculating the similarity between the feature vector of the image data to be identified and the feature vectors corresponding to each pedestrian identity in the database, the similarity between the feature vector of the image data to be identified and the feature vectors corresponding to different pedestrian identities is used as the comparison result.

[0122] Step S704: Determine the pedestrian re-identification result in the image data to be identified based on the comparison result.

[0123] For example, in this embodiment of the application, if the target sample with the highest similarity to the feature vector of the image data to be identified is determined in the database, then the target sample is used as the pedestrian re-identification result of the image data to be identified.

[0124] The pedestrian re-identification method provided in this application utilizes a pedestrian re-identification feature extraction model to extract feature vectors from the image data to be identified. The pedestrian re-identification feature extraction model focuses more on changes in pedestrian identity than changes in the camera, solving the problem in related technologies where large differences in sample features between cameras due to factors such as camera shooting angle, background, and camera parameters mislead the model in identifying pedestrian identities. Through the pedestrian re-identification feature extraction model, the feature vectors of the image data to be identified can be accurately extracted, thereby effectively improving the accuracy of pedestrian re-identification.

[0125] This embodiment also provides a pedestrian re-identification feature extraction model construction device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0126] This embodiment provides a pedestrian re-identification feature extraction model construction device, such as... Figure 8 As shown, it includes:

[0127] The first acquisition module 801 is used to acquire the first feature vector and the second feature vector of multiple image samples corresponding to multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed second feature extraction model.

[0128] The first clustering module 802 is used to cluster the multiple image sample data of each camera based on the first feature vector of multiple image samples of each camera, so as to obtain multiple first clusters of the corresponding camera.

[0129] The second clustering module 803 is used to perform global clustering of multiple image sample data from different cameras based on the first feature vector of multiple image samples corresponding to different cameras, to obtain multiple second clustering clusters, and to perform global clustering of multiple image sample data from different cameras based on the second feature vector of multiple image samples corresponding to different cameras, to obtain multiple third clustering clusters.

[0130] The calculation module 804 is used to calculate the camera change difference values ​​between each first cluster and each second and third cluster of each camera.

[0131] The construction module 805 is used to construct a camera invariant dataset based on at least one target first cluster from multiple first clusters corresponding to different cameras. The target first cluster is the first cluster whose camera change difference value is greater than a preset threshold.

[0132] The training module 806 is used to train the first feature extraction model and the second feature extraction model using the image data and corresponding feature vectors in the camera invariant dataset, until the preset conditions are met, so as to obtain the pedestrian re-identification feature extraction model.

[0133] In some optional implementations, the first acquisition module 801 includes:

[0134] The acquisition submodule is used to acquire multiple image samples corresponding to multiple different cameras, as well as a pre-built first feature extraction model and a second feature extraction model.

[0135] The first determining submodule is used to input multiple image samples from each camera into the first feature extraction model and the second feature extraction model, so that the first feature extraction model outputs the first feature vector corresponding to each image sample from the camera.

[0136] The second determining submodule is used to input multiple image samples from each camera into the second feature extraction model, and the second feature extraction model outputs the second feature vector corresponding to each image sample from the camera.

[0137] In some optional implementations, the first feature extraction model and the second feature extraction model are constructed through the following steps:

[0138] Obtain the source domain dataset;

[0139] The source domain dataset is divided into a first training set and a second training set;

[0140] The first preset model is trained using the first training set until the prediction accuracy of the model meets the first preset requirement, thus obtaining the first feature extraction model.

[0141] The second preset model is trained using the second training set until the prediction accuracy of the model meets the second preset requirement, thus obtaining the second feature extraction model.

[0142] In some alternative implementations, the training module 806 includes:

[0143] The partitioning submodule is used to divide the camera-invariant dataset into a third training set and a fourth training set based on the camera identifiers of each image sample in the camera-invariant dataset.

[0144] The first training submodule is used to train the first feature extraction model using the third training set to obtain the third feature model;

[0145] The second training submodule is used to train the second feature model using the third training set to obtain the fourth feature model;

[0146] The third training submodule is used to train the third feature model using the fourth training set until the model loss converges, thus obtaining the fifth feature model.

[0147] The fourth determination submodule is used to train the fourth feature model using the fourth training set until the model loss converges, thus obtaining the sixth feature model.

[0148] The third determining submodule is used to use the fifth feature model and / or the sixth feature model as the pedestrian re-identification feature extraction model.

[0149] This embodiment also provides a pedestrian re-identification device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described previously. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0150] This embodiment provides a pedestrian re-identification feature extraction model construction device, such as... Figure 9 As shown, it includes:

[0151] The second acquisition module 901 is used to acquire the image data to be identified and the pedestrian re-identification feature extraction model. The pedestrian re-identification feature extraction model is constructed by the pedestrian re-identification feature extraction model construction method in the above embodiment.

[0152] The first determining module 902 is used to input the image data to be identified into the pedestrian re-identification feature extraction model so that the pedestrian re-identification feature extraction model outputs the feature vector of the image data to be identified.

[0153] The comparison module 903 is used to compare the feature vector of the image data to be identified with the feature vectors corresponding to different identities in a pre-built database to obtain the comparison result;

[0154] The second determining module 904 is used to determine the pedestrian re-identification result in the image data to be identified based on the comparison result.

[0155] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0156] In this embodiment, the pedestrian re-identification feature extraction model construction device and the pedestrian re-identification device are presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0157] This invention also provides a computer device having the above-described features. Figure 8 The pedestrian re-identification feature extraction model construction device shown, or having the above-mentioned features, is a pedestrian re-identification feature extraction model construction device. Figure 9 The pedestrian re-identification device shown.

[0158] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 10As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.

[0159] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0160] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0161] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0162] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0163] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0164] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0165] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0166] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for constructing a pedestrian re-identification feature extraction model, characterized in that, The method includes: A first feature vector and a second feature vector are obtained for multiple image samples corresponding to multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to a pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to a pre-constructed second feature extraction model. Based on the first feature vector of multiple image samples from each camera, the multiple image sample data of the camera are clustered to obtain multiple first clusters for the corresponding camera. Global clustering of multiple image sample data from different cameras is performed based on the first feature vectors of multiple image samples corresponding to different cameras to obtain multiple second clusters. Global clustering of multiple image sample data from different cameras is performed based on the second feature vectors of multiple image samples corresponding to different cameras to obtain multiple third clusters. Calculate the camera variation difference values ​​between each first cluster and each second and third cluster for each camera; A camera invariance dataset is constructed based on at least one target first cluster from multiple first clusters corresponding to different cameras, wherein the target first cluster is the first cluster whose camera change difference value is greater than a preset threshold; The first feature extraction model and the second feature extraction model are trained using the image data and corresponding feature vectors in the camera invariance dataset until the preset conditions are met, thus obtaining the pedestrian re-identification feature extraction model. The camera variation differences between each first cluster and each second and third cluster of each camera are calculated through the following steps: Based on three datasets with pseudo-labels from different feature spaces , and Based on the clustering results of different feature spaces, diversity information is provided to calculate the differences in camera variations between clusters: in, Indicates at camera P i The sample set from cluster J during the internal clustering process. This represents the set of samples from cluster K during the overall sample clustering process of encoder F. Let G represent the set of samples from cluster L during the overall sample clustering process of encoder G. This represents the number of samples in the set obtained by the intersection operation. This represents the number of samples in the set obtained by the union operation. Indicates camera P i The sample set of cluster J and and The difference in camera variations between them.

2. The method according to claim 1, characterized in that, The steps for obtaining the first and second feature vectors of multiple image samples corresponding to multiple different cameras include: Acquire multiple image samples corresponding to multiple different cameras, and pre-constructed first and second feature extraction models; Multiple image samples from each camera are input into a first feature extraction model and a second feature extraction model, so that the first feature extraction model outputs a first feature vector corresponding to each image sample from the camera. Multiple image samples from each camera are input into the second feature extraction model, which outputs the second feature vector corresponding to each image sample from the camera.

3. The method according to claim 1, characterized in that, The first feature extraction model and the second feature extraction model are constructed through the following steps: Obtain the source domain dataset; The source domain dataset is divided to obtain a first training set and a second training set; The first preset model is trained using the first training set until the prediction accuracy of the model meets the first preset requirement, thus obtaining the first feature extraction model. The second preset model is trained using the second training set until the prediction accuracy of the model meets the second preset requirement, thus obtaining the second feature extraction model.

4. The method according to claim 3, characterized in that, The steps of training the first feature extraction model and the second feature extraction model using each image data and corresponding feature vector in the camera invariant dataset until a preset condition is met to obtain the pedestrian re-identification feature extraction model include: The camera-invariant dataset is divided into a third training set and a fourth training set based on the camera identifiers of each image sample in the camera-invariant dataset. The first feature extraction model is trained using the third training set to obtain the third feature model; The second feature model is trained using the third training set to obtain the fourth feature model; The third feature model is trained using the fourth training set until the model loss converges, thus obtaining the fifth feature model. The fourth feature model is trained using the fourth training set until the model loss converges, thus obtaining the sixth feature model. The fifth feature model and / or the sixth feature model are used as the pedestrian re-identification feature extraction model.

5. A pedestrian re-identification method, characterized in that, The method includes: The image data to be identified and the pedestrian re-identification feature extraction model are obtained, wherein the pedestrian re-identification feature extraction model is constructed by the pedestrian re-identification feature extraction model construction method according to any one of claims 1 to 4; The image data to be identified is input into the pedestrian re-identification feature extraction model so that the pedestrian re-identification feature extraction model outputs the feature vector of the image data to be identified; The feature vector of the image data to be identified is compared with the feature vectors corresponding to different identities in a pre-built database to obtain the comparison result; Based on the comparison results, the pedestrian re-identification result in the image data to be identified is determined.

6. A pedestrian re-identification feature extraction model construction device, characterized in that, The device includes: The first acquisition module is used to acquire first feature vectors and second feature vectors corresponding to multiple image samples from multiple different cameras. The first feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed first feature extraction model, and the second feature vector is obtained by feature extraction based on the image samples corresponding to the pre-constructed second feature extraction model. The first clustering module is used to cluster the multiple image sample data of each camera based on the first feature vector of multiple image samples of each camera, so as to obtain multiple first clusters of the corresponding camera. The second clustering module is used to perform global clustering of multiple image sample data from different cameras based on the first feature vector of multiple image samples corresponding to different cameras, to obtain multiple second clustering clusters; and to perform global clustering of multiple image sample data from different cameras based on the second feature vector of multiple image samples corresponding to different cameras, to obtain multiple third clustering clusters. The calculation module is used to calculate the camera variation difference values ​​between each first cluster and each second and third cluster of each camera; The construction module is used to construct a camera invariant dataset based on at least one target first cluster from multiple first clusters corresponding to different cameras, wherein the target first cluster is a first cluster whose camera change difference value is greater than a preset threshold. The training module is used to train the first feature extraction model and the second feature extraction model using each image data and corresponding feature vector in the camera invariance dataset, until the preset conditions are met, and thus obtain the pedestrian re-identification feature extraction model. The camera variation differences between each first cluster and each second and third cluster of each camera are calculated through the following steps: Based on three datasets with pseudo-labels from different feature spaces , and Based on the clustering results of different feature spaces, diversity information is provided to calculate the differences in camera variations between clusters: in, Indicates at camera P i The sample set from cluster J during the internal clustering process. This represents the set of samples from cluster K during the overall sample clustering process of encoder F. Let G represent the set of samples from cluster L during the overall sample clustering process of encoder G. This represents the number of samples in the set obtained by the intersection operation. This represents the number of samples in the set obtained by the union operation. Indicates camera P i The sample set of cluster J and and The difference in camera variations between them.

7. A pedestrian re-identification device, characterized in that, The device includes: The second acquisition module is used to acquire the image data to be identified and the pedestrian re-identification feature extraction model, wherein the pedestrian re-identification feature extraction model is constructed by the pedestrian re-identification feature extraction model construction method according to any one of claims 1 to 4; The first determining module is used to input the image data to be identified into the pedestrian re-identification feature extraction model, so that the pedestrian re-identification feature extraction model outputs the feature vector of the image data to be identified; The comparison module is used to compare the feature vector of the image data to be identified with the feature vectors corresponding to different identities in a pre-built database to obtain the comparison result; The second determining module is used to determine the pedestrian re-identification result in the image data to be identified based on the comparison result.

8. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the pedestrian re-identification feature extraction model construction method according to any one of claims 1 to 4, or to perform the pedestrian re-identification method according to claim 5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the pedestrian re-identification feature extraction model construction method according to any one of claims 1 to 4, or to execute the pedestrian re-identification method according to claim 5.

10. A computer program product, characterized in that, The method includes computer instructions for causing a computer to execute the pedestrian re-identification feature extraction model construction method according to any one of claims 1 to 4, or to execute the pedestrian re-identification method according to claim 5.

Citation Information

Patent Citations

  • Unsupervised domain adaptive pedestrian re-identification method based on camera perception and deep learning

    CN115578746A

  • Method for establishing unsupervised cross-domain pedestrian re-recognition model based on attention mechanism and related device

    CN117710788A