Mireille's blog
Fun things, ideas about technology, cheat sheets, data + code.

Let there be color

Let there be color! is a project by students from Waseda University. The official title of the project is Joint End-to-end Learning of Global and Local Image Priors for Automatic Image Colorization with Simultaneous Classification. In plain english this means automatic image colorization.

The code

Here is the diagram that explains their algorithm:

algorithm:

The team provides the code and instructions on ![this github repo]![2]. If you are trying to run their code, but somehow you are stuck with some errors, send me a tweet to @migheille, and I'll try to help.

I spent some time tinkering around and coloring old historical pictures in Lebanon. A lot of the pictures are from the archive of the Library of Congress. I tried different types of images to see how good the algorithm fares and it was pretty impressive. Here are some pictures for you to look at.

Pictures of Beirut

I started with an outdoor city picture:

downtown beirut bw Mireille Raad Blog downtown beirut bw Mireille Raad Blog

I moved to a picture with more greenery.

train beirut bw Mireille Raad Blog

train beirut color Mireille Raad Blog

I decided to go for a more generic picture, I chose this one because I could guess some of the colors (Coca Cola logo is in red, this would be a test of the R in RGB)

coca cola sign bw Mireille Raad Blog

coca cola sign color Mireille Raad Blog

I wanted to test green and blue in the same image. ( the GB of RGB)

beirut by the sea bw Mireille Raad Blog

beirut by the sea color Mireille Raad Blog

Outdoor pictures

I remembered, we have cedars and old forests, so i started digging around for old “green” pictures of Lebanon. Here are some pictures of the famed cedars of Lebanon and some forests.

cedar bw Mireille Raad Blog

cedar color Mireille Raad Blog

forest bw Mireille Raad Blog

forest color Mireille Raad Blog

trees and house bw Mireille Raad Blog

trees and house color Mireille Raad Blog

What is impressive about the next picture, is that the algorithm got the coloring so right for the details in the picture. (except for a small part of the water)

water and green bw Mireille Raad Blog

water and green color Mireille Raad Blog

I love the shading of the soil with the different shades of brown.

mountain bw Mireille Raad Blog

mountain color Mireille Raad Blog

The algorithm works well on rocks, and I liked how some parts of rocks are darker.

rocks bw Mireille Raad Blog

rocks color Mireille Raad Blog

valley bw Mireille Raad Blog

valley color Mireille Raad Blog

river bw Mireille Raad Blog

river color Mireille Raad Blog

I love the detailed blue in the sky, the clouds, the shades on the trees.

cedar2 bw Mireille Raad Blog

cedar2 color Mireille Raad Blog

Once you start with cedar pictures, you can't stop.

cedar3 bw - Mireille Raad Blog

cedar3 color Mireille Raad Blog

Batroun Pictures

I looked up old pictures of Batroun, I could mostly find pictures of Msailha Castle, the colored version looks surprisingly like present day.

|Msailha bw| |Msailha color|

Msailha bw Mireille Raad Blog

Msailha color Mireille Raad Blog

Msailha1 bw Mireille Raad Blog

Msailha1 color Mireille Raad Blog

bridge bw Mireille Raad Blog

bridge color Mireille Raad Blog

So, a big cheers to the authors of this algorithm Satoshi Iizuka, Edgar Simo-Serra and Hiroshi Ishikawa. This is truly some good science. I had a lot of fun converting /images, and I couldn't help myself get excited every time a new image got its colors back.