Abstract
Raindrops adhered to a glass window or camera lens can severely hamper the visibility of a background scene and degrade an image considerably. In this paper, we address the problem by visually removing raindrops, transforming a raindrop-degraded image into a clean one. The problem is intractable because the regions occluded by raindrops are not given, and background information in those regions is often completely lost. To resolve this, we apply an attentive generative network using adversarial training. Our main idea is to inject visual attention into both the generative and discriminative networks. During training, our visual attention learns about raindrop regions and their surroundings. This allows the generative network to focus on restoration and the discriminative network to assess local consistency. Our experiments show that this approach outperforms state-of-the-art methods quantitatively and qualitatively.
Introduction
Raindrops on a glass surface, such as a car windshield or a security camera lens, are more than an aesthetic nuisance; they represent a significant hurdle for autonomous driving and outdoor surveillance systems. Unlike rain streaks, which are often treated as semi-transparent overlays, raindrops act like tiny fish-eye lenses, refracting light from the entire environment and completely obscuring the background. This paper introduces an Attentive Generative Adversarial Network (GAN) designed to automatically detect and remove these obstructions from a single image.
Methodology
The core of the proposed architecture is a visual attention mechanism injected into both the generator and the discriminator to handle unknown occlusions and information loss.
The Generator
The generator consists of two primary sub-networks:
- Attentive-Recurrent Network: Utilizing ResNets and a Convolutional LSTM, this network iteratively refines an attention map over several time steps. It learns to identify raindrop regions and the critical surrounding structures needed for realistic restoration.
- Contextual Autoencoder: This network takes the original image and the refined attention map as input. It employs multi-scale losses and perceptual loss (via VGG-16) to ensure that the restored regions are globally and locally consistent with the rest of the scene.
The Discriminator
Unlike standard GAN discriminators that evaluate the entire image uniformly, the Attentive Discriminator uses the generator's attention map to focus its critique on the modified areas. This targeted feedback forces the generator to produce highly realistic textures specifically where raindrops were removed.
Datasets
To train and evaluate the model, the authors created a new Raindrop Dataset. They captured 1,119 pairs of images by photographing the same scene through two identical pieces of glass—one sprayed with water and one clean. This provided the necessary ground truth for supervised learning.
Key Results
The Attentive GAN achieved a PSNR of 31.57 and an SSIM of 0.9023, significantly outperforming previous methods like Eigen13 and general-purpose models like Pix2Pix. Qualitative results show that the model restores sharp structural details without the "ghost" artifacts or blurry patches common in other approaches. Furthermore, processing images with this network led to a 10% increase in object detection scores and a 100% increase in the number of objects recognized by the Google Vision API compared to raw raindrop-covered images.
Conclusion
While the model demonstrates superior performance, it faces challenges with extreme occlusion where raindrops cover the majority of the lens. Future work may involve optimizing the recurrent network for lower memory consumption and extending the framework to video to ensure temporal consistency. Nonetheless, the injection of visual attention into both the generative and discriminative processes marks a significant advancement in single-image restoration.
Summary updated