Model is trained based on NoGan approach , initally both generator and discriminator is trained separately.After that , Normal Gan method is followed for both generator and discriminator.
In this work, i followed the approach proposed in this paper ,
A NoGAN approach for image and video restoration and compression artifact removal
I did lot of modifications as per my requirement, the intuition behind patchbased training,NoGan method is taken from the paper.
- Generator model will have double Residual in Residual Dense Block (RRDB) followed convolution layers
- Discriptor model will have 6 Convolution layer having leaky Relu as an activation function
- 900 images is take from the Div2kdataset
- train_data = 700 , test_data = 100 , val_data = 100
- Initially patches or cropping is done on the images by using albumentations library
- JPEG compression is done with a Quality Factor = 10
- Two input image is being passed, real high resolution image and reconstructed image from jpeg.
- train_data = 300 , test_data = 50 , val_data = 50
- Same data used for the generator is used
- Model was able to produce 0.67 SSIM and 24 PSNR on the test dataset and able to generalize well across all the images
Here as of resource constraints, batchsize = 1.
- Intially for the generator, there will be two losses, pixel loss (mse) and perceptual loss(VGG feature mse)
- For the Discriptor, Binary cross entropy is used
- During GanTraining, for generator ,in addition to above losses binary cross entroy is added as generator want the fake to be classified as real.