Passive Domain Unsupervised Domain Adaptive Vehicle Re-ID Method

By using the relationship consistent loss and knowledge distillation loss to train the generator in unsupervised domain adaptive vehicle re-identification, pseudo target samples are generated, which solves the problem of existing methods relying on the difficulty of obtaining source domain data and achieves unsupervised domain adaptation. Effectiveness and data privacy of vehicle re-identification.

CN114332787BActive Publication Date: 2024-09-06FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111680087.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2024-09-06
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

Existing unsupervised domain adaptive vehicle re-identification methods rely on source domain data, which is difficult to obtain and has data privacy issues, making it difficult to achieve good results on unlabeled data sets.

Method used

Through the source domain model and target domain data, the generator is trained using relationship consistent loss and knowledge distillation loss to generate pseudo target samples with source domain style, perform model fine-tuning, promote the style transfer of target domain data, and avoid using source domain data.

Benefits of technology

It achieves unsupervised domain adaptive vehicle re-identification without accessing source domain data, improves model performance and discrimination capabilities, and simplifies the data acquisition process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332787B
    Figure CN114332787B
Patent Text Reader

Abstract

The present invention proposes a source-free and unsupervised domain adaptive vehicle re-identification method. In the vehicle re-identification process, a generator is trained by using the source domain model and the target domain data, using the relational consistency loss and the knowledge distillation loss, in order to generate pseudo target samples with the style of the source domain, and then the pseudo target samples are used to fine-tune the model, thereby improving the model performance. It no longer uses the source domain data, but uses the source domain knowledge implicitly learned in the source domain model as a guide, thereby promoting the migration of the style of the target domain data to the style of the source domain data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of machine learning and vehicle re-identification, and in particular relates to a passive domain and unsupervised domain adaptive vehicle re-identification method. Background Art

[0002] At present, most vehicle re-identification methods based on supervised learning have achieved high accuracy, but at the cost of being extremely dependent on effective supervised labels and unable to be well extended to the unsupervised field. For this reason, some unsupervised vehicle re-identification methods have emerged. Here we emphasize the main differences between the unsupervised re-identification task and the currently popular unsupervised pre-training task: (1) The unsupervised pre-training task starts with random initialization of the network, while the unsupervised re-identification task starts with a pre-trained network; (2) The unsupervised pre-trained network needs to be fine-tuned before it can be applied to downstream tasks, while the unsupervised re-identification task itself can be regarded as an unsupervised downstream task, and the trained network can be directly deployed. Unsupervised vehicle re-identification is divided into two directions: unsupervised domain adaptation and fully unsupervised.

[0003] The unsupervised domain adaptation task and the completely unsupervised task are essentially very similar. The difference is that the unsupervised domain adaptation method requires an additional labeled source domain dataset. The model is first pre-trained using the source domain data. After the pre-training is completed, the source domain data is no longer used. Only the unlabeled target domain data is used for re-training to obtain the final model. The completely unsupervised method only needs to be trained with the unlabeled target domain data.

[0004] Currently, among the unsupervised vehicle re-identification tasks, the unsupervised domain adaptation task is currently the most concerned, while the fully unsupervised task that does not rely on source domain data is less studied.

[0005] At present, vehicle re-identification algorithms based on unsupervised domain adaptation usually require a source domain model, and then use labeled source domain data and unlabeled target domain data for a series of fine-tuning, so that the model can also have good performance in the target domain. However, as data privacy and security are increasingly valued by scientific researchers, it is not so easy to obtain source domain data, while it is relatively easy to obtain source domain models.

[0006] In previous unsupervised domain adaptation methods based on image generation, it is usually necessary to use source domain data as content and style guidance to promote the migration of the style of target domain data to the style of source domain data. Summary of the invention

[0007] Considering that in recent years, most vehicle re-identification methods based on supervised learning have achieved high accuracy, but are extremely dependent on effective supervised labels, how to deploy a vehicle re-identification model on an unlabeled dataset and achieve good results is a huge challenge. In addition, due to the limitations of data security and privacy, it is also difficult to obtain source domain data in practical applications.

[0008] In order to make up for the gaps and deficiencies in the prior art, the present invention proposes a source-free unsupervised domain adaptive vehicle re-identification method. Through the source domain model and target domain data, a generator is trained using the relational consistency loss and knowledge distillation loss to generate pseudo target samples with the style of the source domain, and then the pseudo target samples are used to fine-tune the model to improve the model performance. It no longer uses the source domain data, but uses the source domain knowledge implicitly learned in the source domain model as a guide, thereby promoting the migration of the style of the target domain data to the style of the source domain data.

[0009] Compared with other unsupervised domain adaptation methods based on domain transfer, the biggest advantage of the method of the present invention is that it does not require access to source domain data.

[0010] The present invention specifically adopts the following technical solutions:

[0011] A passive domain unsupervised domain adaptive vehicle re-identification method is characterized by: in the vehicle re-identification process, a generator is trained using a source domain model and target domain data using relational consistency loss and knowledge distillation loss to generate pseudo target samples with source domain style, and then the pseudo target samples are used to fine-tune the model to improve model performance.

[0012] Furthermore, instead of using the source domain data, the source domain knowledge implicitly learned in the source domain model is used as a guide to promote the migration of the style of the target domain data to the style of the source domain data.

[0013] Furthermore, synthetic images are used to generate pseudo target samples through SPGAN for pre-training, and at the same time, the source domain data and the target domain data can be jointly received for re-training, thereby completing the unsupervised domain adaptation task.

[0014] Furthermore, two network models are designed by synthesizing images to learn the direction similarity and background similarity of vehicles, and then the direction similarity and camera similarity are subtracted from the vehicle ID similarity to reduce the interference of similar directions and backgrounds on the model.

[0015] Furthermore, the source domain model is obtained through a public pre-trained model or pre-training with a public dataset using cross entropy loss and triplet loss; the target domain model is obtained by loading the acquired source domain model parameters and then fine-tuning using the target domain data.

[0016] Furthermore, we assume that only the feature extractor in the source model is adapted to the target domain; given a source model f S (·) and a target model f T (·), train a generator for the passive knowledge transfer module; set the target image to x, given the generated image The source model outputs feature maps of all source domain data and probability distribution In order to describe the adapted knowledge in the generated image, in addition to the knowledge distillation loss, a new relation preservation loss is introduced, which preserves the target image target model feature map f T (x) and the generated image source model feature map The relative channel relationship between them;

[0017] The knowledge distillation loss is: In the passive knowledge transfer module, the combination of the source model and the generator f S (g(·)) describes the target model f T The adapted knowledge in (·) is considered as a special case of knowledge distillation; the knowledge difference between source domain data and target domain data is extracted into the generator; the generated image is used to feed the output of the source model and the target image is fed into the output p(f T (x)) constitutes the knowledge distillation loss:

[0018]

[0019] The relationship preservation loss is: after successful knowledge distillation, the global features of the target image obtained through the target model and the global features of the generated source domain style image obtained through the source model should be similar, so the relationship preservation loss is used for constraint;

[0020] Given the source domain feature map and the target domain feature map f T (x), first reshape it into a feature vector F S and F T ,

[0021]

[0022]

[0023] Among them, D, H, and W are the depth (number of channels), height, and width of the feature map respectively; then, their channel-level autocorrelation, or Gram matrix, is calculated.

[0024]

[0025] Among them, G s ,G T ∈R D×D , and apply row L2 normalization:

[0026]

[0027] Among them, [i,:] represents the i-th row in the matrix; finally, the relationship of the preservation loss is defined as the mean square error MSE between the normalized Glan matrix:

[0028]

[0029] The total loss is:

[0030]

[0031] Through the constraints of these two losses, it is possible to generate source-style images from target images, which can be used for further fine-tuning of the model and improve the model's discrimination ability.

[0032] The present invention and its preferred solution provide a new passive knowledge transfer unsupervised domain adaptive vehicle re-identification framework. Compared with other unsupervised domain adaptive methods based on domain transfer, its biggest advantage is that it does not require access to source domain data. It only needs to obtain a model trained with source domain data, and then use the passive knowledge transfer module to transfer the knowledge implicit in the source domain model to the target domain data.

[0033] Compared with the prior art, the present invention and its preferred solution have the following technical advantages:

[0034] 1. Existing methods usually directly use source domain data to pre-train the model. After pre-training, the source domain data is no longer used, and only the target domain is used for training, which makes it impossible to reasonably utilize the real labels in the source domain data.

[0035] The present invention and its preferred solution use synthetic images in the field of vehicle re-identification, generate pseudo target samples from the synthetic images through SPGAN for pre-training, and can simultaneously receive source domain data and target domain data for joint re-training, thereby completing the unsupervised domain adaptation task.

[0036] 2. As the target image of the existing method has no labeled information, some interference caused by changes in vehicle direction or perspective may cause the model to be unable to accurately identify.

[0037] The present invention and its preferred solution design two network models through synthetic images to learn the direction similarity and background similarity of vehicles, and then use the vehicle ID similarity to subtract the direction similarity and camera similarity to reduce the interference of similar directions and backgrounds on the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The figure is a schematic diagram of the overall method flow of an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:

[0040] like Figure 1 As shown, the passive domain unsupervised domain adaptive vehicle re-identification method proposed in this embodiment specifically includes the following design details:

[0041] (1) Acquisition of source domain model and target domain model: The source domain model can be obtained by downloading a public pre-trained model or pre-training with a public dataset using cross entropy loss and triplet loss. The target domain model can be obtained by loading the acquired source domain model parameters and then fine-tuning using the target domain data.

[0042] (2) Source domain style image generation: Based on the existing unsupervised domain adaptation working principle, this embodiment assumes that only the feature extractor in the source model is adapted to the target domain. Given a source model f S (·) and a target model f T (·), this embodiment trains a generator g(·) for the passive knowledge transfer module. Since the training process is passive, for simplicity, this embodiment refers to the target image as x in the following content.

[0043] Given the generated image The source model outputs feature maps of all source domain data and probability distribution In order to describe the adapted knowledge in the generated image, in addition to the traditional knowledge distillation loss, this embodiment also introduces a new relationship preservation loss, which preserves the target image target model feature map f T (x) and the generated image source model feature map The relative channel relationship between them.

[0044] Knowledge distillation loss: In the passive knowledge transfer module proposed in this embodiment, the combination of the source model and the generator f S (g(·)) to describe the target model f T The adapted knowledge in (·) can be seen as a special case of knowledge distillation. The purpose of this embodiment is to extract the knowledge difference between the source domain data and the target domain data into the generator. In this case, this embodiment uses the output of the source model fed with the generated image and the target image is fed into the output p(f T (x)) constitutes the knowledge distillation loss.

[0045]

[0046] Relationship preservation loss: After successful knowledge distillation, this embodiment can think that the global features of the target image obtained through the target model and the global features of the generated source domain style image obtained through the source model should be similar, so this embodiment uses the relationship preservation loss to constrain. T (x) and Promoting similar channel-level relationships between can help achieve this goal.

[0047] In the past, knowledge distillation work usually constrains batch-level or pixel-level relationships. However, this constraint method is not applicable to the current task. First, the batch-level relationship cannot supervise the generation task of each image well, which will damage the generation effect. The effectiveness of the pixel-level relationship will also be greatly reduced after global pooling. Compared with the two, the channel-level relationship is calculated based on each image and will not be affected by global pooling. Therefore, the channel-level relationship is more suitable for calculating the relationship preservation loss.

[0048] Given the source domain feature map and the target domain feature map f T (x), this embodiment first needs to reshape it into a feature vector F S and F T ,

[0049]

[0050]

[0051] Where D, H, and W are the depth (number of channels), height, and width of the feature map, respectively. Next, this embodiment calculates their channel-level autocorrelations, or Gram matrices,

[0052]

[0053] Among them, G s ,G T ∈R D×D Like other similarity-preserving losses for knowledge distillation, this example applies row L2 normalization.

[0054]

[0055] Where [i,:] represents the i-th row in the matrix. Finally, this embodiment defines the relationship of the preservation loss as the mean square error (MSE) between the normalized Glan matrix,

[0056]

[0057] The total loss is:

[0058]

[0059] Through the constraints of these two losses, this embodiment can generate a source-style image from a target image, which can be used for further fine-tuning of the model to improve the model's discrimination ability.

[0060] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of passive domain and unsupervised domain adaptive vehicle re-identification methods under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.

Claims

1. A passive domain unsupervised domain adaptive vehicle re-identification method, characterized by: In the vehicle re-identification process, a generator is trained using the source domain model and target domain data using the relational consistency loss and knowledge distillation loss to generate pseudo target samples with the style of the source domain. The pseudo target samples are then used to fine-tune the model to improve model performance. Instead of using source domain data, the source domain knowledge implicitly learned in the source domain model is used as guidance to promote the migration of the style of the target domain data to the style of the source domain data. Using synthetic images, the synthetic images are used to generate pseudo target samples through SPGAN for pre-training. At the same time, the source domain data and the target domain data can be received for joint re-training to complete the unsupervised domain adaptation task. Two network models are designed by synthesizing images to learn the direction similarity and background similarity of vehicles. Then, the direction similarity and camera similarity are subtracted from the vehicle ID similarity to reduce the interference of similar directions and backgrounds on the model. The source domain model is obtained through a public pre-trained model or pre-training with cross entropy loss and triplet loss using a public dataset; the target domain model is obtained by loading the acquired source domain model parameters and fine-tuning using the target domain data; Assume that only the feature extractor in the source model is adapted to the target domain; given a source model f S (·) and a target model f T (·), train a generator for the passive knowledge transfer module; Set the target image to x, given the generated image The source model outputs feature maps of all source domain data and probability distribution In order to describe the adapted knowledge in the generated image, in addition to the knowledge distillation loss, a new relation preservation loss is introduced, which preserves the target image target model feature map f T (x) and the generated image source model feature map The relative channel relationship between them; The knowledge distillation loss is: in the passive knowledge transfer module, the knowledge difference between the source domain data and the target domain data is extracted into the generator; the output of the source model is fed into the generated image and the target image is fed into the output p(f T (x)) constitutes the knowledge distillation loss: The relationship preservation loss is: after successful knowledge distillation, the global features of the target image obtained through the target model and the global features of the generated source domain style image obtained through the source model should be similar, so the relationship preservation loss is used for constraint; Given the source domain feature map and the target domain feature map f T (x), first reshape it into a feature vector F S and F T , Among them, D, H, and W are the number of feature map channels, height, and width respectively; then, their channel-level autocorrelation, or Gram matrix, is calculated. Among them, G s , G T ∈R D×D , and apply row L2 normalization: Among them, [i,:] represents the i-th row in the matrix; finally, the relationship of the preservation loss is defined as the mean squared error MSE between the normalized Glan matrix: The total loss is: Through the constraints of these two losses, it is possible to generate source-style images from target images, which can be used for further fine-tuning of the model and improve the model's discrimination ability.