A pedestrian re-identification method based on dual-domain fusion and cross-batch storage
By introducing a dual-domain fusion module and a cross-batch storage queue mechanism into the ResNet-50 network, the domain drift problem of the pedestrian re-identification model in cross-domain scenarios is solved, improving the model's recognition accuracy and generalization ability. It is applicable to fields such as intelligent security, intelligent missing persons search, smart cities, and public security investigation.
Patent Information
- Application Number
- CN202310394926.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Existing technologies suffer from performance degradation in cross-domain pedestrian re-identification models due to domain drift, and the high cost of label creation in unsupervised learning limits the application of these models in real-world scenarios.
We adopt a dual-domain fusion and cross-batch storage approach. By adding a dual-domain fusion module to the ResNet-50 network, combining it with DBSCAN clustering to generate pseudo-labels, and using a cross-batch storage queue mechanism, we optimize feature extraction and sample mining, reduce domain differences, and improve model performance.
It effectively reduced domain bias, improved the generalization ability and performance of the unsupervised cross-domain pedestrian re-identification model, and enhanced the model's recognition accuracy in different scenarios.
Smart Images

Figure CN116416682B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer vision, and relates to a pedestrian re-identification method based on dual-domain fusion and cross-batch storage. BACKGROUND
[0002] With the rapid development of intelligent monitoring devices and the increasing demand for public safety, a large number of cameras are deployed in public places such as airports, communities, streets and campuses. These camera networks usually span a large geographical area, capture scenes with different scenes, and generate a large amount of monitoring video every day. Because the resolution of most cameras deployed in the current monitoring system is low, and the angle and distance of the camera are not ideal, high-definition face images cannot be obtained in these monitoring videos, so face recognition technology cannot be used to complete tasks such as tracking and positioning of pedestrians. In the scenario where face recognition technology fails, pedestrian re-identification technology can be used as a complementary technology to face recognition to complete tasks such as searching and tracking specific pedestrians. Pedestrian re-identification technology is widely used in practical scenarios, including intelligent security, intelligent search, smart city, public security investigation, etc.
[0003] Pedestrian re-identification methods based on supervised learning have reached a very high level on public datasets, with a first hit rate close to 100%. However, the cost is the time-consuming and tedious annotation of pedestrian images, and the high cost of label making limits the practicality of pedestrian re-identification models in real scenarios. In order to alleviate the dependence of pedestrian re-identification models on real identity labels of pedestrians, researchers have been committed to studying unsupervised cross-domain pedestrian re-identification methods. However, when a good model trained in a certain scenario is directly tested in an unknown scenario, the model performance will decrease. The main reason for this degradation is that different datasets have different data distributions. This distribution difference is also called domain shift or domain bias. The inevitable domain bias between the source domain and the target domain greatly limits the generalization of unsupervised domain adaptive pedestrian re-identification models.
[0004] Therefore, the present application proposes an unsupervised cross-domain pedestrian re-identification method based on dual-domain fusion and cross-batch storage, which deeply fuses the source domain salient features and the target domain salient features at the feature level to reduce the domain difference. In addition, in order to further improve the performance of the cross-domain pedestrian re-identification model, the present application also designs a cross-batch storage queue mechanism to mine difficult samples in a larger range, rather than being limited to the data in the current batch. SUMMARY
[0005] Therefore, the present application proposes an unsupervised cross-domain pedestrian re-identification method based on dual-domain fusion and cross-batch storage, which deeply fuses the source domain salient features and the target domain salient features at the feature level to reduce the domain difference. In addition, in order to further improve the performance of the cross-domain pedestrian re-identification model, the present application also designs a cross-batch storage queue mechanism to mine difficult samples in a larger range, rather than being limited to the data in the current batch.
[0006] To achieve the above object, the present application provides the following technical solutions:
[0007] A pedestrian re-identification method based on dual-domain fusion and cross-batch storage, the method comprising the following steps:
[0008] S1: Obtain source domain and target domain pedestrian image datasets and perform corresponding preprocessing operations;
[0009] S2: Construct a dual-domain fusion module and embed it into a ResNet-50 network to obtain a new backbone network DDF-Net;
[0010] S3: Before starting training in each round, first, use DDF-Net to extract features from all pedestrian images in the target domain, then use the DBSCAN clustering algorithm to cluster the target domain pedestrian features, and finally generate pseudo-labels for each pedestrian image in the target domain according to the clustering results;
[0011] S4: After starting training in each round, randomly select n source domain images from the source domain data and n target domain images from the target domain data, combine them into a batch of data, and input them into DDF-Net for feature extraction;
[0012] S5: Perform the following three operations on the original features of the source domain and the target domain output by DDF-Net:
[0013] (1) Input the features into the hybrid classifier and use the cross-entropy loss to constrain the model, so that the model finally obtains classification ability;
[0014] (2) Use the batch-hard triplet loss to calculate the similarity between features;
[0015] (3) Store the features in the cross-batch storage queue CBMQ and use the weighted contrastive loss In each iteration process, divide the samples in CBMQ into L groups of negative samples and K groups of positive samples, and adaptively assign a certain weight to each group of positive and negative sample pairs according to the cosine similarity;
[0016] S6: Apply fusion loss L f and diversity loss L d to the fusion features and domain factors of the source domain and the target domain output by DDF-Net, respectively;
[0017] S7: According to S5-S6, the total loss function of the DDF-Net model in the entire training process is:
[0018] L total= (1 - m1) L ce + m L WCL + m1 L f + m2 L d
[0019] S8: repeating steps S3-S7 until training is completed for a set maximum number of iterations, saving model weights and ending training;
[0020] S9: sending pedestrian images in the query set and the candidate set into the model that has been trained in S8 for feature extraction, calculating similarity of the query image and all images in the candidate set using a distance measurement function, and sorting similarity scores from large to small to output a sorted list and performance indicators.
[0021] Optionally, S1 specifically adjusts the resolution of pedestrian images to 256x128, and uses random flipping, random erasing and random cropping to perform enhancement processing on the input image.
[0022] Optionally, the dual-domain fusion module is specifically placed between Stage0 and Stage1 of ResNet-50. One batch contains n pairs of source domain and target domain samples, and after passing through the Stage0 stage of ResNet-50, each sample pair can output a source domain feature and a target domain feature and take them as input parts of the dual-domain fusion module; the output part of the dual-domain fusion module includes three features: source domain feature G s , target domain feature G t and a fusion feature obtained by deeply fusing the source domain feature and the target domain feature First, G s and G t perform global average pooling and global maximum pooling operations respectively to obtain In the source domain branch, feature and feature are added element by element to obtain feature In the target domain branch, feature and feature perform the same operation to obtain feature Next and each pass through a fully connected layer, and the output feature vectors of the two are combined in the form of element by element addition, then the combined result is sent to a multi-layer perceptron for dimension change; then the domain factor a = [a s , a t ] is output, where a s and a tSatisfy a s +a t =1, the specific calculation process of the domain factor a is as follows:
[0023]
[0024] Wherein, δ(·) represents the softmax function;
[0025] Finally, let the domain factor a s and the enhanced feature of the source domain Perform multiplication operation, let the domain factor a t and the enhanced feature of the target domain Perform multiplication operation, and the results obtained by the two are added element by element to obtain the final fusion feature of the two domains The calculation process of the fusion domain feature is as follows:
[0026]
[0027] For the input single domain feature G i , wherein i=[s,t] is used to represent the source domain or the target domain, first, respectively along the channel direction, maximum pooling and average pooling operation is performed on G i To obtain the features and Next, using the sigmoid function to process and Obtain the weight matrix and Then, let and With the feature map in each channel of G i Element-level multiplication operation is performed to obtain the channel dimension of the saliency feature and Finally, the saliency feature and the saliency feature Element-wise addition of the enhanced feature The specific calculation process of the enhanced feature is as follows:
[0028]
[0029] Wherein, φ(·) represents the sigmoid function; CMP(·) and CAP(·) represent the maximum pooling function and the average pooling function along the channel direction respectively.
[0030] Optionally, the fusion constraint is applied to the fusion feature, and the diversity constraint is applied to the domain factor;
[0031] The fusion constraint guarantees that the fusion feature is located on the shortest measurement path of the source domain and the target domain and maintains the correct distance relationship with the source domain feature and the target domain feature, minimizes the feature distribution between the source domain and the target domain, and makes the whole domain migration process smoother. The specific calculation process of the fusion loss is as follows:
[0032]
[0033] Wherein, n represents the size of the batch; k represents the domain label; represents the domain factor output by the double-domain fusion module for the i th sample pair in the mini-batch; represents the source domain feature and the target domain feature output by the double-domain fusion module for the i th sample pair in the current batch; represents the fusion domain feature output by the double-domain fusion module for the i th sample pair in the current batch;
[0034] By maximizing the standard deviation of each domain factor, the fusion domain feature is prevented from overfitting to one of the source domain or the target domain. The diversity loss is defined as follows:
[0035]
[0036] Wherein, σ(·) represents the standard deviation; n represents the size of the batch.
[0037] Optionally, in the S5, the mixed classifier has the following components: an L2 regularization layer, a fully connected layer with C s +C t dimensions, and a softmax activation function, wherein C s represents the number of real pedestrian identity categories in the source domain data, and C t represents the number of pseudo labels in the target domain.
[0038] Optionally, the workflow of the cross-batch storage queue CBMQ is as follows: first, a queue Q is established in the memory, and is represented as follows: Wherein represents the feature vector of the i th pedestrian in the queue, is the identity label corresponding to the feature In the source domain, is the real label of the pedestrian image; in the target domain, is the pseudo label obtained by clustering the pedestrian image feature; before the DDF-Net model starts training, the value of Q is initialized to 0, and the length of Q is initialized to M, wherein the calculation process of M is as follows:
[0039] M=(N s +N t )·r
[0040] Wherein, N s And N t Respectively represent the number of pedestrian images in the source domain data and the target domain data; the memory coefficient r represents a hyperparameter that can control the queue length, wherein r [0, 1];
[0041] DDF-Net maintains and updates CBMQ in the form of a queue; when a batch of sample data arrives, first use DDF-Net to extract the features of all pedestrian images in the current batch, then judge whether the queue is full: if the queue Q is not full, directly press the current batch of features and labels into the queue; if the queue Q is full, first remove a batch size of data at the head of the queue, then send the current batch of data into the queue, and always keep the length of the queue Q as M during the entire updating process.
[0042] Optionally, the weighted contrastive loss is used in the CBMQ to mine difficult positive and negative sample pairs between different batches, and the specific process is as follows: according to the label information of each anchor sample in the current batch, all samples in the CBMQ are divided into L groups of negative samples and K groups of positive samples, and each group of positive and negative sample pairs is adaptively given a certain weight according to the cosine similarity, so that the model can more effectively mine difficult sample pairs; the weighted contrastive loss calculation process is as follows:
[0043]
[0044] Wherein, γ represents a scaling factor; And Respectively represent the weight coefficients of negative and positive sample pairs; alpha represents a threshold value; And Respectively represent the cosine similarity between the anchor sample in the current batch and the negative and positive samples in the CBMQ.
[0045] The beneficial effects of the present application are:
[0046] (1) In view of the problem of large domain bias between the source domain and the target domain in unsupervised cross-domain pedestrian re-identification, the ResNet-50 network is improved, a double-domain fusion module is added in the ResNet-50 to form a DDF-Net network, the double-domain fusion module can deeply fuse the significant features of the source domain and the target domain, and the effectiveness of the fused features is guaranteed through fusion loss and diversity loss, which can greatly reduce the domain bias at the feature level;
[0047] (2) The application designs a cross-batch storage queue mechanism, the CBMQ can store the features and identity labels of all pedestrian images in the source domain and the target domain, and the weighted contrast loss is used in the CBMQ to select more difficult samples for each anchor sample in the current batch, further improving the performance of the unsupervised cross-domain pedestrian re-identification model.
[0048] Other advantages, objects, and features of the application will be apparent to those skilled in the art from the following specification, and it is intended to cover any alternatives, modifications, or equivalents included within the scope of the application. The objectives and other advantages of the application can be realized and attained by the embodiments particularly pointed out in the specification. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to make the purposes, technical solutions and advantages of the present application clearer, the preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
[0050] Figure 1 The overall framework diagram of the method of the present application is shown in Figure 1.
[0051] Figure 2 The architecture diagram of the dual-domain fusion module is shown in Figure 2.
[0052] Figure 3 The process diagram of the salient feature generation is shown in Figure 3.
[0053] Figure 4 The architecture diagram of the hybrid classifier is shown in Figure 4.
[0054] Figure 5 The architecture diagram of the CBMQ is shown in Figure 5.
[0055] Figure 6 The flowchart of the method of the present application is shown in Figure 6. DETAILED DESCRIPTION
[0056] The embodiments of the present application are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the disclosure. The present application can also be implemented or applied through other different embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the diagrams provided in the following examples only illustrate the basic concept of the present application in a schematic manner, and the following examples and features in the examples can be combined with each other without conflict.
[0057] The drawings are only used for exemplary illustration, and the representation is only a schematic diagram, not a physical diagram, and cannot be understood as a limitation on the present application; in order to better illustrate the embodiments of the present application, some components of the drawings will be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings can be omitted.
[0058] The same or similar reference numerals in the drawings of the embodiments of the present application correspond to the same or similar components; in the description of the present application, it should be understood that if the terms "upper", "lower", "left", "right", "front", "back" and the like indicate the orientation or positional relationship shown in the drawings, only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore the positional relationship described in the drawings is only used for exemplary illustration, and cannot be understood as a limitation on the present application, for those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0059] Please refer to Figures 1-6 , the present application proposes an unsupervised cross-domain pedestrian re-identification method based on dual-domain fusion and cross-batch storage, as Figure 1 shown is the overall framework diagram of the method of the present application, specifically including the following steps:
[0060] S1: obtaining source domain and target domain pedestrian image dataset, and performing corresponding preprocessing operation;
[0061] S2: constructing a dual-domain fusion module and embedding it into a ResNet-50 network to obtain a dual-domain fusion network DDF-Net;
[0062] Figure 2 is a schematic diagram of the dual-domain fusion module, and the entire operation process of the module is:
[0063] In one batch, n pairs of source domain and target domain samples are included, after the Stage0 stage of ResNet-50, each sample pair can output a source domain feature and a target domain feature and the two are taken as the input part of the dual-domain fusion module. The output part of the dual-domain fusion module includes three features: source domain feature G s , target domain feature G t and fusion feature G obtained by deeply fusing the source domain feature and the target domain feature. First, G s and G t perform global average pooling and global maximum pooling operations respectively to obtain the feature and features element-wise addition to get features on target domain branch and features perform the same operation to get features next and Each of them goes through a fully connected layer, and the output feature vectors of the two are combined in the form of element-wise addition. Then, the combined result is sent to a multi-layer perception for dimension change. Finally, the domain factor a = [a s , a t ] is output, where a s and a t satisfy a s + a t = 1. The specific calculation process of the domain factor is as follows:
[0064]
[0065] where δ(·) represents the softmax function.
[0066] Finally, let the domain factor a s and the enhanced feature of the source domain perform multiplication operation, let the domain factor a t and the enhanced feature of the target domain perform multiplication operation, and then element-wise addition of the results of the two gets the final fusion feature of the two domains The calculation process of the fusion domain feature is as follows:
[0067]
[0068] Figure 3 To generate a schematic diagram of the enhanced feature generation process, the entire operation process is as follows:
[0069] For the input single-domain feature G i , where i = [s, t] is used to represent the source domain or the target domain. First, max-pooling and average-pooling operations are performed on G i along the channel direction to get features and Next, sigmoid function is used to process and to get weight matrices and Then, let and perform element-level multiplication operation with the feature maps in each channel of G i to get the saliency features in the channel dimension and Finally, the saliency features and the saliency features are element-wise added to obtain the enhanced features The specific calculation process of the enhanced features is shown as follows:
[0070]
[0071] wherein φ(·) represents a sigmoid function; CMP(·) and CAP(·) represent a maximum pooling function and an average pooling function along a channel direction, respectively.
[0072] S3: Before starting training at each round, first, feature extraction is performed on all pedestrian images in the target domain using the DDF-Net, then a DBSCAN clustering algorithm is used to cluster the pedestrian features in the target domain, and finally, pseudo labels are generated for each pedestrian image in the target domain according to the clustering results;
[0073] S4: After starting training at each round, n source domain images are randomly selected from the source domain data, and n target domain images are randomly selected from the target domain data, which are combined into a batch of data for feature extraction in the DDF-Net;
[0074] S5: The original features of the source domain and the target domain output by the DDF-Net are subjected to the following three operations: (1) the features are input into the hybrid classifier and the cross-entropy loss is used to constrain the model, so that the model finally obtains classification ability; (2) the batch-hard triplet loss is used to calculate the similarity between the features; (3) the features are stored in the cross-batch memory queue CBMQ and the weighted contrastive loss is used, in which the samples in the CBMQ are divided into L groups of negative samples and K groups of positive samples in each iteration process, and a certain weight is adaptively assigned to each group of positive and negative sample pairs according to the cosine similarity;
[0075] Figure 4 The schematic diagram of the hybrid classifier is shown in FIG. 4, and the entire operation process is as follows:
[0076] The features output by the DDF-Net network are first subjected to an L2 regularization layer for regularization operation, then subjected to a fully connected layer with C s +C t dimensions for dimension reduction operation, and finally subjected to a softmax activation function for feature prediction.
[0077] Figure 5 The schematic diagram of the CBMQ is shown in FIG. 5, and the entire operation process is as follows:
[0078] First, a queue Q is established in memory to represent, where represents the feature vector of the i-th pedestrian in the queue, is the feature corresponding identity label. In the source domain is the true label of the pedestrian image; in the target domain is the pseudo label obtained by clustering the features of the pedestrian image. Before the DDF-Net model starts training, first initialize the value of Q to 0, and initialize the length of Q to M, where the calculation process of M is as follows:
[0079] M=(N s +N t )·r
[0080] where N s and N t represent the number of pedestrian images in the source domain data and the target domain data respectively; the memory coefficient r represents a hyperparameter that can control the length of the queue, where r∈[0,1].
[0081] DDF-Net maintains and updates CBMQ in the form of a queue. When a batch of sample data arrives, first use DDF-Net to extract the features of all pedestrian images in the current batch, and then determine whether the queue is full: if the queue Q is not full, directly press the features and labels of the current batch into the queue; if the queue Q is full, first remove a batch size of data from the head of the queue, and then send the current batch of data into the queue, and always keep the length of the queue Q as M during the entire updating process.
[0082] Using weighted contrastive loss in CBMQ to mine difficult positive and negative sample pairs between different batches, the specific process is as follows: according to the label information of each anchor sample in the current batch, all samples in CBMQ are divided into L groups of negative samples and K groups of positive samples, and each group of positive and negative sample pairs is adaptively given a certain weight according to the cosine similarity, so that the model can more effectively mine difficult sample pairs. The calculation process of the weighted contrastive loss is as follows:
[0083]
[0084] where γ represents the scaling factor; and represent the weight coefficients of negative and positive sample pairs respectively; α represents the threshold; and represent the cosine similarity between the anchor sample in the current batch and the negative and positive samples in CBMQ.
[0085] S6: The fusion loss L is respectively applied to the fusion features and the domain factor of the source domain and the target domain output by the DDF-Net f and the diversity loss L d , the fusion loss L f and the diversity loss L d The specific calculation process is as follows:
[0086]
[0087] S7: According to S5-S6, the total loss function of the DDF-Net model in the whole training process is obtained as follows:
[0088] L total =(1-μ1)·L ce +μ·L WCL +μ1·L f +μ2·L d
[0089] S8: Steps S3-S7 are repeated until the training is completed for the maximum iteration number set, the model weight is saved, and the training is ended.
[0090] S9: The pedestrian images in the query set and the candidate set are sent into the model trained in S8 for feature extraction, the similarity of the to-be-queried image and all images in the candidate set is calculated using the distance measurement function, the similarity scores are sorted in descending order, and the sorted list and the performance index are output.
[0091] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the purpose and scope of the present technical solutions, and all should be covered in the scope of the claims of the present application.
Claims
1. A pedestrian re-identification method based on dual-domain fusion and cross-batch storage, characterized in that: The method comprises the following steps: S1: Obtain source domain and target domain pedestrian image datasets, and perform corresponding preprocessing operations; S2: Construct a dual-domain fusion module and embed it into the ResNet-50 network to obtain a new backbone network DDF-Net; the dual-domain fusion module is specifically placed between Stage0 and Stage1 of the ResNet-50; the construction process of the module includes: a batch contains n pairs of source domain and target domain samples, after passing through the Stage0 stage of the ResNet-50, each sample pair can output a source domain feature and a target domain feature and take them as the input part of the dual-domain fusion module; the output part of the dual-domain fusion module includes three features: source domain feature G s , target domain feature G t and fusion feature obtained by deep fusion of the source domain feature and the target domain feature First, G s and G t perform global average pooling and global maximum pooling operations respectively to obtain In the source domain branch, feature and feature are added element by element to obtain feature In the target domain branch, feature and feature perform the same operation to obtain feature Next and each pass through a fully connected layer, and the output feature vectors of the two are combined in the form of element by element addition, then the combined result is sent to a multi-layer perceptron for dimension change; then the domain factor a=[a s ,a t ] is output, where a s and a t satisfy a s +a t =1, and the specific calculation process of the domain factor is as follows: Wherein, δ(·) represents a softmax function; Finally, let the domain factor a s and the enhanced features of the source domain Perform multiplication operation, let the domain factor a t and the enhanced features of the target domain Perform multiplication operation, and the result of the two domains is finally fused by element-wise addition The calculation process of the fused domain features is as follows: For the input single-domain feature G i where i = [s, t] for representing the source domain or the target domain, first, along the channel direction, respectively, G i perform max-pooling and average-pooling operations to obtain features and Next, using the sigmoid function to process and obtain the weight matrix and Then, let and and G i respectively perform element-level multiplication operation with the feature map in each channel to obtain the saliency feature in the channel dimension and Finally, the saliency feature and the saliency feature are added element by element to obtain the enhanced feature The specific calculation process of the enhanced feature is as follows: Wherein, φ(·) represents a sigmoid function; CMP(·) and CAP(·) represent a maximum pooling function and an average pooling function along a channel direction, respectively; S3: Before starting training in each round, first, features of all pedestrian images in the target domain are extracted using the DDF-Net, then the target domain pedestrian features are clustered using a DBSCAN clustering algorithm, and finally, pseudo labels are generated for each pedestrian image in the target domain according to the clustering results; S4: After starting training in each round, n source domain images are randomly selected from the source domain data, n target domain images are randomly selected from the target domain data, and the two are combined into a batch of data for feature extraction in the DDF-Net; S5: The original features of the source domain and the target domain output by the DDF-Net are subjected to the following three operations: (1) Feeding the features into a hybrid classifier and using cross-entropy loss constraining the model, eventually giving the model the ability to classify (2) using batch-hard triple loss computing similarity between features; (3) store the features into the cross-batch memory queue CBMQ and use the weighted contrastive loss In each iteration process, the samples in CBMQ are divided into L groups of negative samples and K groups of positive samples, and each group of positive and negative sample pairs is adaptively given a certain weight according to the cosine similarity; S6: respectively impose fusion loss L on the fusion features and domain factors of the source domain and the target domain output by the DDF-Net f and diversity loss L d ; S7: According to S5-S6, the total loss function of the DDF-Net model in the entire training process is: L total = (1 - μ1) · L ce + μ · L WCL + μ1 · L f + μ2 · L d S8: Repeat steps S3-S7 until the training is completed for the maximum number of iterations set, save the model weight, and end the training; S9: Pedestrian images in the query set and the candidate set are input into the model trained in S8 for feature extraction, a distance measurement function is used to calculate the similarity of all images in the query set and the candidate set, and the similarity scores are sorted in descending order, and a sorted list and a performance index are output.
2. The method of claim 1, wherein the method is based on dual-domain fusion and cross-batch storage. S1 is specifically: uniformly adjusting the resolution of pedestrian images to 256*128, and performing enhancement processing on the input images using random flipping, random erasing and random cropping.
3. The method of claim 1, wherein the method is based on dual-domain fusion and cross-batch storage. The fusion constraint is applied to the fusion feature, and the diversity constraint is applied to the domain factor; The fusion constraint ensures that the fusion feature is located on the shortest measurement path between the source domain and the target domain and maintains a correct distance relationship with the source domain feature and the target domain feature, minimizes the feature distribution between the source domain and the target domain, and makes the entire domain migration process smoother, and the specific calculation process of the fusion loss is as follows: wherein n represents the size of the batch; k represents the domain label; represents the field factor output by the dual-domain fusion module for the i-th sample pair in the mini-batch; represents the source domain feature and the target domain feature output by the dual-domain fusion module for the i-th sample pair in the current batch; represents the fusion domain feature output by the dual-domain fusion module for the i-th sample pair in the current batch; The standard deviation of each domain factor is maximized to avoid overfitting of the fusion domain feature to one of the source domain or the target domain, and the diversity loss is defined as follows: Wherein, σ(·) represents a standard deviation; n represents the size of a batch.
4. The method of claim 1, wherein the method is based on dual-domain fusion and cross-batch storage. In S5, the hybrid classifier The components are as follows: an L2 regularization layer, a C s +C t A fully connected layer of dimension C and a softmax activation function, where C s C represents the number of real pedestrian identity categories in the source domain data. t This represents the number of pseudo-tags in the target domain.
5. The method of claim 1, wherein the method is based on dual-domain fusion and cross-batch storage. The workflow of the cross-batch storage queue CBMQ is: first, a queue Q is established in the memory, to Indicates that represents the feature vector of the i-th pedestrian in the queue, is the feature corresponding identity label; in the source domain is the true label of the pedestrian image; in the target domain is the pseudo label obtained by clustering the pedestrian image features; before the DDF-Net model starts training, first initialize the value of Q to 0, and initialize the length of Q to M, wherein the calculation process of M is as follows: M = (N s + N t ) · r where N s and N t represent the number of pedestrian images in the source domain data and the target domain data, respectively; the memory coefficient r represents a hyperparameter that can control the queue length, where r ∈ [0, 1]; The DDF-Net maintains and updates the CBMQ in the form of a queue; when a batch of sample data arrives, first, features of all pedestrian images in the current batch are extracted using the DDF-Net, then it is judged whether the queue is full: if the queue Q is not full, the features and labels of the current batch are directly pressed into the queue; if the queue Q is full, a batch size of data located at the head of the queue is first removed from the queue, and then the data of the current batch is sent into the queue, and the length of the queue Q is always maintained as M during the entire updating process.
6. The method of claim 1, wherein the method is based on dual-domain fusion and cross-batch storage. The weighted contrastive loss used in the CBMQ mines difficult positive and negative sample pairs between different batches. Specifically, all samples in the CBMQ are divided into L groups of negative samples and K groups of positive samples according to the label information of each anchor sample in the current batch, and each group of positive and negative sample pairs is adaptively given a certain weight according to the cosine similarity, so that the model can more effectively mine difficult sample pairs. The calculation process of the weighted contrastive loss is as follows: where γ represents a scaling factor; and respectively represent the weight coefficients of negative and positive sample pairs; α represents a threshold value; and respectively represent the cosine similarity between the anchor sample in the current batch and the negative and positive samples in the CBMQ.
Citation Information
Patent Citations
Cross-domain pedestrian re-identification method based on unsupervised joint multi-loss model
CN111126360A
Apparatus and method for identifying pedestrians in radar signals
EP4030187A1