Skip to content

This is a very simplified ipynb code for KupynOrest's Deblur GAN code. DeblurGAN addresses the challenge of end-to-end image deblurring through the use of conditional Generative Adversarial Networks (cGANs).I have used pytorch for this implementation.

Notifications You must be signed in to change notification settings

himanii777/DeblurGAN_ipynb_simplified

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

image image

I have simplified the deblurgan implementation into a ipynb. There you can upload your custom dataset, train, test and continue training the pretrained model.

I had encountered a lot of issues while training and some of the tips I can give are:

  1. Instead of using nn.BatchNorm2d, try using nn.InstanceNorm2d because of the smaller batch size
  2. Start training with same learning rates of disc & generator (0.0001 standard according to the paper)
  3. If the generator doesn't seem to improve then change the lr to 0.0002/ train the generator twice per epoch or add noise to both blurred and sharp data
  4. When you are using custom dataset, resize it with correct dimensions so that image doesn't distort. I have put AR code inside.
  5. Overfitting isn't really an issue for this model however, balancing generator and discriminator can become challenging for which play with their learning rates and training frequency.

Loss visualization(100 epochs):

image image

Original Paper: https://arxiv.org/abs/1711.07064

Codes Borrowed from: https://github.com/KupynOrest/DeblurGAN https://github.com/The-GAN-g/DeblurGAN

About

This is a very simplified ipynb code for KupynOrest's Deblur GAN code. DeblurGAN addresses the challenge of end-to-end image deblurring through the use of conditional Generative Adversarial Networks (cGANs).I have used pytorch for this implementation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published