Foggy day target detection model training method and foggy day target detection method
By constructing a training framework for a target detection model in foggy weather and utilizing an unsupervised recurrent consistency adversarial network to enhance fog features, the problem of decreased target detection performance in foggy environments is solved, and efficient target detection in foggy weather is achieved.
Patent Information
- Application Number
- CN202211141783.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-09-20
AI Technical Summary
Existing target detection technologies suffer from performance degradation in foggy environments, image enhancement methods have limited effectiveness, data augmentation methods are not applicable to invisible situations, and domain adaptation methods are complex and cannot maintain detection performance on clear images.
A training framework for a fog-day target detection model is constructed, including a pre-trained model, a generator, and a discriminator. Fog features are enhanced through an unsupervised recurrent consistency adversarial network. The generator and discriminator are trained using an overall objective function to align fog features with clear features, thereby improving target detection performance.
Without sacrificing target detection performance in clear environments, it significantly improves target detection performance in foggy conditions, providing an effective solution for autonomous driving technology.
Smart Images

Figure CN115631474B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of object detection, specifically to a method for training a target detection model in foggy weather and a method for detecting targets in foggy weather. Background Technology
[0002] Autonomous driving technology refers to technologies that assist or replace drivers in optimally controlling vehicles by perceiving the driving environment (human-vehicle-road) and providing information or vehicle control. It requires multiple functions, including perception, fusion, planning, decision-making, and early warning. Among these, driving environment perception technology has always been a key technology in the field of autonomous driving, providing information support for intelligent vehicles and directly affecting their safety and application. Object detection, as the core of driving environment perception technology, is the foundation of vehicle path planning and decision-making control. Furthermore, the real-time performance, adaptability to complex road environments, adaptability to adverse weather conditions, and detection costs of object detection directly influence the development and popularization of the intelligent vehicle industry.
[0003] Existing object detection techniques are mainly based on image enhancement, data enhancement, and domain adaptation. However, the above methods have the following technical problems: (1) Image enhancement methods can restore foggy images to a clear version, which is beneficial to improving visual perception, but its help to downstream object detection tasks is still debatable; (2) Data enhancement methods require retraining the source model to improve generalization ability, and these methods are not applicable when the training data is not visible; (3) Domain adaptation methods usually use complex network structures or require fine-tuning with target domain semantic labels, and cannot maintain the original detection performance on clear images. Summary of the Invention
[0004] To overcome at least one deficiency in the prior art, embodiments of this application provide a foggy target detection model training method and a foggy target detection method.
[0005] Firstly, a method for training a target detection model in foggy weather is provided, including:
[0006] A training framework for a foggy target detection model is constructed. The framework includes a pre-trained model, a first generator, a second generator, a first discriminator, and a second discriminator. The first generator and the second generator are inserted into the pre-trained model. The pre-trained model is divided into a shallow network and a deep network. The deep network and the first fully connected layer form the first discriminator, and the deep network and the second fully connected layer form the second discriminator.
[0007] The framework is trained based on the training dataset to obtain the first generator after training. The training dataset includes multiple clear-haze image pairs. Each clear-haze image pair includes a clear image and a haze image paired with the clear image. The data input to the framework for each training session includes a clear image and a haze image randomly selected from the training dataset. The randomly selected clear image and haze image are not paired.
[0008] Shallow networks are used to extract haze features from haze images and to extract sharpness features from sharp images;
[0009] The first generator is used to convert hazy features into sharp features;
[0010] The second generator is used to convert sharp features into hazy features;
[0011] The first discriminator is used to distinguish between real sharp features and transformed sharp features;
[0012] The second discriminator shown is used to distinguish between real fog features and converted fog features.
[0013] In one embodiment, the method further includes: training the framework based on an overall objective function, which includes an adversarial loss function, a periodic consistency loss function, an identity preservation loss function, and a degenerate residual loss function.
[0014] In one embodiment, the overall objective function is determined using the following formula:
[0015]
[0016] Among them, L total Let G be the overall objective function, D be the generator, and λ be the discriminator. adv λ represents the weighting coefficients of the adversarial loss function. cyc λ represents the weighting coefficients of the periodic consistency loss function. idt The weight coefficients λ of the identity preservation loss function. res These are the weighting coefficients of the degraded residual loss function. This represents the adversarial loss function corresponding to the clear features. This represents the adversarial loss function corresponding to the fog feature. This represents the periodic consistency loss function corresponding to clear features. This represents the periodic consistency loss function corresponding to the characteristics of fog. This represents the identity preservation loss function corresponding to clear features. L represents the identity preservation loss function corresponding to the fog feature. res This represents the degraded residual loss function.
[0017] In one embodiment, the adversarial loss function is determined using the following formula:
[0018]
[0019]
[0020] in, This represents the adversarial loss function corresponding to the clear features. G represents the adversarial loss function corresponding to the fog feature. D2C G represents the first generator. C2D D represents the second generator. C D represents the first discriminator. D This represents the second discriminator, CF represents sharp features, DF represents hazy features, and D... C (G D2C (DF) represents the output of DF after passing through the first generator and the first discriminator. C (CF) represents the output of CF after passing through the first discriminator, D D (G C2D (CF) represents the output of CF after passing through the second generator and the second discriminator, D D (DF) represents the output of DF after passing through the second discriminator.
[0021] In one embodiment, the periodic consistency loss function is determined using the following formula:
[0022]
[0023]
[0024] in, This represents the adversarial loss function corresponding to the fog feature. G represents the periodic consistency loss function corresponding to clear features. D2C G represents the first generator. C2D This represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... C2D (G D2C (DF)) represents the output of DF after passing through the first generator and the second generator, G D2C (G C2D (CF) indicates that CF is the output of the second generator and the first generator.
[0025] In one embodiment, the identity preservation loss function is determined using the following formula:
[0026]
[0027]
[0028] in, This represents the identity preservation loss function corresponding to clear features. G represents the identity preservation loss function corresponding to the fog feature. D2C G represents the first generator. C2D This represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... D2C (CF) represents the output of CF after passing through the first generator, G C2D (DF) represents the output of DF after passing through the second generator.
[0029] In one embodiment, the degraded residual loss function is determined using the following formula:
[0030] L res (G D2C G C2D ,CF,DF)=||(DF-G D2C (DF))-(G C2D (CF)-CF)||1
[0031] Among them, L res G represents the degraded residual loss function. D2C G represents the first generator. C2D This represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... D2C (DF) represents the output of DF after passing through the first generator, G C2D (CF) represents the output of CF after passing through the second generator.
[0032] In one embodiment, the first generator and the second generator are inserted after the second convolutional layer within the pre-trained model.
[0033] Secondly, a target detection method for foggy weather is provided, including:
[0034] A foggy target detection model is constructed, which consists of a shallow network, a first generator, and a deep network connected in sequence.
[0035] The image of the fog to be detected is input into a shallow network to obtain fog features;
[0036] The haze features are input into the first generator to obtain the transformed clear features;
[0037] The transformed, sharpened features are input into a deep network to obtain the target detection results for the foggy image;
[0038] The clear image to be detected is input into a shallow network to obtain clear features;
[0039] By inputting clear features into a deep network, object detection results in clear images are obtained.
[0040] The first generator was obtained by applying the aforementioned foggy target detection model training method.
[0041] Compared with existing technologies, this application has the following advantages: This application applies an unsupervised recurrent consistency adversarial network to the feature space and proposes a feature enhancement module that focuses on using arbitrarily clear images to enhance the fog features extracted by the low-level network, thereby aligning the feature space of arbitrarily clear images with that of fog images. This improves the target detection performance of existing models in foggy environments without sacrificing the target detection performance in clear environments, and provides an effective and reliable method to promote the industrial application of autonomous driving technology. Attached Figure Description
[0042] This application can be better understood by referring to the description given below in conjunction with the accompanying drawings, which, together with the detailed description below, are incorporated in and form part of this specification. In the drawings:
[0043] Figure 1 A schematic diagram of the structure of the fog-day target detection model training framework according to an embodiment of this application is shown;
[0044] Figure 2 A schematic diagram of the network structure of FEM according to an embodiment of this application is shown;
[0045] Figure 3 A schematic diagram of the structure of a foggy target detection model according to an embodiment of this application is shown;
[0046] Figure 4 A visual illustration of the enhanced features is shown;
[0047] Figure 5 A comparison chart of target detection results in foggy images is shown. Detailed Implementation
[0048] Exemplary embodiments of the present application will be described below with reference to the accompanying drawings. For clarity and brevity, not all features of the actual embodiments are described in the specification. However, it should be understood that many embodiment-specific decisions can be made in the development of any such actual embodiment to achieve the developer’s specific objectives, and these decisions may vary as the embodiments differ.
[0049] It should also be noted that, in order to avoid obscuring this application with unnecessary details, only the device structure closely related to the solution according to this application is shown in the accompanying drawings, while other details that are not closely related to this application are omitted.
[0050] It should be understood that this application is not limited to the described embodiments by virtue of the following description with reference to the accompanying drawings. In this document, embodiments may be combined with each other, features may be substituted or borrowed between different embodiments, and one or more features may be omitted in one embodiment, where feasible.
[0051] This application addresses the severe performance degradation of target detection models under various extreme degraded environments (especially foggy environments) by constructing a bidirectional cyclic consistency feature transformation network. This network improves the target detection performance of existing models in foggy conditions without sacrificing performance in clear environments. First, this application extracts arbitrary unpaired clear features and fog features through the shallow network of existing target detection models. Based on the network architecture, it achieves consistency in the generation and deletion of fog information within two cycles, thereby obtaining enhanced features. Finally, the deep network of the model is used to detect these enhanced features, further improving the model's target detection performance in foggy environments.
[0052] This application provides a method for training a target detection model in foggy weather. Figure 1 A schematic diagram of the training framework for a foggy target detection model according to an embodiment of this application is shown. (Refer to...) Figure 1 The present application provides a detailed description of the fog-day target detection model training method provided in the embodiments.
[0053] The method begins with step S110, which constructs the training framework for the foggy object detection model. In this step, the official weights of yolov5s.pt trained on the COCO dataset are first used as the pre-trained model to obtain a detector, YOLOv5, that performs well on clear images in the COCO dataset. Then, the pre-trained model can be fine-tuned using 240 clear images from the UG2 dataset. Here, the pre-trained model includes a shallow network SPL and a deep network DPL.
[0054] The fog-day target detection model training framework constructed in this embodiment includes a pre-trained model and a first generator G. D2C Second generator G C2D First discriminator D C Second discriminator D D First generator G D2C Second generator G C2D Inserted into the pre-trained model, the pre-trained model is divided into a shallow network SPL and a deep network DPL. The deep network DPL and the first fully connected layer FC1 form the first discriminator D. C The deep network DPL and the second fully connected layer FC2 form the second discriminator D. D .
[0055] In this embodiment, the shallow network SPL is used to extract haze features DF from haze images and sharpness features CF from sharp images, and the first generator G... D2C Second generator G C2D All are feature-enhanced modules (FEMs), based on the U-Net architecture paradigm, constructed using convolutional layers with an encoder-decoder structure as the main component. The first generator G... D2C The second generator G is used to convert the hazy feature DF into the clear feature fake_CF. C2D To convert clear features (CF) into fog features (fake_DF), a U-Net structure paradigm based on encoder-decoder is adopted, which makes the receptive field of shallow features extracted by the shallow network SPL larger, which is conducive to extracting richer global information. Figure 2 A schematic diagram of the network structure of FEM according to an embodiment of this application is shown. FEM mainly consists of three parts: (1) Input convolutional layer IC, which performs preliminary convolution on the input haze features to convert them into intermediate features. The main function of this layer is to extract local features; (2) U-Net encoder-decoder structure, which encodes and decodes features of different scales in the image area, and then uses residual connections to fuse features of different scales to obtain fused features; (3) Output convolutional layer OC, which further convolutionally transforms the fused features to extract richer information, and performs residual connections with the haze features to output enhanced features. In the encoding stage (E1, E2, E3, W), a sufficiently large receptive field of view is obtained through two max pooling and one dilated convolution to obtain rich global information. In the decoding stage (D1, D2, D3), global information features and low-level features are fused multiple times with multiple scales to obtain local information. By drawing on the idea of residual learning, the input haze features are residually connected with the enhanced features output by the FEM module to further preserve the original image information and reduce the training difficulty.
[0056] Two discriminators, D1 and D2, are constructed using a deep YOLOv5 network DPL and a fully connected layer. C D D The first discriminator D C The second discriminator D is used to distinguish between true sharp features and transformed sharp features. D Used to distinguish between real fog features and transformed fog features; in addition, the first discriminator D C Second discriminator D D The existence of the first generator G enables D2C Generates more realistic and clear features; second generator G C2D It produces more realistic fog features, and because the deep network DPL of Yolov5 is used as the first discriminator D... C The main components make the first discriminator DC It can distinguish between real and fake clear features from the perspective of object detection tasks, thereby enabling the first generator G to... D2C It produces clear features that are beneficial for target detection.
[0057] Then, in step S120, the framework is trained based on the training dataset to obtain the first generator after training.
[0058] In this step, 177 images from the UG2 dataset that form multiple sharp-haze image pairs are used as the training dataset. Each sharp-haze image pair includes a sharp image and a haze image paired with the sharp image. The data input to the framework for each training session includes a sharp image and a haze image randomly selected from the training dataset. The randomly selected sharp image and haze image are not paired to achieve unsupervised training.
[0059] The method in this application applies an unsupervised recurrent consistency adversarial network to the feature space and proposes a feature enhancement module. It focuses on using arbitrarily clear images to enhance the fog features extracted by the low-level network, thereby aligning the feature space of arbitrarily clear images with that of fog images. This significantly improves the target detection performance of the pre-trained network in foggy environments and provides an effective and reliable method for promoting the industrial application of autonomous driving technology.
[0060] In one embodiment, the method further includes: training the framework based on an overall objective function, which includes an adversarial loss function, a periodic consistency loss function, an identity preservation loss function, and a degenerate residual loss function.
[0061] Specifically, in order to force the first generator G D2C The haze features are converted into clear features using the first discriminator D. C To distinguish between real, clear features and transformed, clear features. Meanwhile, the first generator G... D2C The goal is to generate more realistic and clear features in order to deceive the first discriminator, D. C Furthermore, a similar adversarial loss is applied to the second generator G. C2D Second discriminator D D To force the second generator G C2D The sharp features are transformed into hazy features. Therefore, the adversarial loss function is determined using the following formula:
[0062]
[0063]
[0064] in, This represents the adversarial loss function corresponding to the clear features. G represents the adversarial loss function corresponding to the fog feature. D2C G represents the first generator. C2D D represents the second generator. C D represents the first discriminator. D This represents the second discriminator, CF represents sharp features, DF represents hazy features, and D... C (G D2C (DF) represents the output of DF after passing through the first generator and the first discriminator. C (CF) represents the output of CF after passing through the first discriminator, D D (G C2D (CF) represents the output of CF after passing through the second generator and the second discriminator, D D (DF) represents the output of DF after passing through the second discriminator.
[0065] Specifically, although adversarial loss ensures that the transformed luminous features are in the same domain as the true luminous features, the content information of the generated luminous features may be lost during the transformation process. Therefore, we use two periodic consistency losses to ensure that the first generator G... D2C Second generator G C2D Content information is preserved during the transformation process. First, the first generator G... D2C The haze features are converted into sharp features, and the resulting sharp features are then processed by the second generator G. C2D If it becomes a haze feature, then periodic consistency ensures that the haze feature passes through the first generator G. D2C Second generator G C2D The transformation remains unchanged; similarly, clear features are processed by the second generator G. C2D First generator G D2C Since the transformation remains unchanged, the periodic consistency loss function is determined using the following formula:
[0066]
[0067]
[0068] in, This represents the adversarial loss function corresponding to the fog feature. G represents the periodic consistency loss function corresponding to clear features. D2C G represents the first generator. C2D This represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... C2D (G D2C (DF)) represents the output of DF after passing through the first generator and the second generator, G D2C (G C2D(CF) indicates that CF is the output of the second generator and the first generator.
[0069] Specifically, to encourage the first generator G D2C Second generator G C2D Greater attention is paid to degraded information, while further preserving identity information, introducing an identity preservation loss. Specifically, the first generator G... D2C It is used to convert hazy features into sharp features. If the sharp features are input into the first generator G... D2C The transformed data should remain unchanged. Similarly, the fog characteristics are generated by the second generator G. C2D The transformation should leave the data unchanged. Therefore, the body retention loss function is determined using the following formula:
[0070]
[0071]
[0072] in, This represents the identity preservation loss function corresponding to clear features. G represents the identity preservation loss function corresponding to the fog feature. D2C G represents the first generator. C2D This represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... D2C (CF) represents the output of CF after passing through the first generator, G C2D (DF) represents the output of DF after passing through the second generator.
[0073] Specifically, since the method in this application is trained in an unsupervised manner, degenerate residual loss is used to ensure the stability of network training. The fog features are processed by the first generator G. D2C The features are converted into sharp features, and degenerate information is eliminated during the conversion process; the sharp features are then processed by the second generator G. C2D The transformation into haze features generates degradation information during the process. Therefore, the degradation residual loss aims to eliminate and maintain consistency with the generated degradation information during the transformation. Thus, the degradation residual loss function is determined using the following formula:
[0074] L res (G D2C G C2D ,CF,DF)=||(DF-G D2C (DF))-(G C2D )CF)-CF)||1
[0075] Among them, L res G represents the degraded residual loss function. D2C G represents the first generator. C2DThis represents the second generator, CF represents the clear feature, DF represents the hazy feature, and G... D2C (DF) represents the output of DF after passing through the first generator, G C2D (CF) represents the output of CF after passing through the second generator.
[0076] Specifically, the overall objective function is determined using the following formula:
[0077]
[0078] Among them, L total Let G be the overall objective function, D be the generator, and λ be the discriminator. adv λ represents the weighting coefficients of the adversarial loss function. cyc λ represents the weighting coefficients of the periodic consistency loss function. idt The weight coefficients λ of the identity preservation loss function. res These are the weighting coefficients of the degraded residual loss function. This represents the adversarial loss function corresponding to the clear features. This represents the adversarial loss function corresponding to the fog feature. This represents the periodic consistency loss function corresponding to clear features. This represents the periodic consistency loss function corresponding to the characteristics of fog. This represents the identity preservation loss function corresponding to clear features. L represents the identity preservation loss function corresponding to the fog feature. res This represents the degraded residual loss function.
[0079] In one embodiment, after the first and second generators are inserted into the second convolutional layer within the pre-trained model, more significant results can be achieved in recovering edge information and statistical features of hazy images.
[0080] This application also provides a method for target detection in foggy weather. Figure 3 A schematic diagram of the structure of the fog target detection model according to an embodiment of this application is shown. The method begins at step S310, constructing a fog target detection model. The fog target detection model includes a shallow network, a first generator, and a deep network connected in sequence. In this step, the first generator is a trained first generator obtained using the above training method. The trained first generator G is then... D2C As a feature enhancement module, FEM is introduced between the shallow network SPL and the deep network DPL of YOLOv5 to construct the overall network structure YOLOv5-FEM;
[0081] Then, in step S320, the image of the fog to be detected is input into a shallow network to obtain fog features;
[0082] Then, in step S330, the haze features are input into the first generator to obtain the transformed clear features;
[0083] Then, in step S340, the transformed clear features are input into the deep network to obtain the target detection results of the fog image;
[0084] Then, in step S350, the clear image to be detected is input into the shallow network to obtain clear features;
[0085] Then, in step S360, the sharp features are input into the deep network to obtain the target detection results of the sharp image.
[0086] In this embodiment of the application, inserting the trained first generator after the shallow network often achieves better enhancement results. This is because the shallow part of the network mainly extracts the low-level features of the local area of the image, such as edges, textures, and colors. Inserting the trained first generator into the shallow part can achieve more obvious results in reconstructing hazy images and restoring their edge information and statistical features.
[0087] To verify the effectiveness of the fog-based object detection method presented in this application, the UG2 dataset published in the CVPR challenge was used as both the training and testing datasets. 240 clear, labeled images were used to fine-tune the Yolov5 network, 177 unpaired clear-fog images were used to train the first generator (Feature Enhancement Module, FEM), and 60 labeled fog images were used for model testing. This application primarily conducts three experimental verifications:
[0088] (1) First, the enhancement effect of inserting the feature enhancement module FEM into different layers of the YOLOv5 network was verified, and the best feature enhancement effect was obtained by inserting FEM into which layer of the YOLOv5 network. By training and testing with FEM inserted into different layers of the YOLOv5 network, the experimental results show that inserting FEM into the second convolutional layer of the YOLOv5 network will achieve the best enhancement effect, which is consistent with the theory that it can achieve more obvious effects in reconstructing hazy images and restoring their edge information and statistical features.
[0089] (2) From the perspective of feature maps, the enhancement mechanism of the feature enhancement module FEM in the feature representation space is verified. First, a haze image is input into the network and the information is extracted by the Yolov5 shallow network to obtain the haze feature DF, and the feature map of each channel is visualized; then, the haze feature is enhanced by the feature enhancement module FEM to obtain the enhanced feature EF, and the feature map of each channel is visualized; finally, the difference between the feature maps before and after enhancement is compared to analyze the enhancement mechanism of FEM in the feature space.
[0090] like Figure 4As shown, by comparing the fog features before and after enhancement, it can be seen that the feature enhancement module FEM recovers information that is helpful for detection, such as the edges, textures, and colors of the fog image, and reduces the interference of fog degradation clues that destroy image content information.
[0091] (3) Based on actual detection results, verify the improvement effect of FEM on haze image detection. Input the haze image into the Yolov5 network and the Yolov5-FEM network of this application respectively, and compare the final target detection results. For example... Figure 5 As shown, inserting FEM into Yolov5 does indeed improve the target detection performance of the original network in foggy conditions, greatly reducing false detections and missed detections.
[0092] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for training a target detection model in foggy weather, characterized in that, include: A training framework for a target detection model in foggy weather is constructed. The framework includes a pre-trained model, a first generator, a second generator, a first discriminator, and a second discriminator. The first generator and the second generator are inserted into the pre-trained model. The pre-trained model is divided into a shallow network and a deep network. The deep network and a first fully connected layer form the first discriminator. The deep network and the second fully connected layer form the second discriminator. The framework is trained based on the training dataset to obtain the first generator after training; The training dataset includes multiple clear-haze image pairs, each of which includes a clear image and a haze image paired with the clear image. The data input to the framework for each training session includes a clear image and a haze image randomly selected from the training dataset, and the randomly selected clear image and haze image are not paired. The shallow network is used to extract haze features from haze images and to extract sharpness features from sharp images; The first generator is used to convert the haze features into clear features; The second generator is used to convert the clear features into hazy features; The first discriminator is used to distinguish between real sharp features and transformed sharp features; The second discriminator shown is used to distinguish between real fog features and converted fog features; The foggy target detection model comprises a shallow network, a first generator, and a deep network connected in sequence. Both the first generator and the second generator are feature enhancement modules (FEMs). The feature enhancement module (FEM) includes an input convolutional layer (IC), a U-Net encoder-decoder structure, and an output convolutional layer (OC). The input convolutional layer (IC) is used to perform preliminary convolution on the input hazy or clear features to convert them into intermediate features. The U-Net encoder-decoder structure is used to encode and decode intermediate features to generate features at different scales. Then, residual connections are used to fuse features at different scales to obtain fused features. The output convolutional layer OC is used to further convolve the fused features to extract richer information and perform residual connections with hazy or clear features to output enhanced features.
2. The method as described in claim 1, characterized in that, The method further includes training the framework based on an overall objective function, which includes an adversarial loss function, a periodic consistency loss function, an identity preservation loss function, and a degenerate residual loss function.
3. The method as described in claim 2, characterized in that, The overall objective function is determined using the following formula: in, Let G be the overall objective function, and D be the generator and discriminator. These are the weighting coefficients of the adversarial loss function. The weighting coefficients of the periodic consistency loss function, The weight coefficients of the identity preservation loss function, These are the weighting coefficients of the degraded residual loss function. This represents the adversarial loss function corresponding to the clear features. This represents the adversarial loss function corresponding to the fog feature. This represents the periodic consistency loss function corresponding to clear features. This represents the periodic consistency loss function corresponding to the characteristics of fog. This represents the identity preservation loss function corresponding to clear features. This represents the identity preservation loss function corresponding to the fog feature. This represents the degraded residual loss function.
4. The method as described in claim 2, characterized in that, The adversarial loss function is determined using the following formula: in, This represents the adversarial loss function corresponding to the clear features. This represents the adversarial loss function corresponding to the fog feature. Indicates the first generator. Indicates the second generator. This represents the first discriminator. This represents the second discriminator, where CF represents sharp features and DF represents hazy features. This represents the output of DF after passing through the first generator and the first discriminator. This represents the output of CF after passing through the first discriminator. This represents the output of CF after passing through the second generator and the second discriminator. This represents the output of DF after passing through the second discriminator.
5. The method as described in claim 2, characterized in that, The periodic consistency loss function is determined using the following formula: in, This represents the adversarial loss function corresponding to the fog feature. This represents the periodic consistency loss function corresponding to clear features. Indicates the first generator. This indicates the second generator, CF represents the sharp feature, and DF represents the hazy feature. This indicates that DF has passed through the outputs of the first generator and the second generator. This indicates that CF is the output of the second generator and the first generator in sequence.
6. The method as described in claim 2, characterized in that, The identity preservation loss function is determined using the following formula: in, This represents the identity preservation loss function corresponding to clear features. This represents the identity preservation loss function corresponding to the fog feature. Indicates the first generator. This indicates the second generator, CF represents the sharp feature, and DF represents the hazy feature. This indicates the output of CF after passing through the first generator. This indicates the output of DF after passing through the second generator.
7. The method as described in claim 2, characterized in that, The degraded residual loss function is determined using the following formula: in, Represents the degraded residual loss function. Indicates the first generator. This indicates the second generator, CF represents the sharp feature, and DF represents the hazy feature. This indicates the output of DF after passing through the first generator. This indicates the output of CF after passing through the second generator.
8. The method as described in claim 1, characterized in that, The first generator and the second generator are inserted after the second convolutional layer in the pre-trained model.
9. A method for target detection in foggy weather, characterized in that, include: A foggy target detection model is constructed, comprising a shallow network, a first generator, and a deep network connected in sequence. The image of the fog to be detected is input into the shallow network to obtain fog features; The haze features are input into the first generator to obtain the transformed clear features; The transformed sharp features are input into the deep network to obtain the target detection results of the fog image; The clear image to be detected is input into the shallow network to obtain clear features; The clear features are input into the deep network to obtain the target detection results of the clear image; The first generator is obtained by applying the foggy target detection model training method of any one of claims 1-7.