jantic / DeOldify

A Deep Learning based project for colorizing and restoring old images (and video!)
MIT License
17.97k stars 2.56k forks source link

NoGAN mechanism #363

Closed GlebSBrykin closed 3 years ago

GlebSBrykin commented 3 years ago

Hi, Jason! I see that the NoGAN training technology you have developed gives fantastic results, so I want to try to use it for other tasks, not for coloring. But I would like to clarify whether I understood the learning algorithm correctly. As I understand it, we first separately train the generator as a regular image2image network, then we train the discriminator to distinguish between real images and those created by the generator as a regular classifier. And then we create new optimizers for the trained generator and discriminator(we reset the parameters of the optimizer) and perform training according to the classical GAN scheme. Am I right? I am interested in the exact moment with the optimizers, whether I should reset their parameters or not. I would also like to ask how many iterations of NoGAN(training a new discriminator and GAN) is optimal? Thank you in advance for your answer. Sincerely, Gleb Brykin

jantic commented 3 years ago

@GlebBrykin I think perhaps this article we wrote a few years ago may answer your questions (?): https://www.fast.ai/2019/05/03/decrappify/ . It gets into some of those specifics that you're asking about, at least with video., in terms of how many iterations are optimal, and what that inflection point looks like before, during and after.

But really I'd caution against doing anything but using your own eyeballs ultimately and only use what's been said so far as a very general starting point. To this day, for example, I'm not sure how much the behavior of training changes if you increase batch size, for example. I suspect you'd be able to train with more stability for a longer time.

You do seem to have a good grasp of what's going on though with the algorithm- you're right as far as I can tell!