Non-paired remote sensing image defogging method based on hybrid cascade group attention Transform
Through the U-Net network structure generator and cyclic generative adversarial network based on the hybrid cascade group attention Transformer, the problem of feature loss and color shift in remote sensing image dehazing is solved, and remote sensing haze-free image generation with high perceptual quality is achieved. , overcoming the limitation of data set scarcity and significantly improving the dehazing effect of remote sensing images.
Patent Information
- Application Number
- CN202410756397.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-11
AI Technical Summary
Existing remote sensing image dehazing methods have problems with feature loss and color shift, and methods based on supervised learning are limited by the scarcity of data sets, making it difficult to obtain pairs of remote sensing haze images.
A non-paired remote sensing image dehazing method based on a hybrid cascaded group attention Transformer is used to construct a U-Net network structure generator with a hybrid cascaded group attention Transformer module, and the foggy and fog-free images are realized through a loop generation adversarial network. Transform each other, use the loss function to adjust parameters, and build the optimal unpaired remote sensing image dehazing model.
This method can generate remote sensing haze-free images with high perceptual quality in important areas and details, avoid feature loss and color shift, learn high-frequency and low-frequency features of the image at multiple scales, reduce feature loss and color differences, and significantly improve remote sensing image removal. Fog effect.
Smart Images

Figure CN118761931A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an unpaired remote sensing image defogging method based on a hybrid cascade group attention Transformer, and belongs to computer vision technology. Background Art
[0002] Remote sensing technology is a technical means of acquiring, processing and analyzing information on the earth's surface, and has been widely used in agriculture, forestry, urban planning, environmental monitoring and other fields. However, due to the influence of factors such as haze and aerosols in the atmosphere, remote sensing images often have problems such as blur, low contrast and color distortion, which seriously affect the quality of the image and the accuracy of information extraction.
[0003] At present, remote sensing image dehazing has made great progress, but the existing methods still have certain shortcomings. In the early research on image dehazing, researchers used prior information to remove haze, such as dark channel prior, color attenuation prior, color line prior, etc. However, the prior-based methods are largely based on assumptions and specific settings, and the dehazing methods have poor generalization ability. In recent years, deep learning-based methods have gradually dominated remote sensing tasks, but the dehazed images have problems with feature loss and color shift, which limits the training and application of deep learning-based methods. In addition, paired remote sensing haze images are difficult to obtain, which leads to the limitation of deep learning methods based on supervised learning due to the scarcity of datasets. Summary of the invention
[0004] Purpose of the invention: In order to solve the problem of feature loss and color shift after remote sensing image defogging, the present invention proposes an unpaired remote sensing image defogging method based on a hybrid cascade group attention Transformer, which can not only generate remote sensing fog-free images with high perceptual quality in important areas and details, but also avoid feature loss and color shift.
[0005] Technical solution: To achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A method for defogging unpaired remote sensing images based on a hybrid cascade group attention Transformer is proposed. A U-Net network structure generator with a hybrid cascade group attention Transformer module is constructed and pre-trained. The pre-trained U-Net network structure generator is used as a generator of a cyclic generative adversarial network. The cyclic generative adversarial network is used to realize the mutual conversion between unpaired remote sensing foggy images and remote sensing non-fog images. The loss function is used to adjust the parameters of the cyclic generative adversarial network to obtain the optimal unpaired remote sensing image defogging model. The method comprises the following steps:
[0007] Step 1: Obtain the training sets of the source domain and the target domain;
[0008] Step 2: Construct a hybrid cascade group attention module, including the following execution steps:
[0009] Step 21: For a feature map X of size C×H×W, it is evenly divided into two parts of size Sub-feature maps X1 and X2; where C represents the number of channels of X, and H and W represent the height and width of X;
[0010] Step 22, obtain the corresponding feature map X1′ of X1 through the cascade group attention module. The size of X1′ is The steps include:
[0011] Step 221, divide X1 equally according to the total number of attention heads T of the cascade group attention module, X1 = [X 11 , X 12 , …, X 1j , …, X 1T ];
[0012] Step 222. Use the jth attention head to calculate X 1j The self-attention value Where: Attn represents the self-attention function of the attention mechanism, based on the query, key and value in the attention mechanism, X 1j The layer is divided into three different subspaces, represented as and
[0013] Step 223. Calculate the output of each attention head in a cascade manner, and add the output of the previous attention head to the next attention head to gradually improve the output, expressed as:
[0014]
[0015] Step 224, X 11 ′,X 12 ′,…,X 1j ′,…,X 1h ′ performs concatenation operation to obtain the corresponding feature map X1′ of X1;
[0016] Step 23, obtain the corresponding feature map X2′ of X2 through the dehazing dynamic deep convolution module. The size of X2′ is The steps include:
[0017] Step 231: Perform spatial context aggregation on X2 through adaptive average pooling operation, and compress the spatial dimension of X2 into K2 , and then pass through 1×1 convolution, ReLU activation function, batch normalization layer, 1×1 convolution to get the attention map Among them, the value of dimension G is the number of attention groups;
[0018] Step 232, reshape A into And use the normalization function softmax on dimension G to get the attention weight value
[0019] Step 233: Compare A′ element by element with a set of learnable parameters Multiply and sum the multiplication results in dimension G to obtain a deep convolution kernel that depends on X2
[0020] Step 234, perform a deep convolution operation on X2 and W to obtain the corresponding feature map X2′ of X2;
[0021] Step 24, concatenate X1′ and X2′ along the channel dimension to obtain the feature map X′, the size of X′ is C×H×W;
[0022] Step 25, using a dehazing compression feature enhancer to efficiently aggregate features of X′; the dehazing compression feature enhancer includes a 3×3 depth convolution, a ReLU activation function, and a batch normalization layer for enhancing local relationships, channel compression and 1×1 expansion convolution for reducing computational costs, and a residual connector for reducing feature loss;
[0023] Step 3, build a hybrid cascade group attention Transformer module with a hybrid cascade group attention module;
[0024] Step 4. Construct a U-Net network structure generator with a hybrid cascade group attention Transformer module, and pre-train the U-Net network structure generator through a cyclic iteration method;
[0025] Step 5. Use the pre-trained U-Net network structure generator as the generator of the cyclic generative adversarial network to construct a cyclic generative adversarial network.
[0026] Step 6. Construct a loss function and use the loss function to adjust the parameters of the cyclic generative adversarial network.
[0027] Step 7: Use the trained cyclic generative adversarial network as the optimal unpaired remote sensing image dehazing model;
[0028] Step 8: Input the remote sensing foggy image to be processed into the optimal unpaired remote sensing image defogging model to obtain the corresponding remote sensing fog-free image.
[0029] Specifically, in the Step 3, the hybrid cascade group attention Transformer module includes a hybrid cascade group attention module and a multi-scale feedforward network module, and a layer normalization module is set before the hybrid cascade group attention module and the multi-scale feedforward network module; the hybrid cascade group attention Transformer module includes the following execution steps:
[0030] Step 31, after the feature map X passes through the layer normalization module and the hybrid cascade group attention module, the feature map X′ is obtained;
[0031] Step 32, performing residual connection on the feature map X′ and the feature map X to obtain the feature map X0, and after passing through the layer normalization module and the multi-scale feedforward network module, performing residual connection on the output to obtain the feature map X″; the multi-scale feedforward network module includes the following execution steps:
[0032] Step 321, perform 1×1 depth convolution on the feature map X0 to obtain the feature map X0′;
[0033] Step 322, divide the feature map X0′ into four parts from the channel dimension, and extract features from the four parts through four parallel depth convolutions of different scales to capture feature information of four scales; the convolution kernel sizes of the four parallel depth convolutions are 1, 3, 5, and 7 respectively;
[0034] S323, first concatenate the feature information of the four scales along the channel dimension, then obtain the feature map X0″ through 1×1 depth convolution, and perform residual connection on the feature map X0″ and the feature map X0 to obtain the feature map X″.
[0035] Specifically, in Step 4, constructing a U-Net network structure generator with a hybrid cascade group attention Transformer module includes the following steps:
[0036] Step 41. In the encoding path of U-Net, four layers of convolution and downsampling are performed on the input image to extract the feature map Y of the input image.
[0037] Step 42, taking Y as the input of the stacked hybrid cascade group attention Transformer module, and recording the output of the stacked hybrid cascade group attention Transformer module as feature map Y′;
[0038] Step 43, in the decoding path of U-Net, Y′ is upsampled and convolved in four layers;
[0039] Step 44, adding the feature maps of the corresponding layers in the encoding path and the decoding path by means of skip connection to obtain the feature map Y″;
[0040] Step 45. Convert Y″ into an output image through post-processing operations.
[0041] Specifically, in Step 5, constructing a cyclic generative adversarial network includes the following steps:
[0042] Step 51. Construct a generator of a cyclic generative adversarial network: Use two pre-trained U-Net network structure generators as generators of a cyclic generative adversarial network. One U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images, and the other U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images.
[0043] Step 52, construct the discriminator of the cyclic generative adversarial network: two Markov discriminators are used as the discriminators of the cyclic generative adversarial network, one is used to judge the similarity between the remote sensing fog-free image generated by the generator and the real remote sensing fog-free image, and the other is used to judge the similarity between the remote sensing foggy image generated by the generator and the real remote sensing foggy image;
[0044] Step 53, construct a cyclic generative adversarial network: combine the generator and the discriminator to construct a cyclic generative adversarial network to achieve mutual conversion between unpaired remote sensing foggy images and remote sensing fog-free images.
[0045] Specifically, in Step 6, the loss function is used to adjust the parameters of the generative adversarial network, including the following steps:
[0046] Step 61. Calculate adversarial loss The generator and the discriminator are used to compete with each other to match the generated image distribution with the image distribution of the target domain, and the adversarial loss for:
[0047]
[0048] Where: G A→B , G B→A Denotes two generators, D A , D B represents two discriminators, represents the expected value of the image distribution, a, b are the input images from the target domain A, B, P data (a), P data (b) represents the real image distribution of a and b;
[0049] S62: Calculate cycle consistency loss The cycle consistency loss provides a reverse consistency constraint to ensure that the generated image is consistent with the input image. for:
[0050]
[0051] S63: Computing cycle-aware identity consistency loss The steps include:
[0052] S631: Calculate the identity loss of the input image and the generated image
[0053]
[0054] S632: Extract the features of the input image and the generated image through the VGG19 network, and calculate the perceptual identity loss of the input image and the generated image
[0055]
[0056] Where: F represents the feature extractor of the VGG19 network;
[0057] S633: Loss of identity and perceived identity loss Perform weighted summation to calculate the cycle-aware identity consistency loss
[0058]
[0059] Where: λ1 and λ2 are identity losses and perceived identity loss The weighting coefficient of
[0060] S64: Against loss Cycle consistency loss and cycle-aware identity consistency loss Perform weighted summation to calculate the total loss
[0061]
[0062] Where: adv , cyc and λ cpidt To combat losses Cycle consistency loss and cycle-aware identity consistency loss The weighting coefficient of .
[0063] Beneficial effects: The unpaired remote sensing image defogging method based on hybrid cascade group attention Transformer provided by the present invention has the following advantages over the prior art: 1. The present invention uses a cyclic adversarial network to realize the conversion between foggy and non-fog images, which can make up for the problem that the prior art is difficult to obtain paired haze images; 2. The present invention introduces hybrid cascade group attention to capture global and local information, which can more effectively learn image features; 3. The present invention constructs a U-Net network structure generator with a hybrid cascade group attention Transformer, which can learn the high-frequency and low-frequency features of images at multiple scales, and can better restore the details and structures in remote sensing images; 4. The present invention proposes a cyclic perceptual identity consistency loss function, which can reduce feature loss and color difference and retain the detailed features of the input image; 5. In an experimental comparison with several existing representative prior methods, the present invention achieved better remote sensing image defogging effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 1 is a flow chart for implementing the method of the present invention;
[0065] Figure 2 It is the structural block diagram of the cascade group attention module;
[0066] Figure 3 This is the structural block diagram of the dehazing dynamic deep convolution module;
[0067] Figure 4 This is the structural block diagram of the dehazing compressed feature enhancer;
[0068] Figure 5 The overall architecture diagram of the recurrent generative adversarial network generator;
[0069] Figure 6 The overall architecture diagram of the recurrent generative adversarial network;
[0070] Figure 7 : It is a comparison diagram of the results of remote sensing image dehazing in the embodiment, wherein: (a) represents three input images; (b) represents the image after DCP processing; (c) represents the image after AODNet processing; (d) represents the image after FFANet processing; (e) represents the image after CycleDehaze processing; (f) represents the image after DehazeFormer processing; (g) represents the image after Uformer processing; (h) represents the image processed by the method of the present invention; (i) represents the clear image corresponding to the input image. DETAILED DESCRIPTION
[0071] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0072] like Figure 1The figure shows an unpaired remote sensing image defogging method based on a hybrid cascade group attention transformer. First, a hybrid cascade group attention module is constructed, and then a hybrid cascade group attention transformer module with a hybrid cascade group attention module is constructed. Then, a U-Net network structure generator with a hybrid cascade group attention transformer module is constructed, and the U-Net network structure generator is pre-trained. Then, the pre-trained U-Net network structure generator is used as a generator of a cyclic generative adversarial network, and the mutual conversion between unpaired remote sensing foggy images and remote sensing non-fog images is realized through a cyclic generative adversarial network. The loss function is used to adjust the parameters of the cyclic generative adversarial network, and finally the optimal unpaired remote sensing image defogging model is obtained. The following is a detailed description of each step.
[0073] Step 1: Obtain training sets of source and target domains.
[0074] Step 2: Construct a hybrid cascade group attention module.
[0075] The hybrid cascade group attention module mainly includes: Figure 2 The cascaded group attention module shown in Figure 3 The dehazing dynamic deep convolution module shown in Figure 4 The dehazing compression feature enhancer has three parts as shown. The hybrid cascade group attention module includes the following execution steps:
[0076] Step 21: For a feature map X of size C×H×W, it is evenly divided into two parts of size Sub-feature maps X1 and X2; where C represents the number of channels of X, and H and W represent the height and width of X;
[0077] Step 22, through Figure 2 The cascaded group attention module shown obtains the corresponding feature map X1′ of X1, and the size of X1′ is The steps include:
[0078] Step 221, divide X1 equally according to the total number of attention heads (head) of the cascade group attention module, X1 = [X 11 , X 12 , …, X 1j , …, X 1T ];
[0079] Step 222. Use the jth attention head to calculate X 1j The self-attention value Where: Attn represents the self-attention function of the attention mechanism, based on the query, key and value in the attention mechanism, X 1jThe layer is divided into three different subspaces, represented as and
[0080] Step 223. Calculate the output of each attention head in a cascade manner, and add the output of the previous attention head to the next attention head to gradually improve the output, expressed as:
[0081]
[0082] Step 224, X 11 ′,X 12 ′,…,X 1j ′,…,X 1h ′ performs concatenation operation to obtain the corresponding feature map X1′ of X1;
[0083] Step 23, through Figure 3 The dehazing dynamic deep convolution module shown in the figure obtains the corresponding feature map X2′ of X2, and the size of X2′ is The steps include:
[0084] Step 231: Perform spatial context aggregation on X2 through adaptive average pooling operation, and compress the spatial dimension of X2 into K 2 , and then pass through 1×1 convolution, ReLU activation function, batch normalization layer (BN layer), 1×1 convolution to get the attention map Among them, the value of dimension G is the number of attention groups;
[0085] Step 232, reshape A into And use the normalization function softmax on dimension G to get the attention weight value
[0086] Step 233: Compare A′ element by element with a set of learnable parameters Multiply and sum the multiplication results in dimension G to obtain a deep convolution kernel that depends on X2
[0087] Step 234, perform a deep convolution operation on X2 and W to obtain the corresponding feature map X2′ of X2;
[0088] Step 24, concatenate X1′ and X2′ along the channel dimension to obtain the feature map X′, the size of X′ is C×H×W;
[0089] Step 25, use the dehazing compression feature enhancer to perform efficient feature aggregation on X′; Figure 3As shown, the dehazing compression feature enhancer includes a 3×3 depth convolution, a ReLU activation function, and a batch normalization layer for enhancing local relationships, a channel compression and a 1×1 expansion convolution for reducing computational costs, and a residual connector for reducing feature loss.
[0090] Step 3: Construct a hybrid cascade group attention Transformer module with a hybrid cascade group attention module.
[0091] like Figure 4 As shown in FIG. 1 , the hybrid cascade group attention Transformer module mainly includes two parts: a hybrid cascade group attention module and a multi-scale feedforward network module. A layer normalization module is set before the hybrid cascade group attention module and the multi-scale feedforward network module. The hybrid cascade group attention Transformer module includes the following execution steps:
[0092] Step 31, after the feature map X passes through the layer normalization module and the hybrid cascade group attention module, the feature map X′ is obtained;
[0093] Step 32, performing residual connection on the feature map X′ and the feature map X to obtain the feature map X0, and after passing through the layer normalization module and the multi-scale feedforward network module, performing residual connection on the output to obtain the feature map X″; the multi-scale feedforward network module includes the following execution steps:
[0094] Step 321, perform 1×1 depth convolution on the feature map X0 to obtain the feature map X0′;
[0095] Step 322, divide the feature map X0′ into four parts from the channel dimension, and extract features from the four parts through four parallel depth convolutions of different scales to capture feature information of four scales; the convolution kernel sizes of the four parallel depth convolutions are 1, 3, 5, and 7 respectively;
[0096] S323, first concatenate the feature information of the four scales along the channel dimension, then obtain the feature map X0″ through 1×1 depth convolution, and perform residual connection on the feature map X0″ and the feature map X0 to obtain the feature map X″.
[0097] Step 4: Construct a U-Net network structure generator with a hybrid cascade group attention Transformer module, and pre-train the U-Net network structure generator through a cyclic iteration method.
[0098] The structure of the U-Net network structure generator with a hybrid cascade group attention Transformer module is as follows Figure 5 As shown, the following execution steps are included:
[0099] Step 41. In the encoding path of U-Net, four layers of convolution and downsampling are performed on the input image to extract the feature map Y of the input image.
[0100] Step 42, taking Y as the input of the stacked hybrid cascade group attention Transformer module, and recording the output of the stacked hybrid cascade group attention Transformer module as feature map Y′;
[0101] Step 43, in the decoding path of U-Net, Y′ is upsampled and convolved in four layers;
[0102] Step 44, adding the feature maps of the corresponding layers in the encoding path and the decoding path by means of skip connection to obtain the feature map Y″;
[0103] Step 45. Convert Y″ into an output image through post-processing operations.
[0104] Step 5: Build a cyclic generative adversarial network.
[0105] The pre-trained U-Net network structure generator is used as the generator of the cyclic generative adversarial network to construct Figure 6 The cyclic generative adversarial network shown includes the following steps:
[0106] Step 51. Construct a generator of a cyclic generative adversarial network: Use two pre-trained U-Net network structure generators as generators of a cyclic generative adversarial network. One U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images, and the other U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images.
[0107] Step 52, construct the discriminator of the cyclic generative adversarial network: two Markov discriminators are used as the discriminators of the cyclic generative adversarial network, one is used to judge the similarity between the remote sensing fog-free image generated by the generator and the real remote sensing fog-free image, and the other is used to judge the similarity between the remote sensing foggy image generated by the generator and the real remote sensing foggy image;
[0108] Step 53, construct a cyclic generative adversarial network: combine the generator and the discriminator to construct a cyclic generative adversarial network to achieve mutual conversion between unpaired remote sensing foggy images and remote sensing fog-free images.
[0109] Step 6: Construct a loss function and use it to adjust the parameters of the cyclic generative adversarial network.
[0110] Construct a loss function and use it to adjust the parameters of the generative adversarial network, including the following steps:
[0111] Step 61. Calculate adversarial loss The generator and the discriminator are used to compete with each other to match the generated image distribution with the image distribution of the target domain, and the adversarial loss for:
[0112]
[0113] Where: G A→B , G B→A Denotes two generators, D A , D B represents two discriminators, represents the expected value of the image distribution, a, b are the input images from the target domain A, B, P data (a), P data (b) represents the real image distribution of a and b;
[0114] S62: Calculate cycle consistency loss The cycle consistency loss provides a reverse consistency constraint to ensure that the generated image is consistent with the input image. for:
[0115]
[0116] S63: Computing cycle-aware identity consistency loss The steps include:
[0117] S631: Calculate the identity loss of the input image and the generated image
[0118]
[0119] S632: Extract the features of the input image and the generated image through the VGG19 network, and calculate the perceptual identity loss of the input image and the generated image
[0120]
[0121] Where: F represents the feature extractor of the VGG19 network;
[0122] S633: Loss of identity and perceived identity loss Perform weighted summation to calculate the cycle-aware identity consistency loss
[0123]
[0124] Where: λ1 and λ2 are identity losses and perceived identity loss The weighting coefficients are set as λ1=2.5 and λ2=0.5 in the experiment;
[0125] S64: Against loss Cycle consistency loss and cycle-aware identity consistency loss Perform weighted summation to calculate the total loss
[0126]
[0127] Where: adv , cyc and λ cpidt To combat losses Cycle consistency loss and cycle-aware identity consistency loss The weighting coefficient is set to λ in the experiment. adv =1,λ cyc =5,λ cpidt =1.
[0128] Step 7: Use the trained cyclic generative adversarial network as the optimal unpaired remote sensing image dehazing model;
[0129] Step 8: Input the remote sensing foggy image to be processed into the optimal unpaired remote sensing image defogging model to obtain the corresponding remote sensing fog-free image.
[0130] The present invention will be further described below in conjunction with the embodiments.
[0131] In this embodiment, the Sate 1K test set is selected for the experiment. Figure 7 As shown in the figure, it is a qualitative comparison diagram of the remote sensing image dehazing method of the present invention and five other remote sensing image dehazing methods, wherein: (a) represents three input images; (b) represents the image processed by DCP; (c) represents the image processed by AODNet; (d) represents the image processed by FFANet; (e) represents the image processed by CycleDehaze; (f) represents the image processed by DehazeFormer; (.g) represents the image processed by Uformer; (h) represents the image processed by the method of the present invention; (i) represents the clear image corresponding to the input image. It can be seen from the area in the comparison frame that the method of the present invention can retain more texture content, color balance and perceptual quality while removing haze from remote sensing images.
[0132] In order to conduct an effective objective quantitative evaluation of the proposed method in remote sensing image dehazing, SSIM, PSNR and LPIPS values are used to evaluate the image quality of remote sensing image dehazing. We quantitatively evaluate the performance of the proposed method based on the average PSNR, SSIM and LPIPS compared with previous remote sensing image dehazing methods, where the higher the PSNR and SSIM values, the better, and the lower the LPIPS, the better.
[0133] Experiments were conducted on the Sate 1K dataset, and SSIM, PSNR, and LPIPS values were used to evaluate the image quality of remote sensing images after dehazing. The results are shown in Tables 1 to 3.
[0134] Table 1 Quantitative comparison results of different methods on the Sate 1K dataset mist
[0135]
[0136] Table 2 Quantitative comparison results of different methods on medium fog in Sate 1K dataset
[0137]
[0138] Table 3 Quantitative comparison results of different methods on the Sate 1K dataset thick fog
[0139]
[0140] Tables 1 to 3 list the average SSIM, PSNR and LPIPS values of DCP, AODNet, FFANet, CycleDehaze, DehazeFormer, Uformer and the method of the present invention in various fog concentration tests on the Sate 1K dataset. It can be seen that compared with other methods, the image generated by the method of the present invention has higher SSIM, PSNR values and lower LPIPS values, which proves that the method of the present invention has better dehazing effect.
[0141] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A method for dehazing unpaired remote sensing images based on a hybrid cascade group attention Transformer, characterized by: A U-Net network structure generator with a hybrid cascade group attention Transformer module is constructed and pre-trained. The pre-trained U-Net network structure generator is used as a generator of a cyclic generative adversarial network. The mutual transformation between unpaired remote sensing foggy images and remote sensing fog-free images is realized through the cyclic generative adversarial network. The parameters of the cyclic generative adversarial network are adjusted using a loss function to obtain the optimal unpaired remote sensing image defogging model. The method comprises the following steps: Step 1: Obtain the training sets of the source domain and the target domain; Step 2: Construct a hybrid cascade group attention module, including the following execution steps: Step 21: For a feature map v of size C×H×W, it is evenly divided into two parts of size Sub-feature maps X1 and X2; where C represents the number of channels of X, and H and W represent the height and width of X; Step 22, obtain the corresponding feature map X1′ of X1 through the cascade group attention module. The size of X1′ is The steps include: Step 221, divide X1 equally according to the total number T of attention heads of the cascade group attention module, X1 = [X 11 , X 12 , …, X 1j , …, X 1T ]; Step 222. Use the jth attention head to calculate X 1j The self-attention value Where: Attn represents the self-attention function of the attention mechanism, based on the query, key and value in the attention mechanism, X 1j The layer is divided into three different subspaces, represented as and Step 223. Calculate the output of each attention head in a cascade manner, and add the output of the previous attention head to the next attention head to gradually improve the output, expressed as: Step 224, X 11 ′,X 12 ′,…,X 1j ′,…,X 1h ′ performs concatenation operation to obtain the corresponding feature map X1′ of X1; Step 23, obtain the corresponding feature map X2′ of X2 through the dehazing dynamic deep convolution module. The size of X2′ is The steps include: Step 231: Perform spatial context aggregation on X2 through adaptive average pooling operation, and compress the spatial dimension of X2 into K 2 , and then pass through 1×1 convolution, ReLU activation function, batch normalization layer, 1×1 convolution to get the attention map Among them, the value of dimension G is the number of attention groups; Step 232, reshape A into And use the normalization function softmax on dimension G to get the attention weight value Step 233: Compare A′ element by element with a set of learnable parameters Multiply and sum the multiplication results in dimension G to obtain a deep convolution kernel that depends on X2 Step 234, perform a deep convolution operation on X2 and W to obtain the corresponding feature map X2′ of X2; Step 24, concatenate X1′ and X2′ along the channel dimension to obtain the feature map X′, the size of X′ is C×H×W; Step 25, using a dehazing compression feature enhancer to efficiently aggregate features of X′; the dehazing compression feature enhancer includes a 3×3 depth convolution, a ReLU activation function, and a batch normalization layer for enhancing local relationships, channel compression and 1×1 expansion convolution for reducing computational costs, and a residual connector for reducing feature loss; Step 3, build a hybrid cascade group attention Transformer module with a hybrid cascade group attention module; Step 4. Construct a U-Net network structure generator with a hybrid cascade group attention Transformer module, and pre-train the U-Net network structure generator through a cyclic iteration method; Step 5. Use the pre-trained U-Net network structure generator as the generator of the cyclic generative adversarial network to construct a cyclic generative adversarial network. Step 6. Construct a loss function and use the loss function to adjust the parameters of the cyclic generative adversarial network. Step 7: Use the trained cyclic generative adversarial network as the optimal unpaired remote sensing image dehazing model; Step 8: Input the remote sensing foggy image to be processed into the optimal unpaired remote sensing image defogging model to obtain the corresponding remote sensing fog-free image.
2. The unpaired remote sensing image defogging method based on hybrid cascade group attention Transformer according to claim 1, characterized in that: In the Step 3, the hybrid cascade group attention Transformer module includes a hybrid cascade group attention module and a multi-scale feedforward network module, and a layer normalization module is set before the hybrid cascade group attention module and the multi-scale feedforward network module; the hybrid cascade group attention Transformer module includes the following execution steps: Step 31, after the feature map X passes through the layer normalization module and the hybrid cascade group attention module, the feature map X′ is obtained; Step 32, performing residual connection on the feature map X′ and the feature map X to obtain the feature map X0, and after passing through the layer normalization module and the multi-scale feedforward network module, performing residual connection on the output to obtain the feature map X″; the multi-scale feedforward network module includes the following execution steps: Step 321, perform 1×1 depth convolution on the feature map X0 to obtain the feature map X0′; Step 322, divide the feature map X0′ into four parts from the channel dimension, and extract features from the four parts through four parallel depth convolutions of different scales to capture feature information of four scales; the convolution kernel sizes of the four parallel depth convolutions are 1, 3, 5, and 7 respectively; S323, first concatenate the feature information of the four scales along the channel dimension, then obtain the feature map X0″ through 1×1 depth convolution, and perform residual connection on the feature map X0″ and the feature map X0 to obtain the feature map X″.
3. The unpaired remote sensing image defogging method based on hybrid cascade group attention Transformer according to claim 1, characterized in that: In the Step 4, a U-Net network structure generator with a hybrid cascade group attention Transformer module is constructed, including the following steps: Step 41. In the encoding path of U-Net, four layers of convolution and downsampling are performed on the input image to extract the feature map Y of the input image. Step 42, taking Y as the input of the stacked hybrid cascade group attention Transformer module, and recording the output of the stacked hybrid cascade group attention Transformer module as feature map Y′; Step 43, in the decoding path of U-Net, Y′ is upsampled and convolved in four layers; Step 44, adding the feature maps of the corresponding layers in the encoding path and the decoding path by means of skip connection to obtain the feature map Y″; Step 45. Convert Y″ into an output image through post-processing operations.
4. The unpaired remote sensing image defogging method based on hybrid cascade group attention Transformer according to claim 1, characterized in that: In the Step 5, a cyclic generative adversarial network is constructed, including the following steps: Step 51. Construct a generator of a cyclic generative adversarial network: Use two pre-trained U-Net network structure generators as generators of a cyclic generative adversarial network. One U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images, and the other U-Net network structure generator is responsible for generating remote sensing foggy images from remote sensing fog-free images. Step 52, construct the discriminator of the cyclic generative adversarial network: two Markov discriminators are used as the discriminators of the cyclic generative adversarial network, one is used to judge the similarity between the remote sensing fog-free image generated by the generator and the real remote sensing fog-free image, and the other is used to judge the similarity between the remote sensing foggy image generated by the generator and the real remote sensing foggy image; Step 53, construct a cyclic generative adversarial network: combine the generator and the discriminator to construct a cyclic generative adversarial network to achieve mutual conversion between unpaired remote sensing foggy images and remote sensing fog-free images.
5. The unpaired remote sensing image defogging method based on hybrid cascade group attention Transformer according to claim 1, characterized in that: In Step 6, the loss function is used to adjust the parameters of the generative adversarial network, including the following steps: Step 61. Calculate adversarial loss The generator and the discriminator are used to compete with each other to match the generated image distribution with the image distribution of the target domain, and the adversarial loss for: Where: G A→B , G B→A Denotes two generators, D A , D B represents two discriminators, represents the expected value of the image distribution, a, b are the input images from the target domain A, B, P data (a) P data (b) represents the real image distribution of a and b; S62: Calculate cycle consistency loss The cycle consistency loss provides a reverse consistency constraint to ensure that the generated image is consistent with the input image. for: S63: Computing cycle-aware identity consistency loss The steps include: S631: Calculate the identity loss of the input image and the generated image S632: Extract the features of the input image and the generated image through the VGG19 network, and calculate the perceptual identity loss of the input image and the generated image Where: F represents the feature extractor of the VGG19 network; S633: Loss of identity and perceived identity loss Perform weighted summation to calculate the cycle-aware identity consistency loss Where: λ1 and λ2 are identity losses and perceived identity loss The weighting coefficient of S64: Against loss Cycle consistency loss and cycle-aware identity consistency loss Perform weighted summation to calculate the total loss Where: adv , cyc and λ cpidt To combat losses Cycle consistency loss and cycle-aware identity consistency loss The weighting coefficient of .
Citation Information
Cited By
Multi-level network identity verification and access control system
CN119337353A
Multi-temporal remote sensing image cloud removal method based on global perception selective fusion
CN119887589A
