Analyzing Conditional Adversarial Networks to solve image recovery problems like shadow recovery, denoising and deblurring.
- Python 3
- Pytorch
- MATLAB
ISTD Dataset is used. Link to Google Drive
Recovery is tested for the following augmented sets of images created from ISTD dataset.
- Only Shadow
- Shadow + Salt and Pepper Noise
- Shadow + Speckle Noise
- Shadow + Gaussian Noise
- Shadow + All Noises
- Shadow+ BLur
- Shadow + Salt and Pepper Noise + Blur
- Shadow + Speckle Noise + Blur
- Shadow+ Gaussian Noise + Blur
- Shadow + All Noises + Blur
Run generate.m
to generate the extra augmented images to help the network train to restore images that are degraded by more than one type of artifact.
python dataset_create.py
to resize the input and GT images such that they are in the proper format to be fed in to the network.
Addition of any more type of images afflicted with artifacts would be fruitful and would improve the network's performance.
Make a dataset folder and store the augmented images generated from dataset_create.py in it.
We have used the pix2pix network proposed for image to image translation tasks by Jun-Yan Zhu for this work.
Pix2pix: Project | Paper | Torch
To train the model :
python train.py --dataroot ./datasets/shadow --name shadow_pix2pix --model pix2pix --direction BtoA
To test the model:
python test.py --dataroot ./datasets/shadow --name shadow_pix2pix --model pix2pix --direction BtoA
To view the results:
./results/facades_pix2pix/test_latest/index.html
From Left :
i)Input
ii)Prediction
iii) Ground Truth