A method and system for removing rain from nighttime images based on rain line position prior
By improving the recurrent residual network to learn the rain line position prior and combining it with the self-attention mechanism, the recognition deficiencies of the night image rain removal model are solved, and effective rain line removal and background restoration in night scenes are achieved, improving image quality and the performance of computer vision algorithms.
Patent Information
- Application Number
- CN202211710369.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-12-29
AI Technical Summary
Existing image deraining models cannot effectively identify and remove rain lines in nighttime scenes, resulting in poor image quality and affecting the performance of computer vision algorithms.
By improving the recurrent residual network model to learn the rain line position prior, and combining it with the self-attention mechanism to modulate it, it is injected into the existing image deraining model and trained using the image deraining dataset to improve the deraining performance of night scenes.
It effectively identifies and removes rain lines in night scenes, restores clear background images, and improves the image signal-to-noise ratio and the processing performance of computer vision algorithms.
Smart Images

Figure CN116152089B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a nighttime image rain removal method and system based on rain line position priori, and belongs to the technical field of computer vision. Background Art
[0002] In rainy conditions, raindrops' reflection and refraction of incoming ambient light influences their appearance, often appearing brighter than the background in daylight scenes. During the camera's exposure time, rapidly falling raindrops experience motion blur, appearing as thin, white lines in the image and obscuring background information. Consequently, images captured in rainy conditions suffer from a low signal-to-noise ratio, poor image quality, and reduced scene visibility, hindering normal use and degrading the processing performance of downstream computer vision algorithms.
[0003] To address these issues, image deraining technology has emerged. This technology utilizes a post-processing algorithm to remove rain lines from rainy images and restore the background information obscured by the rain lines, thereby restoring a clean background image and improving the image's signal-to-noise ratio. This computational imaging technology has achieved excellent results and is widely deployed in image editing systems. Traditional image deraining technology establishes an artificial prior model for physical properties such as the size, direction, and spatial distribution of rain lines. It then processes rainy images, detects the distribution of rain lines within the image, and separates them from the background information. It then removes the rain lines and fills in the missing background information, restoring a clean background image. With the rapid development of deep learning methods, end-to-end image deraining methods using neural network models have gradually become mainstream, far outperforming traditional methods based on artificial prior models.
[0004] Currently, image deraining primarily focuses on daytime image deraining, while nighttime image deraining has not been fully explored. Compared to daytime scenes, nighttime scenes no longer have a uniform global white light source. Instead, they are replaced by uneven, colored, artificial local light sources. This breaks the white rain line assumption relied upon by daytime image deraining methods. The appearance of rain lines in nighttime scenes is strongly correlated with their relative position to the local light source. This means that rain lines appear differently at different locations within the scene, resulting in rain lines appearing as different colors and pixel brightness in rainy images, significantly increasing the similarity between the rain lines and the background.
[0005] Although existing deep models for image deraining are effective, they do not take into account the characteristics of the aforementioned nighttime rainy scenes. Therefore, such image deraining networks cannot identify rain lines when directly processing rainy images at night, and are unable to remove rain lines from nighttime images. Summary of the Invention
[0006] This paper addresses the current lack of research in image deraining for nighttime scenes. To address the technical problem of existing image deraining models failing to identify and remove rain lines in nighttime scenes, we propose a novel method and system for nighttime image deraining based on a priori knowledge of rain line positions. This method, based on an existing synthetic image deraining dataset, improves the performance of existing image deraining methods for nighttime scenes. Furthermore, it removes rain lines from real rainy nighttime images, restoring a clean background image.
[0007] The present invention is achieved through the following technical solutions.
[0008] On the one hand, this paper proposes a night image rain removal method based on rain line position prior, which includes the following steps:
[0009] Step 1: Model improvement phase.
[0010] The rain line position prior is learned from the training data and modulated, and then this prior information is injected into the model.
[0011] Specifically, step 1 includes the following steps:
[0012] Step 1.1: Use the recurrent residual network model to learn the rain line position prior from the data in the image deraining dataset. This model can process rainy images at night and obtain the corresponding rain line position prior results for modulation and injection in subsequent steps.
[0013] Furthermore, the implementation method of this step is as follows:
[0014] The output dimension of the recurrent residual network model is modified to guide it to output a single-channel prior result of the rain line position. The prior result of the previous stage is spliced with the original rain image in the channel dimension and input into the next stage of the model for iterative optimization. The specific expression is:
[0015]
[0016] in, is the output of the k-th stage of the model, is the output of the k-1th stage of the model, RLP represents the rain line position prior module based on the cyclic residual network, I is the night rain image, θ is the parameter to be optimized of the network model, and N is the total number of cyclic stages of the model.
[0017] Step 1.2: Use self-attention to modulate the rain line position prior and generate corresponding weights to weight the prior. This increases the feature weights of the rain line region while suppressing the feature weights of the background region, making it easier for the image deraining network in subsequent steps to process the rain line region specifically.
[0018] Furthermore, the implementation method of this step is as follows:
[0019] The rain line position prior obtained in step 1.1 The feature tensor f before the output layer of the RLP module is input into the rain line prior injection module RPIM. Using the self-attention method, the rain line position prior and the corresponding feature tensor are weighted modulated to obtain the modulated rain line position prior. and the feature tensor z.
[0020] Specifically expressed as:
[0021]
[0022] Among them, σ is the model parameter to be optimized for this module.
[0023] Step 1.3: Inject the modulated rain line position prior and feature tensor into the existing image deraining model structure through the feature mapping structure of the input part.
[0024] Furthermore, the implementation method of this step is as follows:
[0025] The modulated rain line position prior in step 1.2 The channel dimension of the feature tensor z is concatenated with the input of the existing image deraining model and the feature tensor output by the input feature mapping structure, respectively. The rain line position prior is injected into the existing image deraining model to guide the recognition of rain lines in night scenes. The specific expression is:
[0026]
[0027] in, is the final deraining result, DM is the existing image deraining model, I is the original rainy image, and z are the modulated rain line position prior and feature tensor respectively, and Θ is the parameter to be optimized in the existing image deraining model.
[0028] Step 2: Training phase.
[0029] Using an existing image deraining dataset, train the deraining model from step 1, tailored to the lighting characteristics of nighttime scenes. Input the original rainy image into the model, obtain the deraining result output by the network, and then calculate the loss function with the paired clean background image to complete the model training.
[0030] Specifically, step 2 includes the following steps:
[0031] Step 2.1: Preprocess and augment the image deraining dataset to improve the richness of network training data.
[0032] Furthermore, the implementation method of this step is as follows:
[0033] The input images in the image deraining dataset are preprocessed, including rotation, flipping, and random cropping, to increase the richness of the training data.
[0034] Step 2.2: Input the preprocessed rainy image into the improved deraining model obtained in step 1. After processing by the deraining model, the corresponding deraining result is obtained. It is compared with the paired clean background image, and the loss function of the image deraining task is calculated. The parameters in the model are updated accordingly.
[0035] Furthermore, the implementation method of this step is as follows:
[0036] Randomly select rainy images from the training dataset and input them into the image deraining model. Let the input image be I. The improved network model processes the input rainy image I and outputs the corresponding image deraining result. Compare it with the paired clean background image Y and calculate the image deraining task loss function
[0037]
[0038] Step 2.3: Repeat step 2.2 and continuously update the parameters in the model until the set termination conditions are met, and then save the network structure and model parameters.
[0039] Furthermore, the implementation method of this step is as follows:
[0040] During the training process, the model is repeatedly fed rainy images and its parameters are dynamically adjusted based on the loss function until a pre-set condition is met (e.g., a certain number of training rounds is reached or an evaluation metric exceeds a pre-set value). When the training process stops, the model parameters are saved.
[0041] Step 3: Use phase.
[0042] Using the image deraining model trained in step 2, rain lines are removed from the nighttime rainy image to be processed, and the result is obtained after removing the rain lines and restoring the background details.
[0043] Specifically, step 3 includes the following steps:
[0044] Step 3.1: Use the trained image deraining network model to process the rainy night image to obtain the deraining result.
[0045] Furthermore, the implementation method of this step is as follows:
[0046] After step 2 training is completed, the optimal network model is selected, the network parameters are loaded, and the night rainy image to be processed is input into the model. The model will effectively remove the rain lines in the night scene.
[0047] On the other hand, to achieve the above purpose, the present invention proposes a night image rain removal system based on rain line position prior, which includes an input processing module, a rain line position prior module, a rain line prior injection module and a rain removal module.
[0048] Among them, the input processing module is responsible for preprocessing the image of the input model to ensure that it meets the input requirements of the subsequent modules.
[0049] Furthermore, the input processing module reads the original rainy image to be processed, converts its color space, and performs numerical normalization. The entire preprocessing process converts the original rainy image in different formats into a vector form that meets the input requirements of subsequent modules.
[0050] The rain line position prior module is responsible for processing the input rainy image using the prior knowledge learned from the paired image rain removal dataset, generating the corresponding rain line position prior results, and inputting them into subsequent modules for modulation.
[0051] The rain line prior injection module is responsible for modulating the rain line position prior and feature tensor provided by the rain line position prior module through the self-attention mechanism. By increasing the feature weight of the rain line area and reducing the weight of the background area, the modulated rain line position prior and feature tensor are obtained and injected into subsequent modules.
[0052] The rain removal module is responsible for receiving rainy images and injecting the modulated rain line position prior from the rain line prior injection module to specifically identify and remove rain lines in night scenes, and finally restore the clean background image to obtain the derained result.
[0053] The connection relationship of the above modules is as follows:
[0054] The output of the input processing module is connected to the input of the rain line location prior module and the input of the rain removal module. The output of the rain line location prior module is connected to the input of the rain line prior injection module. The output of the rain line prior injection module is connected to the input of the rain removal module.
[0055] Beneficial effects
[0056] Compared with the prior art, the present invention has the following advantages:
[0057] 1. The present invention uses a cyclic residual network model to learn rain line position priors that are strongly correlated with rain line position information from image deraining datasets, and specifically applies them to the task of nighttime image deraining. It fully utilizes the characteristics of the cyclic residual network structure in existing image deraining networks and the fact that rain lines are strongly correlated with light source positions in nighttime scenes, providing effective rain line position information to existing deraining networks.
[0058] 2. This paper adopts a self-attention mechanism to modulate the learned rain line position prior. By weightedly increasing the weight of the rain line area and suppressing the weight of the background area, it guides the subsequent rain removal network model to focus on removing rain lines in the rain line area and restoring background information, thereby achieving rain removal for night scene images.
[0059] 3. This invention utilizes an existing image deraining network model as the deraining module. By applying a loss function for the image deraining task as a constraint, it jointly trains a rain line location prior module, a rain line prior injection module, and a rain removal module to achieve nighttime image deraining. The rain line location prior network is not limited to a specific recurrent residual network and can be modified based on practical needs. The deraining network is not limited to a specific network model and can be freely replaced as needed. For example, a more complex network structure can be used to improve image deraining effectiveness, while a lightweight network can be used to increase real-time processing speed. This provides ample flexibility.
[0060] 4. This paper proposes a targeted solution for nighttime image deraining tasks. It can effectively address the problem of the strong correlation between the appearance of rain lines and the relative position of light sources in nighttime scenes, and improve the deraining performance of existing image deraining network models in rainy nighttime scenes. It not only fully utilizes the advantages of existing methods, but also solves the under-studied problem of nighttime image deraining, which is of great significance for promoting the development of the image deraining field. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a flow chart of the method of the present invention;
[0062] Figure 2 It is a structural diagram of the core algorithm model of the method of the present invention.
[0063] Figure 3 It is a structural schematic diagram of the night image rain removal system based on rain line position prior disclosed by the present invention. DETAILED DESCRIPTION
[0064] In order to better illustrate the purpose and advantages of the present invention, the present invention is further described below with reference to the accompanying drawings and embodiments.
[0065] Example
[0066] This embodiment discloses a night image deraining method based on rain line position prior, which uses a cyclic residual network to process the original rainy image and estimate the corresponding rain line position prior; the obtained rain line position prior is input into the rain line prior injection module for modulation, thereby increasing the feature weight of the rain line area and reducing the weight of the background area at the same time, so as to guide the deraining network to focus on the rain line area and background restoration; the modulated rain line position prior is injected into the existing deraining network to guide it to perform deraining processing on the original rainy image; during the training process, an end-to-end training method is adopted to compare the deraining results of the deraining network with paired clean background images, calculate the loss function, and constrain the training of the network model; after the training is completed, the obtained network model is used to directly process the night rainy image to obtain the deraining result. The flowchart of this embodiment is shown in FIG. Figure 1 shown.
[0067] There is not much research on the task of removing rain from night images. The current daytime rain removal method based on deep learning does not take into account the particularity of the lighting conditions of night scenes and the strong correlation between the appearance of rain lines and the relative position of light sources. Therefore, the rain lines in night scenes cannot be effectively identified and removed. Due to the correlation between the appearance of rain lines and the position of light sources, the position information of rain lines becomes more important for the task of removing rain from night images. The night image rain removal method based on rain line position prior disclosed in this embodiment proposes a core algorithm that uses the cyclic residual network itself to learn the rain line position prior. By implicitly learning the rain line position prior knowledge from the image dataset and performing weighted modulation to enhance the weight of the rain line area and suppress the background area weight, it is further explicitly injected into the existing rain removal network, and the rain line position information is integrated into the network model, thereby enhancing the image rain removal model's ability to recognize rain lines in night scenes and improving its night rain removal performance. The structural diagram of the night image rain removal method based on rain line position prior is shown in FIG. Figure 2 shown.
[0068] The details of this embodiment are as follows.
[0069] A rain line position prior-based night image rain removal method includes three stages: model improvement, training, and application. Specifically, the following steps are included:
[0070] Step 1: Model improvement phase.
[0071] The existing image deraining method is improved by learning the rain line position prior from the training data and modulating it, and then injecting the prior information into the model.
[0072] Step 1.1: Use the recurrent residual network model to learn the rain line position prior from the data in the image deraining dataset. This model can process rainy images at night and obtain the corresponding rain line position prior results for modulation and injection in subsequent steps.
[0073] The output dimension of the recurrent residual network model is specifically modified to guide it to output a single-channel prior result of the rain line position. The prior result of the previous stage will be spliced with the original rain image in the channel dimension and input into the next stage of the model for iterative optimization. This step can be expressed as:
[0074]
[0075] Among them, RLP represents the rain line position prior module based on the cyclic residual network, I is the night rain image, is the output of the kth stage of the model, θ is the parameter of the network model to be optimized, and N is the total number of cyclic stages of the model.
[0076] Specifically, the cyclic residual network can use PReNet (see Ren D, Zuo W, Hu Q, et al. Progressive image deraining networks: A better and simpler baseline [C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2019: 3937-3946.), and other models with similar structures can be selected according to different performance requirements.
[0077] Step 1.2: Use the self-attention method to modulate the rain line position prior obtained in the previous step, generate corresponding weights to weight the prior, increase the feature weight of the rain line area while suppressing the feature weight of the background area, so that the image deraining network in the subsequent step can process the rain line area in a targeted manner.
[0078] The rain line position prior obtained in step 1.1 As well as the feature tensor f before the output layer of the RLP module, it is input into the rain line prior injection module RPIM. Using the self-attention method, the rain line position prior and the corresponding feature tensor are weighted modulated to obtain the modulated rain line position prior and feature tensor z. This step is described as:
[0079]
[0080] Among them, σ is the model parameter to be optimized for this module.
[0081] Step 1.3: The modulated rain line position prior and feature tensor are cleverly injected into the existing image deraining model structure through the feature mapping structure of the input part.
[0082] The modulated rain line position prior in step 1.2 The channel-wise concatenation of the feature tensor z and the input of the existing image deraining model and the feature tensor output by the input feature mapping structure is performed. This cleverly injects the rain line position prior into the existing image deraining model to guide the recognition of rain lines in night scenes. This step is described as follows:
[0083]
[0084] Among them, DM is the existing image deraining model, I is the original rainy image, and z are the modulated rain line position prior and feature tensor obtained in the previous step, respectively. is the final deraining result, and Θ is the parameter to be optimized for the existing image deraining model.
[0085] The image deraining network uses Uformer_T (see Wang Z, Cun X, Bao J, et al. Uformer: A general u-shaped transformer for image restoration [C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2022: 17683-17693. for details). Other deraining models can be selected based on the requirements for network performance and operation efficiency.
[0086] Step 2: Training phase.
[0087] Using the existing image deraining dataset, the deraining model improved for the night scene lighting characteristics in step 1 is trained. The original rainy image is input into the model. After obtaining the deraining result output by the network, the loss function is calculated with the paired clean background image to complete the model training.
[0088] Step 2.1: Preprocess and augment the image deraining dataset to improve the richness of network training data.
[0089] The input images in the image deraining dataset are preprocessed, including rotation, flipping, and random cropping, to increase the richness of the training data.
[0090] Step 2.2: Input the preprocessed rainy image into the improved deraining model obtained in step 1. After processing by the deraining model, the corresponding deraining result is obtained. It is compared with the paired clean background image, and the loss function of the image deraining task is calculated. The parameters in the model are updated accordingly.
[0091] Randomly select rainy images from the training dataset and input them into the image deraining model. Let the input image be I. The improved network model processes the input rainy image I and outputs the corresponding image deraining result. Compare it with the paired clean background image Y and calculate the image deraining task loss function
[0092]
[0093] Step 2.3: Repeat step 2.2 and continuously update the parameters in the model until the set termination conditions are met, and then save the network structure and model parameters.
[0094] During the training process, rainy images are repeatedly input into the model, and the parameters in the model are dynamically adjusted according to the loss function until the preset conditions are met (such as: the number of training rounds reaches a certain amount or a certain evaluation indicator is better than a preset value). The training process stops and the model parameters are saved.
[0095] Step 3: Use phase.
[0096] Using the image deraining model trained in step 2, rain lines are removed from the nighttime rainy image to be processed, and the result is obtained after removing the rain lines and restoring the background details.
[0097] Step 3.1: Use the trained image deraining network model to process the rainy night image to obtain the deraining result.
[0098] After step 2 training is completed, the optimal network model is selected, the network parameters are loaded, and the night rainy image to be processed is input into the model. The model will effectively remove the rain lines in the night scene.
[0099] Furthermore, a schematic diagram of a night image rain removal system based on rain line position prior according to an embodiment of the present invention is shown in FIG. Figure 3 As shown, the system includes an input processing module 100 , a rain line position priori module 200 , a rain line priori injection module 300 and a rain removal module 400 .
[0100] The input processing module 100 preprocesses images to be input into the model to ensure they meet the input requirements of subsequent modules. It reads the original rain-affected image to be processed, converts its color space, and performs numerical normalization. This entire preprocessing process converts the original rain-affected image in various formats into a vector form that meets the input requirements of subsequent modules.
[0101] The rain line position prior module 200 is used to estimate the rain line position prior of the input image. Using the prior knowledge learned from the paired image rain removal dataset, it processes the input rainy image and generates the corresponding rain line position prior result, which is input into the subsequent modules for modulation.
[0102] The rain line prior injection module 300 modulates the rain line position prior to increase the feature weight of the pre-defined region. The rain line position prior and feature tensor provided by the rain line position prior module 200 are modulated. By increasing the feature weight of the rain line region and decreasing the weight of the background region, the modulated rain line position prior and feature tensor are generated and injected into the rain removal module 400.
[0103] The rain removal module 400 removes rain lines from the scene and restores background information. It receives a rainy image and injects the modulated rain line position prior from the rain line prior injection module 300. It specifically identifies and removes rain lines from the nighttime scene, ultimately restoring a clean background image and producing the derained image.
[0104] The connection relationship of the above modules is as follows:
[0105] The output of the input processing module 100 is connected to the inputs of the rain line location prior module 200 and the rain removal module 400. The output of the rain line location prior module 200 is connected to the input of the rain line prior injection module 300. The output of the rain line prior injection module 300 is connected to the input of the rain removal module 400.
[0106] It should be noted that the above explanation of the embodiment of the night image rain removal method based on rain line position prior is also applicable to the night image rain removal system based on rain line position prior in this embodiment, and will not be repeated here.
[0107] The above specific description further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A nighttime image rain removal method based on rain line position prior, characterized in that: The following steps are involved: Step 1: Model improvement phase, learning the rain line position prior from the training data and performing modulation, and then injecting this prior information into the model; Step 1.1: Use the recurrent residual network model to learn the rain line position prior from the image deraining dataset. This model can process rainy images at night and obtain the corresponding rain line position prior. The output dimension of the recurrent residual network model is modified to guide it to output a single-channel prior result of the rain line position; The prior results of the previous stage are concatenated with the original rainy image in the channel dimension and then input into the next stage of the model for iterative optimization. The specific expression is: in, is the output of the k-th stage of the model, is the output of the k-1th stage of the model, RLP represents the rain line position prior module based on the cyclic residual network, I is the night rain image, θ is the parameter to be optimized for the network model, and N is the total number of cyclic stages of the model; Step 1.2: Use the self-attention method to modulate the rain line position prior and generate corresponding weights to weight the prior. The rain line position prior As well as the feature tensor f before the output layer of the RLP module, it is input into the rain line prior injection module RPIM; using the self-attention method, the rain line position prior and the corresponding feature tensor are weighted modulated to obtain the modulated rain line position prior And the feature tensor z, specifically expressed as: Among them, σ is the model parameter to be optimized for this module; Step 1.3: Inject the modulated rain line position prior and feature tensor into the existing image deraining model structure through the feature mapping structure of the input part; The modulated rain line position prior The channel dimension of the feature tensor z is concatenated with the input of the existing image deraining model and the feature tensor output by the input feature mapping structure. The rain line position prior is injected into the existing image deraining model to guide the recognition of rain lines in night scenes. The specific expression is: in, is the final deraining result, DM is the existing image deraining model, I is the original rainy image, and z are the modulated rain line position prior and feature tensor respectively, Θ is the parameter to be optimized in the existing image deraining model; Step 2: In the training phase, the rain removal model developed in Step 1 for nighttime scene lighting characteristics is trained using the existing image rain removal dataset. The original rainy image is input into the model, and the rain removal result output by the network is then compared with the paired clean background image to complete the model training. Step 3: In the application stage, the image deraining model trained in step 2 is used to remove rain lines from the nighttime rainy image to be processed, and the result is obtained after removing the rain lines and restoring the background details.
2. The method for removing rain from nighttime images based on rain line position priors according to claim 1, characterized in that: Step 2 includes the following steps: Step 2.1: Preprocess and augment the image deraining dataset to improve the richness of network training data; Step 2.2: Input the preprocessed rainy image into the improved deraining model obtained in step 1. After being processed by the deraining model, the corresponding deraining result is obtained. The deraining result is compared with the paired clean background image, and the loss function of the image deraining task is calculated. The parameters in the model are updated accordingly. Step 2.3: Repeat step 2.2, continuously input rainy images into the model, and dynamically adjust the parameters in the model according to the loss function until the set termination condition is met, and then save the network structure and model parameters.
3. The method for removing rain from nighttime images based on rain line position priors according to claim 2, characterized in that: Step 2.2 is implemented as follows: Randomly select rainy images from the training data set and input them into the image deraining model. Let the input image be I. The improved network model processes the input rainy image I and outputs the corresponding image deraining result. Compare it with the paired clean background image Y and calculate the image deraining task loss function 4. A nighttime image rain removal system based on rain line position priors that implements the method of claim 1, characterized in that: It includes input processing module, rain line position prior module, rain line prior injection module and rain removal module; The input processing module is responsible for preprocessing the image input to the model to ensure that it meets the input requirements of subsequent modules. The input processing module reads the original rain-affected image to be processed, converts its color space, and performs numerical normalization. The entire preprocessing process converts the original rain-affected image in different formats into a vector form that meets the input requirements of subsequent modules. The rain line position prior module is responsible for processing the input rain image using the prior knowledge learned from the paired image rain removal dataset to generate the corresponding rain line position prior results, which are then input into the rain line prior injection module for modulation. The rain line prior injection module is responsible for modulating the rain line position prior and feature tensor provided by the rain line position prior module through a self-attention mechanism. By increasing the feature weight of the rain line area and reducing the weight of the background area, the modulated rain line position prior and feature tensor are obtained and input into the rain removal module. The rain removal module receives rainy images and injects the modulated rain line position prior from the rain line prior injection module. It then specifically identifies and removes rain lines from nighttime scenes, ultimately restoring a clean background image and obtaining the derained result. The connection relationship of the above modules is as follows: The output end of the input processing module is connected to the input end of the rain line position prior module and the input end of the rain removal module respectively; the output end of the rain line position prior module is connected to the input end of the rain line prior injection module; and the output end of the rain line prior injection module is connected to the input end of the rain removal module.
Citation Information
Patent Citations
Single image rain removing method based on compressed reward and punishment neural network reusing original information
CN110310238A
Two-stage image rain removal method and system based on residual adversarial refinement network
CN111145112A