Colorizing black and white photos with deep learning
blog.floydhub.com
blog.floydhub.com
Do an image search for "D-Day in color" and try to tell me which results are original color negatives and which are colorizations made by teenagers.
I'm also a little confused as to why colorizations always aim to restore color to the equivalent of a faded color negative, with muted tonality and grain. Human logic is funny.
I always assumed that if you tried to use "full color" it would look weird, since the photos themselves usually are quite faded and grainy.
To the grandparent: people have been trying to colorize black and white photos since the 1840s; complaining isn’t going to stop them now, https://en.wikipedia.org/wiki/Hand-colouring_of_photographs
True. But there was also tons of skepticism in the medium throughout the mid- to late 1800s. Oliver Wendell Holmes' writing on veracity of photography is a neat reminder that it took the public decades to come to terms that the photographic process was a somewhat-veritable facsimile of "real" life.
Well, as a professional photo editor, you know that if the original b+w photo captures an image with say, a 50% grey value, you don't know if the original color was bright red, or closer to that 50% gray. Bright red has a much higher chroma value, but chroma isn't recorded in a b+w photo - color saturation is lost. Easily demonstrated by making an image in your favorite image editing program that's just straight up red, then changing the image mode to grayscale, then asking someone else entirely to guess the original color.
That, and I think the style is to mimic hand tinting photographs, where you would paint right on a b+w photo. The colors would look "faded" because whatever was used to tint the photograph needed to have a transparent medium, for the information of the photograph itself to shine through. That, and there's just so many colors you could use when hand-tinting. Back to our 50% gray. What if that was... bright yellow? You can't tint "bright yellow" onto a 50% gray area of a photograph. Yellow is highly transparent, and the grey would be too powerful to let its chroma value shine through.
The bigger problem is that real images have varying chroma and hue within single shapes, but actually mimicking that when coloring a black and white photograph takes a huge amount of skill, attention to detail, and work. You have to think about what the lighting was like, what material it was striking and at what angle, what lens filters the photographer might have used to capture the image, etc. and then you have to go in and painstakingly paint all of those fine gradations and textures in.
It’s especially difficult to do a convincing job with skin, but most materials are hard to color convincingly.
It’s much easier to apply color to whole shapes as a blob, but this looks terrible (very obviously wrong) when you make the colors very strong.
If you want to try for yourself, get a Photoshop expert friend to find some color photographs (without showing them to you first) and convert them to black and white, applying whatever kind of intermediate processing he/she desires as long as it results in a roughly photorealistic looking black and white image.
Then you try to photorealistically colorize the photo, spending as much time and effort on it as you want. When you have something you are satisfied with, compare to the colored original. It’s very likely that the colorized version will look pretty bad in comparison, even if it looked vaguely okay on its own.
When they were first aired, there was a special episode with the director and artists who did the work. The amount of research they put into it, the amount of effort they out into doing the work, and their attempts to be faithful to the history really, really impressed me.
It's able to be an art, in and of itself. It's also able to be undertaken as a scholarly work. Additionally, the original uncolorized work is still available. It's an additive process and isn't destructive.
I'm not sure why you'd be agitated, but I don't have your perspective. I'd better understand, I think, if it meant the destruction of the original work.
Sure, the colors will never be exact, because we don't know what the original colors were. But that doesn't matter in any material way.
I don't mind colorized photos. Yet for some of them that were made thinking in a b/w result (For example, the 'With The Beatles' album cover) colorizing means the lost of those stylistic choices.
Many movies set in the past, or that have flashbacks to the past, will often mute the colors. Most modern movies muck around with the colors in post production, too. The worst is when they go for the blue/orange palette.
http://theabyssgazes.blogspot.com/2010/03/teal-and-orange-ho...
True for all AI; neural networks are doing amazing things, but the output is a synthesis, it's a complex interpolation of it's training inputs that may seem "good" or reliable, but it is never to be taken as truth or fact, and it can be arbitrarily wrong with unbounded errors.
> I'm also a little confused as to why colorization always aim to restore color to the equivalent of a faded color negative, with muted tonality and grain. Human logic is funny.
This isn't a human logic problem. Normally colorizations don't affect tonality and grain much, they are putting color splashes on top of a B/W image. This is true of hand-painted colorization, as well as the digital colorization here. You can't get rid of grain or adjust tone by adding color.
One can adjust tone and grain, but then you're doing more than colorizing, and going even further down the road of "interpretation" you're concerned about.
In this particular case, the author did mention "A more diverse dataset makes the pictures brownish". Brown is the average color in natural photos, so minimizing error tends to make things browish. That is separate from leaving faded tone & grain in tact, but it's a second reason why AI based colorization will tend toward muted color.
I suppose the technique has evolved exponentially since then.
As a photographer, collector and enthusiast of vintage prints and photos and amateur historian, I deeply appreciate the aesthetic of colorized photos and understand the motivation to reproduce and master it. There is more to art than truth.
The artist is not the transcriber of the world, he is its rival. - L'Intemporel (Third volume of 'The Metamorphosis of the Gods'), André Malraux (1957)
That means the luminance values can be completely different from what they actually were, and skew the color choices. On the other hand, this might be something that a good ML algorithm can detect and compensate for.
These types of techniques should let you explore the hyperparameter space much more quickly (and cheaply!), but I agree - having money to burn on EC2 (or access to powerful GPUs) will still be a major factor in tuning models.
A HN user in an earlier thread suggested to use a fake/real colorization classifiers as a loss function. [1] But I still feel that it would not solve the averaging problem. It would hop between different colors and probably converge to brown. I haven’t come across a plausible solution so far. [1] https://news.ycombinator.com/item?id=10864801
I have an urge to teach it simple logic. Instead of making it brown, it selects the color with the highest probability from a range of colors. However, I haven't come across a deep learning implementation like this to mimic.
At least to the extent that GANs work, it works. They will alternate between the observed colours based on the noise vector. They do not simply converge to averages, because the discriminator easily recognizes brown apples as fakes.
I dunno, does it look more like a red apple, a green apple or a yellow apple?
Alternatively, use a discrete colour space and consider colours as categorical data not implying any ordinal scale.
Using something akin to a variational autoencoder would solve this problem, because it learns a distributional approximation rather than a single point estimate of the color, and then the random noise vector input allows one to sample from this output distribution. Similarly, Mixture Density Networks allow you to model a distribution and then sample from it.
https://en.wikipedia.org/wiki/List_of_black-and-white_films_...
An example implementation would look something like edges2cats https://affinelayer.com/pixsrv/
I love how we can, in general, elevate the sophistication of ML models by having different models interact and train each other.