Automatic driving automobile cross-weather target detection method based on feature adversarial learning

Through the adversarial learning and self-attention mechanism, combined with semi-supervised learning, the problem of insufficient robustness and generalization of the object detection model under different weather conditions is solved, cross-domain adaptation and catastrophic forgetting are mitigated, and automatic Target detection performance of driving a car.

CN119169580APending Publication Date: 2024-12-20JILIN UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411180802.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing object detection models show insufficient robustness and generalization under different weather conditions, especially in the absence of diversified training data, and are prone to catastrophic forgetting when adapting to new weather conditions.

Method used

Adopting a feature alignment method based on adversarial learning, combining self-attention mechanism and semi-supervised learning, through dynamic EMA parameter update and Mean Teacher model, semi-supervised cross-domain detection module and domain alignment module are designed to reduce the distribution differences under different weather conditions. Improve the generalization ability and adaptability of the model.

Benefits of technology

Improves the accuracy and robustness of target detection under different weather conditions, reduces the need for labeled data, prevents catastrophic forgetting, and ensures that the model maintains high performance under changing weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses an automatic driving automobile cross-weather target detection method based on feature adversarial learning, and belongs to the technical field of machine learning and computer vision. According to the automatic driving automobile cross-weather target detection method based on feature adversarial learning, feature alignment between a source domain and a target domain is achieved through adversarial learning, distribution differences under different weather conditions are reduced, and therefore the efficiency and accuracy of target detection under various weather conditions are improved. The structure of the invention comprises the following parts: a feature enhancement module, a domain alignment module and a semi-supervised cross-domain detection module. According to the method, the requirement for marked data is reduced, and disastrous forgetting is relieved; through semi-supervised learning, the requirement for a large amount of marked data is reduced, and efficient training is achieved; and in combination with the feature enhancement module and the domain alignment module, the effect of preventing disastrous forgetting is remarkable, so that the model keeps high performance under constantly changing weather conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of machine learning and computer vision. Background Art

[0002] Object detection is particularly important in the field of machine learning and computer vision, especially in key application scenarios such as autonomous driving, where accurate identification of objects in different weather conditions is crucial to improving the safety and reliability of the system. Most existing object detection models are trained and evaluated mainly under clear and good weather conditions (i.e., source domain), which leads to significant performance degradation of these models in other weather conditions (e.g., heavy rain and fog, i.e., target domain). Due to the lack of diverse training data, these models show insufficient robustness and generalization when encountering environments with large distribution differences from the training data. In addition, these methods usually require a large amount of labeled data for training, which is particularly challenging in fields such as autonomous driving where data annotation is expensive or difficult to obtain. If a model trained on sunny days (source domain) is retrained to adapt to foggy day (target domain) data, its performance on foggy days may improve, but the information previously learned on sunny days will be forgotten, resulting in a degradation of detection performance on sunny days. This is a typical catastrophic forgetting problem, which poses a severe challenge to object detection in autonomous driving, as the system needs to maintain high performance for all learned tasks under changing weather conditions. Therefore, reducing the need for labeled data, enhancing the model's cross-domain adaptability under different weather conditions, and preventing the occurrence of catastrophic forgetting have become the focus of current research.

[0003] The self-attention mechanism shows significant advantages in capturing long-distance dependencies in feature maps. It can enhance feature expression capabilities and enable the model to better focus on important areas in the image, thereby improving object detection performance. However, the use of the self-attention mechanism alone cannot completely solve the problem of distribution differences in object detection under different weather conditions. Through the adversarial learning mechanism, the domain adaptation discriminator can help the feature extraction network generate domain-invariant features, thereby reducing the distribution differences between sunny days and other different weather conditions. The Mean Teacher model is an effective method for semi-supervised learning. By combining labeled data such as sunny days and unlabeled data for other weather conditions, the generalization ability and adaptability of the model are improved, preventing the model from forgetting previously learned knowledge when adapting to new weather conditions. Summary of the invention

[0004] The purpose of the present invention is to use adversarial learning to achieve feature alignment between the source domain and the target domain, reduce the distribution differences under different weather conditions, and thus improve the efficiency and accuracy of target detection under various weather conditions.

[0005] The steps of the present invention are: S1, semi-supervised cross-domain detection module: S11. Update the parameters of the teacher model using dynamic EMA parameters: S12: A set of source domain images I with a total of N target bounding boxes annotated s , these bounding boxes are represented as B={B j |j=1,...,N,B j =(x j ,y j ,w j ,h j )}, where each bounding box consists of the center coordinates, width, and height; the corresponding category label set is C = {C j |j=1,...,N,C j ∈(0,1,...,c)}, where c represents the total number of target categories; the unlabeled target domain image I t , for those with N s Zhang source domain image I s The set of bounding box coordinates B s and the class label set C s , the source domain is represented as Denote the target domain as Where N t represents the number of unlabeled images in the target domain; S13. Supervised source domain detection loss L det (I s ,B s ,C s ): L det (I s ,B s ,C s )=L box (B s ;I s )+L cls,obj (C s ;I s ) (3) S14, pseudo source domain image detection loss S15. Knowledge distillation loss The teacher model uses FB(·) to predict bounding box coordinates and FC(·) to predict categories. It then filters the bounding box prediction results through GB[·] and the category prediction results through GC[·]. S16, consistency loss L con : S17, overall optimization loss function: Among them, α is the weight hyperparameter of knowledge distillation loss, and β is the weight hyperparameter of consistency loss; S2. Feature enhancement module: The feature enhancement module receives the input feature map Where B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively; the input feature map is downsampled through the average pooling layer to generate the downsampled feature map S21, used to generate query Q, key K and value V matrix: S22. In the feature enhancement module, the attention weight matrix A: Among them, d k is a scaling factor, Q and K represent the transformed forms of query and key matrices respectively; S23, the attention weight matrix A is multiplied by the value matrix V to obtain the reconstructed feature matrix O: O=A×V (12) S24, reconstructed and adjusted feature map Add it to the input feature map x to get the final output: S25, the feature enhancement module is concisely formulated as follows: Y=SA(X) (14) Among them, X is the input feature map, Y is the output feature map, SA(·) represents the self-attention mechanism module; S3, domain alignment module: the two sub-modules in the module are GFED-SA and LFED-SA GFED-SA sub-module: Among them, D gk is the discriminator of the kth layer, G gk is the feature generator of the kth layer; LFED-SA submodules: Among them, Dp is the local feature discriminator, G p It is a low-level feature generator; The final loss function is expressed as:

[0006] The beneficial effects of the present invention are: 1. Enhanced feature expression and detection performance: The self-attention mechanism is introduced to enable the model to capture long-distance dependencies in feature maps under different weather conditions, effectively integrate local and global information, and improve the accuracy and robustness of the model; 2. Effective domain alignment and generalization capability improvement: Through the adversarial learning mechanism, the domain alignment module is designed to achieve feature alignment between the source domain (sunny day) and the target domain (foggy day) at different scales to reduce cross-domain distribution differences; the semi-supervised cross-domain detection module is used to improve the generalization capability and adaptability of the model under different weather conditions; 3. Reduce the need for labeled data and alleviate catastrophic forgetting: Through semi-supervised learning, the need for a large amount of labeled data is reduced, achieving efficient training; combined with the feature enhancement module and the domain alignment module, it is effective in preventing catastrophic forgetting, allowing the model to maintain high performance under changing weather conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 It is the overall framework of the SFA-DAOD model; Figure 2 It is the framework of the GFED-SA module; Figure 3 It is the framework of the LFED-SA module; Figure 4 It is the data distribution of the CityScapes / Foggy CityScapes dataset training set; Figure 5 It is the data distribution of the CityScapes / Foggy CityScapes dataset test set. DETAILED DESCRIPTION

[0008] The present invention mainly aims at the problem of target detection domain adaptation of autonomous vehicles under different weather conditions, and designs a target detection domain adaptation network based on semi-supervised learning and adversarial learning mechanisms to achieve the target detection task of autonomous vehicles under different weather conditions. The self-attention mechanism is used to enhance the feature extraction capability, so that the model can capture richer feature information under different weather conditions; the adversarial learning mechanism is used to achieve feature alignment, so that the model can extract consistent feature representations under different weather conditions, thereby reducing the distribution differences under different weather conditions; and the Mean Teacher model is used for semi-supervised learning to improve the generalization ability and adaptability of the model and alleviate catastrophic forgetting. The present invention can effectively utilize the data distribution differences between different weather conditions to perform target detection domain adaptation, and can well solve the problem that deep learning methods require a large amount of labeled data under different weather conditions, while alleviating catastrophic forgetting, ensuring that the model maintains high performance in a changing weather environment.

[0009] This paper proposes a domain adaptation object detection algorithm (Semi-supervised Feature Adversarial Domain Adaptation Object Detection, SFA-DAOD for short) based on semi-supervised global feature adversarial learning. This method enhances feature extraction through self-attention, enabling the model to capture key features under different weather conditions; uses adversarial learning to achieve feature alignment between the source domain and the target domain, reducing the distribution difference under different weather conditions; and uses the Mean Teacher model to enhance the generalization ability of the model, thereby improving the efficiency and accuracy of target detection under various weather conditions.

[0010] The structure of the present invention includes the following parts: a feature enhancement module, a domain alignment module and a semi-supervised cross-domain detection module.

[0011] Feature enhancement module: This module mainly uses the self-attention mechanism to improve the feature extraction capability. By capturing the long-distance dependencies in the input feature map, the model can more effectively focus on important areas in the image, thereby enhancing the feature expression capability and enabling the model to perform well under different weather conditions.

[0012] Domain alignment module: This module achieves feature alignment between the source domain and the target domain at different scales through an adversarial learning mechanism, reduces cross-domain distribution differences, and thus improves the accuracy of target detection under different weather conditions.

[0013] Semi-supervised cross-domain detection module: Semi-supervised learning is achieved through the Mean Teacher model, which combines labeled source domain data with unlabeled target domain data to improve the generalization and adaptability of the model. The dynamic EMA parameter update strategy can dynamically adjust the attenuation factor according to the progress of training, so that the stability of the model can be better balanced at different stages of training.

[0014] The implementation method of the present invention includes the following parts: The domain adaptation target detection algorithm based on semi-supervised global feature adversarial learning of the present invention is carried out on a server equipped with two NVIDIA GeForce RTX 4090s, each with 24 GB of video memory. The specific network is built by the deep learning platform Pytorch 1.1.0, and the number of training times is set to 5 and 10. Other settings are consistent with the default settings of YOLOv5. For the hyperparameters in the model, α is set to 0.005, β is set to 2.0, γ1 and γ2 are set to 1.0 and 0.1, respectively.

[0015] First, the dataset is divided into a training set and a test set, where the training set and the test set contain 2975 and 500 images respectively. Then, a benchmark model is trained in the source domain and the target domain using the default YOLOv5 to evaluate the performance of the SFA-DAOD model proposed in the present invention. Finally, the benchmark model trained in the source domain using YOLOv5 is used for cross-domain adaptation. After the training is completed, the test set is used to verify the domain adaptation effect of the model.

[0016] The overall framework of the domain adaptation object detection algorithm (SFA-DAOD) based on semi-supervised feature adversarial learning described in the present invention is as follows: Figure 1 As shown in the figure, the teacher model and the student model are initialized as the same model, and the teacher model is used to guide the training of the student model, thereby enhancing the feature extraction ability of the student model in the unlabeled target domain, and using the dynamic EMA parameter update strategy, the attenuation factor can be dynamically adjusted according to the progress of training, so that the stability of the model can be better balanced at different stages of training; LFED-SA (Local Feature Enhancement Discriminator with Self-Attention) and GFED-SA (Global Feature Enhancement Discriminator with Self-Attention) are local feature enhancement discriminators with self-attention and global feature enhancement discriminators with self-attention, respectively. The self-attention mechanism is combined to capture global features, and the alignment of cross-domain features is achieved by aligning and discriminating the input image features, thereby improving the generalization of the target detection model under different weather conditions.

[0017] The ultimate goal of this invention is to solve the problem of target detection domain adaptation for autonomous vehicles under different weather conditions and alleviate the catastrophic forgetting phenomenon of the algorithm using as little labeled data as possible.

[0018] The specific implementation steps taken by the present invention are as follows: 1. Dataset Preparation The input of the algorithm proposed in this invention is the Cityscapes dataset with labeled information and the unlabeled FoggyCityscapes dataset. In addition, it also includes pseudo source domain images and pseudo target domain images generated by cross-domain image conversion. Cityscapes data is used for supervised model training, while Foggy Cityscapes data is used for unlabeled domain adaptation training. And by using cross-domain images, the model can better handle the inter-domain distribution differences at the image level, and finally verify the performance of the algorithm on the Foggy Cityscapes test set.

[0019] 2. Model Generalization Network Semi-supervised learning is achieved through the Mean Teacher model, which combines labeled source domain data with unlabeled target domain data to improve the generalization ability and adaptability of the model.

[0020] The Mean Teacher model consists of a teacher model and a student model, both of which have the same architecture but different parameter update methods. The student model is trained through standard back-propagation, while the parameters of the teacher model are updated through the exponential moving average (EMA) of the student model parameters.

[0021] The parameters θ of the teacher model teacher Updated by the following formula: θ teacher =γθ teacher +(1-γ)θ student (1) Here, γ is a hyperparameter that controls the weight of the EMA and is usually set to a value close to 1, such as 0.99 or 0.999.

[0022] In the present invention, a dynamic EMA parameter update strategy is used to update the parameters of the teacher model. The specific formula is as follows: The attenuation factor is dynamically adjusted during the training process so that the stability of the model can be better balanced at different stages of training.

[0023] On the target domain images (unlabeled), the pseudo labels generated by the teacher model are used to guide the training of the student model. Specifically, the teacher model predicts the pseudo target domain images and selects bounding boxes and category labels with higher confidence as pseudo labels. These pseudo labels are used to train the student model to have better generalization ability on the target domain.

[0024] In the cross-domain object detection task, we have a set of source domain images I with a total of N target bounding boxes annotated s These bounding boxes are denoted as B = {B j |j=1,...,N,B j =(x j ,y j ,w j ,h j )}, where each bounding box consists of the center coordinates and width and height. The corresponding category label set is C = {C j |j=1,...,N,C j ∈(0,1,...,c)}, where c represents the total number of target categories. We also have a set of unlabeled target domain images I t For N s Zhang source domain image I s The set of bounding box coordinates B s and the class label set C s , we denote the source domain as Similarly, we denote the target domain as Where N t Represents the number of unlabeled images in the target domain.

[0025] From the source domain image I s The translated image similar to the target domain is represented as And from the target domain image I t The translated image similar to the source domain is represented as When the Mean Teacher model is applied to the cross-domain target detection task, the unlabeled pseudo target domain image is set as the only input of the teacher model, and the rest of I s , Set as input to the student model.

[0026] The loss function of the Mean Teacher model consists of multiple parts to jointly optimize the performance of the student model: Supervised source domain detection loss L det (I s ,B s ,C s ): Ldet (I s ,B s ,C s )=L box (B s ;I s )+L cls,obj (C s ;I s ) (3) It ensures that the student model can accurately detect objects in the source domain. By training the model on labeled source domain data, the model can learn the characteristics of the source domain.

[0027] Fake Source Image Detection Loss The pseudo source domain image detection loss helps the model adapt to the characteristics of the target domain by converting the source domain images into pseudo images in the target domain style and training on these pseudo images. In this way, the model can be exposed to the feature distribution of both the source domain and the target domain during training, thereby reducing the distribution difference between cross-domains.

[0028] Knowledge Distillation Loss Among them, the teacher model uses FB(·) to predict the bounding box coordinates and FC(·) to predict the category, and then filters the bounding box prediction results through GB[·] (non-maximum suppression NMS), and filters the category prediction results through GC[·] (category confidence threshold).

[0029] The knowledge distillation loss guides the training of the student model on the unlabeled target domain data by using the prediction results (pseudo-labels) of the teacher model. The pseudo-labels of the teacher model help the student model reduce the prediction variance in the target domain, thereby improving the performance in the target domain. By penalizing the inconsistency between the teacher model and the student model, it ensures that the student model can gradually learn the characteristics of the target domain.

[0030] Consistency loss L con : The consistency loss ensures the consistency of the model’s output on the source domain and pseudo-source domain images, thereby helping the model reduce the feature differences introduced by style transfer. This consistency constraint makes the model more robust during training and better able to adapt to the feature distribution of the target domain.

[0031] Overall optimization loss function: Among them, α is the weight hyperparameter of knowledge distillation loss, and β is the weight hyperparameter of consistency loss, which controls its contribution to the total loss.

[0032] In summary, the pseudo-labels generated by the teacher model guide the training of the student model in the target domain, reducing the uncertainty of the model on the unlabeled target domain data. At the same time, the consistency loss ensures the consistency of the model's output on the source domain and target domain images (including pseudo-images), further enhancing the performance of the model in the target domain. These mechanisms enable the Mean Teacher model to effectively adapt to the feature distribution of different domains in cross-domain object detection tasks, improving the detection performance and robustness in the target domain.

[0033] 3. Feature Enhancement Module The core of this module is a feature enhancement method based on the self-attention mechanism, which aims to improve the expressiveness of image features, especially the ability to model local and global feature dependencies.

[0034] The feature enhancement module receives the input feature map Where B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively. In order to optimize the computational efficiency, the input feature map is first downsampled through the average pooling layer to generate the downsampled feature map

[0035] The module includes three key convolution operations, which are used to generate query Q (Query), key K (Key) and value V (Value) matrices. The downsampled feature map is transformed by a 1×1 convolution kernel: These convolution operations reduce the number of channels of the input feature map to 1 / r times of the original to reduce computational overhead while retaining key feature information.

[0036] In the feature enhancement module, the self-attention mechanism calculates the attention weight matrix A through matrix multiplication: Among them, d k is a scaling factor used to stabilize the computation of the attention scores, and Q and K represent the transformed forms of the query and key matrices, respectively.

[0037] In the self-attention mechanism, the calculated attention weight matrix A is multiplied by the value matrix V to obtain the reconstructed feature matrix O: O=A×V (12) This step captures the relationship between different positions in the input feature map through the attention weight A, thereby reconstructing a feature map with global dependencies. Then, the number of channels is restored through a convolution operation, and the reconstructed feature map is restored to the same spatial size as the input feature map x using bilinear interpolation.

[0038] In this process, the reconstructed and adjusted feature map Add it to the input feature map x to get the final output: This process fuses the features enhanced by the attention mechanism with the original features to improve the richness and effectiveness of feature expression.

[0039] Combining the above process, the feature enhancement module can be concisely expressed as the following formula: Y=SA(X) (14) Among them, X is the input feature map, Y is the output feature map, and SA(·) represents the self-attention mechanism module.

[0040] 4. Domain Alignment Module Based on the adversarial learning mechanism, this module achieves feature alignment between the source domain and the target domain at different scales, reduces cross-domain distribution differences, and thus improves the accuracy of target detection under different weather conditions. The two submodules in the module are GFED-SA and LFED-SA.

[0041] GFED-SA captures the dependencies between global features by applying a self-attention mechanism on multi-scale feature maps. This submodule eliminates inter-domain differences at the global level through an adversarial discriminator, enhancing the alignment of object categories. Among them, D gk is the discriminator of the kth layer, G gk is the feature generator of the kth layer.

[0042] LFED-SA focuses on the alignment of low-level features. By introducing the self-attention mechanism, LFED-SA more accurately captures the dependencies between pixel-level features, thereby more effectively performing inter-domain alignment and feature enhancement. Among them, D p is the local feature discriminator, G p It is a low-level feature generator.

[0043] The final loss function can be expressed as: By introducing the self-attention mechanism, the domain alignment module can not only achieve feature alignment between domains at different scales, but also enhance the expressiveness of features, thereby further improving the accuracy of object detection under different weather conditions.

[0044] Experimental Results In order to evaluate the performance of the proposed model, we used mAP, the most commonly used evaluation indicator in object detection, to measure the detection accuracy of the model.

[0045] For each category, we first need to calculate Precision and Recall. The definitions are as follows: Among them, TP is the number of true positive samples detected, FP is the number of false positive samples detected, and FN is the number of true positive samples that were missed. For each category, under different confidence thresholds, the corresponding Precision and Recall are calculated to obtain the Precision-Recall curve of the category.

[0046] Then calculate the Average Precision (AP) of each category. Average Precision (AP) is an approximation of the area under the Precision-Recall curve. The specific formula is: Among them, P n is the accuracy when the threshold is n, R n is the recall rate when the threshold is n, R n-1 It is the recall rate of the previous threshold, which means dividing the Precision-Recall curve into several rectangular regions, calculating the area of ​​each region, and adding them together to get the approximate value of AP.

[0047] Finally, the mAP of all categories is calculated. mAP is the average of the AP of all categories. The formula is as follows: Where C is the total number of categories, AP c is the average precision of category c.

[0048] On the CityScapes and Foggy CityScapes datasets, we first trained the YOLOV5-m model as a benchmark (Source Only and Oracle model), and its mAP on these two datasets was 60.5% and 53.4%, respectively. To evaluate the performance of the model proposed in the present invention, we trained the SFA-DAOD model 5 and 10 times independently under the same hyperparameter settings, and its mAP on the CityScapes and Foggy CityScapes datasets was 59.2%, 51.4% and 59.4%, 52.6%, respectively. From the results, it can be seen that the SFA-DAOD model shows significant robustness in dealing with cross-domain weather changes. Its performance on the Foggy CityScapes dataset reached 94.6% and 96.8% of the baseline model, respectively, and the mAP on the CityScapes dataset only showed a slight decrease of about 2%, and did not show catastrophic forgetting.

[0049] This result shows that the SFA-DAOD model of the present invention can effectively utilize the inter-domain distribution differences of different weather conditions to achieve domain adaptation of target detection, while reducing the dependence of deep learning models on a large amount of labeled data under different weather conditions. In addition, the model successfully alleviates the catastrophic forgetting problem that traditional models are prone to when dealing with cross-domain tasks, ensuring that the model can still maintain a high level of detection performance in a continuously changing weather environment.

[0050] Table 1 Results of different models on CityScapes Method bus bicycle car mcycle person rider train truck mAP Source Only 69.1 53.6 79.7 51.2 63.8 63.2 56.7 46.4 60.5 SFA-DAOD(5) 70.1 52.9 79.4 49.1 62.9 61.0 53.2 45.2 59.2 SFA-DAOD(10) 69.9 54.1 79.9 49.2 62.9 61.4 54.8 42.9 59.4

[0051] Table 2 Results of different models on Foggy CityScapes Method bus bicycle car mcycle person rider train truck mAP Source Only 29.3 37.3 48.6 26.9 43.1 47.6 6.6 19.1 32.3 SFA-DAOD(5) 54.2 47.2 72.0 42.7 57.0 57.5 45.7 34.5 51.4 SFA-DAOD(10) 55.0 47.8 73.0 43.7 58.0 58.9 49.4 35.1 52.6 Oracle 62.8 49.0 75.2 41.6 57.7 56.6 54.2 37.6 54.3

[0053] The meanings of the symbols involved in this invention are summarized as follows: θ teacher : Parameters of the teacher model; θ student : Parameters of the student model; γ: Attenuation factor for updating the parameters of the Mean Teacher model; γ start : initial decay factor of the dynamic EMA parameter update strategy; γ end : Termination decay factor of the dynamic EMA parameter update strategy; epoch : Current number of training times; total_epochs : total number of training times; L det (I s ,B s ,C s ): source domain detection loss; L box: Bounding box loss; L cls,obj : Classification and target confidence loss; Pseudo source domain detection loss; Knowledge distillation loss; FB(·): bounding box coordinate prediction; FC(·): category prediction; GB[·]: filtered bounding box prediction results; GC[·]: filtered category prediction results; L con : consistency loss; α: weight hyperparameter of knowledge distillation loss; β: weight hyperparameter of consistency loss; Downsampled feature map; Q: query matrix; K: key matrix; V: value matrix; A: attention weight matrix; Conv2D q 、Conv2D k 、Conv2D v : 1×1 convolution kernel; B: batch size; C: number of channels; H, W: height and width of feature map; r: channel reduction factor; d k : scaling factor; O: reconstructed feature matrix; Adjusted feature map; x: input feature map; y: final output of self-attention; GFED-SA module loss; D gk : The discriminator of the kth layer; G gk : The feature generator of the kth layer; D i : Input domain label, which is 0 for source domain and pseudo source domain, and 1 for target domain and pseudo target domain; x i : input image; Input images (source and pseudo-source); Input image (target domain and pseudo-target domain); LEFD-SA module loss; D p : Local feature discriminator; G p : Low-level feature generator; Domain alignment module loss; γ1, γ2: weight hyperparameters of GFED-SA loss and LFED-SA loss; P: precision; R: recall; TP: number of true positive samples detected; FP: number of false positive samples detected; FN: number of true positive samples missed; AP: average precision; P n : The accuracy when the threshold is n; R n : Recall rate when the threshold is n; R n-1 : Recall rate when the threshold is n-1; mAP: Mean average precision; C: Total number of categories; AP c : The average precision of category c.

Claims

1. A cross-weather target detection method for autonomous driving vehicles based on feature adversarial learning, characterized by: The steps are: S1, semi-supervised cross-domain detection module: S11. Update the parameters of the teacher model using dynamic EMA parameters: S12: A set of source domain images I with a total of N target bounding boxes annotated s , these bounding boxes are represented as B = {B j |j=1,...,N,B j =(x j ,y j ,w j ,h j )}, where each bounding box consists of the center coordinates, width, and height; the corresponding category label set is C = {C j |j=1,...,N,C j ∈(0,1,...,c)}, where c represents the total number of target categories; the unlabeled target domain image I t , for those with N s Zhang source domain image I s The set of bounding box coordinates B s and the class label set C s , the source domain is represented as Denote the target domain as Where N t represents the number of unlabeled images in the target domain; S13. Supervised source domain detection loss L det (I s ,B s ,C s ): L det (I s ,B s ,C s )=L box (B s ;I s )+L cls,obj (C s ;I s ) (3) S14, pseudo source domain image detection loss S15. Knowledge distillation loss The teacher model uses FB(·) to predict bounding box coordinates and FC(·) to predict categories. It then filters the bounding box prediction results through GB[·] and the category prediction results through GC[·]. S16, consistency loss L con : S17, overall optimization loss function: Among them, α is the weight hyperparameter of knowledge distillation loss, and β is the weight hyperparameter of consistency loss; S2. Feature enhancement module: The feature enhancement module receives the input feature map Where B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively; the input feature map is downsampled through the average pooling layer to generate the downsampled feature map S21, used to generate query Q, key K and value V matrix: S22. In the feature enhancement module, the attention weight matrix A: Among them, d k is a scaling factor, Q and K represent the transformed forms of the query and key matrices, respectively; S23. Multiply the attention weight matrix A by the value matrix V to obtain the reconstructed feature matrix O: O=A×V (12) S24, reconstructed and adjusted feature map Add it to the input feature map x to get the final output: S25, the feature enhancement module is concisely formulated as follows: Y=SA(X) (14) Among them, X is the input feature map, Y is the output feature map, and SA(·) represents the self-attention mechanism module; S3, domain alignment module: the two submodules in the module are GFED-SA and LFED-SA GFED-SA submodules: Among them, D gk is the discriminator of the kth layer, G gk is the feature generator of the kth layer; LFED-SA submodules: Among them, D p is the local feature discriminator, G p It is a low-level feature generator; The final loss function is expressed as:

Citation Information

Cited By

  • Cross-domain target detection method and system based on semi-supervised learning in extreme weather

    CN119863615A

  • Cross-Domain Object Detection Method and System Based on Semi-Supervised Learning in Extreme Weather

    CN119863615B

  • Multi-layer feature adaptive alignment cross-domain unmanned aerial vehicle target detection method and system

    CN120014241A