Image Recovery Convolutional Neural Networks
This is a project of recovering damaged images. Specifically, the images that are damaged by adding noises. Based on the testing result, this method is able to infer and recover the real image from the masked ones.
A CNN with Residual blocks is used to tackle this challenge. It has a similar structure as Image Super-Resolution Using Deep Convolutional Networks, namely SRCNN. Detailed structure is clearly shown in model.py
.
Gaussian random noise of different ratio is added over 3 channels of the images, separately. The noise funtion is specified in utils.py
, in function normalize_img_add_noise(Img, noiseRatio)
.
Besides, you are welcomed to implement other kind of noise and test on them.
- tensorflow==1.4.1
- tensorlayer==1.8
- easydict
- CUDA8.0
Noisy Image
Recovered Image
To train your own model, please download your own dataset and change the path in config.py
. You may need to make some minor changes if you use dataset of different image size.
Then simply run
python main.py
In this implementation, I use a subset of VOC2012 as training data (about 14000 images)
To validate the demo image, run the command in the project folder
python main.py mode==eval
If you want to test on your own image, change the path in main.py