An unsupervised recurrent rain removal network method based on self-supervised constraints and unpaired data
By using unpaired real rain images and background images for self-supervised training in the image rain removal network, a rain removal and generation sub-network is established, which solves the problem of insufficient generalization in the existing technology and achieves better rain removal. Graph deraining effect and model generalization.
Patent Information
- Application Number
- CN202110887952.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-03
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-08-03
AI Technical Summary
Existing deep learning-based image rain removal methods are trained using artificially synthesized data sets under a supervised learning framework, resulting in insufficient generalization and inability to effectively handle the diverse rain streak types in the real world.
Unpaired real rain images and real background images are used for self-supervised training, and rain removal sub-networks, rain generation sub-networks and identification networks are established. Rain is introduced through self-supervision constraints and the unsupervised cyclic rain removal network method of unpaired data. Textured closed loops improve model generalization.
It improves the generalization of the model when processing real-world rain maps, circumvents the dilemma of obtaining supervision training data for real rain scenes, and provides stronger supervision through the rain pattern closed loop, improving the rain removal effect.
Smart Images

Figure CN113554568B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of single image rain removal, and in particular relates to an unsupervised cyclic rain removal network method based on self-supervisory constraints and unpaired data. Background Art
[0002] In recent years, with the development of big data and the advancement of deep learning, artificial intelligence has gradually entered people's field of vision. Among them, computer vision applications, as an important branch of artificial intelligence, are ubiquitous. Rainy weather is one of the common bad weather in daily life. When collecting images for computer vision, rainy weather will reduce the visual volume of the picture. The artifacts caused by rain streaks will have an adverse effect on the performance of subsequent computer vision algorithms, and may even cause the computer vision algorithm to fail. As image deraining algorithms have become a vital component in various applications such as unmanned driving, video surveillance, image enhancement, and target tracking, it is becoming increasingly important to develop image deraining algorithms with excellent results and good generalization performance.
[0003] Most of the current deep learning-based image deraining methods, such as convolutional neural networks, adversarial neural networks, encoder-decoder structures, etc., still use artificially synthesized datasets as training sets to train the network under the framework of supervised learning. Although the current deep learning-based image deraining methods have achieved excellent performance, there are still some limitations. The most important is that it is difficult to obtain input-label image pairs for supervised training from real rainy scenes, resulting in insufficient generalization. The current mainstream training method is to use artificially synthesized training sets as a substitute for training the network. The artificial synthesis method is to add rain streaks of different sizes, brightness, and distances from the camera to clean pictures through Photoshop software, and may also add different degrees of mist or smoke to simulate the real situation as much as possible. Despite this, artificially synthesized rain streak images still cannot cover the different types of rain streaks in the real world, which will cause domain deviations between artificial datasets and real pictures, and then cause the network trained with artificial datasets to not be well generalized to the real world. Summary of the invention
[0004] Based on this problem, the present invention proposes a self-supervised rain removal network that uses unpaired real rain images and real background images as input. Unlike other supervised rain removal methods, paired artificially synthesized rain images and background images are not used for supervised training. Therefore, the generalization of the model in processing real-world rain images can be improved to a certain extent, and the dilemma of difficulty in obtaining input-label image pairs for supervised training from real rain scenes is also avoided. At the same time, the present invention also introduces rain addition into the network to realize rain streak closed loop, providing stronger supervision for the self-supervised rain removal network.
[0005] To achieve the purpose of the present invention, the technical solution adopted by the present invention is as follows: an unsupervised cyclic rain removal network method based on self-supervisory constraints and unpaired data, characterized in that the method comprises the following steps:
[0006] Step 1: Randomly sample unpaired rain images and background images in the training dataset and perform preprocessing;
[0007] Step 2: Establish rainwater removal subnetwork, rainwater generation subnetwork, and identification network;
[0008] Step 3: Calculate the loss function based on the established network and the network architecture designed by the present invention;
[0009] Step 4: Set network hyperparameters, perform back propagation according to the loss function, and optimize network parameters;
[0010] Step 5: Repeat steps 3 and 4 until epoch 200, and then end network training.
[0011] As an improvement of the present invention, in step 1, the method of randomly sampling unpaired pictures and preprocessing pictures is:
[0012] Step 1.1: Image preprocessing;
[0013] It is found through observation that real rain pictures are usually taken under cloudy conditions, so the average brightness of real rain pictures is usually low. If we directly use unprocessed real background pictures and real rain pictures for training, the brightness of the real rain pictures after rain removal will be higher because the brightness of the unprocessed real background pictures is too high, which does not conform to the current situation that the average brightness of the real rain pictures is low, resulting in poor rain removal effect and poor viewing experience. Therefore, after discovering this phenomenon, the present invention performs preprocessing in the data loading module of the model. The specific method is to convert the real rain pictures and background pictures randomly extracted from the data set from the RGB mode to the YCbCr mode, and then perform channel decomposition on the real rain pictures and real background pictures in the YCbCr mode, extract the Y channel component therein, and compare the average values of the Y channel classification of the two pictures. If the Y channel average value of the real rain picture is less than the Y channel average value of the real background picture, the real background picture is re-extracted until the Y channel average value of the real rain picture is greater than the Y channel average value of the real background picture. In this way, the network can be guided as much as possible to ensure that the brightness of the real rain picture after rain removal is in line with reality.
[0014] Step 1.2: Randomly sample unpaired images;
[0015] The single image deraining algorithm based on supervised learning is trained with paired data as input and labels. The disadvantage of this type of deraining method is the lack of real training data and excessive reliance on artificially synthesized data sets to train the model. Artificially synthesized rain streak images cannot cover the various types of rain streaks in the real world, and the deraining model trained with artificial data sets may have poor results in processing real rain images. To address this problem, this method uses unpaired real rain images and background images as input for training. It is very difficult to obtain paired real data sets, but it is very easy to obtain unpaired real rain data sets. Using unpaired data as input can bypass the dilemma of the difficulty in obtaining real data sets, and at the same time, due to the authenticity of the training data, it will also improve the generalization performance of the model. The specific implementation in the training process is to completely randomly sample from two unpaired real rain data sets and background data sets, and then input them into the network for forward propagation.
[0016] As an improvement of the present invention, in step 2, the rainwater removal subnetwork and the rainwater generation subnetwork are collectively referred to as a generation network, and the specific structures of the generation network and the identification network are:
[0017] Step 2.1: Generate the network
[0018] The generative network mainly adopts a fully convolutional neural network with an imagetoimage structure. The network mainly includes an initial feature extraction module, a downsampling module, a residual module, an upsampling module, and a terminal feature refinement module. The downsampling module is implemented by a convolution with a step size of 2, and the upsampling module is implemented by a deconvolution with a step size of 2. The generative network adopts a structure similar to U-Net but does not use the jump connection structure. In the residual module in the middle, the idea of residual learning is adopted. Rain patterns can be obtained by learning the residual between the rain image and the background image. The normalization layer in the network does not use the more commonly used batch normalization layer, but uses the instance normalization layer. The main reason is that the batch normalization layer is suitable for discriminative models. Because the batch normalization layer focuses on normalizing each batch to ensure the consistency of data distribution, but the batch normalization layer is sensitive to the batch size. If the batch size is small, the calculated mean and variance are not enough to represent the entire data distribution. The instance normalization layer is suitable for the generative model, because the result of image generation mainly depends on a certain image instance, so it is not suitable for the entire batch normalization. This network adopts the idea of generative adversarial and uses an image-to-image structure similar to style transfer, so it uses an instance normalization layer.
[0019] Step 2.2: Identify the network;
[0020] The discriminator network mainly adopts the idea of PatchGAN. Generally speaking, the discriminator design of traditional GAN only outputs one evaluation value, which is an evaluation of the entire image generated by the generator. However, the design of PatchGAN is different. PatchGAN is designed in the form of full convolution. After the image passes through various convolution layers, it is not input into the fully connected layer or activation function. Instead, the input is mapped into an N×N matrix using convolution. This matrix is equivalent to the final evaluation value of the generated image of the generator in the traditional GAN. Each point (True or False) in the N×N matrix represents the evaluation value of a small area in the original image, which is the application of "receptive field". Originally, one value was used to measure the entire image, but now an N×N matrix is used to evaluate the entire image. Obviously, the latter can focus on more areas, which is the advantage of PatchGAN.
[0021] As an improvement of the present invention, in step 3, the specific form and setting significance of the loss function are:
[0022] The loss function of the present invention includes five parts: cycle loss, background loss, consistency loss, confrontation loss, and rain streak loss. Figure 2 The first line is branch A, the second line is branch B, and the rainwater removal module (green) is defined as G R , the rainwater generation module (red) is G G , the rainwater identification network is D R , the background identification network is D B ; Define the input of branch A as a real rain picture (First row, second from the left), the input of branch B is a real background image (Second row, second from the left); define the consistency loss of branch A as L idt A , the circulation loss is L cyc A , the background loss is L back A ; Define the consistency loss of branch B as L idt B , the circulation loss is L cyc B , the background loss is L back B ; Define the rainwater loss between branch A and branch B as L rain , define the adversarial loss between the predicted background image of branch A (the third image from the left in the first row) and the real background image of branch B (the second image from the left in the second row) as L adv B , define the adversarial loss between the real rain picture of branch A (the second picture from the left in the first row) and the predicted rain picture of branch B (the third picture from the left in the second row) as L adv A ,λ3,λ5,λ9,λ id t,λ back ,λ adv ,λ rain ,λcyc is a hyperparameter, It represents the operation of performing Gaussian blur with a filter kernel size of σ×σ, and then using the Laplacian operator to calculate the image gradient. The specific form is as follows:
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031] The purpose of background loss is to maintain the consistency of image content and prevent the loss of important details after rain removal and rain addition. The specific operation is to first perform Gaussian blur on the two images, then use the Laplacian operator to calculate the image gradient, and finally calculate the L1 loss of the gradient between the two.
[0032] The main purpose of consistency loss is to ensure that the real rain picture remains unchanged after passing through the rain generation module and the real background picture remains unchanged after passing through the rain removal module. This allows the rain removal and rain addition operations to run reasonably, ensuring that rain cannot be generated when there is rain in the picture, and rain cannot be removed when there is no rain in the picture. The specific operation is to calculate the L1 loss between the two pictures.
[0033] The purpose of the cycle loss is to make the rain image remain consistent after removing rain and adding rain, and to make the background image remain consistent after adding rain and removing rain, so as to provide stronger constraints for the model. The specific operation is to calculate the L1 loss between the two images.
[0034] The purpose of the rain adversarial loss is to use the generative adversarial idea to allow the rain generation module to generate more realistic rain, making it difficult for the rain identification network to distinguish; the purpose of the background loss module is to use the generative adversarial idea to allow the rain removal module to more perfectly remove rain streaks, making it difficult for the background identification network to distinguish. The specific operation is to use the ideas of LSGAN and PatchGAN and use the least squares method to calculate the adversarial loss.
[0035] The purpose of rain loss is to make the rain streaks removed and generated by the rain removal module and the rain addition module as consistent as possible. Because this method is an unsupervised method, more constraints are required to ensure the stability of network training, so the setting of rain loss is very necessary. The specific operation is to calculate the L1 loss between two rain streak images.
[0036] In summary, the total loss function is as follows:
[0037] Totalloss=λ idt ×(L idtA +L idtB )+λ back ×(L backA +L backB )+λ adv ×(L advA +L advB )+λ rain ×L rain +λ cyc ×(L cycA +L cycB )#
[0038] Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0039] (1) The present invention proposes a self-supervised rain removal network that uses unpaired real rain images and real background images as input. Unlike other supervised rain removal methods, it does not use paired artificially synthesized rain images and background images for supervised training. Therefore, it can improve the generalization of the model when processing real-world rain images to a certain extent, and also circumvents the difficulty of obtaining input-label image pairs for supervised training from real rain scenes.
[0040] (2) The present invention proposes a self-supervised rain removal network that uses an unpaired real rain image and a real background image as input. In data preprocessing, the fact that real rain images are usually taken on cloudy days and have a low average brightness is taken into account. By controlling the brightness of the real rain image to be greater than the brightness of the background image, the brightness of the real rain image after rain removal is in line with reality.
[0041] (3) The present invention proposes a self-supervised rain removal network that uses an unpaired real rain image and a real background image as input, introduces rain streak generation into the network structure, and realizes a closed loop of rain streaks as a whole, providing stronger supervision for the self-supervised rain removal network and ensuring better results. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 The present invention is a method flow chart of an unsupervised cyclic rain removal network method based on self-supervisory constraints and unpaired data.
[0043] Figure 2 It is the overall network structure diagram of the present invention. DETAILED DESCRIPTION
[0044] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0045] Example 1: Figure 1 As shown, the present invention proposes an unsupervised cyclic rain removal network method based on self-supervisory constraints and unpaired data. The detailed steps of the method are:
[0046] Step 1: Randomly sample unpaired rain images and background images in the training dataset and perform preprocessing;
[0047] Step 2: Establish rainwater removal subnetwork, rainwater generation subnetwork, and identification network;
[0048] Step 3: Calculate the loss function based on the established network and the network architecture designed by the present invention;
[0049] Step 4: Set network hyperparameters, perform back propagation according to the loss function, and optimize network parameters;
[0050] Step 5: Repeat steps 3 and 4 until epoch 200, and then end network training.
[0051] Step 1: Randomly sample unpaired rain images and background images in the training dataset and perform preprocessing.
[0052] It is found through observation that real rain pictures are usually taken under cloudy conditions, so the average brightness of real rain pictures is usually low. If we directly use unprocessed real background pictures and real rain pictures for training, the brightness of the real rain pictures after rain removal will be higher because the brightness of the unprocessed real background pictures is too high, which does not conform to the current situation that the average brightness of the real rain pictures is low, resulting in poor rain removal effect and poor viewing experience. Therefore, after discovering this phenomenon, the present invention performs preprocessing in the data loading module of the model. The specific method is to convert the real rain pictures and background pictures randomly extracted from the data set from the RGB mode to the YCbCr mode, and then perform channel decomposition on the real rain pictures and real background pictures in the YCbCr mode, extract the Y channel component therein, and compare the average values of the Y channel classification of the two pictures. If the Y channel average value of the real rain picture is less than the Y channel average value of the real background picture, the real background picture is re-extracted until the Y channel average value of the real rain picture is greater than the Y channel average value of the real background picture. In this way, the network can be guided as much as possible to ensure that the brightness of the real rain picture after rain removal is in line with reality.
[0053] The single image deraining algorithm based on supervised learning is trained with paired data as input and labels. The disadvantage of this type of deraining method is the lack of real training data and excessive reliance on artificially synthesized data sets to train the model. Artificially synthesized rain streak images cannot cover the various types of rain streaks in the real world, and the deraining model trained with artificial data sets may have poor results in processing real rain images. To address this problem, this method uses unpaired real rain images and background images as input for training. It is very difficult to obtain paired real data sets, but it is very easy to obtain unpaired real rain data sets. Using unpaired data as input can bypass the dilemma of the difficulty in obtaining real data sets, and at the same time, due to the authenticity of the training data, it will also improve the generalization performance of the model. The specific implementation in the training process is to completely randomly sample from two unpaired real rain data sets and background data sets, and then input them into the network for forward propagation.
[0054] Step 2: Establish rainwater removal subnetwork, rainwater generation subnetwork, and identification network.
[0055] The generative network mainly adopts a fully convolutional neural network with an imagetoimage structure. The network mainly includes an initial feature extraction module, a downsampling module, a residual module, an upsampling module, and a terminal feature refinement module. The downsampling module is implemented by a convolution with a step size of 2, and the upsampling module is implemented by a deconvolution with a step size of 2. The generative network adopts a structure similar to U-Net but does not use the jump connection structure. In the residual module in the middle, the idea of residual learning is adopted. Rain patterns can be obtained by learning the residual between the rain image and the background image. The normalization layer in the network does not use the more commonly used batch normalization layer, but uses the instance normalization layer. The main reason is that the batch normalization layer is suitable for discriminative models. Because the batch normalization layer focuses on normalizing each batch to ensure the consistency of data distribution, but the batch normalization layer is sensitive to the batch size. If the batch size is small, the calculated mean and variance are not enough to represent the entire data distribution. The instance normalization layer is suitable for the generative model, because the result of image generation mainly depends on a certain image instance, so it is not suitable for the entire batch normalization. This network adopts the idea of generative adversarial and uses an image-to-image structure similar to style transfer, so it uses an instance normalization layer.
[0056] The discriminator network mainly adopts the idea of PatchGAN. Generally speaking, the discriminator design of traditional GAN only outputs one evaluation value, which is an evaluation of the entire image generated by the generator. However, the design of PatchGAN is different. PatchGAN is designed in the form of full convolution. After the image passes through various convolution layers, it is not input into the fully connected layer or activation function. Instead, the input is mapped into an N×N matrix using convolution. This matrix is equivalent to the final evaluation value of the generated image of the generator in the traditional GAN. Each point (True or False) in the N×N matrix represents the evaluation value of a small area in the original image, which is the application of "receptive field". Originally, one value was used to measure the entire image, but now an N×N matrix is used to evaluate the entire image. Obviously, the latter can focus on more areas, which is the advantage of PatchGAN.
[0057] Step 3: Calculate the loss function based on the established network and the network architecture designed by the present invention.
[0058] The loss function of the present invention includes five parts: cycle loss, background loss, consistency loss, confrontation loss, and rain streak loss. Figure 2 The first line is branch A, the second line is branch B, and the rainwater removal module (green) is defined as G R , the rainwater generation module (red) is G G , the rainwater identification network is D R , the background identification network is D B ; Define the input of branch A as a real rain picture (First row, second from the left), the input of branch B is a real background image (Second row, second from the left); define the consistency loss of branch A as L idt A , the circulation loss is L cyc A , the background loss is L back A ; Define the consistency loss of branch B as L idt B , the circulation loss is L cyc B , the background loss is L back B ; Define the rainwater loss between branch A and branch B as L rain , define the adversarial loss between the predicted background image of branch A (the third image from the left in the first row) and the real background image of branch B (the second image from the left in the second row) as L adv B , define the adversarial loss between the real rain picture of branch A (the second picture from the left in the first row) and the predicted rain picture of branch B (the third picture from the left in the second row) as L adv A ,λ3,λ5,λ9,λ idt ,λ back ,λ adv ,λ rain ,λcyc is a hyperparameter, It represents the operation of performing Gaussian blur with a filter kernel size of σ×σ, and then using the Laplacian operator to calculate the image gradient. The specific form is as follows:
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068] The purpose of background loss is to maintain the consistency of image content and prevent the loss of important details after rain removal and rain addition. The specific operation is to first perform Gaussian blur on the two images, then use the Laplacian operator to calculate the image gradient, and finally calculate the L1 loss of the gradient between the two.
[0069] The main purpose of consistency loss is to ensure that the real rain picture remains unchanged after passing through the rain generation module and the real background picture remains unchanged after passing through the rain removal module. This allows the rain removal and rain addition operations to run reasonably, ensuring that rain cannot be generated when there is rain in the picture, and rain cannot be removed when there is no rain in the picture. The specific operation is to calculate the L1 loss between the two pictures.
[0070] The purpose of the cycle loss is to make the rain image remain consistent after removing rain and adding rain, and to make the background image remain consistent after adding rain and removing rain, so as to provide stronger constraints for the model. The specific operation is to calculate the L1 loss between the two images.
[0071] The purpose of the rain adversarial loss is to use the generative adversarial idea to allow the rain generation module to generate more realistic rain, making it difficult for the rain identification network to distinguish; the purpose of the background loss module is to use the generative adversarial idea to allow the rain removal module to more perfectly remove rain streaks, making it difficult for the background identification network to distinguish. The specific operation is to use the ideas of LSGAN and PatchGAN and use the least squares method to calculate the adversarial loss.
[0072] The purpose of rain loss is to make the rain streaks removed and generated by the rain removal module and the rain addition module as consistent as possible. Because this method is an unsupervised method, more constraints are required to ensure the stability of network training, so the setting of rain loss is very necessary. The specific operation is to calculate the L1 loss between two rain streak images.
[0073] In summary, the total loss function is as follows:
[0074] Totalloss=λ idt ×(L idtA +L idtB )+λ back ×(L backA +L backB )+λ adv ×(L advA +L advB )+λ rain ×L rain +λ cyc ×(L cycA +L cycB )#
[0075] Step 4: Set network hyperparameters, perform backpropagation according to the loss function, and optimize the network parameters.
[0076] The network was initialized using normal distribution, the epoch was set to 200, the learning rate was initialized to 0.0002, and after epoch = 100, the learning rate was linearly decreased until the learning rate was 0 at epoch = 200. The size of the network input image was 256 × 256, the batch size was set to 1, and the Adam optimizer was used to minimize the target loss function. The entire network was trained on two NVIDIA V100 32G graphics cards based on the Pytorch framework. The loss function hyperparameters were set as follows: λ3 = 0.01, λ5 = 0.1, λ9 = 1, λ idt =0.5,λ back =1,λ adv =1,λ rain =1,λ cyc =10.
[0077] Step 5: Repeat steps 3 and 4 until epoch 200, and then end network training.
[0078] It should be noted that the above embodiments are merely preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Equivalent replacements or substitutions made on the basis of the above technical solutions all fall within the protection scope of the present invention.
Claims
1. An unsupervised cyclic rain removal network method based on self-supervisory constraints and unpaired data, characterized by: The method comprises the following steps: Step 1: Randomly sample unpaired rain images and background images in the training dataset and perform preprocessing; Step 2: Establish rainwater removal subnetwork, rainwater generation subnetwork, and identification network; Step 3: Calculate the loss function based on the established network; Step 4: Set network hyperparameters, perform back propagation according to the loss function, and optimize network parameters; Step 5: Repeat steps 3 and 4 until epoch 200, and then end network training; In step 1, the method of randomly sampling unpaired pictures and preprocessing pictures is: Step 1.1: Image preprocessing: Preprocessing is performed in the data loading module of the model. The specific method is to convert the real rain pictures and background pictures randomly extracted from the data set from RGB mode to YCbCr mode, then perform channel decomposition on the real rain pictures and real background pictures in YCbCr mode, extract the Y channel component, and compare the average values of the Y channel classification of the two pictures. If the average value of the Y channel of the real rain picture is less than the average value of the Y channel of the real background picture, re-extract the real background picture until the average value of the Y channel of the real rain picture is greater than the average value of the Y channel of the real background picture. Step 1.2: Randomly sample unpaired images: The training is conducted with unpaired real rain pictures and background pictures as input. During the training process, samples are randomly collected from two unpaired real rain data sets and background data sets, and then input into the network for forward propagation. In step 2, the rainwater removal subnetwork and the rainwater generation subnetwork are collectively referred to as the generation network. The specific structures of the generation network and the identification network are: Step 2.1: Generate network; The generated network adopts a fully convolutional neural network with an image to image structure. The network includes an initial feature extraction module, a downsampling module, a residual module, an upsampling module, and a terminal feature refinement module. The downsampling module is implemented by a convolution with a step size of 2, and the upsampling module is implemented by a deconvolution with a step size of 2. The generated network adopts the U-Net structure. Step 2.2: Identify the network; The discriminator network adopts the idea of PatchGAN. PatchGAN is designed in the form of full convolution. After the image passes through various convolutional layers, it is not input into the fully connected layer or activation function. Instead, convolution is used to map the input into an N×N matrix, which is equivalent to the final evaluation value of the generated image of the generator in the traditional GAN. Each point True or False in the N×N matrix represents the evaluation value of a small area in the original image. In step 3, the specific form of the loss function is: The loss function includes five parts: cycle loss, background loss, consistency loss, adversarial loss, and rain streak loss. The first line is defined as branch A, the second line as branch B, and the green rain removal module is defined as G. R , the red rainwater generation module is G G , the rainwater identification network is D R , the background identification network is D B ; Define the input of branch A as a real rain picture The input of branch B is a real background image Define the consistency loss of branch A as L idtA , the circulation loss is L cycA , the background loss is L backA ; Define the consistency loss of branch B as L idtB , the circulation loss is L cycB , the background loss is L backB ; Define the rainwater loss between branch A and branch B as L rain , define the adversarial loss between the predicted background image of branch A and the real background image of branch B as L advB , define the adversarial loss between the real rain picture of branch A and the predicted rain picture of branch B as L advA ,λ3,λ5,λ9,λ idt ,λ back ,λ adv ,λ rain ,λ cyc is a hyperparameter, It represents the operation of performing Gaussian blur with a filter kernel size of σ×σ, and then using the Laplacian operator to calculate the image gradient; The specific form is as follows: In summary, the total loss function is as follows: Total loss=λ idt ×(L idtA +L idtB )+λ back ×(L backA +L backB )+λ adv ×(L advA +L advB )+λ rain ×L rain +λ cyc ×(L cycA +L cycB 。 2. The unsupervised cyclic rain removal network method based on self-supervised constraints and unpaired data according to claim 1, characterized in that: The network hyperparameters in step 4 are: The network was initialized using normal distribution, the epoch was set to 200, the learning rate was initialized to 0.0002, and after epoch = 100, the learning rate was linearly decreased until the learning rate was 0 at epoch = 200. The size of the network input image was 256 × 256, the batch size was set to 1, and the Adam optimizer was used to minimize the target loss function. The entire network was trained on two NVIDIA V100 32G graphics cards based on the Pytorch framework. The loss function hyperparameters were set as follows: λ3 = 0.01, λ5 = 0.1, λ9 = 1, λ idt =0.5,λ back =1,λ adv =1,λ rain =1,λ cyc =10.
Citation Information
Patent Citations
Single image rain removal method based on cyclic generative adversarial network
CN111179187A
Image rain and fog removing method based on unsupervised attention mechanism
CN112508083A
