I was looking for a cool Machine Learning project, using Python, of course, and either PyTorch or Tensor Flow, since it’s what the cool kids are doing those days.
I have also always had an interest in restoration of old pictures, and sometimes colorizing them, which is a very tedious & time consuming project if done by hand.
Then I ran into the deoldify project by Jason Antic, doing Machine Learning automatic colorization, and decided to give it a go. There are a few very interesting interviews on line of Jason talking about this project, his journey in AI, GANs (General Adversarial Networks) and the MIT fast.ai course.
Deoldify install was fairly straight forward, automatically building a new Python environment -thanks Jason for making this part painless! It just takes some time for all the dependencies to download and install. Once done with that, I added Spyder to the environment, created a Model directory, downloaded some pre-trained models from Jantic’s dropbox (machine learning is such a breeze when one can download a pre-trained model!), read the Colab document and examples, copied the scripts from the Jupyter lab into Spyder and within minutes put the GPUs of my graphic card to good work, bulk processing all the black and white images in my library. I show here a few examples. Very cool.
For comparison, I show 3 pictures: the original was taken in the 1930’s. I scanned it in high resolution and restored it (remove dirt, scratched, blemish, spots that accumulated over nearly a century) using mostly Gimp. Then in the middle picture I put my best effort to colorize it manually, using layers, also with the Gimp. I am not an expert at image manipulation software and it took a few hours. The one on the right was done by deoldify in minutes, running on the GPUs of my graphic card.
Click on the images for a closer look and a fine comparison.