'Color Diffusion' to colorize a black and white image using a diffusion model



The ``Color Diffusion'' project, which colorizes black and white images, is available on GitHub.

Erwann Millon/Color-diffusion: A diffusion model to colorize black and white images

https://github.com/Erwann Millon/Color-diffusion



Color Diffusion: Colorizing Black and White Images with Diffusion Models | by Erwann | Medium

https://medium.com/@erwannmillon/color-diffusion-colorizing-black-and-white-images-with-diffusion-models-269828f71c81



The following is an example of a black and white image.



Color Diffusion can colorize these images.



Commonly, image colors are represented by a combination of red (R), green (G), and blue (B) 'color channels.' The Color Diffusion model learns how to gradually remove noise added to the color channels of an image.

Color Diffusion first reads an RGB color image and converts it to Lab . Then, keep the channels of the grayscale image constant and add noise only to the color channels.

Below is an animation of this process. You can see that the underlying structure of the black-and-white image has not changed, and color information has been added to the model. During actual inference, it is not displayed like the animation below, and only the result is obtained.



Erwan Milon, the machine learning engineer who created Color Diffusion, said, 'The conditioning information in Color Diffusion is highly structured. It can be seen in grayscale images as opposed to something inherently vague like a text prompt. contains a lot of information about lighting, composition and meaning.'

However, there is a wide range of 'correct answers' for all grayscale images, and there are many images that can assign different colors to the same black and white image.



``Color Diffusion is an interesting first step in applying a diffusion model to Lab images, and is just a simple proof of concept to satisfy my curiosity and get a feel for training a diffusion model from scratch,'' Milon said. I was.

in Software, Posted by log1p_kr