Blind noise removal from Images

Published Dec 13, 2021
 8 hours to build
 Intermediate

Digital Image capturing devices are widely used from personal to professional applications. However various factors affect the quality of the image in terms of distortion to add unwanted information generate unnecessary pattern as noise. Image denoising is the method to remove such unwanted noise and preserve original information.

display image

Components Used

Jupyter Notebook
Python IDE
1
Description

In the case of deep learning-based image denoising, we need a dataset on which we can train our network. Since we are targeting different noises, we need more datasets and for the same, we have combined various datasets to prepare a large dataset. We have combined three different datasets. In the DIV2K_train_HR dataset total of 800 images are there, the shape of each image is 1140x2040x3. In the BSDS500 dataset 200 images are there, size of each image is 481x321x3. We also have 400 images of the Berkeley segmentation data, a shape of 180x180x3.

We have converted all images into .png and resized them to 180x180x3. After collecting all images in a common folder of the same size we have a total of 1700 images from three different datasets as the training datasets. For testing, we have used the Set68 dataset to measure the PSNR and SSIM. For generating the dataset we have added various noises like gaussian, locavore, Poisson, salt &paper, and speckle. 

We have developed deep learning-based image denoising models targeting various types of noises. Since we have the dataset as both noisy images as well as clean images, we can take a noisy image as input and (noisy image — network generated image) as a clean image, so that network will learn various noise patterns from noisy images.

 

 

We have trained the model with mean square error as loss function and Adam optimizer with a learning rate of 0.00001. For testing, we have used the Set64 data set. For testing PSNR and SSIM is calculated for all 64 images after reconstruction.

To check the performance of our best model we have used random noisy images from the internet. Using tensor flow lite, the model has been compressed and compares the results for both the compressed and original model. We have developed an application using streamlit. 

Model Deployment

We have used Streamlit for deploying our best model for the application. Model Deployment helps us to showcase our work to the world. Streamlit is an open-source framework used for model deployment. It is python based and free of cost available. Before model deployment, we have compressed our model using TensorFlow Lite. We took reference from https://github.com/bhattbhavesh91/tflite-tutorials/blob/master/tflite-part-2.ipynb.

You can see below how our app works.

Codes

Downloads

ezgif-1-e4e35c1667bc Download
Comments
Ad