Remote sensing image defogging sharpening method and system based on improved diffusion model
By introducing fog generator and NAF fusion module into the diffusion model, the remote sensing image defog model is improved, solving the shortcomings of the existing models in data generalization and noise estimation, and achieving higher quality and stable defog effect.
Patent Information
- Application Number
- CN202510288164.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
AI Technical Summary
In the process of defogging with remote sensing images, existing diffusion models have problems such as weak data generalization ability, inaccurate noise estimation and high computational cost, which leads to unstable defogging quality and inability to effectively deal with complex fogging scenes.
Using an improved diffusion model, the diversity of the data set and the accuracy of noise estimation are improved by introducing a fog generator and NAF fusion module, reducing the amount of calculation and improving the efficiency of defog de-inference.
The quality and stability of remote sensing images are improved, the generalization ability and defog efficiency of the model are enhanced, and complex fog scenes can be handled more effectively.
Smart Images

Figure CN120219197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image restoration, and particularly to a method and system for defogging and clarifying remote sensing images based on an improved diffusion model. Background Art
[0002] Remote sensing technology is widely used in fields such as geological exploration, environmental monitoring, agricultural assessment, urban planning, military reconnaissance, etc. It can help managers conduct regional research and macro monitoring more effectively. However, when collecting and recording information on the Earth's surface or atmosphere through remote sensing technology, it is often affected by foggy weather, resulting in the interference of fog on remote sensing images, thus severely degrading the quality of the collected remote sensing images, with problems such as blurred details, low recognition rate, and color distortion. Therefore, defogging of remote sensing images has become a key technology to improve the quality and application value of remote sensing images and is a research hotspot in the field of image restoration technology.
[0003] Defogging of remote sensing images is to process the foggy image to restore it to a clean fog-free image, improve the quality of the image, and enable the image to more clearly reflect the actual situation of the ground surface, thereby reducing misjudgments caused by image quality problems. Currently, the methods for defogging remote sensing images mainly include methods based on image enhancement, image restoration, and deep learning. The methods based on image enhancement tend to focus on subjective visual effects and ignore the restoration of image details. For the methods based on image restoration, the atmospheric scattering model derives the restored clean image through physical imaging formulas. These methods often assume processing under uniform fog conditions, but when the fog is non-uniform, there will be problems such as fog residue and color distortion in the defogged image.
[0004] The defogging methods based on deep learning learn the direct mapping from foggy images to fog-free images. These methods can usually handle complex fog situations and have also achieved certain results. However, for the deep learning defogging methods based on generative adversarial networks and convolutional neural networks, the images are generated in one iteration during the training of defogging, which may lead to unstable training defogging results. The deep learning method based on the diffusion model adopts a progressive denoising technique, decomposes the process of generating a pure noise image from forward diffusion into multiple smaller steps, and then gradually denoises and restores the clear image through reverse diffusion learning. This progressive generation method helps to ensure the stability of the entire process and shows potential in image restoration tasks. However, the diffusion model often has drawbacks such as weak data generalization ability, inaccurate noise estimation, high computational cost, and slow inference speed, resulting in problems such as unstable defogging quality and inability to be applied to complex fog scenarios, loss of local details in defogged images, and low defogging efficiency and inability to be practically applied. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and system for defogging and clarifying remote sensing images based on an improved diffusion model in view of the deficiencies of the above-mentioned existing technologies, establish a remote sensing image defogging model based on the improved diffusion model, solve the problems of weak generalization ability and inaccurate noise estimation in the diffusion model, which make it impossible to stably and clearly restore images, improve the defogging quality of remote sensing images, reduce the computational complexity of the remote sensing image defogging model based on the improved diffusion model, and improve the defogging inference efficiency of the remote sensing image defogging model based on the diffusion model; the remote sensing image defogging and clarifying system based on the improved diffusion model intuitively demonstrates the effectiveness of the remote sensing image defogging model based on the improved diffusion model, and provides a convenient and real-time solution to deal with the problem of remote sensing image defogging.
[0006] To solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0007] On the one hand, the present invention provides a method for defogging and clarifying remote sensing images based on an improved diffusion model, including the following steps:
[0008] Step 1: Establish a remote sensing fog image dataset composed of a number of remote sensing fog image pairs, each remote sensing fog image pair includes a foggy image and its corresponding fog-free image, and divide the remote sensing fog image dataset into a training set and a test set;
[0009] Step 2: Establish a remote sensing image defogging model based on the improved diffusion model, including a fog generator and a noise estimation network. The fog generator is used to enhance the fog-free image in the remote sensing fog image pair, and the noise estimation network is used to predict the noise distribution of the noise image after adding Gaussian noise to the fog-free image, and infer the remote sensing defogged image of the foggy image;
[0010] Step 2.1: The fog generator includes a fog generation mode based on imaging parameters and a fog generation mode based on frequency domain analysis. The fog generation mode based on imaging parameters is used to generate enhanced foggy images with different fog depths, and the fog generation mode based on frequency domain analysis is used to generate enhanced foggy images with different fog distribution patterns. The generation mode used by the fog generator is determined by a random function;
[0011] The specific method for generating enhanced foggy images with different fog depths by the fog generation mode based on imaging parameters is as follows:
[0012] Obtain the imaging parameters of the fog-free image including: the depth δ of the fog-free image i , a randomly generated light scattering parameter β and a global atmospheric light parameter A, as shown in the following formula:
[0013]
[0014] where, U(A min, A max ) is a random number generated between the minimum value A min and the maximum value A max ; U(β min , β max ) is a random number generated between the minimum value β min and the maximum value β max ; is the depth of the current haze-free image obtained using the depth estimation function D(·) ;
[0015] According to the atmospheric haze imaging formula, the enhanced hazy image corresponding to the haze-free image is as follows: As shown in the following formula:
[0016]
[0017] The specific method for generating enhanced hazy images with different fog distribution patterns based on the fog generation mode of frequency domain analysis is as follows:
[0018] Randomly select the k-th hazy image from the training set Convert the hazy image to the frequency domain through Fourier transform, and design a binary mask matrix Q that is non-zero only in the central rectangular region of the frequency domain , as shown in the following formula: m As follows:
[0019] Q m = Mask(λ H , λ W ) (3)
[0020] where Mask(·) is the binary mask generation operation, and the thresholds λ H , λ W are the region ranges of the rectangular region in the horizontal and vertical directions respectively;
[0021] Multiply the binary mask matrix Q m point by point with the hazy image in the frequency domain, extract the low-frequency fog signal of the hazy image , retain the original position information of the haze-free image , and fuse it with the extracted low-frequency fog signal of the hazy image in the frequency domain to obtain the enhanced hazy image corresponding to the haze-free image as follows: As shown in the following formula:
[0022]
[0023] where ⊙ is the point-by-point multiplication operation, and F and F -1They are the Fourier transform and the inverse Fourier transform respectively;
[0024] Step 2.2: The noise estimation network is constructed by introducing the NAF fusion module on the skip connections of the sampling layers with the same dimension in the U-Net network. It includes three encoders, three decoders, three NAF fusion modules and an intermediate connection layer. Both the encoder and the decoder are composed of ResNet residual blocks. The encoder is used to perform the downsampling operation, and the decoder is used to perform the upsampling operation;
[0025] The input image of the noise estimation network is successively downsampled by three encoders, and the output of the first encoder is used as the input of the first input branch of the first NAF fusion module, and the output of the second encoder is used as the input of the second input branch of the first NAF fusion module; the output of the second encoder is used as the input of the first input branch of the second NAF fusion module, and the output of the third encoder is used as the input of the second input branch of the second NAF fusion module; a skip connection is set to input the output of the third encoder and the output of the third encoder after passing through the intermediate connection layer into the first decoder for upsampling operation; the output of the first NAF fusion module is input to the first input branch of the third NAF fusion module, and the output of the second NAF fusion module is input to the second input branch of the third NAF fusion module; the output of the second NAF fusion module and the output of the first decoder are input to the second decoder; the output of the third NAF fusion module and the output of the second decoder are input to the third decoder to obtain the output image of the noise estimation network;
[0026] The NAF fusion module includes a first input branch and a second input branch, which respectively receive feature maps of different sizes output by two adjacent encoders or NAF fusion modules. Among them, the first input branch receives the large-size feature map, and the second input branch receives the small-size feature map, and adjusts the size of the small-size feature map through the upsampling operation to make it match the size of the feature map received by the first input branch. The feature maps of the two input branches after upsampling are concatenated through the element-wise addition operator to obtain the concatenated feature map X, as shown in the following formula:
[0027] X = E1 ⊕ UP(E2) (5)
[0028] Among them, E1 is the first input branch of the NAF fusion module, E2 is the second input branch of the NAF fusion module, UP(·) is the upsampling operation, and ⊕ is the element-wise addition operator;
[0029] The spliced feature map X is successively processed by layer normalization, the first convolution, depthwise separable convolution, gated unit, channel attention, and the second convolution to obtain the feature map X'. A skip connection is set to splice the feature map X and the processed feature map X' to obtain the feature map X1, as shown in the following formula:
[0030] X1 = X + X' = X + Conv1×1(Sca(Sg(DwConv3×3(Conv1×1(LN(X)))))) (6)
[0031] Among them, Conv 1×1 is a 1×1 convolution, which is used to increase the non-linearity of the NAF fusion module and help the noise estimation network learn more complex features; DwConv 3×3 is a 3×3 depthwise separable convolution, which is used to learn global feature information; LN is layer normalization, which is used to ensure the stability of training; Sg is a gated unit, and Sca is channel attention;
[0032] The feature map X1 is successively processed by the third convolution, gated unit, and fourth convolution to obtain the feature map X'1. A residual connection is set to splice the feature map X1 and the processed feature map X1' to obtain the output Y of the NAF fusion module, as shown in the following formula:
[0033] Y = X1 + X'1 = X1 + Conv 1×1 (Sg(Conv 1×1 (LN(X1)))) (7)
[0034] Step 3: Obtain the remote sensing fog image pairs in the training set, and use a fog generator to enhance the fog-free images in the remote sensing fog image pairs to obtain the enhanced foggy images corresponding to the fog-free images, and generate enhanced remote sensing fog image pairs composed of the fog-free images and their corresponding enhanced foggy images;
[0035] Obtain the remote sensing fog image pairs in the training set Among them, is the i-th fog-free image in the training set, is the i-th fog-free image in the training set corresponding foggy image. Use a fog generator to process the fog-free image in the remote sensing fog image pair for enhancement to obtain the enhanced foggy image corresponding to the fog-free image Generate enhanced remote sensing fog image pairs composed of the fog-free image and its corresponding enhanced foggy image
[0036] Step 4: Set the total length T of the forward diffusion time step sequence of the remote sensing image defogging model based on the improved diffusion model, and randomly create Gaussian noise with the same tensor size as the fog-free image at time step t. Using the probability principle of the diffusion model, obtain the noisy image after adding Gaussian noise to the fog-free image at time step t;
[0037] Obtain fog-free images from the training set Randomly select a time step t ∈ [1, T] using a random number function and randomly sample a Gaussian noise ε t ~N(0, I) and add it to the fog-free image where N is the Gaussian distribution and I is the identity matrix, to obtain the noisy image after adding Gaussian noise to the fog-free image at time step t as shown in the following formula: as follows:
[0038]
[0039] where is the adjustment parameter for the scale of Gaussian noise change, used to adjust the amount of noise added at time step t;
[0040] Step 5: Input the enhanced foggy image corresponding to the fog-free image, the noisy image after adding Gaussian noise to the fog-free image at time step t, and time step t into the noise estimation network. Use the noise estimation network to predict the noise distribution of the noisy image after adding Gaussian noise to the fog-free image at time step t;
[0041] Input the fog-free image corresponding enhanced foggy image the noisy image after adding Gaussian noise to the fog-free image at time step t and time step t into the noise estimation network to obtain the predicted noise distribution of the noisy image after adding Gaussian noise to the fog-free image at time step t as the noisy image after adding Gaussian noise to the fog-free image at time step t of
[0042] Step 6: Set the target loss function and training parameters, use the training set to train the noise estimation network, save the parameter weight file of the trained noise estimation network model, use the test set to test the trained noise estimation network, gradually infer the remote sensing defogging images of the test set through the diffusion model, save the parameter weight file of the noise estimation network model with the best test result performance, and obtain the trained remote sensing image defogging model based on the diffusion model;
[0043] Set the target loss function Use the Adam optimizer and the target loss function Optimize and adjust the parameter weights in the network through backpropagation, and the target loss function is as shown in the following formula:
[0044]
[0045] where E is the expectation, is the noise estimation network according to the fog-free image corresponding enhanced foggy image at time step t for the fog-free image noise image after adding Gaussian noise and the noise distribution predicted at time step t;
[0046] Randomly select a remote sensing fog image from the test set, and randomly sample a noise image of the same size as the remote sensing fog image. Stitch the noise image and the remote sensing fog image together, and input them into the trained noise estimation network together with time step t. Under the guidance of the remote sensing fog image, iteratively process the randomly sampled noise image to gradually estimate the noise distribution of the noise image at each time step t, as shown in the following formula:
[0047]
[0048] where, is the noise image at time step t - 1, is the input noise image, is the remote sensing fog image randomly selected from the test set, is the noise distribution predicted by the noise estimation network;
[0049] Through step-by-step reasoning, obtain the defogged image corresponding to the remote sensing fog image randomly selected from the test set
[0050] Step 7: Use the trained remote sensing image defogging model based on the diffusion model to defog the remote sensing fog image. Input the remote sensing fog image to be defogged into the remote sensing image defogging model based on the diffusion model to obtain the clear remote sensing image after defogging;
[0051] On the other hand, the present invention provides a remote sensing image defogging and clarity system based on an improved diffusion model, including: an image reading module, an image preprocessing module, an image defogging inference module, and an image result display module; the image reading module is used to acquire and store the remote sensing image to be defogged, select the remote sensing image to be defogged and transmit it to the image preprocessing module; the image preprocessing module is used to receive the remote sensing fog image selected by the image reading module and perform preprocessing on it; the image defogging inference module is used to receive the preprocessed image and generate the defogged remote sensing image; the image result display module is used to display the remote sensing image to be defogged and the defogged remote sensing image;
[0052] The image reading module includes an image acquisition sub-module, a system photo album sub-module, and an image selector; the image acquisition sub-module is used to acquire remote sensing images to be dehazed, including pre-synthesized remote sensing fog images and remote sensing fog images captured in real time using the mobile device camera; the system photo album sub-module is used to store remote sensing images to be dehazed; the image selector is used to select remote sensing images to be dehazed from the system photo album sub-module and transmit them to the image preprocessing module;
[0053] The image preprocessing module includes an image size adjustment sub-module and a pixel normalization sub-module; the image size adjustment sub-module adjusts the size of the remote sensing image to be dehazed to match the expected size of the input layer of the dehazing model, ensuring that all input images have a consistent size before entering the dehazing model; the pixel normalization sub-module adjusts the pixel value range of the resized image, normalizes the pixel values to the range of 0 to 1, makes the pixel value distribution of the pixel-normalized image more balanced, and inputs the pixel-normalized image into the image dehazing inference module;
[0054] The image dehazing inference module includes a weight file conversion sub-module and a dehazing sub-module; the weight file conversion sub-module performs model conversion processing on the trained model parameter weight file through pruning and eliminating redundant parameter optimization techniques to enhance the running efficiency and adaptability of the dehazing model deployed on the mobile device; uses the GPU acceleration technology of the mobile device to accelerate the inference process and shorten the inference time, making the remote sensing image dehazing task run more smoothly and efficiently on the mobile device; the dehazing sub-module uses the converted dehazing model to perform dehazing inference on the preprocessed image obtained by the image preprocessing module, obtains the inferred image and transmits it to the image result display module;
[0055] The image result display module includes a pixel value inverse normalization sub-module and a remote sensing image dehazing display sub-module; the pixel value inverse normalization sub-module uses the inverse normalization method to restore the pixel values of the inferred remote sensing image to the original pixel value range, ensuring that the image can accurately reflect the actual visual effect; the remote sensing image dehazing display sub-module creates a visual user interface for the dehazing effect of the remote sensing image, displays the dehazed image in a visual form to the user, and enables the user to intuitively compare the image differences before and after dehazing;
[0056] The beneficial effects of adopting the above technical solutions are as follows: A remote sensing image dehazing and clarity improvement method and system based on an improved diffusion model provided by the present invention has the following beneficial effects compared with the prior art:
[0057] On the one hand, a method for defogging and clarifying remote sensing images based on an improved diffusion model provided by the present invention selects the diffusion model as the basic method for defogging remote sensing images. By utilizing the stability and theoretical interpretability of its diffusion process, it ensures stable output results during the defogging process and better understanding of the mechanism of the defogging process, thereby providing a theoretical basis for the optimization and improvement of the model;
[0058] Regarding the unpredictable fog concentration and distribution in the real world, the present invention considers the influence of these factors on the prediction performance of the defogging model. To prevent the defogging model from overfitting or underfitting when the fog concentration and distribution change, a fog generator is introduced into the image preprocessing process of the diffusion model. The fog generator generates foggy samples with various different concentrations and different distribution positions, thereby enhancing the diversity and richness of the dataset to improve the generalization of remote sensing image defogging;
[0059] Aiming at the problem that when the existing noise estimation network processes image information through a simple structure composed of an encoder, skip connections, and a decoder, it is very likely to cause the loss of key feature information during the information transmission process, resulting in incomplete image details. The present invention uses a NAF fusion module to improve the noise estimation network, layer-by-layer fusing the feature maps from different stages of the encoder to ensure that the key details from input to output are retained, greatly improving the coherence and consistency of information processing, thereby obtaining a remote sensing defogged image with high fidelity and high detail performance ability;
[0060] On the other hand, a system for defogging and clarifying remote sensing images based on an improved diffusion model provided by the present invention can perform real-time defogging processing and display of the defogging effect of remote sensing fog images on a mobile device. It greatly reduces the computational complexity of diffusion model inference and improves the response speed of the system, providing a more convenient, practical, and efficient artificial intelligence defogging experience for users. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flowchart of a method for defogging and clarifying remote sensing images based on an improved diffusion model provided by an embodiment of the present invention;
[0062] Figure 2 It is a structural diagram of a remote sensing image defogging model based on an improved diffusion model provided by an embodiment of the present invention;
[0063] Figure 3 It is a structural diagram of a NAF fusion module provided by an embodiment of the present invention;
[0064] Figure 4 It is a structural diagram of a system for defogging and clarifying remote sensing images based on an improved diffusion model provided by an embodiment of the present invention;
[0065] Figure 5Flowchart of the parameter weight file conversion process provided by the embodiment of the present invention;
[0066] Figure 6 Visualization user interface diagram of the haze removal effect of remote sensing images provided by the embodiment of the present invention. Detailed implementation manners
[0067] The following combines the accompanying drawings and embodiments to further describe in detail the specific implementation manners of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.
[0068] A method for haze removal and clarity improvement of remote sensing images based on an improved diffusion model in this embodiment, as Figure 1 shown, includes the following steps:
[0069] Step 1: Establish a remote sensing fog image dataset composed of a number of remote sensing fog image pairs. Each remote sensing fog image pair includes a foggy image and its corresponding fog-free image, and divide the remote sensing fog image dataset into a training set and a test set;
[0070] Based on the public remote sensing image dataset AID, this embodiment constructs a synthetic remote sensing fog image dataset, generating a total of 10,102 remote sensing fog image pairs. Randomly select 500 pairs of uniform or non-uniform remote sensing fog images as the test set, and the remaining remote sensing fog images as the training set. Collect 80 real foggy remote sensing images for actual testing;
[0071] Step 2: Establish a remote sensing image haze removal model based on an improved diffusion model, including a fog generator and a noise estimation network. The fog generator is used to enhance the fog-free image in the remote sensing fog image pair, and the noise estimation network is used to predict the noise distribution of the noise image after adding Gaussian noise to the fog-free image, and infer the remote sensing haze removal image of the foggy image;
[0072] Remote sensing image haze removal is a challenging task. Due to the existence of fog, it often causes problems such as low image contrast and poor visibility. Due to the excellent image generation performance shown by the diffusion model, its application in the field of remote sensing image haze removal is becoming more and more common. However, the traditional diffusion model still has problems such as weak data generalization ability, inaccurate noise estimation, high computational cost, and slow inference speed. To address this problem, this embodiment improves the image preprocessing stage and the noise estimation network structure of the diffusion model, and establishes a remote sensing image haze removal model based on an improved diffusion model, including a fog generator and a noise estimation network, as Figure 2 shown, for improving the haze removal effect of remote sensing images.
[0073] Specifically, to further improve the defogging ability of the diffusion model in complex fog scenarios, in this embodiment, a fog generator is used as a data augmentation method in the image preprocessing stage. It performs fog transformation on the fog-free image input to the fog generator to generate foggy images with more diverse fog scenes and more complex fogging degrees, enabling the remote sensing image defogging model based on the improved diffusion model to learn more fog variation performances during training, thereby enhancing its generalization in practical applications. Secondly, since the diffusion model relies on constrained noise for training, inaccurate noise estimation often affects the quality of image restoration. Therefore, in this embodiment, a NAF fusion module is introduced into the noise estimation network of the diffusion model to improve the noise estimation network. The NAF fusion module adopts a special network structure of layer-by-layer fusion, which can effectively prevent the loss of detailed feature information during processing to enhance the accuracy of the network's noise prediction.
[0074] Step 2.1: The fog generator includes a fog generation mode based on imaging parameters and a fog generation mode based on frequency domain analysis. The fog generation mode based on imaging parameters is used to generate enhanced foggy images with different fog depths, and the fog generation mode based on frequency domain analysis is used to generate enhanced foggy images with different fog distribution patterns. The generation mode used by the fog generator is determined by a random function.
[0075] Since most of the current synthetic dataset's foggy images are formed by mixing the original fog-free image with the light scattering parameter β and the global atmospheric light parameter A adjusted by the atmospheric scattering model (ASM) in a certain proportion. However, in actual processing of foggy images, the fog distribution pattern and fog depth in the image are usually ill-posed, resulting in the diffusion model trained through the synthetic dataset having a memory of the fog pattern and being unable to handle real foggy images well.
[0076] The specific method for the fog generation mode based on imaging parameters to generate enhanced foggy images with different fog depths is as follows:
[0077] Obtain the imaging parameters of the fog-free image , including: the depth δ of the fog-free image i , the randomly generated light scattering parameter β and the global atmospheric light parameter A, as shown in the following formula:
[0078]
[0079] where, U(A min , A max ) is a random number generated between the minimum value A min and the maximum value A max , and U(β min , β max ) is a random number generated between the minimum value β minand the maximum value β max The random number generated between is the depth of the current haze-free image obtained by using the depth estimation function D(·) ;
[0080] According to the atmospheric fog imaging formula, the haze-free image corresponding enhanced hazy image is as shown in the following formula:
[0081]
[0082] The specific method for generating enhanced hazy images with different fog distribution patterns based on the fog generation mode of frequency domain analysis is as follows:
[0083] Since the low-frequency components of the image are usually concentrated in the center of the frequency domain and the fog signal is mainly composed of these low-frequency components, therefore, the k-th hazy image is randomly selected from the training set The hazy image is transformed to the frequency domain through Fourier transform A binary mask matrix Q that is non-zero only in the central rectangular region of the frequency domain is designed m , as shown in the following formula:
[0084] Q m = Mask(λ H , λ W ) (3)
[0085] where Mask(·) is the binary mask generation operation, and the thresholds λ H , λ W are the region ranges of the rectangular region in the horizontal and vertical directions respectively;
[0086] The binary mask matrix Q m is multiplied point by point with the hazy image in the frequency domain to extract the low-frequency fog signal of the hazy image , retain the original position information of the haze-free image , and fuse it with the extracted low-frequency fog signal of the hazy image in the frequency domain to obtain the enhanced hazy image corresponding to the haze-free image as shown in the following formula: as shown in the following formula:
[0087]
[0088] where ⊙ is the point-by-point multiplication operation, and F and F -1 are the Fourier transform and the inverse Fourier transform respectively;
[0089] In this embodiment, a fog generator is used for the haze-free images in the training set Perform further enhancement processing to obtain a foggy image with corresponding rich fog depth levels and fog distribution patterns, and drive the remote sensing image defogging model based on the improved diffusion model to learn the invariance of the changing fogging process, so that the remote sensing image defogging model based on the improved diffusion model can be flexibly adapted to real fog images.
[0090] Step 2.2: The noise estimation network is constructed by introducing a NAF fusion module on the skip connection of the same-dimensional sampling layer of the U-Net network. It includes three encoders, three decoders, three NAF fusion modules, and an intermediate connection layer. Both the encoder and the decoder are composed of ResNet residual blocks. The encoder is used to perform downsampling operations, and the decoder is used to perform upsampling operations.
[0091] The input image of the noise estimation network undergoes downsampling operations through the first encoder, the second encoder, and the third encoder in sequence. The output of the first encoder is used as the input of the first input branch of the first NAF fusion module, and the output of the second encoder is used as the input of the second input branch of the first NAF fusion module. The output of the second encoder is used as the input of the first input branch of the second NAF fusion module, and the output of the third encoder is used as the input of the second input branch of the second NAF fusion module. A skip connection is set to input the output of the third encoder and the output of the third encoder after passing through the intermediate connection layer into the first decoder for upsampling operations. The output of the first NAF fusion module is input to the first input branch of the third NAF fusion module, and the output of the second NAF fusion module is input to the second input branch of the third NAF fusion module. The output of the second NAF fusion module and the output of the first decoder are input to the second decoder. The output of the third NAF fusion module and the output of the second decoder are input to the third decoder to obtain the output image of the noise estimation network.
[0092] The NAF fusion module is as Figure 3 shown, including a first input branch and a second input branch, which respectively receive feature maps of different sizes output by two adjacent encoders or NAF fusion modules. Among them, the first input branch receives the large-size feature map, the second input branch receives the small-size feature map, and the size of the small-size feature map is adjusted through an upsampling operation to match the size of the feature map received by the first input branch. The feature maps of the two input branches after upsampling are concatenated through an element-wise addition operator to obtain the concatenated feature map X, as shown in the following formula:
[0093] X = E1 ⊕ UP(E2) (5)
[0094] where E1 is the first input branch of the NAF fusion module, E2 is the second input branch of the NAF fusion module, UP(·) is the upsampling operation, and ⊕ is the element-wise addition operator.
[0095] The spliced feature map X is successively processed by layer normalization, the first convolution, depthwise separable convolution, a gated unit, channel attention, and the second convolution to obtain the feature map X'. A skip connection is set to splice the feature map X and the processed feature map X' to obtain the feature map X1, as shown in the following formula:
[0096] X1 = X + X' = X + Conv 1×1 (Sca(Sg(DwConv 3×3 (Conv 1×1 (LN(X)))))) (6)
[0097] Among them, Conv 1×1 is a 1×1 convolution, which is used to increase the non-linearity of the NAF fusion module and help the noise estimation network learn more complex features; DwConv 3×3 is a 3×3 depthwise separable convolution, which is used to learn global feature information; LN is layer normalization, which is used to ensure the stability of training; Sg is a gated unit, and Sca is channel attention;
[0098] The feature map X1 is successively processed by the third convolution, a gated unit, and the fourth convolution to obtain the feature map X'1. A residual connection is set to splice the feature map X1 and the processed feature map X1' to obtain the output Y of the NAF fusion module, as shown in the following formula:
[0099] Y = X1 + X'1 = X1 + Conv 1×1 (Sg(Conv 1×1 (LN(X1)))) (7)
[0100] Step 3: Obtain the remote sensing fog image pairs in the training set, use a fog generator to enhance the fog-free images in the remote sensing fog image pairs to obtain the enhanced foggy images corresponding to the fog-free images, and generate enhanced remote sensing fog image pairs composed of the fog-free images and their corresponding enhanced foggy images;
[0101] Obtain the remote sensing fog image pairs in the training set Among them, is the i-th fog-free image in the training set, is the i-th fog-free image in the training set corresponding foggy image, use a fog generator to process the fog-free image in the remote sensing fog image pair for enhancement processing to obtain the enhanced foggy image corresponding to the fog-free image Generate enhanced remote sensing fog image pairs composed of the fog-free image and its corresponding enhanced foggy image
[0102] Step 4: Set the total length T of the forward diffusion time step sequence of the remote sensing image defogging model based on the improved diffusion model, and randomly create Gaussian noise with the same tensor size as the fog-free image at time step t. Using the probability principle of the diffusion model, obtain the noisy image after adding Gaussian noise to the fog-free image at time step t;
[0103] Obtain the fog-free image from the training set Use the random number function to randomly select a time step t ∈ [1, T], and randomly sample a Gaussian noise ε t ~N(0, I) and add it to the fog-free image where N is the Gaussian distribution and I is the identity matrix, to obtain the noisy image after adding Gaussian noise to the fog-free image at time step t as shown in the following formula: as follows:
[0104]
[0105] where is the Gaussian noise variation scale adjustment parameter, used to adjust the amount of noise added at time step t;
[0106] In this embodiment, set the total length T of the forward diffusion time step sequence of the remote sensing image defogging model based on the improved diffusion model to T = 1000;
[0107] Step 5: Input the enhanced foggy image corresponding to the fog-free image, the noisy image after adding Gaussian noise to the fog-free image at time step t, and time step t into the noise estimation network, and use the noise estimation network to predict the noise distribution of the noisy image after adding Gaussian noise to the fog-free image at time step t;
[0108] Input the fog-free image corresponding enhanced foggy image the noisy image after adding Gaussian noise to the fog-free image at time step t and time step t into the noise estimation network, to obtain the predicted noise distribution of the noisy image after adding Gaussian noise to the fog-free image at time step t at time step t after adding Gaussian noise to the fog-free image Based on the noise estimation network, the upper-layer information is cascaded to the adjacent lower layer in turn and propagated downward to the lowest layer, realizing the processing of fusing all information to the resolution level of the original image, significantly improving the feature information extraction ability, and ensuring high-accuracy and high-fidelity noise distribution prediction;
[0109] Step 6: Set the target loss function and training parameters, train the noise estimation network using the training set, save the parameter weight file of the trained noise estimation network model, test the trained noise estimation network using the test set, gradually infer the remote sensing defogged images of the test set through the diffusion model, save the parameter weight file of the noise estimation network model with the best test result performance, and obtain the trained remote sensing image defogging model based on the diffusion model;
[0110] Set the target loss function Use the Adam optimizer and the target loss function Optimize and adjust the parameter weights in the network through backpropagation, with the target loss function As shown in the following formula:
[0111]
[0112] where E is the expectation, is the noise image estimated by the noise estimation network according to the fog-free image corresponding enhanced foggy image at time step t for the fog-free image after adding Gaussian noise, and the predicted noise distribution at time step t; and the predicted noise distribution at time step t;
[0113] Randomly select a remote sensing fog image from the test set, and randomly sample a noise image of the same size as the remote sensing fog image. Stitch the noise image and the remote sensing fog image together, and input them into the trained noise estimation network together with time step t. Under the guidance of the remote sensing fog image, iteratively process the randomly sampled noise image to gradually estimate the noise distribution of the noise image at each time step t, as shown in the following formula:
[0114]
[0115] where, is the noise image at time step t - 1, is the input noise image, is the remote sensing fog image randomly selected from the test set, is the noise distribution predicted by the noise estimation network;
[0116] Through gradual inference, obtain the defogged image corresponding to the remote sensing fog image randomly selected from the test set
[0117] In this embodiment, an iteration variable iteration is set to record the current training iteration number of the noise estimation network. The total number of iterations is set to 2,000,000 times. A set of remote sensing fog image pairs is randomly selected from the training set to perform iterative training on the noise estimation network. After each training, the iteration variable iteration = iteration + 1 is set, and it is determined whether the preset number of iterations is reached or whether the loss function converges and is less than the preset loss value. If any of the above conditions is satisfied, the training is completed; if neither of the above conditions is satisfied, the next training is continued, another set of remote sensing fog image pairs is randomly selected, and steps 2 to 5 are repeated until the training is completed. The trained noise estimation network model is saved as a parameter weight file in the haze_model.pt format;
[0118] Step 7: Use the trained remote sensing image defogging model based on the diffusion model to perform defogging processing on the remote sensing fog image. Input the remote sensing fog image to be defogged into the remote sensing image defogging model based on the diffusion model to obtain a clear remote sensing image after defogging;
[0119] An improved diffusion model-based remote sensing image defogging and clarification system according to this embodiment, as Figure 4 shown, includes: an image reading module, an image preprocessing module, an image defogging inference module, and an image result display module; the image reading module is used to obtain and store the remote sensing image to be defogged, select the remote sensing image to be defogged and transmit it to the image preprocessing module; the image preprocessing module is used to receive the remote sensing fog image selected by the image reading module and perform preprocessing on it; the image defogging inference module is used to receive the preprocessed image and generate a defogged remote sensing image; the image result display module is used to display the remote sensing image to be defogged and the defogged remote sensing image;
[0120] The image reading module includes an image acquisition sub-module, a system album sub-module, and an image selector; the image acquisition sub-module is used to acquire the remote sensing image to be defogged, including pre-synthesized remote sensing fog images and remote sensing fog images captured in real time using the camera of a mobile device; the system album sub-module is used to store the remote sensing image to be defogged; the image selector is used to select the remote sensing image to be defogged from the system album sub-module and transmit it to the image preprocessing module;
[0121] The image preprocessing module includes an image size adjustment sub-module and a pixel normalization sub-module; the image size adjustment sub-module adjusts the size of the remote sensing image to be dehazed to match the expected size of the input layer of the dehazing model, ensuring that all input images have a consistent size before entering the dehazing model; the pixel normalization sub-module adjusts the pixel value range of the resized image, normalizes the pixel values to the range of 0 to 1, makes the pixel value distribution of the pixel-normalized image more balanced, and inputs the pixel-normalized image into the image dehazing inference module;
[0122] The image dehazing inference module includes a weight file conversion sub-module and a dehazing sub-module; the weight file conversion sub-module performs model conversion processing on the trained model parameter weight file through pruning and eliminating redundant parameters optimization techniques to enhance the running efficiency and fitness of the dehazing model deployed on mobile devices; uses the GPU acceleration technology of mobile devices to accelerate the inference process and shorten the inference time, making the remote sensing image dehazing task run more smoothly and efficiently on mobile devices; the dehazing sub-module uses the converted dehazing model to perform dehazing inference on the preprocessed image obtained by the image preprocessing module, obtains the inferred image and transmits it to the image result display module;
[0123] The image result display module includes a pixel value denormalization sub-module and a remote sensing image dehazing display sub-module; the pixel value denormalization sub-module uses the denormalization method to restore the pixel values of the inferred remote sensing image to the original pixel value range, ensuring that the image can accurately reflect the actual visual effect; the remote sensing image dehazing display sub-module creates a visualization user interface for the remote sensing image dehazing effect, displays the dehazed image in a visual form to the user, enabling the user to intuitively compare the image differences before and after dehazing;
[0124] In this embodiment, to verify the effectiveness of the remote sensing image dehazing and clarification method based on the improved diffusion model, evaluations were carried out on the non-uniform test dataset and real remote sensing fog image test data in step 1. After obtaining the restored remote sensing dehazed image in step 5, the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) were calculated with it and the clean remote sensing fog-free image in the non-uniform test dataset as inputs to evaluate the results. For the real remote sensing fog image test data without reference, the dehazed results were evaluated according to the no-reference image quality assessment index (NIQE). In addition, this embodiment compared the performance of the method of the present invention with existing deep learning-based remote sensing image dehazing methods such as DCP, AOD-Net, GPD-Net, 4k-Dehazing, CycleGAN, and Weatherdiff. The experimental results are shown in Table 1.
[0125] Table 1 Comparison results of objective evaluations of different remote sensing dehazing methods on different test data
[0126]
[0127]
[0128] As can be seen from Table 1, the remote sensing image dehazing and clearing method based on the improved diffusion model provided in this embodiment achieves higher values in terms of PSNR and SSIM, and obtains a lower value in NIQE, which proves the effectiveness and practicality of the method of the present invention.
[0129] In this embodiment, the model parameter weight file conversion processing process of the weight file conversion submodule in the remote sensing image defogging and clarity system based on the improved diffusion model is as follows: Figure 5 As shown in the figure, the deep learning model conversion tool PNNX (PyTorch Neural Network Exchange) is used to lightweight the trained remote sensing image dehazing model file based on the diffusion model, so that it can be applied to the Android platform for deployment model reasoning. PNNX provides a convenient and open deployment method for PyTorch models by defining a computational graph that strictly matches the PyTorch high-level operators. This eliminates the tedious steps of converting the PyTorch model to an ONNX model and then to an NCNN model, effectively reducing the problems and complexity that may arise during the conversion process. Select the model parameter weight file haze_model.pt that has been trained in the remote sensing image dehazing and clarity method based on the improved diffusion model. Then, in order to facilitate subsequent conversion, use the method torch.jit.trace or torch.jit.script to export the PyTorch model file to TorchScript format and save it. PNNX can directly convert the TorchScript format model based on PyTorch into an NCNN model file. After the conversion is successful, PNNX will generate two files in the current directory: haze_model.param and haze_model.bin. These two files are the converted NCNN model files and are used for deployment reasoning. In addition, during the conversion process, PNNX also uses weight pruning and quantization parameter compression technology to further compress the complexity of the model and the number of redundant parameters, ensuring that the model can achieve high-efficiency calculations in practical applications.
[0130] In this embodiment, the remote sensing image defogging effect visualization user interface is as follows: Figure 6As shown, the user can choose to use the CPU or GPU for testing. The remote sensing image dehazing effect visualization user interface shows the original remote sensing fog image and the image after dehazing processing. This contrast display not only intuitively verifies the effectiveness of the remote sensing image dehazing and clarification method and system based on the improved diffusion model, but also provides a convenient and real-time solution for users to deal with the problem of remote sensing image dehazing.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A remote sensing image defogging and clarity method based on an improved diffusion model, characterized in that: The following steps are involved: Step 1: Establish a remote sensing fog image dataset consisting of several remote sensing fog image pairs. Each remote sensing fog image pair includes a foggy image and its corresponding fog-free image. The remote sensing fog image dataset is divided into a training set and a test set. Step 2: Establish a remote sensing image defogging model based on the improved diffusion model, including a fog generator and a noise estimation network. The fog generator is used to enhance the fog-free image in the remote sensing fog image pair. The noise estimation network is used to predict the noise distribution of the noise image after adding Gaussian noise to the fog-free image, and infer the remote sensing defogging image of the foggy image. Step 3: Obtain remote sensing fog image pairs in the training set, use the fog generator to enhance the fog-free image in the remote sensing fog image pair, obtain the enhanced foggy image corresponding to the fog-free image, and generate an enhanced remote sensing foggy image pair consisting of the fog-free image and its corresponding enhanced foggy image; Step 4: Set the total length T of the forward diffusion time step sequence of the remote sensing image defogging model based on the improved diffusion model, and randomly create Gaussian noise with the same size as the haze-free image tensor at time step t. Using the probability principle of the diffusion model, obtain the noisy image after adding Gaussian noise to the haze-free image at time step t. Step 5: Input the enhanced foggy image corresponding to the fog-free image, the noisy image after adding Gaussian noise to the fog-free image at time step t, and the time step t into the noise estimation network, and use the noise estimation network to predict the noise distribution of the noisy image after adding Gaussian noise to the fog-free image at time step t; Step 6: Set the target loss function and training parameters, use the training set to train the noise estimation network, save the noise estimation network model parameter weight file obtained by training, use the test set to test the trained noise estimation network, and gradually infer the remote sensing defogging image of the test set through the diffusion model. Save the noise estimation network model parameter weight file with the best test result to obtain the trained remote sensing image defogging model based on the diffusion model; Step 7: Use the trained remote sensing image defogging model based on the diffusion model to defog the remote sensing foggy image, input the remote sensing foggy image to be defogged into the remote sensing image defogging model based on the diffusion model, and obtain a clear remote sensing image after defogging.
2. According to the remote sensing image dehazing and clearing method based on the improved diffusion model of claim 1, it is characterized in that: Step 2.1: The fog generator includes a fog generation mode based on imaging parameters and a fog generation mode based on frequency domain analysis. The fog generation mode based on imaging parameters is used to generate enhanced foggy images with different fog depths, and the fog generation mode based on frequency domain analysis is used to generate enhanced foggy images with different fog distribution patterns. The generation mode used by the fog generator is determined by a random function. The specific method of generating enhanced foggy images with different fog depths based on the fog generation mode of imaging parameters is as follows: Obtaining fog-free images Imaging parameters, including: fog-free image The depth δ i , the randomly generated light scattering parameter β and the global atmospheric light parameter A, as shown in the following formula: Among them, U(A min ,A max ) is the minimum value of the global atmospheric light parameter A min and the maximum value A max The random number generated between min ,β max ) is the minimum value of the light scattering parameter β min and the maximum value β max A random number generated between is the current fog-free image obtained using the depth estimation function D(·) Depth According to the atmospheric fog imaging formula, a fog-free image is obtained Corresponding enhanced foggy image As shown in the following formula: The specific method of generating enhanced foggy images with different fog distribution patterns based on the fog generation mode of frequency domain analysis is as follows: Randomly select the kth foggy image from the training set The foggy image is transformed by Fourier transform Convert to the frequency domain and design a binary mask matrix Q that is non-zero only in the central rectangular region of the frequency domain m , as shown in the following formula: Q m =Mask(λ H ,l W ) (3) Among them, Mask(·) is a binary mask generation operation, and the threshold λ H , W They are the area range of the rectangular area in the horizontal and vertical directions respectively; The binary mask matrix Q m Multiply the foggy image in the frequency domain point by point to extract the foggy image The low-frequency fog signal is retained to preserve the fog-free image The original position information is compared with the extracted foggy image The low-frequency fog signals are fused in the frequency domain to obtain a fog-free image Corresponding enhanced foggy image As shown in the following formula: Among them, ⊙ is a point-by-point multiplication operation, F and F -1 They are Fourier transform and inverse Fourier transform respectively.
3. The remote sensing image defogging and clearing method based on an improved diffusion model according to claim 2, characterized in that: The noise estimation network described in step 2.2 is constructed by introducing a NAF fusion module on the jump connection of the sampling layer of the same dimension of the U-Net network, including three encoders, three decoders, three NAF fusion modules and an intermediate connection layer, wherein the encoder and the decoder are both composed of ResNet residual blocks, the encoder is used to perform downsampling operations, and the decoder is used to perform upsampling operations; The input image of the noise estimation network is downsampled by three encoders in sequence, and the output of the first encoder is used as the input of the first input branch of the first NAF fusion module, and the output of the second encoder is used as the input of the second input branch of the first NAF fusion module; the output of the second encoder is used as the input of the first input branch of the second NAF fusion module, and the output of the third encoder is used as the input of the second input branch of the second NAF fusion module; Set a jump connection to input the output of the third encoder and the output of the third encoder after passing through the intermediate connection layer into the first decoder for upsampling operation; input the output of the first NAF fusion module into the first input branch of the third NAF fusion module, and input the output of the second NAF fusion module into the second input branch of the third NAF fusion module; The output of the second NAF fusion module and the output of the first decoder are input to the second decoder; the output of the third NAF fusion module and the output of the second decoder are input to the third decoder to obtain the output image of the noise estimation network.
4. The remote sensing image dehazing and clearing method based on an improved diffusion model according to claim 3, characterized in that: The NAF fusion module includes a first input branch and a second input branch, which respectively receive feature maps of different sizes output by two adjacent encoders or NAF fusion modules, wherein the first input branch receives a large-size feature map, and the second input branch receives a small-size feature map, and adjusts the size of the small-size feature map through an upsampling operation to match the size of the feature map received by the first input branch, and splices the feature maps of the two input branches after upsampling through an element-by-element addition operator to obtain a spliced feature map X, as shown in the following formula: Where E1 is the first input branch of the NAF fusion module, E2 is the second input branch of the NAF fusion module, UP(·) is the upsampling operation, is the element-wise addition operator; The concatenated feature map X is processed by layer normalization, first convolution, depth-separable convolution, gated unit, channel attention, and second convolution in sequence to obtain feature map X′. A skip connection is set to concatenate the feature map X with the processed feature map X′ to obtain feature map X1, as shown in the following formula: X1=X+X′=X+Conv 1×1 (Sca(Sg(DwConv 3×3 (Conv 1×1 (LN(X)))))) (6) Among them, Conv 1×1 DwConv is a 1×1 convolution, which is used to increase the nonlinear capability of the NAF fusion module and help the noise estimation network learn more complex features. 3×3 is a 3×3 depth-wise separable convolution, used to learn global feature information; LN is layer normalization, used to ensure the stability of training; Sg is the gated unit, and Sca is the channel attention; The feature map X1 is processed by the third convolution, the gating unit and the fourth convolution in sequence to obtain the feature map X′1. The residual connection is set to splice the feature map X1 with the processed feature map X′1 to obtain the output Y of the NAF fusion module, as shown in the following formula: Y=X1+X′1=X1+Conv 1×1 (Sg(Conv 1×1 (LN(X1)))) (7)。 5. The remote sensing image defogging and clearing method based on an improved diffusion model according to claim 4, characterized in that: Step 3 includes: Get remote sensing fog image pairs in the training set in, is the i-th fog-free image in the training set, is the i-th fog-free image in the training set Corresponding foggy images, using fog generator to generate remote sensing foggy images Fog-free image in Perform enhancement processing to obtain a fog-free image Corresponding enhanced foggy image Generated from a haze-free image And its corresponding enhanced foggy image Enhanced remote sensing fog image pair 6. The remote sensing image dehazing and clearing method based on an improved diffusion model according to claim 5, characterized in that: Step 4: Get haze-free images from the training set Use the random number function to randomly select a time step t∈[1,T] and randomly sample a Gaussian noise ε t ~N(0,I) added to the haze-free image In which N is Gaussian distribution and I is unit matrix, we can get the haze-free image at time step t. Noisy image after adding Gaussian noise As shown in the following formula: in, is the adjustment parameter of the Gaussian noise change scale, which is used to adjust the amount of noise added at time step t.
7. The remote sensing image defogging and clearing method based on an improved diffusion model according to claim 6, characterized in that: Step 5: The fog-free image Corresponding enhanced foggy image For the haze-free image at time step t Noisy image after adding Gaussian noise And the time step t is input into the noise estimation network to obtain the predicted time step t for the fog-free image Noisy image after adding Gaussian noise The noise distribution 8. The remote sensing image dehazing and clearing method based on an improved diffusion model according to claim 7, characterized in that: Step 6: Set the target loss function l2, use the Adam optimizer and the target loss function l2, and optimize the parameter weights in the network through back propagation. The target loss function l2 is shown in the following formula: Where E is the expectation, For the noise estimation network, based on the haze-free image Corresponding enhanced foggy image For the haze-free image at time step t Noisy image after adding Gaussian noise and the noise distribution predicted at time step t; A remote sensing fog image is randomly selected from the test set, and a noise image of the same size as the remote sensing fog image is randomly sampled. The noise image and the remote sensing fog image are spliced and input into the trained noise estimation network together with the time step t. Under the guidance of the remote sensing fog image, the randomly sampled noise image is iteratively processed to gradually estimate the noise distribution of the noise image at each time step t, as shown in the following formula: in, is the noise image at time step t-1, is the input noisy image, is a remote sensing fog image randomly selected from the test set. The noise distribution predicted by the noise estimation network; Through step-by-step reasoning, the defogging image corresponding to the randomly selected remote sensing fog image in the test set is obtained.
9. A remote sensing image defogging and clarity system based on an improved diffusion model, which performs remote sensing image defogging based on the method of claim 1, characterized in that: include: Image reading module, image preprocessing module, image defogging reasoning module and image result display module; The image reading module is used to acquire and store remote sensing images that need to be defogged, select remote sensing images that need to be defogged and transmit them to the image preprocessing module; the image preprocessing module is used to receive the remote sensing fog image selected by the image reading module and preprocess it; the image defogging reasoning module is used to receive the preprocessed image and generate the defogged remote sensing image; the image result display module is used to display the remote sensing image that needs to be defogged and the defogged remote sensing image.
10. The remote sensing image defogging and clarity system based on the improved diffusion model according to claim 9, characterized in that: The image reading module includes an image acquisition submodule, a system album submodule and an image selector; the image acquisition submodule is used to acquire remote sensing images that need to be defogged, including pre-synthesized remote sensing fog images and remote sensing fog images taken in real time using a mobile device camera; the system album submodule is used to store remote sensing images that need to be defogged; the image selector is used to select remote sensing images that need to be defogged from the system album submodule and transmit them to the image preprocessing module; The image preprocessing module includes an image resizing submodule and a pixel normalization submodule; the image resizing submodule adjusts the size of the remote sensing image to be defogged to match the expected size of the defogging model input layer, ensuring that all input images have a consistent size before entering the defogging model; the pixel normalization submodule adjusts the pixel value range of the resized image, normalizes the pixel value to the range of 0 to 1, so that the pixel value distribution of the pixel normalized image is more balanced, and inputs the pixel value normalized image into the image defogging reasoning module; The image defogging inference module includes a weight file conversion submodule and a defogging submodule; The weight file conversion submodule converts the trained model parameter weight file into a model through pruning and eliminating redundant parameter optimization techniques to enhance the running efficiency and adaptability of the defogging model deployed on mobile devices. It also uses the GPU acceleration technology of mobile devices to accelerate the inference process and shorten the inference time, making the remote sensing image defogging task run more smoothly and efficiently on mobile devices. The defogging module uses the converted defogging model to perform defogging reasoning on the preprocessed image obtained by the image preprocessing module, obtains the inferred image and transmits it to the image result display module; The image result display module includes a pixel value denormalization submodule and a remote sensing image defogging display submodule; The pixel value denormalization submodule uses the denormalization method to restore the pixel values of the inferred remote sensing image to the original pixel value range, ensuring that the image can accurately reflect the actual visual effect; The remote sensing image defogging display submodule creates a visual user interface for the remote sensing image defogging effect, and displays the defogged image to the user in a visual form, allowing the user to intuitively compare the image differences before and after defogging.
Citation Information
Cited By
Lightweight image defogging device and method based on noise robustness evaluation and optimization
CN122473032A