junyanz / CycleGAN

Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Other
12.23k stars 1.93k forks source link

Image colorization of grayscale images. #102

Open ArkaJU opened 5 years ago

ArkaJU commented 5 years ago

I am working on an image colorization problem. I made the dataset by downloading black and white/colored movies from youtube and extracting frames from them. But I am not getting the desired very good results. Dataset size is 2k images each and was trained for about 40 epochs. Some results are shown below:

screenshot_2018-10-20 tensorboard 1 screenshot_2018-10-20 tensorboard screenshot_2018-10-19 tensorboard 5 screenshot_2018-10-19 tensorboard 4

Can you give some pointers on how to get better results, or whether it is indeed possible for CycleGAN to colorize a grayscale image. Thank you.

junyanz commented 5 years ago

2K might not be enough. Researchers often trained the colorization models using millions of RGB images. See the colorization-pytorch repo for more details.

ArkaJU commented 5 years ago

Thanks. If I just increase the number of RGB images with number of black and white images constant, is it fine?

junyanz commented 5 years ago

You can also train the model with a paired dataset. See the colorization-pytorch and this paper for more details.

ArkaJU commented 5 years ago

Actually paired data is not available for this problem.

junyanz commented 5 years ago

You can create paired data by converting RGB to grayscale images. Please look at the paper for more details.