Pixel Precipitation: Single Image Deraining with CVAE

Machine Learning Project by Liam Jennings, Tabatha Viso, & Nikesh Walling

Worcester Polytechnic Institute, CS539, Prof. Kyumin Lee

Gif Image

Project Motivation

Gently watching raindrops roll down the window provides a calming and serene experience, but when driving, rain can impede clarity, even with reliable windshield wipers. In an increasingly automated world of autonomous vehicles, inclement weather, including raindrops, poses a significant challenge for computer vision and perception. Single-image deraining, a computer vision solution, comes into play to eliminate raindrops and streaks from images, restoring visual clarity. These models act as a filter on rainy images, enabling autonomous vehicles and other applications to function seamlessly in adverse weather conditions as if they were clear skies.

Existing Image Filtering Approaches

Image filtering, a method that modifies pixel values, is commonly used in deraining, deblurring, and other similar image restoration applications. Some image filtering approaches include:

Machine learning and related techniques are used in conjunction with image filtering in order to restore images. These methods typically include deep learning (such as convolutional neural networks), math models (for describing rain properties and estimating rain streaks), support vector machines, and random forests.

Challenges

The task of single image deraining comes with some challenges: One is dealing with the variety of rain features found in real-world situations. Raindrops can be of different shapes, sizes, densities, and orientations, making it hard to create a deraining model that works well for all types of rain patterns. Another problem is the lack of high-quality datasets containing pairs of clean and rainy images. Having enough data to train and test deraining models effectively is crucial, but gathering such datasets can be time-consuming and difficult. Many models are trained using computer-generated rain images. However, synthetic rain images may not capture all the complexities and nuances of real rain, which can affect how well the deraining models perform in actual rainy scenes.

Additionally, evaluating deraining algorithms can be challenging. The usual subjective evaluation methods, like visual inspection or human judgment, can be influenced by personal biases, as well as time-consuming. It would be helpful to have more objective and quantitative evaluation metrics that better align with human perception. By addressing these issues, deraining models can become more reliable tools for enhancing visibility and safety in challenging weather conditions, especially for applications like autonomous vehicles.

Our project aims to tackle low image visibility caused by raindrop blurs on glass, such as a car windshield or camera lense.

Examples of different rain features on glass:

ex1 ex2 ex3 ex3 ex3

Convolutional Variational Autoencoder (CVAE) Architecture

The proposed solution that we implemented is a Convolutional Variational Autoencoder. The architecture is as follows:

Our Github can be found here. The following images show a progression of our model’s image reconstruction behavior through fine-tuning, such as adding convolutional layers, increasing the latent space dimension, and adjusting the number of epochs.

ex1 ex2 ex3

Dataset

We used this dataset of 861 rain-free and rain image pairs for training. This dataset was acquired from this Github project that developed a different deraining method. Below are examples of the image pairs:

ex1 ex2
ex3 ex4

Example of Training Result

ex1 ex2 ex3

Example of Testing Result

ex1 ex2 ex3

Conclusions

The model performed somewhat successfully in training. It input images, identified significant hierarchal features of colored images, and reconstructed recognizable images without raindrop blurs. Unfortunately, when applying the model to testing data, the resulting images were not recognizable at all. The model needs significant further tuning and development to improve image reconstruction. Future work could include:

References

(Please note: images that are not our own are hyperlinked to their original sources, all open-source.)