Image rain removal method and system based on discrete attention mechanism

By constructing an information distillation rain removal network model based on a discrete attention mechanism, the problem of poor rain streak removal in existing technologies is solved, rain streak feature extraction and image clarity enhancement are achieved at high resolution, and the performance of computer vision systems is improved.

CN116994191BActive Publication Date: 2025-11-25NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310251085.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2025-11-25
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

Existing technologies struggle to maintain a good balance between rain streak noise removal and detail restoration when removing rain streaks, and the performance of deep neural networks degrades after training on new tasks, affecting the accuracy of computer vision systems.

Method used

A rain removal network model based on discrete attention mechanism is adopted. By concatenating multi-space convolutional pooling, long short-term memory network and discrete attention information distillation network, and combining loss function optimization iteration, fine rain pattern features are extracted and rain patterns in the image are removed.

Benefits of technology

The model effectively removes rain streak features at high resolution, improving image clarity and the accuracy of the computer vision system, and enhancing the robustness of the model under different rainfall scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116994191B_ABST
    Figure CN116994191B_ABST
Patent Text Reader

Abstract

The application discloses an image rain removing method and system based on a discrete attention mechanism in the field of image rain removing, and comprises the following steps: collecting real-time monitoring images of a monitoring area, inputting the real-time monitoring images into a trained information distillation rain removing network model, removing rain streak features from the real-time monitoring images to obtain output images; the training process of the information distillation rain removing network model comprises the following steps: connecting a multi-space convolution pooling network module, a long short-term memory network module and a discrete attention information distillation network module in series to construct an information distillation rain removing network model; training the information distillation rain removing network model by using a training sample set S and outputting a training result; optimizing and iterating parameters of the information distillation rain removing network model by using a loss function, and repeating the iteration until a set maximum iteration number is reached to output the trained information distillation rain removing network model; and more fine rain streak features are extracted under high resolution, so that the rain streak features in the images are removed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of image rain removal, and particularly relates to an image rain removal method and system based on a discrete attention mechanism. BACKGROUND

[0002] Images taken in the rain are disturbed by rain streaks and other noises, affecting the processing results of visual algorithms. The stacking of rain marks seriously affects the judgment and recognition of objects by machines and artificial intelligence, and can cause machines and artificial intelligence to make a series of wrong operations, reducing the accuracy of computer vision systems. In outdoor tasks of computer vision, removing rain marks is an important and challenging research topic. However, due to the complex combination of rain mark layers and background layers, image rain removal is still an ill-posed problem. Single-image rain removal relies only on physical models and prior information of image pixels. Previous algorithms can achieve good rain and fog removal effects, but it is difficult to maintain a good balance between rain streak noise removal and detail recovery.

[0003] In addition, by sequentially training multiple data sets, the current deep neural network almost completely forgets the previous knowledge, and after training on a new task, the performance of the model in previous tasks is greatly reduced. SUMMARY

[0004] The application provides an image rain removal method and system based on a discrete attention mechanism, which extracts more fine rain streak features at high resolution to remove rain streak features in images.

[0005] To achieve the above-mentioned purposes, the technical solution adopted by the application is:

[0006] The first aspect of the application provides an image rain removal method based on a discrete attention mechanism, comprising:

[0007] Collecting real-time monitoring images of a monitoring area, inputting the real-time monitoring images into a trained information distillation rain removal network model, removing rain streak features from the real-time monitoring images to obtain output images;

[0008] The training process of the information distillation rain removal network model comprises: acquiring images containing rain streak features as training samples, establishing a training sample set S; based on a discrete attention unit and an information distillation unit, a discrete attention information distillation network module is constructed; the multi-space convolution pooling network module, the long short-term memory network module and the discrete attention information distillation network module are connected in series to construct an information distillation rain removal network model;

[0009] The information distillation rain removal network model is trained by using the training sample set S and a training result is output; a loss function is constructed based on the training result and a benchmark clean image corresponding to the training sample, parameters of the information distillation rain removal network model are iteratively optimized by using the loss function, and the iteration is repeated until a set maximum iteration number is reached to output the trained information distillation rain removal network model.

[0010] Preferably, the method for obtaining the image containing rain streak features as the training sample comprises: selecting N synthetic images containing rain streak features from a Rain100H synthetic image database, cutting and flipping the synthetic images to obtain images containing rain streak features of a set size, and taking the images containing rain streak features of the set size as the training sample.

[0011] Preferably, the method for training the information distillation rain removal network model by using the training sample set S and outputting a training result comprises: inputting the training sample in the training sample set S into a multi-space convolutional pooling network module to extract multi-scale information, obtaining image feature information X a ; inputting the image feature information X a into a long short-term memory network module to extract effective features, increasing the weight of the effective features to obtain image feature information X b ; inputting the image feature information X b into a discrete attention information distillation network module to perform cross-channel fusion and deep feature extraction, and obtaining a training result.

[0012] Preferably, the multi-space convolutional pooling network module comprises one image input layer and four dilated convolutional layers; the image input layer comprises an adaptive average pooling layer and a 1x1 convolutional layer; the convolutional kernel size of the four dilated convolutional layers is set to 3x3, and the expansion rate of the four dilated convolutional layers increases in turn.

[0013] Preferably, the method for inputting the training sample in the training sample set S into the multi-space convolutional pooling network module to extract multi-scale information and obtaining image feature information X a comprises:

[0014] The training sample is input into the multi-space convolutional pooling network, the training sample is upsampled by the image input layer in the multi-space convolutional pooling network, then four features are extracted by using four dilated convolutions respectively to obtain four feature information, and the four feature information is combined to obtain image feature information X a .

[0015] Preferably, the calculation formula of the dilated convolutional layer is:

[0016]

[0017] In the formula, y[i] represents the feature information output by the dilated convolution layer; x[i] represents the feature map input to the dilated convolution layer; w[k] represents the filter function; r represents the set stride; k represents the order of the dilated convolution layer; and K represents the number of dilated convolution layers.

[0018] Preferably, the discrete attention information distillation network module comprises one discrete attention unit and seven information distillation units.

[0019] Preferably, the image feature information X b is input to the discrete attention information distillation network module for cross-channel fusion and deep feature extraction, and the method for obtaining the training result comprises:

[0020] The image feature information X b is input to the discrete attention unit, the image feature information X b is segmented, and R convolution kernels are used for processing to form a unit feature map;

[0021] The unit feature map is subjected to feature fusion, and the expression formula is:

[0022]

[0023] In the formula, U j represents the unit feature map; U k represents the feature map output by the discrete attention unit;

[0024] The feature map U k output by the discrete attention unit is input to the seven information distillation units, and the expression formula is:

[0025]

[0026] In the formula, represents the jth convolution layer function of the nth information distillation module, n ranges from 1 to 7, and j ranges from 1 to 4; represents the input feature map of the nth information distillation module; when n = 1, represents the feature map U k output by the discrete attention unit; represents the jth channel splitting layer function of the nth information distillation module; represents the mth refined feature output by the nth information distillation module, represents the jth coarse feature output by the nth information distillation module;

[0027] The training result is obtained by combining the refined features output by the fourth information distillation module.

[0028] Preferably, a loss function is constructed based on the training result and the reference clean image corresponding to the training sample, and the formula is as follows:

[0029]

[0030] In the formula, SSIM(x, y) represents a loss function of the training result and the reference clean image; x represents the training result; y represents the reference clean image corresponding to the training sample; mu x represents the mean value of the training result; mu y represents the mean value of the reference clean image; sigma x represents the standard deviation of the training result; sigma y represents the standard deviation of the reference clean image; sigma xy represents the covariance of the training result and the corresponding reference clean image.

[0031] The second aspect of the present application provides an image rain removal system based on a discrete attention mechanism, comprising:

[0032] A rain removal module is configured to collect real-time monitoring images of a monitoring area, input the real-time monitoring images into a trained information distillation rain removal network model, and remove rain streak features from the real-time monitoring images to obtain output images.

[0033] An acquisition module is configured to acquire images containing rain streak features as training samples, and establish a training sample set S.

[0034] A model construction module is configured to construct a discrete attention information distillation network module based on a discrete attention unit and an information distillation unit, and connect the multi-space convolution pooling network module, the long short-term memory network module and the discrete attention information distillation network module in series to construct an information distillation rain removal network model.

[0035] A model training module is configured to train the information distillation rain removal network model using the training sample set S and output a training result, construct a loss function based on the training result and the reference clean image corresponding to the training sample, optimize and iterate parameters of the information distillation rain removal network model using the loss function, and repeat the iteration until a set maximum iteration number is reached to output a trained information distillation rain removal network model.

[0036] The third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the steps of the image rain removal method.

[0037] Compared with the prior art, the present application has the following beneficial effects:

[0038] The application connects the multi-space convolution pooling network module, the long short-term memory network module and the discrete attention information distillation network module in series to construct an information distillation rain removal network model; a loss function is constructed based on a training result and a corresponding benchmark clean image of a training sample, and the loss function is used to optimize and iterate parameters of the information distillation rain removal network model, so that the information distillation rain removal network model extracts more fine rain streak features under high spatial resolution, thereby removing the rain streak features in the image to obtain a clear background image. BRIEF DESCRIPTION OF DRAWINGS

[0039] Figure 1 is a flowchart of an image rain removal method based on a discrete attention mechanism provided by an embodiment of the application;

[0040] Figure 2 is a structural diagram of an information distillation rain removal network model provided by an embodiment of the application;

[0041] Figure 3 is a structural diagram of a multi-space convolution network unit provided by an embodiment of the application;

[0042] Figure 4 is a structural diagram of a discrete attention information distillation network module provided by an embodiment of the application;

[0043] Figure 5 is a structural diagram of an information distillation unit provided by an embodiment of the application;

[0044] Figure 6 is a comparison diagram of the application and other image rain removal methods. DETAILED DESCRIPTION

[0045] The application will be further described below in combination with the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the application, and cannot be used to limit the protection scope of the application.

[0046] Embodiment one

[0047] As shown in Figures 1 to 5 , the application provides an image rain removal method based on a discrete attention mechanism, comprising:

[0048] Collecting a real-time monitoring image of a monitoring area, inputting the real-time monitoring image into a trained information distillation rain removal network model, removing rain streak features of the real-time monitoring image to obtain an output image;

[0049] The training process of the information distillation rain removal network model comprises:

[0050] N synthetic images containing rain streak features are selected from a Rain100H synthetic image database, the synthetic images are cut and flipped to obtain images containing rain streak features of a set size and used as training samples; a training sample set S is established.

[0051] A discrete attention information distillation network module is constructed based on a discrete attention unit and an information distillation unit; the discrete attention information distillation network module includes one discrete attention unit and seven information distillation units. The multi-space convolution pooling network module, the long short-term memory network module and the discrete attention information distillation network module are connected in series to construct an information distillation rain removal network model; the multi-space convolution pooling network module includes one image input layer and four dilated convolution layers; the image input layer includes an adaptive average pooling layer and a 1x1 convolution layer; the convolution kernel size of the four dilated convolution layers is set to 3x3, and the dilation rates of the four dilated convolution layers increase in turn; the dilation rates of the four dilated convolution layers are set to {1, 2, 3, 4} to expand the receptive field, so as to better extract the traces introduced between pixels in the binocular super-resolution process and realize multi-scale information extraction;

[0052] The method for training the information distillation rain removal network model by using the training sample set S and outputting a training result includes:

[0053] The training sample in the training sample set S is input into the multi-space convolution pooling network module for multi-scale information extraction to obtain image feature information X a The method includes:

[0054] The training sample is input into the multi-space convolution pooling network, the training sample is upsampled by the image input layer in the multi-space convolution pooling network, then four features are extracted by using four dilated convolutions respectively to obtain four feature information, and the four feature information is combined to obtain the image feature information X a .

[0055] The calculation formula of the dilated convolution layer is:

[0056]

[0057] In the formula, L[i] represents the feature information output by the dilated convolution layer; x[i] represents the feature map input into the dilated convolution layer; w[k] represents the filter function; r represents the set step; k represents the order of the dilated convolution layer; and K represents the number of dilated convolution layers.

[0058] The image feature information X a is input into the long short-term memory network module to extract effective features, increase the weight of the effective features, and obtain the image feature information X b .

[0059] The image feature information Xb The method for obtaining the training result by inputting the discrete attention information distillation network module to perform cross-channel fusion and deep feature extraction includes:

[0060] The image feature information X b is input into the discrete attention unit, and the image feature information X b is segmented and processed by R convolution kernels to form a unit feature map;

[0061] The unit feature map is subjected to feature fusion, and the expression formula is:

[0062]

[0063] In the formula, U j represents the unit feature map; U k represents the feature map output by the discrete attention unit; the features of different channels are fused to improve the robustness of the information distillation rain removal network model in different rainfall scenarios

[0064] The feature map U k output by the discrete attention unit is input into 7 information distillation units, and the expression formula is:

[0065]

[0066] In the formula, represents the jth convolution layer function of the nth information distillation module, n ranges from 1 to 7, and j ranges from 1 to 4; represents the input feature map of the nth information distillation module; when n = 1, represents the feature map U k output by the discrete attention unit; represents the jth channel splitting layer function of the nth information distillation module; represents the mth refined feature output by the nth information distillation module, represents the jth coarse feature output by the nth information distillation module;

[0067] The training result is formed by combining the refined features output by the fourth information distillation module.

[0068] A loss function is constructed based on the training result and the reference clean image corresponding to the training sample, and the expression formula is:

[0069]

[0070] In the formula, SSIM(x, y) represents the loss function of the training result and the reference clean image; x represents the training result; y represents the reference clean image corresponding to the training sample; μ xdenoted as the mean of the training results; μ y denoted as the mean of the reference clean images; σ x denoted as the standard deviation of the training results; σ y denoted as the standard deviation of the reference clean images; σ xy denoted as the covariance of the training results and the corresponding reference clean images.

[0071] The parameters of the information distillation rain removal network model are iteratively optimized using the loss function, and the iteration is repeated until a set maximum number of iterations is reached to output a trained information distillation rain removal network model.

[0072] The expression formula of the information distillation rain removal network model is:

[0073] x t-0.5 = f in (x t-1 ,h)

[0074] s t = f recurrent (s t-1 ,x t-0.5 )

[0075] x t = f out (f res (s t ))

[0076] In the formula, x t-1 denotes the output image of the information distillation rain removal network model at the t-1th recursion; h denotes the training sample; f in (·) denotes the input function of the information distillation rain removal network model, and the concatenation of the output image x t-1 and the training sample y is taken as the input of the input function; t is the number of recursions of the information distillation rain removal network model; s t-1 denotes the state parameter of the t-1th recursion cycle layer of the information distillation rain removal network model; f res (·) is a residual network function, f recurrent (·) denotes a repeated recursion function, f out (·) denotes the output function of the information distillation rain removal network model; x t denotes the output image of the information distillation rain removal network model at the tth recursion.

[0077] The software environment of the embodiment is Python 3.7 and the deep learning framework Pytorch, the hardware environment is Tesla A40 processor, 48G memory, the development tool is PyCharm Professional Edition 2021.3.3, the image size is 100*100, the batch size is set to 8, the Adam optimizer is used, the number of iterations is 100, and the initial learning rate is 1*10-3.The learning rate is multiplied by 0.2 to decay at 30, 50 and 80 iterations.

[0078] The application uses two indicators as the reference for evaluating the performance of the algorithm, which are peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). The higher the restoration degree of the result after removing the rain streaks, the larger the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM).

[0079] The information distillation rain removal network based on the discrete attention mechanism is compared with four advanced methods, including Lightweight pyramid networks (LPNET), Recurrent squeeze-and-excitation context aggregation net (RESCAN), Progressive image deraining networks (Pre-Net) and Deep cross-scale fusion network (DCSFN), and the information distillation rain removal network based on the discrete attention mechanism is trained and tested using the synthetic dataset Rain100H, Rain100L, and the evaluation results are shown in Table 1.

[0080] Table 1 Quality evaluation results of regional images

[0081]

[0082] As Figure 6 shown, the model uses a pooling network composed of a hollow convolution to extract data, integrates the features of particles of various sizes, obtains the maximum receptive field while reducing the resolution loss. The recurrent network selectively extracts features, increasing the weight of important features. Through the discrete attention distillation module, the details of the image are gradually refined, and after obtaining part of the detail features, the remaining features are further refined to obtain a clear background image.

[0083] Embodiment two

[0084] As Figure 1 and Figure 2 shown, an image rain removal system based on a discrete attention mechanism, the system provided by the embodiment can be applied to the method described in embodiment one, the image rain removal system comprises:

[0085] The rain removal module is configured to acquire a real-time monitoring image of the monitoring area, input the real-time monitoring image into the trained information distillation rain removal network model, and remove rain streak features from the real-time monitoring image to obtain an output image.

[0086] The acquisition module is configured to acquire an image containing rain streak features as a training sample, and establish a training sample set S.

[0087] The model construction module is configured to construct a discrete attention information distillation network module based on a discrete attention unit and an information distillation unit, and construct the information distillation rain removal network model by connecting the multi-space convolution pooling network module, the long short-term memory network module, and the discrete attention information distillation network module in series.

[0088] The model training module is configured to train the information distillation rain removal network model using the training sample set S and output a training result, construct a loss function based on the training result and a benchmark clean image corresponding to the training sample, optimize and iterate parameters of the information distillation rain removal network model using the loss function, and repeat the iteration until a set maximum iteration number is reached to output the trained information distillation rain removal network model.

[0089] Embodiment three

[0090] The third aspect of the present application provides a computer readable storage medium, characterized in that a computer program is stored thereon, and the program, when executed by a processor, implements the steps of the image rain removal method of embodiment one.

[0091] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0092] The present application is described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one flow or multiple flows and / or blocks Figure 1means for performing the function specified in the block or blocks.

[0093] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the flow Figure 1 one or more flowcharts and / or blocks Figure 1 means for performing the function specified in the block or blocks.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow Figure 1 one or more flowcharts and / or blocks ​ means for performing the function specified in the block or blocks.

[0095] The above description is only preferred embodiments of the present application, it should be pointed out that, for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and modifications can also be made, these improvements and modifications should be considered as the protection scope of the present application.

Claims

1. An image deraining method based on a discrete attention mechanism, characterized in that, include: Real-time monitoring images of the monitoring area are collected and input into a trained information distillation deraining network model to remove rain streaks from the real-time monitoring images and obtain the output image. The training process of the information distillation rain removal network model includes: acquiring images containing rain pattern features as training samples and establishing a training sample set S; constructing a discrete attention information distillation network module based on discrete attention units and information distillation units; and connecting a multi-space convolutional pooling network module, a long short-term memory network module, and a discrete attention information distillation network module in series to construct the information distillation rain removal network model. The method for training an information distillation rain removal network model using a training sample set S and outputting the training results includes: inputting training samples from the training sample set S into a multi-space convolutional pooling network module to extract multi-scale information and obtain image feature information X. a ; to transfer image feature information X a The input is fed into a Long Short-Term Memory (LSTM) network module to extract effective features, and the weights of these effective features are increased to obtain image feature information X. b ; Image feature information X b Methods for inputting information into a discrete attention distillation network module for cross-channel fusion and deep feature extraction to obtain training results include: Image feature information X b Input discrete attention unit to the image feature information X b Segmentation, and through Each convolutional kernel is used to process and form a unit feature map; Feature fusion of unit feature maps is expressed by the following formula: ; In the formula, Represented as a unit feature map; denoted as the feature map output by the discrete attention unit; k represents the order of the dilated convolutional layers in the multi-space convolutional pooling network module. Feature map output by discrete attention unit The input is fed into 7 information distillation units, and the expression formula is as follows: ; In the formula, Let n represent the function of the j-th convolutional layer in the n-th information distillation module, where n ranges from 1 to 7 and j ranges from 1 to 4. This is represented as the input feature map of the nth information distillation module; when n=1, Feature map output by discrete attention unit ; This represents the j-th channel splitting layer function of the n-th information distillation module; This represents the m-th refined feature output by the n-th information distillation module. This represents the j-th coarse feature output by the n-th information distillation module; The refined features output by the fourth information distillation module are combined to form the training result; A loss function is constructed based on the training results and the corresponding clean benchmark images of the training samples. The parameters of the information distillation rain removal network model are optimized and iterated using the loss function. The iteration is repeated until the set maximum number of iterations is reached, and the trained information distillation rain removal network model is output.

2. The image deraining method based on discrete attention mechanism according to claim 1, characterized in that, The method for obtaining images containing rain streak features as training samples includes: selecting N synthetic images containing rain streak features from the Rain100H synthetic image database, cutting and flipping the synthetic images to obtain images containing rain streak features of a set size, and using them as training samples.

3. The image deraining method based on discrete attention mechanism according to claim 1, characterized in that, The multi-spatial convolutional pooling network module includes an image input layer and four dilated convolutional layers; the image input layer includes an adaptive average pooling layer and... The convolutional layers; the kernel size of the four dilated convolutional layers is set to... The expansion rates of the four hollow convolutional layers increase sequentially.

4. The image deraining method based on discrete attention mechanism according to claim 3, characterized in that, The training samples in the training sample set S are input into a multi-space convolutional pooling network module to extract multi-scale information and obtain image feature information X. a The methods include: Training samples are input into a multi-spatial convolutional pooling network. The image input layer in the network upsamples the training samples, and then four dilated convolutions are used to extract four feature information. These four feature information are combined to obtain image feature information X. a .

5. The image deraining method based on discrete attention mechanism according to claim 4, characterized in that, The formula for calculating a holed convolutional layer is: ; In the formula, This represents the feature information output by the dilated convolutional layer; This is represented as the feature map of the input dilated convolutional layer; denoted as the filtering function; r represents the stride setting; k represents the order of the dilated convolutional layers; K represents the number of dilated convolutional layers.

6. The image deraining method based on discrete attention mechanism according to claim 1, characterized in that, The loss function is constructed based on the training results and the corresponding clean benchmark images of the training samples, expressed as follows: ; In the formula, SSIM(x,y) represents the loss function for the training result and the baseline clean image; x represents the training result; y represents the baseline clean image corresponding to the training sample. This is expressed as the average value of the training results; It is represented as the average value of the baseline clean image; This is expressed as the standard deviation of the training results; Expressed as the standard deviation of the baseline clean image; It is represented as the covariance between the training result and the corresponding clean benchmark image.

7. An image deraining system based on a discrete attention mechanism, characterized in that, include: The rain removal module is used to collect real-time monitoring images of the monitoring area, input the real-time monitoring images into the trained information distillation rain removal network model, and remove rain streak features from the real-time monitoring images to obtain the output image; The acquisition module is used to acquire images containing rain pattern features as training samples and establish a training sample set S. The model building module is used to construct a discrete attention information distillation network module based on discrete attention units and information distillation units; and to connect the multi-space convolutional pooling network module, long short-term memory network module and discrete attention information distillation network module to construct an information distillation rain removal network model. The model training module is used to train the information distillation rain removal network model using the training sample set S and output the training results. Based on the training results and the benchmark clean images corresponding to the training samples, a loss function is constructed. The parameters of the information distillation rain removal network model are optimized and iterated using the loss function. The iteration is repeated until the set maximum number of iterations is reached and the trained information distillation rain removal network model is output. The model training module uses a training sample set S to train the information distillation rain removal network model and outputs the training results. This includes inputting training samples from the training sample set S into a multi-space convolutional pooling network module to extract multi-scale information and obtain image feature information X. a ; to transfer image feature information X a The input is fed into a Long Short-Term Memory (LSTM) network module to extract effective features, and the weights of these effective features are increased to obtain image feature information X. b ; Image feature information X b Methods for inputting information into a discrete attention distillation network module for cross-channel fusion and deep feature extraction to obtain training results include: Image feature information X b Input discrete attention unit to the image feature information X b Segmentation, and through Each convolutional kernel is used to process and form a unit feature map; Feature fusion of unit feature maps is expressed by the following formula: ; In the formula, Represented as a unit feature map; denoted as the feature map output by the discrete attention unit; k represents the order of the dilated convolutional layers in the multi-space convolutional pooling network module. Feature map output by discrete attention unit The input is fed into 7 information distillation units, and the expression formula is as follows: ; In the formula, Let n represent the function of the j-th convolutional layer in the n-th information distillation module, where n ranges from 1 to 7 and j ranges from 1 to 4. This is represented as the input feature map of the nth information distillation module; when n=1, Feature map output by discrete attention unit ; This represents the j-th channel splitting layer function of the n-th information distillation module; This represents the m-th refined feature output by the n-th information distillation module. This represents the j-th coarse feature output by the n-th information distillation module; The refined features output by the fourth information distillation module are combined to form the training result.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the image deraining method according to any one of claims 1 to 6.