I am currently working on a project of mine where I want to use Convolutional neural networks for noise removal from images. I am talking about removing Poisson type of noise. The software that I am using is Matlab 2018b. However, following all the instructions from this site gives me poor results. I will now roughly explain my implementation and I will also post a link to my source code, in hopes that someone can point out where I am making a mistake.
I first created a folder with a small number of training images taken from the PASCAL VOC dataset. The training set consists of 40 images, and I am using such a small dataset just to see whether the network is able to produce any meaningful result before training it with the full dataset.
I used the previously created folder with the training images to make an imageDataStore, so I have easy access to all the images
Then, using a for loop I resized all the images in the datastore, applied Poisson noise to all of them and stored them in a folder called X. The pristine images were stored in a folder called Y.
Using a for loop I stored the noisy images in a 4D array named X, with the dimensions height x width x channels x Number of images. I did the same thing with the pristine images, calling the 4D array Y.
Made validation 4D arrays containing ten images from the original training set of 40.
Defined the layers of the ConvNet using the dnCNNLayers function from matlab. I went for an 11 layer network. The layers which it gives can be found here.
For the training options i set the 'sgdm' solver, initial learning rate of 1e-7, max epochs to 500, validation frequency to 5, and I set it to train using my gpu.
The training process starts by executing the following command
netPoisson=trainNetwork(X,Y,layers,options);. Here X is the 4D array containing the noisy images, and Y contains all the pristine images.
In this step I test the network on a sample image from the dataset by using the following command
denoisedI=denoiseImage(noisyI, netPoisson);Here we can see the pristine image, the noisy image, and the image which was supposed to be the denoised one.
Subtracting the noisy image and the supposedly denoised image yields a somewhat noise free image, but that makes no sense whatsover.
The matlab code for all of this is here. All help will be appreciated. With regards, Emir.