Haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network

By using semi-supervised learning and a dynamic perception attention U-shaped network, combined with deformable convolutional residual blocks and hierarchical feature fusion modules, the problem of poor generalization ability of haze image restoration models is solved, achieving high-quality haze image dehazing effects, which are suitable for remote sensing, autonomous driving and monitoring analysis.

CN120070259BActive Publication Date: 2025-12-26NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411968665.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-12-26
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing haze image restoration models suffer from poor generalization ability because the datasets are obtained through synthesis and have a certain domain gap with natural paired datasets.

Method used

We adopt a method based on semi-supervised learning and dynamic perceptual attention U-shaped network, combining supervised and unsupervised training strategies. Using synthetic haze images and natural haze images, we extract features through deformable convolutional residual blocks and hierarchical feature fusion modules, introduce a content-guided attention mechanism, and construct a dynamic perceptual attention U-shaped network.

Benefits of technology

It improves the image restoration effect of haze images, effectively reduces noise and color distortion in dehaze images, and restores high-quality haze-free images, which are suitable for remote sensing, autonomous driving and monitoring analysis and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070259B_ABST
    Figure CN120070259B_ABST
Patent Text Reader

Abstract

The application discloses a haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network, and method steps are as follows: firstly, a dynamic perception attention U-shaped network is designed by combining deformable convolution and attention mechanism, and the haze density distribution in the fog image can be effectively perceived. Then, a supervised branch is constructed, a synthetic dataset is used to train the network, and the model is ensured to have basic dehazing capability; then, in order to improve the generalization capability on the natural haze image, an unsupervised learning branch is further constructed, and the network is fine-tuned by using the statistical characteristics of the natural image; finally, the trained dehazing network is used, the haze image is taken as input, and the haze-free image is restored in an end-to-end manner. Compared with other methods, the dehazing method of the application effectively improves the noise and color distortion problems after the image is dehazed, the restored image is better in visual quality, and has good practicability and application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, in particular to a haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network. BACKGROUND

[0002] The importance of image defogging extends to various fields, including remote sensing, surveillance, and autonomous driving. In remote sensing, defogging techniques can extract key information from satellite or aerial images, facilitating accurate analysis of the Earth's surface. In surveillance systems, defogging plays a crucial role in enhancing the visibility of outdoor environments, thereby improving object detection and tracking capabilities. For autonomous driving, defogging ensures a clearer view for vehicle-mounted cameras, enhancing safety and reliability in complex driving scenarios.

[0003] The development of image defogging algorithms can be traced back to early image enhancement techniques. Early defogging techniques mainly relied on image enhancement methods such as histogram equalization and Retinex theory. These methods enhance the visual effect of foggy images by improving the contrast and brightness of the images. Image enhancement methods are simple to implement and computationally efficient, but their shortcomings include the inability to effectively restore the true details of the image and limited effectiveness in handling severe fog.

[0004] With the rapid development of deep learning technology, researchers began to use convolutional neural networks (CNN) to directly restore clear images from foggy images, either by estimating parameters based on atmospheric scattering models or by not using physical models for end-to-end learning. This type of method can automatically learn complex feature representations, thereby improving defogging results, but requires a large number of paired foggy images and clear images for training. However, most current datasets are obtained through synthesis, which has a certain domain gap from natural paired datasets, resulting in poor model generalization ability, which still needs to be further improved. SUMMARY

[0005] The present application provides a haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network, which can be used to solve the technical problem of poor model generalization ability caused by the domain gap between synthetic datasets and natural paired datasets.

[0006] The haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network, the method comprising:

[0007] Step A, the overall architecture of the defogging network, i.e., the dynamic perception attention U-shaped network, is constructed; the U-shaped network is divided into an encoding part, a feature conversion part and a decoding part from the input end to the output end, and can output a haze-free image in an end-to-end manner;

[0008] Step B, a supervised learning branch is constructed to supervise the training of the defogging network; synthetic haze images are used as the input of the defogging network, and real-world clean images are used as labels, and mean square error loss, perception loss and adversarial loss are adopted for supervised training;

[0009] Step C, an unsupervised learning branch is constructed to supervise the training of the defogging network; natural haze images are used as the input of the defogging network, and dark channel loss and total variation loss are adopted for unsupervised training;

[0010] Step D, the dynamic perception attention U-shaped network trained in steps B and C is used to input a haze image and output a haze-free image in an end-to-end manner.

[0011] Compared with the prior art, the present application has the following advantages: 1. A semi-supervised learning strategy is used, and both labeled data and unlabeled data are used in the training process. The defogging network can be trained using both natural data sets and synthetic data sets, which can learn the mapping relationship from the haze image to the haze-free image through prior knowledge, and can also learn the feature distribution of the real-world haze-free image, thereby improving the performance of the defogging network in actual application. 2. A deformable convolution residual block is designed, which enhances the feature extraction network based on deformable convolution and residual learning, improves the ability of the network to model geometric transformation, and can extract more effective feature representations. 3. The content-guided attention extracts and analyzes the spatial information specific to the feature channel, generates a spatial importance distribution map at the channel level, and effectively deals with the uneven distribution of haze. 4. A hierarchical feature fusion module is proposed to replace the simple skip connection, which effectively fuses shallow and deep features, enhances the information flow from shallow to deep, and is beneficial to restore images with higher clarity. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 A flowchart of the haze image restoration process provided by the present application.

[0013] Figure 2 An overall architecture diagram of the haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network designed by the method provided by the present application.

[0014] Figure 3 A dynamic perception attention U-shaped network structure diagram designed by the method provided by the present application.

[0015] Figure 4A deformable convolution residual block structure diagram of the method provided in the present application.

[0016] Figure 5 A content attention guiding structure diagram of the method provided in the present application.

[0017] Figure 6 A hierarchical feature fusion module structure diagram of the method provided in the present application. DETAILED DESCRIPTION

[0018] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0019] Firstly, the embodiments of the present application will be introduced below with reference to the drawings.

[0020] In combination with Figure 1 , the present application relates to a haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network, mainly comprising the following steps: step A, constructing the overall architecture of the haze removal network, i.e. the dynamic perception attention U-shaped network; the U-shaped network is divided into an encoding part, a feature conversion part, a decoding part and a feature fusion part from the input end to the output end, and can obtain a haze-free image in an end-to-end manner; step B, constructing a supervised learning branch; using a synthetic haze image as the input of the U-shaped network, using a real-world clean image as the label, and adopting mean square error loss, perception loss and adversarial loss for supervised training; step C, constructing an unsupervised learning branch; using a natural haze image as the input of the U-shaped network, and adopting dark channel loss and total variation loss for unsupervised training, and the network parameters obtained by training in step B are shared in the training process. Step D, using the model parameters obtained by training to construct the dynamic perception attention U-shaped network, inputting a haze image, and outputting a haze-free image restored by the haze removal network.

[0021] The network architecture diagram of the haze image restoration method based on semi-supervised learning and dynamic perception attention U-shaped network is shown in Figure 2 , and the method comprises the following steps:

[0022] Step A, constructing the overall architecture of the haze removal network, i.e. the dynamic perception attention U-shaped network; the U-shaped network is divided into an encoding part, a feature conversion part and a decoding part from the input end to the output end, and can obtain a haze-free image in an end-to-end manner;

[0023] Step B, constructing a supervised learning branch, and performing supervised training on the haze removal network constructed in step A; using a synthetic haze image as the input of the haze removal network constructed in step A, using a real-world clean image as the label, and adopting mean square error loss, perception loss and adversarial loss for supervised training;

[0024] Step C: Construct an unsupervised learning branch to train the dehazing network constructed in Step A in an unsupervised manner; use natural haze images as network input and employ dark channel loss and total variation loss for unsupervised training.

[0025] Step D: Using the dynamic perception attention U-shaped network trained in steps B and C, input a hazy image and output a hazy-free image end-to-end.

[0026] Step A: Construct the overall architecture of the dehazing network—the Dynamic Perception Attention U-shaped Network; the overall architecture of the Dynamic Perception Attention U-shaped Network is as follows: Figure 3 As shown, the U-shaped network consists of an encoding section, a feature transformation section, and a decoding section from the input to the output, enabling end-to-end acquisition of fog-free images; it includes:

[0027] Step A1: Construct a U-shaped network encoder to obtain multi-semantic feature layers. The encoder uses 3×3 convolutional layers to adjust the number of channels, uses deformable convolutional residual blocks to dynamically extract input image features, and uses 3×3 convolutional layers with a stride of 2 for downsampling. The deformable convolutional residual blocks and downsampling layers are repeated twice, resulting in a total of three feature layers at different scales.

[0028] The core component of the deformable convolutional residual block is deformable convolution, whose formula is as follows:

[0029]

[0030] Where x is the input feature, p is the center position of the convolution sampling, and p k It is the offset of the center point, p k ∈{(-1,-1),(-1,0),…,(0,1),(1,1)}. Δp k and Δm k These are the offsets and weighting coefficients of the K sampling points, Δm. k The value range of Δp is [0,1]. k It is a real number with an unrestricted range, resulting in p+p k +Δp k It is a real number, in calculating x(p+p) k +Δp k The bilinear interpolation method will be applied to confirm the sampling points on the original feature map. Δp k and Δm k These are all learnable parameters, obtained through two separate convolutional layers.

[0031] Further, a deformable convolution residual block (DCRB) is constructed using deformable convolution. The structure diagram of the deformable convolution residual block is shown in Figure 4 As shown in the structure diagram of the deformable convolution residual block, one deformable convolution and one 3x3 convolution block are used, and after each convolution, a ReLU activation layer is added, and two residual connections are introduced to directly connect the input feature map and the feature map after convolution. The formula of the deformable convolution residual block is as follows:

[0032]

[0033] where max(0, x) represents a ReLU activation function, represents a convolution layer with a kernel size of 3, and edge padding is performed in the same way during convolution to ensure that the output feature layer size is unchanged. DeConv(x) represents a deformable convolution block.

[0034] Step A2, a feature conversion part is constructed, and based on the minimum size feature layer obtained in the encoding process of step A1, multi-channel semantic information of the low-resolution feature layer is extracted; the feature conversion part includes a deformable convolution residual block and a hierarchical feature fusion module in series; wherein the hierarchical feature fusion module (HFFA) includes a content guided attention mechanism and a 1x1 convolution layer, and can mix shallow and deep feature map information.

[0035] Further, the core of the hierarchical feature fusion module is a content guided attention (CGA) mechanism, which can extract a spatial importance distribution map specific to a feature channel. The structure diagram of the content guided attention is shown in Figure 5 The process is described as the following formula:

[0036]

[0037] In formula (3), represents a channel attention map, represents a spatial attention map. max(0, x) represents a ReLU activation function, represents a convolution layer with a kernel size of kxk. represents global average pooling in the spatial dimension, and represent global average pooling and global maximum pooling in the channel dimension, respectively. denotes concatenating two tensors with consistent dimensions along the channel dimension.

[0038] In formula (4), X denotes the input feature map, W c +W s denotes adding the spatial attention map and the channel attention map to obtain the channel-specific hybrid attention map, and since the two have inconsistent dimensions, the operation follows the broadcast mechanism. CS(·) denotes mixing along the channel dimension, denotes grouped convolution, which reduces the amount of calculation compared with ordinary convolution. Sigma denotes the sigmoid activation function, and the spatial importance distribution map W is obtained after normalization.

[0039] Further, the structure of the hierarchical feature fusion module is as shown in Figure 6 The low-level feature layer after down-sampling in the encoding process and the corresponding hierarchical high-level feature layer are used as input. First, the two layers of features are added to mix the high-level semantic information and the low-level semantic information. Then, the content-guided attention is used to calculate the spatial importance map, which is multiplied by the respective feature map to obtain the refined feature map. Finally, the two original feature maps and the two refined feature maps are added, and then a 1x1 convolution layer is used to obtain the final fusion feature map. The process is described by the following formula:

[0040]

[0041] wherein, F fuse denotes the fusion feature map, F low and F high denote the bottom feature and the corresponding high-level feature respectively, W denotes the spatial importance map obtained through content-guided attention, is a 1x1 convolution layer.

[0042] Step A3, the decoder of the U-shaped network is constructed, and the fusion feature map obtained based on step A2 is used to gradually recover and fuse features. The encoder uses a deformable convolution residual block to extract features, and a 3x3 deconvolution layer with a step of 2 is used for up-sampling. The up-sampling and deformable convolution residual block are repeated twice. Similar to the encoding process, three feature layers of corresponding scales are obtained. Finally, a 3x3 convolution layer is used to adjust the channel number to 3, and a haze-free image is output. Before up-sampling, the hierarchical feature fusion module is used to fuse the feature layer after down-sampling in step A1 again.

[0043] Further, step B, a supervised learning branch is constructed to supervise the training of the dehazing network constructed in step A; the synthetic haze image is used as the input of the dehazing network constructed in step A, and the real-world clean image is used as the label. The mean square error loss, the perception loss and the adversarial loss are used for supervised training; including:

[0044] Step B1, introduce mean square error loss, measure the pixel difference between natural haze-free image and predicted haze-free image, the loss function is expressed as follows:

[0045]

[0046] wherein, represents n b represents the number of labeled data in a batch, N(I i ) represents the synthesized haze image I i the haze-free image predicted by the U-shaped network constructed through step A, represents I i the corresponding natural haze-free image, ‖‖2 represents L2-norm.

[0047] Step B2, introduce adversarial loss, which can improve the clarity and edge details of the predicted image. The loss function is expressed as follows:

[0048]

[0049] wherein, represents the discriminator, which needs to be trained together with the U-shaped network constructed in step A. The first term of the loss represents the probability that the real image is true when passing through the discriminator, and the second term represents the probability that the predicted image is false when passing through the discriminator. The optimization process of this loss is to deceive the generator, and reduce the probability that it considers the real image to be true and the predicted image to be false.

[0050] Step B3, introduce perception loss, which can establish the connection between the haze removal task and the advanced task, and improve the visual effect of the image. The loss function is expressed as follows:

[0051]

[0052] wherein, F represents a pre-trained target detection network feature extractor, in this invention, VGG-19 network pre-trained on COCO dataset is used, and respectively, the feature maps of the predicted image and the natural image after passing through the feature extractor, and then calculate their L2-norm.

[0053] Step B4, construct the composite loss function loss s , use the synthesized haze image as input, and the real-world clean image as label to train the dynamic spatial perception U-shaped network, the composite loss function is as follows:

[0054] loss s =αL c +βL a +γL p (9)

[0055] Wherein, {a, b, g} is a hyperparameter for controlling the weight of each loss, in the application, it is respectively set as {a=1, b=0.01, g=0.001}

[0056] Further, step C, constructing an unsupervised learning branch, unsupervised training is performed on the defogging network constructed in step A; using natural fog image as network input, and taking dark channel loss, total variation loss for unsupervised training. Including:

[0057] Step C1, introducing dark channel loss, which can use dark channel prior to help predict image to obtain the same statistical characteristics as natural image, the dark channel loss function is as follows:

[0058]

[0059] Formula (11) represents the calculation formula of dark channel, wherein I c represents the three color channels of I, and Ω(x) represents a local block centered at x. Formula (10) is the calculation of dark channel loss, and ‖‖1 represents L1-norm sparse prediction image dark channel.

[0060] Step C2, introducing total variation loss, which can help the predicted image to retain the structure and details of the natural fog image, the total variation loss function is as follows, wherein, and respectively represent horizontal and vertical gradient operators.

[0061]

[0062] Step C3, constructing a composite loss function loss u , using natural fog image as U-shaped network input to train dynamic spatial perception U-shaped network, and the loss function is as follows:

[0063] loss u =εL d +δL t (13)

[0064] Wherein, {e, d} is a hyperparameter for controlling the weight of each loss, in the application, it is respectively set as {e=10 -5 , d=10 -5}.

[0065] Further, the training details are that at the beginning of training, firstly, n b labeled samples are randomly selected, these samples are processed through the network, and the supervised loss is calculated. Then, n bThe unsupervised loss is calculated by processing the same network to the unlabeled samples, and finally, the network parameters of the supervised branch and the unsupervised branch are updated in turn by using the calculated supervised loss and unsupervised loss through the back propagation algorithm. It should be noted that the dehazing network of the unsupervised branch and the supervised branch shares the network weight in the training process, and the convergence of the supervised branch is the end point of the training.

[0066] Further, step D, using the dynamic perception attention U-shaped network trained in steps B and C, inputs the haze image, and outputs the haze-free image end to end.

[0067] To sum up, the application combines the dynamic feature extraction capability of deformable convolution and the perception capability of haze unevenness of the attention mechanism, and innovatively constructs a dynamic perception attention U-shaped network, which significantly improves the expression capability of the dehazing model. Then, the U-shaped network is trained on the synthetic dataset using the MSE loss, the adversarial loss and the perception loss, forming a supervised learning branch; subsequently, the U-shaped network is further trained on the natural haze image dataset using the dark channel loss and the total variation loss, constructing an unsupervised learning branch; finally, the trained network is used to dehaze the haze image. The application can effectively reduce the noise and color distortion of the dehazed image, and restore an image with excellent visual quality, which is suitable for remote sensing, automatic driving, monitoring analysis and other fields, and has a wide application prospect and practical application value.

[0068] The above-mentioned embodiments of the application do not constitute a limitation on the protection scope of the application.

Claims

1. A method for haze image restoration based on semi-supervised learning and a dynamic perceptual attention U-shaped network, characterized in that, The method includes: Step A: Construct the overall architecture of the dehazing network, namely the dynamic perception attention U-shaped network; the U-shaped network is divided into an encoding part, a feature transformation part, and a decoding part from the input end to the output end, which can output a haze-free image end to end; Step A includes: Step A1, constructing a U-shaped network encoder to obtain multi-semantic feature layers; wherein, the encoder uses 3×3 convolutional layers to adjust the number of channels, uses deformable convolutional residual blocks to dynamically extract input image features, and uses 3×3 convolutional layers with a stride of 2 for downsampling; the deformable convolutional residual blocks and downsampling layers are repeated twice, for a total of three feature layers at different scales. Step A2: Construct the feature transformation part. Based on the minimum size feature layer obtained in the encoding process of step A1, perform feature transformation to extract multi-channel semantic information of the low-resolution feature layer. The feature transformation part includes a series of deformable convolutional residual blocks and a hierarchical feature fusion module. The hierarchical feature fusion module (Hierarchical Feature Fusion with Attention, HFFA) consists of a content-guided attention mechanism and a 1×1 convolutional layer, which can mix shallow and deep feature information. The hierarchical feature fusion module uses the downsampled low-level feature layers and corresponding high-level feature layers from the encoding process as input. The two feature layers are added together to mix high-level and low-level semantic information. Then, content-guided attention is used to calculate the spatial importance map, which is multiplied by the respective feature maps to obtain a refined feature map. Finally, the two original feature maps and the two refined feature maps are added together and passed through a 1×1 convolutional layer to obtain the final fused feature map. The formula is as follows: Among them, F fuse F represents the fused feature map. low and F high Let represent the low-level features and the corresponding high-level features, respectively. W represents the spatial importance graph obtained through content-guided attention. It is a 1×1 convolutional layer; Step A3 involves constructing a U-shaped network decoder, which progressively performs feature recovery and feature fusion based on the fused feature map obtained in Step A2. The encoder extracts features using deformable convolutional residual blocks, upsamples using a 3×3 deconvolutional layer with a stride of 2, and repeats the upsampling and deformable convolutional residual block process twice to obtain feature layers at three corresponding scales. Finally, a 3×3 convolutional layer is used to adjust the number of channels to 3, outputting a fog-free image. Before upsampling, a hierarchical feature fusion module is used to fuse the feature layers downsampled in Step A1 once more. Step B: Construct a supervised learning branch to conduct supervised training on the dehazing network; use synthetic haze images as input to the dehazing network, use clean real-world images as labels, and conduct supervised training using mean squared loss, perceptual loss, and adversarial loss. Step C: Construct an unsupervised learning branch to train the dehazing network in an unsupervised manner; use natural haze images as input to the dehazing network and perform unsupervised training using dark channel loss and total variation loss; Step D: Using the dynamic perception attention U-shaped network trained in steps B and C, input a hazy image and output a hazy-free image end-to-end.

2. The method according to claim 1, characterized in that, In step A: The core component of deformable convolutional residual blocks is deformable convolution, as shown in the following formula: Where x is the input feature, p is the center position of the convolution sampling, and p k It is the offset of the center point, p k ∈{(-1,-1),(-1,0),…,(0,1),(1,1)}; Δp k and Δm k These are the offsets and weighting coefficients of the K sampling points, Δm. k The range of values ​​for Δp ​​is [0,1]; k It is a real number with an unrestricted range, resulting in p+p k +Δp k It is a real number, in calculating x(p+p) k +Δp k The bilinear interpolation method is applied to confirm the sampling points on the original feature map; Δp k and Δm k These are all learnable parameters, obtained through two separate convolutional layers; Deformable Convolutional Residual Blocks (DCRBs) are constructed using deformable convolutions. One deformable convolution and one 3×3 convolutional block are used. After each convolutional layer, a ReLU activation layer is added, and two residual connections are introduced, directly adding the input feature map to the convolutional feature map. The formula for the deformable convolutional residual block is as follows: Where max(0,x) represents the ReLU activation function. This indicates a convolutional layer with a kernel size of 3, and edge padding is performed using the same method during convolution; DeConv(x) represents a deformable convolutional block; The core of the hierarchical feature fusion module is the Content Guided Attention (CGA) mechanism, which can extract a spatial importance distribution map specific to feature channels, as shown in the following formula: In formula (3), This represents a channel attention map. This is a spatial attention map; max(0,x) represents the ReLU activation function. This represents a convolutional layer with a kernel size of k×k; This indicates that global average pooling is performed across the spatial dimension. and These represent global average pooling and global max pooling, respectively, along the channel dimension. This means concatenating two tensors of the same size along the channel dimension; In formula (4), X represents the input feature map, W c +W s This indicates that the spatial attention map and the channel attention map are added together to obtain a channel-specific hybrid attention map. Since the two are of different sizes, the operation follows a broadcast mechanism; CS(·) indicates shuffling along the channel dimension. σ represents grouped convolution; σ represents the sigmoid activation function, and the spatial importance distribution map W is obtained after normalization.

3. The method according to claim 1, characterized in that, Step B: Construct a supervised learning branch and perform supervised training on the dehazing network constructed in Step A; use synthetic haze images as input to the dehazing network constructed in Step A, use clean real-world images as labels, and perform supervised training using mean squared loss, perceptual loss, and adversarial loss. include: Step B1 introduces the mean squared error loss, the mean squared error loss function is expressed as: Where, n represents b N(I) represents the number of labeled data in a batch. i ) represents the synthesized fog image I i The fog-free image predicted after the U-shaped network constructed in step A. Indicate I i The corresponding natural, haze-free image, ‖‖2 represents the L2 norm; Step B2, introduce adversarial loss, the adversarial loss function is expressed as follows: in, The discriminator is trained together with the U-shaped network constructed in step A; the first term of the adversarial loss represents the probability that the real image is real when it passes through the discriminator, and the second term represents the probability that the predicted image is false when it passes through the discriminator; the optimization process of the adversarial loss is to deceive the generator and reduce the probability of considering the real image as real and the predicted image as false. Step B3 introduces perceptual loss, which is expressed as follows: Where F represents the pre-trained object detection network feature extractor, using the VGG-19 network pre-trained on the COCO dataset. and Predict the feature maps of the image and the natural image after passing through the feature extractor, and then calculate their L2 norm; Step B4, construct the composite loss function. s Using synthetic hazy images as input and clean real-world images as labels, a dynamic spatial awareness U-shaped network is trained. The composite loss function is as follows: loss s =αL c +βL a +γL p (9) Where {α, β, γ} are hyperparameters that control the weight of each loss, and are set to {α = 1, β = 0.01, γ = 0.001} respectively.

4. The method according to claim 3, characterized in that, Step C: Construct an unsupervised learning branch to perform unsupervised training on the dehazing network constructed in Step A; Natural haze images were used as network input, and unsupervised training was performed using dark channel loss and total variation loss. include: Step C1 introduces dark channel loss, using dark channel priors to help the predicted image obtain the same statistical properties as the natural image. The dark channel loss function is as follows: D(I)=min c∈{r,g,b} [my y∈Ω(x) IN c (y)] (11) Formula (11) represents the calculation formula for the dark channel, where I c Let I represent the three color channels RGB, and Ω(x) represent the local block centered at x; Formula (10) is used to calculate the dark channel loss, and |||1 represents the L1 norm, which can sparsely predict the dark channel of the image. Step C2, introduce the total variational loss, the total variational loss function is as follows, where, and These represent the horizontal and vertical gradient operators, respectively. Step C3, construct the composite loss function. u A dynamic spatial awareness U-shaped network was trained using natural haze images as input. The composite loss function is as follows: loss u =εL d +δL t (13) Where {ε, δ} are hyperparameters controlling the weights of each loss, set as {ε=10} respectively. -5 δ = 10 -5 } 5. The method according to claim 4, characterized in that, At the start of training, n is first randomly selected. b Each labeled sample is processed by a network, and the supervised loss is calculated. Then, randomly select n. b Each unlabeled sample is processed through the same network, and the unsupervised loss is calculated. Finally, using the calculated supervised and unsupervised losses, the network parameters of the supervised and unsupervised branches are updated sequentially through the backpropagation algorithm. The unsupervised and supervised branches of the dehazing network share network weights during training, and the convergence of the supervised branch is the endpoint of training completion.

Citation Information

Patent Citations

  • Image defogging method based on semi-supervision

    CN114155165A

  • Defogging method based on foggy day traffic road image

    CN118365558A