早期的老照片都是黑白的,通过AI技术能自动给它们上色,先来看下原理。
原理
基本原理就是encoder-decoder架构,然后加上一些GAN training技巧,可以使得生成的图片更加真实。代码可见https://github.com/jantic/DeOldifygithub.com
值得一提的是,这里用的不是传统的GAN,传统GAN会把Generator和Discriminator放到一起end2end train,这里用了一种称之为"NoGAN"的技巧,这种技巧能使得生成的图片更少的局部瑕疵。具体步骤如下
The steps are as follows: First train the generator in a conventional way by itself with just the feature loss. Next, generate images from that, and train the critic on distinguishing between those outputs and real images as a basic binary classifier. Finally, train the generator and critic together in a GAN setting (starting right at the target size of 192px in this case). Now for the weird part: All the useful GAN training here only takes place within a very small window of time. There’