Image rain removal method based on wavelet transform and digital filtering detail guidance

This image deraining method, which combines wavelet transform and digital filtering with deep learning and prior image information, solves the problem of separating the background and rain layer, improves the accuracy and robustness of image deraining, and is suitable for complex scenes and resource-constrained devices.

CN120876306AActive Publication Date: 2025-10-31QINGDAO UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511395022.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2025-10-31
Estimated Expiration
2045-09-28

AI Technical Summary

Technical Problem

Existing techniques struggle to effectively separate background and rain layer features in image deraining methods, resulting in poor restoration performance, especially in high-noise and complex scenes where accuracy is insufficient. Furthermore, deep learning models lack full utilization of prior image information.

Method used

An image deraining method based on wavelet transform and digital filtering is adopted. By learningable wavelet decomposition, detail modulation, bi-branch processing and dynamic interactive perception decoupling, combined with depthwise separable convolution and multi-scale grouped convolution, the prior information of the image is fused to improve the accuracy and robustness of deraining.

Benefits of technology

It significantly improves the accuracy and detail restoration of image deraining, especially in complex backgrounds and high-noise scenes, with adaptive adjustment, reduced computational overhead, and is suitable for efficient operation on resource-constrained platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876306A_ABST
    Figure CN120876306A_ABST
Patent Text Reader

Abstract

The invention relates to the field of deep learning and image processing, and discloses an image rain removal method based on wavelet transform and digital filtering detail guidance, which comprises the step of processing an input rain image by applying a trained image rain removal model, and comprises the following steps of: obtaining the rain image, and inputting the rain image into the image rain removal model for processing, and then outputting a rain removal image. According to the method, different image rain removal tasks can be better adapted by introducing image priori knowledge, image noise is effectively suppressed in combination with digital filtering, so that the quality and precision of recovery are improved, and the accuracy and robustness of image rain removal are improved by fusing feature information of different scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of deep learning and image processing, and specifically relates to an image deraining method based on wavelet transform and digital filtering detail guidance. Background Technology

[0002] The basic goal of image deraining is to recover a clear image that is as close as possible to the real scene from low-quality images affected by raindrops, fog, etc., before proceeding with downstream tasks. This is because the deterioration of image quality (such as raindrops, fog, noise, etc.) not only affects the visual effect of the image, but also negatively impacts the accuracy of image processing and the accuracy of downstream tasks, leading to incorrect identification and judgment. Summary of the Invention

[0003] The technical problem to be solved by this application is to overcome the shortcomings of the existing technology. This application provides an image deraining method based on wavelet transform and digital filtering details. By introducing prior knowledge of the image, it can better adapt to different image deraining tasks. Combined with digital filtering, it can effectively suppress image noise, thereby improving the quality and accuracy of restoration. By fusing feature information at different scales, it can improve the accuracy and robustness of image deraining.

[0004] To achieve the above objectives, the first aspect of this application provides an image deraining method based on wavelet transform and digital filtering detail guidance, comprising applying a trained image deraining model to process an input rainy image, the method comprising: acquiring a rainy image, inputting the rainy image into the image deraining model for processing, and then outputting a derained image; The image deraining model processes the input rainy image, including the following steps: S1. Learnable wavelet decomposition: The input rainy image is decomposed into multiple levels of low-frequency subbands and high-frequency subbands using learnable wavelets; S2, Detail Modulation: The rainy image is subjected to stepwise bandpass filtering with the multiple levels of the low-frequency sub-bands to obtain multi-level detail information; the multi-level detail information is fused and the background information and rain layer information in the rainy image are modulated with detail information after fusion to obtain background features and rain layer features; S3, decoupling of dual-branch processing and dynamic interaction awareness: The background features are processed through a background branch, which can effectively preserve the low-frequency structural information of the rain image. The rain layer features are processed through a rain layer branch, which obtains the rain pattern distribution through global modeling. The background branch includes at least the following steps: processing the background features through depthwise separable convolution, then processing them through multi-scale grouped convolution, enhancing the background features enhanced by the multi-scale grouped convolution with SE channel attention, and fusing the background features enhanced by SE channel attention with the original background features through weighted residual fusion, and finally outputting the background features processed by the background branch. The outputs of the background branch and the rain layer branch are processed by a dynamic interactive perception mechanism. The dynamic interactive perception mechanism integrates global information through global gating weights, i.e., global attention, generates local attention through spatial modulation, and fuses global attention and local attention through attention weights to obtain decoupled background features and rain layer features. S4. Perform image reconstruction on the decoupled background features and rain layer features to finally obtain the rain-removed image.

[0005] Optionally, in S2, the rainy image and the multiple levels of low-frequency sub-bands are subjected to step-by-step bandpass filtering to obtain multi-level detail information. The multi-level detail information is then fused, and the fused detail information is used to perform detail modulation on the background information and rain layer information in the rainy image to obtain background features and rain layer features, including: The low-frequency subbands are subtracted stepwise to obtain the mid-frequency detail features (BP). The mid-frequency detail features are used to generate a detail attention map through convolution. The Sigmoid activation function is used to convert the rain layer detail weights d to generate the background detail weights 1-d. The background features are obtained by generating initial background features through convolution of the last-level low-frequency subband, and then multiplying them element-wise with the background detail weights 1-d. The rain layer features are obtained by combining the initial rain layer features generated by feature fusion of high-frequency subbands through convolution with the rain layer detail weights d.

[0006] Optionally, the depthwise separable convolution processing described in S3 includes: Perform depthwise convolution operations, which are performed independently on each input channel without cross-channel information fusion, to extract local structural information; By using point convolution operations, information is fused for each channel using a 1×1 convolution kernel.

[0007] Optionally, the multi-scale grouped convolution processing described in S3 includes: The background features after the depth-separable convolution are divided into multiple groups, and each group is processed by a convolution kernel. The convolution results of different groups are concatenated along the channel dimension to obtain the merged feature map, which is the background feature after the multi-scale grouped convolution processing.

[0008] Optionally, in S3, the background features enhanced by the multi-scale grouped convolution are subjected to SE channel attention enhancement, including: Global information for each channel is obtained through global average pooling; Attention weights for each channel are generated using a two-layer fully connected network; and, The background features enhanced by the multi-scale grouped convolution are weighted using the attention weights generated for each channel, and the background features enhanced by SE channel attention are finally obtained.

[0009] Optionally, in S3, the background features enhanced by the attention of the SE channel and the original background features are fused using weighted residuals. The final output background features after the background branch processing include: The background feature enhanced with attention in the SE channel is connected to the original background feature along the channel; Use a depthwise separable convolution layer to further extract features connected along the channels; Enhanced fusion output through SE attention; and, Introducing learnable residual weights A weighted residual connection is performed, and the final output is the background feature processed by the background branch.

[0010] Optionally, the dynamic interaction perception mechanism described in S3 integrates global information through global gating weights, i.e., global attention, and generates local attention through spatial modulation, including: Global attention: The background enhancement features and rain layer enhancement features are concatenated along the channel dimension to form a joint feature, represented as follows: ; in, Background features after background branch processing The rain layer features after rain layer branching processing. Indicates joint features; By integrating global context information through adaptive average pooling, a single-point global description is generated, represented as: ; in, This represents a single-point global description, avoiding interference from spatial location. Indicates global average pooling; A gated network is introduced, using a multi-layer convolutional sequence, adding activation functions layer by layer, and applying soft maximization activation to generate global gate weights, represented as: ; in, For learnable parameters, This refers to the channel compression ratio. For the Sigmoid function, This represents the ReLU activation function. Indicates the generated background gating weights. This represents the generated rain layer gating weights. G represents B With g R A list of components; Local spatial attention: Spatial attention is applied to the joint features, and multiple convolutions are used to generate a pixel-level spatial weight mask, represented as follows: ; in, For the Sigmoid function, For convolution weights, Represents pixel-level spatial weight mask The shape, These are batch size, number of channels, width, and height.

[0011] Optionally, in S3, global attention and local attention are fused through attention weights to obtain decoupled background features and rain layer features, including: Introducing learnable parameters The relationship between the global gating weights and the local spatial attention weights is expressed as: ; in, This represents the background layer weights after attention weight fusion. This represents the rain layer weights after attention weight fusion. Represents a pixel-level spatial weight mask. Represents the learnable parameters. By multiplying the features output by the background branch and the rain layer branch by the normalized weights, the decoupled background features and rain layer features are obtained, as follows: ; ; in, This represents the background features after decoupling. This represents the output of the background branch before decoupling. Represents the normalized background weights. This represents the characteristics of the rain layer after decoupling. This represents the output of the rain layer branch before decoupling. This represents the normalized rain layer weights, where ε is a constant used to ensure numerical stability and avoid division by zero and gradient explosion. This indicates element-wise multiplication.

[0012] By adopting the above technical solution, this application has the following beneficial effects compared with the prior art: This application effectively solves the problem of separating complex backgrounds and rain layers in image deraining by introducing learnable wavelet transform and multimodal data fusion technology. Compared with traditional methods based on a single modality or simple fusion, this application can more accurately separate background image and rain layer features, significantly improving the accuracy and detail restoration capability of image deraining. Especially when facing high-noise, blurred, or dynamically changing scenes, it can adaptively adjust the weights of each modality to ensure the stability and accuracy of the restoration operation. This application combines a dual-branch processing method for background and rain layer decoupling with a detail modulation mechanism to further optimize performance in complex image environments. By processing background and rain layer information separately through a dual-branch structure, interference from background and rain layer features is effectively avoided, making the restoration process more accurate and efficient in complex environments. Compared with traditional methods, this application provides higher accuracy when processing complex image background and rain layer mixtures, especially demonstrating superior performance in detail restoration. This application employs a guided details mechanism and a multi-scale separation strategy, and optimizes memory usage through depthwise separable convolution, enabling the image deraining process to reduce unnecessary computational overhead while maintaining high accuracy. Compared with traditional deep networks, this application optimizes the feature extraction and fusion process, avoids redundant overcomputation, and improves inference efficiency. It is particularly suitable for deployment on edge devices, reducing hardware costs and energy consumption, and enabling the image deraining system to run efficiently on resource-constrained platforms.

[0013] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. Attached Figure Description

[0014] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application. The illustrative embodiments and descriptions of the application are used to explain the application, but do not constitute an undue limitation of the application. Obviously, the drawings described below are merely some embodiments, and those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0015] In the attached diagram: Figure 1This is a flowchart illustrating the image deraining method based on wavelet transform and digital filtering details in this specific embodiment. Figure 2 This is a system schematic diagram of the image deraining method based on wavelet transform and digital filtering details guided in this specific embodiment; Figure 3 This is a flowchart illustrating the S1 learnable wavelet transform process in the image deraining method based on wavelet transform and digital filtering details in this specific embodiment. Figure 4 This is a flowchart illustrating the S2 detail modulation process in the image deraining method guided by wavelet transform and digital filtering in this specific embodiment. Figure 5 This is a flowchart illustrating the S3 dual-branch processing and dynamic interactive perception decoupling in the image deraining method based on wavelet transform and digital filtering details in this specific embodiment. Figure 6 This is a schematic diagram of the training process of the image deraining model in the image deraining method based on wavelet transform and digital filtering details in this specific embodiment; Figure 7 This is a feature heatmap of the image deraining method based on wavelet transform and digital filtering details in this specific embodiment. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0017] Most existing image deraining methods rely on digital image filtering and algorithms based on prior information. Filtering methods typically process certain local parameters of the image (such as brightness, shape, and orientation), which are often strongly affected by noise. During processing, traditional methods generate sub-images based on specific orientations, frequencies, and shapes; however, this approach easily loses detailed image features and may suffer significant information loss and limitations during image processing. Secondly, prior-based methods depend on pre-designed prior knowledge and model structures, which often fail to adapt to the ever-changing image features in complex real-world scenes, resulting in unsatisfactory restoration results.

[0018] Existing deep learning-based image deraining methods, such as convolutional neural networks (CNNs) and generative adversarial networks (GANs), do not fully utilize prior information about images. Since deep learning networks mainly focus on extracting information from image data and lack guidance on frequency domain features in images, the restoration effect is sometimes limited by the learning ability of the network itself and the quality of the training data.

[0019] Please see Figure 1 and Figure 2 Based on the technical deficiencies of existing methods in image deraining, this application provides an image deraining method guided by wavelet transform and digital filtering details, which includes applying a trained image deraining model to process the input rainy image. The method includes: acquiring the rainy image, inputting the rainy image into the image deraining model for processing, and then outputting the derained image. The image deraining model processes the input rainy image, including the following steps: S1. Learnable wavelet decomposition: The input rainy image is decomposed into multiple levels of low-frequency subbands and high-frequency subbands using learnable wavelets; S2, Detail Modulation: The rainy image and multiple low-frequency sub-bands are subjected to stepwise bandpass filtering to obtain multi-level detail information; the multi-level detail information is fused and the background information and rain layer information in the rainy image are modulated with the fused detail information to obtain background features and rain layer features. S3, decoupling of dual-branch processing and dynamic interaction awareness: Background features are processed through a background branch, which effectively preserves the low-frequency structural information of the rain image. Rain layer features are processed through a rain layer branch, which obtains the rain streak distribution through global modeling. The background branch includes at least the following steps: processing the background features through depthwise separable convolution, then processing them through multi-scale group convolution, enhancing the background features enhanced by multi-scale group convolution with SE channel attention, fusing the background features enhanced by SE channel attention with the original background features through weighted residual fusion, and finally outputting the background features processed by the background branch. The outputs of the background branch and the rain layer branch are processed through a dynamic interactive perception mechanism. The dynamic interactive perception mechanism integrates global information through global gating weights, i.e., global attention, generates local attention through spatial modulation, and fuses global attention and local attention through attention weights to obtain decoupled background features and rain layer features. S4. Reconstruct the image from the decoupled background features and rain layer features to obtain the de-rained image.

[0020] This application combines digital filtering with prior image information, leveraging the powerful feature learning capabilities of deep learning networks and integrating the advantages of traditional image processing methods. By incorporating prior image knowledge, it can better adapt to different image deraining tasks, and effectively suppress image noise through digital filtering, thereby improving the quality and accuracy of image restoration. Furthermore, by fusing feature information at different scales, it enhances the accuracy and robustness of image deraining.

[0021] It should be noted that the execution subject of the image deraining method based on wavelet transform and digital filtering detail guidance in this embodiment is an image deraining device based on wavelet transform and digital filtering detail guidance. This device can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, etc., and non-mobile electronic devices can be servers and personal computers, etc., which are not specifically limited in this application. The following description uses a server as the execution subject to illustrate the image deraining method based on wavelet transform and digital filtering detail guidance in this embodiment.

[0022] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0023] Please see Figure 3 To incorporate prior information from the image and improve the background rain layer separation performance of the image deraining model, the input image is graded using learnable wavelets. Furthermore, Static Wavelet Transform (SWT) is employed to decompose the image into low-frequency and high-frequency subbands, avoiding the downsampling operation in traditional wavelet transforms. Consistent resolution is maintained through padding convolutions, thus preventing information loss and facilitating subsequent feature fusion. The learnable wavelet filter transforms the traditional Haar wavelet filter into a learnable filter. The initial state of the filter is obtained from the low-pass and high-pass filters of the Haar wavelet. The filter parameters can be dynamically adjusted during training to adapt to the spectral distribution of a specific task. ; Where LL subband represents the low-frequency part of wavelet decomposition, and HH, HL, and HH represent the high-frequency part of wavelet decomposition. This represents depthwise separable convolution. For learnable wavelet kernels, initialization satisfies Haar basis orthogonality. , , , These represent parameterizing the filter bank of a traditional two-dimensional Haar wavelet into a trainable depthwise separable convolutional kernel. This represents the original input image. The wavelet decomposition level is denoted as . When =1, it indicates that wavelet transform is performed on the input image; Learnable wavelet tree: Since single-level wavelet transform is insufficient for mining spectral information, in order to ensure the full extraction of image information, a hierarchical frequency band separation strategy is adopted. Learnable wavelet trees are used to generate multi-level subbands to extract low-frequency background (LL subband) and high-frequency details (LH, HL, HH subbands) level by level. Multi-level decomposition allows the model to capture multi-scale information from coarse-grained to fine-grained. To balance computational cost and performance, a two-level wavelet tree is used: Level : ; Level : ; Where x is the original input image, the first stage decomposes the original input image, This represents a continuous wavelet transform using a learnable wavelet filter. , , , These represent the first-level sub-bands, , , , These represent the second-level subbands. Unlike traditional downsampling wavelet transform, continuous wavelet transform maintains consistent subband resolution through padding convolution, thereby avoiding information loss and facilitating subsequent feature fusion.

[0024] Please see Figure 4 In step S2, the rainy image and the multiple levels of low-frequency sub-bands are subjected to step-by-step bandpass filtering to obtain multi-level detail information. This multi-level detail information is then fused, and the fused detail information is used to modulate the background and rain layer information in the rainy image to obtain background features and rain layer features, including: The low-frequency subbands are subtracted stepwise to obtain the mid-frequency detail features (BP). The mid-frequency detail features are used to generate a detail attention map through convolution. The Sigmoid activation function is used to convert the rain layer detail weights d to generate the background detail weights 1-d. The background features are obtained by generating initial background features through convolution of the last-level low-frequency subband, and then multiplying them element-wise with the background detail weights 1-d. The rain layer features are obtained by combining the initial rain layer features generated by feature fusion of high-frequency subbands through convolution with the rain layer detail weights d.

[0025] Specifically, because learnable wavelet transform lacks the downsampling operation of traditional wavelet transform, it contains redundant frequency band decomposition information. A detail modulation mechanism is designed to dynamically fuse background and detail features through bandpass filtering and gating. First, a multi-level bandpass component is calculated, i.e., the low-frequency subbands are subtracted level by level to obtain the intermediate-frequency detail features, expressed as: ; Here, BP represents the obtained mid-frequency detail features. is the wavelet decomposition level. When When the value is 1, the first-level low-frequency subband LL is used with the rainy image. Perform bandpass filtering; When the value is 2, the second-stage low-frequency sub-band and the first-stage low-frequency sub-band are used for bandpass filtering.

[0026] Specifically, a detail attention map is generated through convolution, and then converted into detail weights using the Sigmoid activation function, as follows: ; ; in, Represents a detail attention map. Represents convolution. Using the Sigmoid activation function, the detailed features obtained by stepwise bandpass filtering represent the missing high-frequency details. Therefore, the generated weight d is used as the rain layer detail weight, and 1-d is used as the background detail weight.

[0027] Specifically, the background features are obtained by generating initial background features from the last-level low-frequency subband through convolution, and then multiplying them element-wise with the background detail weights 1-d; the rain layer features are obtained by generating initial rain layer features from the high-frequency subband through feature fusion via convolution, and then multiplying them with the rain layer detail weights d, as shown below: ; ; in, Indicates background features, Indicates rain layer characteristics, LH and HL represent the LH sub-band and HL sub-band, respectively. Indicates channel splicing. This represents element-wise multiplication. This indicates the first-level HL sub-band and the second-level HL sub-band. This indicates the first-level LH ​​subband and the second-level LH ​​subband.

[0028] After obtaining the embedding information of the two branches, the background branch and the rain layer branch, since the background and the rain layer need to retain different image information, the background branch can effectively retain the low-frequency structural information of the image, while the purpose of the rain layer branch is to obtain the distribution of rain patterns through global modeling. In this embodiment, a dual-branch processing network for image restoration with decoupled background and rain layers is designed. The network is an encoder-decoder UET architecture, and the encoder and decoder are assembled by a feature reconstructor and a dynamic interaction module.

[0029] Please see Figure 5 The depthwise separable convolution processing described in S3 includes: Perform depthwise convolution operations, which are performed independently on each input channel without cross-channel information fusion, to extract local structural information; By using point convolution operations, information is fused for each channel using a 1×1 convolution kernel.

[0030] Specifically, performing a depthwise convolution operation is represented as: ; in, This represents the features after a depthwise convolution operation. Represents depthwise convolution. Indicate background features; Then, through point convolution, it can be represented as: ; in, Represents the features after depthwise convolution. Features obtained by point convolution Represents point convolution; Information is fused across each channel using a 1×1 convolutional kernel, ensuring information transfer across channels. Depthwise separable convolution refines the input feature map through depthwise and pointwise convolution operations while maintaining low computational cost.

[0031] Please continue reading Figure 5 The multi-scale grouped convolution processing described in S3 includes: The background features after the depth-separable convolution are divided into multiple groups, and each group is processed by a convolution kernel. The convolution results of different groups are concatenated along the channel dimension to obtain the merged feature map, which is the background feature after the multi-scale grouped convolution processing.

[0032] Specifically, the feature maps after feature extraction via depthwise separable convolution are subjected to multi-scale grouped convolution. Different convolution kernels are used to extract more comprehensive information. First, the input features are divided into multiple groups. The number of input feature channels is C, which is divided into 3 groups. Each group is processed by a convolution kernel, as shown below: ; in, Indicates the group number. express Group convolution, applying convolution kernels of different scales to each group of features. convolution kernel The results of each convolution group are obtained by using 3×3, 5×5, and 7×7. ; Then, the convolution results from different groups By concatenating along the channel dimension, the merged feature map is obtained, represented as follows: ; in, This represents the convolution results of different groups. The feature map obtained by concatenating along the channel dimension This represents the convolution results of groups 1, 2, ..., G. This indicates channel splicing.

[0033] Please continue reading Figure 5 In S3, SE channel attention enhancement is performed on the background features enhanced by the multi-scale grouped convolution, including: Global information for each channel is obtained through global average pooling; Attention weights for each channel are generated using a two-layer fully connected network; and, The background features enhanced by the multi-scale grouped convolution are weighted using the attention weights generated for each channel, and the background features enhanced by SE channel attention are finally obtained.

[0034] Specifically, after acquiring multi-scale information of the image, an SE attention mechanism is used to highlight important background features. Global average pooling is used to obtain global information for each channel. ; in, This represents the global information obtained for each channel after global average pooling. Indicates global average pooling. Represents the convolution results of different groups The feature map obtained by stitching along the channel dimension; Then, a two-layer fully connected network is used to generate the attention weights for each channel, represented as follows: ; in, This represents the weight of each channel. This represents the Sigmoid activation function. , This represents the learnable weight matrix of the fully connected layer. express Activation function; Finally, the input features are weighted using the attention weight of each channel to obtain grouped convolutional and channel-enhanced features, represented as: ; in, Represents the convolution results for different groups The feature map obtained by splicing along the channel dimension is enhanced with channel attention.

[0035] Please continue reading Figure 5 In S3, the background features enhanced by the attention of the SE channel are fused with the original background features through weighted residual fusion. The final output background features after the background branch processing include: The background feature enhanced with attention in the SE channel is connected to the original background feature along the channel; Use a depthwise separable convolution layer to further extract features connected along the channels; Enhanced fusion output through SE attention; and, Introducing learnable residual weights A weighted residual connection is performed, and the final output is the background feature processed by the background branch.

[0036] Specifically, to achieve adaptive fusion of background features, the background features enhanced by the SE channel are first connected along the channel to the original background features to prevent gradient explosion, as shown below: ; in, Indicates the features after splicing. Indicates channel splicing. Indicates the original background features; Then, a depthwise separable convolution layer is used to further extract the fused features, represented as: ; in, This represents the features enhanced by depthwise separable convolution. This represents depthwise separable convolution; The fusion output, further enhanced by SE attention, is represented as: ; in, Features derived from depthwise separable convolutions are enhanced using SE attention. Indicates SE attention; Finally, learnable residual weights are introduced. Perform weighted residual connections to obtain the output background features. , represented as: ; in, This represents the learnable residual weights. It is a learnable parameter that helps control the balance between fused features and residual features, and can adaptively adjust the fusion ratio of background features and rain layer features to avoid overfitting or unnecessary interference.

[0037] Please continue reading Figure 5 The dynamic interactive perception mechanism described in S3 integrates global information through global gating weights, i.e., global attention, and generates local attention through spatial modulation, including: Global attention: The background enhancement features and rain layer enhancement features are concatenated along the channel dimension to form a joint feature, represented as follows: ; in, Background features after background branch processing The rain layer features after rain layer branching processing. Indicates joint features; By integrating global context information through adaptive average pooling, a single-point global description is generated, represented as: ; in, This indicates the generated single-point global description, avoiding interference from spatial location; GAP indicates global average pooling. A gated network is introduced, using a multi-layer convolutional sequence, adding activation functions layer by layer, and applying soft maximization activation to generate global gate weights, represented as: ; in, For learnable parameters, This refers to the channel compression ratio. For the Sigmoid function, express Activation function This represents the generated rain layer gating weights. Indicates the generated background gating weights. Represents a list of components; Local spatial attention: Spatial attention is applied to the joint features, and multiple convolutions are used to generate a pixel-level spatial weight mask, represented as follows: ; in, For the Sigmoid function, For convolution weights, Represents pixel-level spatial weight mask The shape, These represent batch, number of channels, width, and height, respectively.

[0038] Please continue reading Figure 5 In the rain layer branch, the input feature map is first downsampled. By downsampling the rainy image using a convolutional neural network, the size of the image's feature map is reduced. This operation provides a more compact feature representation for subsequent network processing. The downsampled features are then processed using Restrormer, and are represented as follows: ; in, This is the downsampled feature map. It is a feature map processed by the Restormer module; After Restormer processing, an upsampling operation is used to restore rain layer details. This involves using a transposed convolution to upsample the feature map, restoring it to its original size. The upsampling operation can be expressed by the formula: ; in, It is the feature map after Restormer processing. It is a feature map upsampled through transposed convolution. Indicates an upsampling operation. This represents transposed convolution.

[0039] To further optimize the generation of rain layer feature maps, the rain layer features processed by Restormer are first fused with the original rain layer features. Then, a weighted gating mechanism is applied to ensure that rain layer details are reasonably restored, as shown below: ; in, This is the fused rain layer feature map, which serves as the output of the rain layer branch. Indicates feature fusion, This represents the original background features.

[0040] Please continue reading Figure 5 In S3, global and local attention are fused through attention weights to obtain decoupled background and rain layer features, including: Introducing learnable parameters The relationship between the global gating weights and the local spatial attention weights is expressed as: ; in, This represents the background weights after attention weight fusion. This represents the rain layer weights after attention weight fusion. Represents the prime-level spatial weight mask. Indicates learnable parameters; By multiplying the features output by the background branch and the rain layer branch by the normalized weights, the decoupled background features and rain layer features are obtained, as follows: ; ; in, This represents the background features after decoupling. This represents the output of the background branch of the feature reconstructor before decoupling. This represents the normalized background weights. This represents the characteristics of the rain layer after decoupling. This represents the output of the rain layer branch of the feature reconstructor before decoupling. This represents the normalized rain layer weights, where ε is a very small constant used to ensure numerical stability and avoid division by zero and gradient explosion. This indicates element-wise multiplication.

[0041] In a preferred embodiment, training the image deraining model is achieved through the following steps: data acquisition and preprocessing, model initialization, feature extraction and decoupling, dynamic interactive fusion, multi-scale reconstruction, loss function design, optimization strategy, training iteration loop, testing and evaluation, and parameter optimization. The entire process aims to enable the model to learn a decoupled representation of the background and rain layer from low-quality images (such as rainy images) through supervised learning, and to generate high-quality restored images (such as derained images).

[0042] Please see Figure 2 and Figure 6 The training process of the image deraining model is briefly described below. For the processing steps of the input rainy image by the image deraining model, please refer to the steps described above: Data Acquisition: Paired samples were obtained from publicly available de-raining datasets. Training used the Rain13K training set, and testing used five corresponding test datasets: Test100, Test1200, Test2800, Rain100L, and Rain100H. Each sample set consists of two parts: a rainy image containing degradation factors such as rain streaks, fog, and glare from puddles, providing appearance and texture information under realistic interference; and a clear image (no-rain image) serving as a reference image, strictly aligned pixel-wise with the rainy image for supervised learning and objective metric evaluation. The data covers multiple weather conditions, illumination levels, textures, and scales.

[0043] Specifically, rainy images and their corresponding rainless images from the publicly available Rain13k dataset are used to ensure that the dataset covers different types of raindrop features, scene lighting, and background complexity. Various data augmentation techniques, such as rotation, cropping, translation, flipping, and random noise, are employed to increase the diversity of the training set, prevent overfitting, and improve the model's generalization ability.

[0044] This embodiment uses two main loss functions to optimize the rain removal model: SSIM loss, which calculates the structural similarity between the output image and the target rain-removed image, can reduce image blurring during the rain removal process while preserving image structure; and Char loss, which measures the image's ability to recover details. This loss focuses on the recovery of small-scale structures, especially the preservation of details during the rain removal process.

[0045] This embodiment uses the Adam optimizer to train the image deraining model, employing a dynamic learning rate strategy to improve the model's convergence speed. Gradients are calculated through backpropagation, and the model weights are updated to minimize the SSIM and Char losses. By optimizing the SSIM and Char losses, the image deraining model is ensured to simultaneously recover the structural information and details of the image. This process adjusts the parameters in the image deraining model, enabling it to better remove rain from rainy images and extract rain-free images.

[0046] It should be noted that in the data preprocessing stage, the input color image (i.e., the rainy image) is first normalized, scaling the pixel values ​​to the [0,1] range. Then, data diversity is enhanced through random flipping, rotation, and cropping, increasing the robustness of the model. For paired samples (low-quality images and clear target images), reflection padding is used to ensure consistent size and adjust to a uniform resolution. Noisy data undergoes Gaussian filtering to remove redundancy, ensuring consistency in spatial and channel dimensions across different images, facilitating subsequent feature extraction and fusion. This preprocessing method accurately extracts the most recognizable features from the original image, significantly improving the accuracy of the reconstruction.

[0047] In a preferred embodiment, the average SSIM, PSNR, and running time of the restoration results of the method proposed in this embodiment and the following comparative methods are compared on multiple test datasets, including R100L, R100H, Test100, Test1200, and Test2800. The algorithms compared include: DIDMDN algorithm, RESCAN method, LPNet algorithm, unsupervised multi-residual learning deblurring methods proposed by UMRL, PreNet algorithm, MSPFN network, PCNet network, MPRNet network, ELFormer method, Uformer network, Restormer network, MFDnet network, and the method proposed in this embodiment. The comparison results of each algorithm are shown in Table 1. Table 1: Comparison of Objective Indicators of Restoration Results from Several Algorithms

[0048] As can be seen from Table 1, the method proposed in this embodiment achieves optimal or near-optimal PSNR and SSIM values ​​on most test datasets, with an average PSNR of 33.37 and an average SSIM of 0.932. Compared with other methods, it has a significant performance advantage, which fully verifies the effectiveness of the method proposed in this embodiment.

[0049] Please see Figure 7 Each row displays a set of feature heatmap examples, from left to right: input rain map, original background feature Braw, original rain layer feature Rraw, guided background feature Bfea, guided rain layer feature Rfea, detail guide map Dfea, and target map Target. Braw is obtained by splicing low-frequency subband LL and its multi-scale information, but still retains obvious rain layer noise pollution; Rraw is formed by splicing high-frequency subbands (LH / HL / HH) across scales, which can highlight high-frequency components such as stripes / edges, but is mixed with some background details. Based on the detail guide map Rfea learned from Rraw (high response at noise areas, low response at background areas), we modulate two branches respectively: on the one hand, we suppress rain patterns in Braw, original rain layer feature Rraw, guided background feature Bfea, guided rain layer feature Rfea, and original rain layer feature Braw to obtain guided background feature Bfea (cleaner background, more complete structure); on the other hand, we enhance the noise response of the original rain layer feature Rraw to obtain a "purer" rain layer representation (corresponding to Rfea / Dfea in the figure). It can be seen that the guided Bfea / Rfea are closer to their target layers (background / rain layer) than the original background feature Braw and the original rain layer feature Rraw, respectively.

[0050] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-mentioned technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. The implementation schemes in the above embodiments can also be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the content of the technical solution of this application shall still fall within the scope of this application.

Claims

1. An image deraining method based on wavelet transform and digital filtering detail guidance, characterized in that, The method includes applying a trained image deraining model to process an input rainy image, the method comprising: acquiring a rainy image, inputting the rainy image into the image deraining model for processing, and then outputting a derained image; The image deraining model processes the input rainy image, including the following steps: S1. Learnable wavelet decomposition: The input rainy image is decomposed into multiple levels of low-frequency subbands and high-frequency subbands using learnable wavelets; S2, Detail Modulation: The rainy image is subjected to stepwise bandpass filtering with the multiple levels of the low-frequency sub-bands to obtain multi-level detail information; the multi-level detail information is fused and the background information and rain layer information in the rainy image are modulated with detail information after fusion to obtain background features and rain layer features; S3, decoupling of dual-branch processing and dynamic interaction awareness: The background features are processed through a background branch, which can effectively preserve the low-frequency structural information of the rain image. The rain layer features are processed through a rain layer branch, which obtains the rain pattern distribution through global modeling. The background branch includes at least the following steps: processing the background features through depthwise separable convolution, then processing them through multi-scale grouped convolution, enhancing the background features enhanced by the multi-scale grouped convolution with SE channel attention, and fusing the background features enhanced by SE channel attention with the original background features through weighted residual fusion, and finally outputting the background features processed by the background branch. The outputs of the background branch and the rain layer branch are processed by a dynamic interactive perception mechanism. The dynamic interactive perception mechanism integrates global information through global gating weights, i.e., global attention, generates local attention through spatial modulation, and fuses global attention and local attention through attention weights to obtain decoupled background features and rain layer features. S4. Perform image reconstruction on the decoupled background features and rain layer features to finally obtain the rain-removed image.

2. The method according to claim 1, characterized in that, In S2, the rainy image and the multiple levels of low-frequency sub-bands are subjected to step-by-step bandpass filtering to obtain multi-level detail information. This multi-level detail information is then fused, and the fused detail information is used to modulate the background and rain layer information in the rainy image to obtain background features and rain layer features, including: The low-frequency subbands are subtracted stepwise to obtain the mid-frequency detail features (BP). The mid-frequency detail features are used to generate a detail attention map through convolution. The Sigmoid activation function is used to convert the rain layer detail weights d to generate the background detail weights 1-d. The background features are obtained by generating initial background features through convolution of the last-level low-frequency subband, and then multiplying them element-wise with the background detail weights 1-d. The rain layer features are obtained by combining the initial rain layer features generated by feature fusion of high-frequency subbands through convolution with the rain layer detail weights d.

3. The method according to claim 1, characterized in that, The depthwise separable convolution processing described in S3 includes: Perform depthwise convolution operations, which are performed independently on each input channel without cross-channel information fusion, to extract local structural information; By using point convolution operations, information is fused for each channel using a 1×1 convolution kernel.

4. The method according to claim 1, characterized in that, The multi-scale grouped convolution processing described in S3 includes: The background features after the depth-separable convolution are divided into multiple groups, and each group is processed by a convolution kernel. The convolution results of different groups are concatenated along the channel dimension to obtain the merged feature map, which is the background feature after the multi-scale grouped convolution processing.

5. The method according to claim 1, characterized in that, S3 performs SE channel attention enhancement on the background features enhanced by the multi-scale grouped convolution, including: Global information for each channel is obtained through global average pooling; Attention weights for each channel are generated using a two-layer fully connected network; and, The background features enhanced by the multi-scale grouped convolution are weighted using the attention weights generated for each channel, and the background features enhanced by SE channel attention are finally obtained.

6. The method according to claim 5, characterized in that, In S3, the background features enhanced with attention in the SE channel are fused with the original background features using weighted residual fusion. The final output background features after the background branching process include: The background feature enhanced with attention in the SE channel is connected to the original background feature along the channel; Use a depthwise separable convolution layer to further extract features connected along the channels; Enhanced fusion output through SE attention; and, Introducing learnable residual weights A weighted residual connection is performed, and the final output is the background feature processed by the background branch.

7. The method according to claim 1, characterized in that, The dynamic interactive perception mechanism described in S3 integrates global information through global gating weights, i.e., global attention, and generates local attention through spatial modulation, including: Global attention: The background enhancement features and rain layer enhancement features are concatenated along the channel dimension to form a joint feature, represented as follows: ; in, Background features after background branch processing The rain layer features after rain layer branching processing. Indicates joint features; By integrating global context information through adaptive average pooling, a single-point global description is generated, represented as: ; in, This represents a single-point global description, avoiding interference from spatial location. Indicates global average pooling; A gated network is introduced, using a multi-layer convolutional sequence, adding activation functions layer by layer, and applying soft maximization activation to generate global gate weights, represented as: ; in, For learnable parameters, This refers to the channel compression ratio. For the Sigmoid function, This represents the ReLU activation function. Indicates the generated background gating weights. This represents the generated rain layer gating weights. G represents B With g R A list of components; Local spatial attention: Spatial attention is applied to the joint features, and multiple convolutions are used to generate a pixel-level spatial weight mask, represented as follows: ; in, For the Sigmoid function, For convolution weights, Represents pixel-level spatial weight mask The shape, These are batch size, number of channels, width, and height.

8. The method according to claim 7, characterized in that, In S3, global and local attention are fused through attention weights to obtain decoupled background and rain layer features, including: Introducing learnable parameters The relationship between the global gating weights and the local spatial attention weights is expressed as: ; in, This represents the background layer weights after attention weight fusion. This represents the rain layer weights after attention weight fusion. Represents a pixel-level spatial weight mask. Represents the learnable parameters. By multiplying the features output by the background branch and the rain layer branch by the normalized weights, the decoupled background features and rain layer features are obtained, as follows: ; ; in, This represents the background features after decoupling. This represents the output of the background branch before decoupling. Represents the normalized background weights. This represents the characteristics of the rain layer after decoupling. This represents the output of the rain layer branch before decoupling. This represents the normalized rain layer weights, where ε is a constant used to ensure numerical stability and avoid division by zero and gradient explosion. This indicates element-wise multiplication.

Citation Information

Patent Citations

  • Single-frame rainfall removing method based on multi-scale feature fusion

    CN109360155A

  • Wavelet-space double-attention image rain removal method and system guided by priori knowledge

    CN118014890A

  • Image rain removal method based on space-frequency double-domain perception

    CN119784637A

  • Rainfall field image extraction method based on double-domain collaboration and progressive feature decoupling

    CN120543878A

  • AU2020100196A4