23 December 2021

Photo restoration with artificial intelligence

There’s a lot to explore and love with machine learning. It may sound like an esoteric term to many but you can still play with artificial intelligence even without any computer science or mathematical knowledge. You can for instance use this online demo service to restore old grainy or blurry photos (here’s the underlying GitHub repository).

It may not work perfectly but the results are sometimes mesmerising. Don’t forget that it works by using a trained model of thousands of high-quality faces: this means the algorithm doesn’t randomly guess what the high-resolution version of your old photo looks like (the old photo by definition has lost those details or visible facial geometry data points) but instead enhances the photo by regenerating missing elements based on its pre-trained data (on other images).

Here are some of the results I could get with photos of my grandparents in their twenties.

My grandfather in 1943. He’s 20 years old. Zoom in the photo to notice the lack of details.
The same photo, enhanced with machine learning.
A picture of my grandmother around 1942. She’s 20 years old.
The same photo, enhanced with machine learning. Notice how lipstick has been erroneously added.
My grandfather around 1944, second from the right on the first row, behind the machine gun.
Close-up of the photo restoration. While the details look stunning, I struggle recognising my grandfather’s features here: I’m therefore assuming the model requires further training based on additional images of my grandfather.

If you are curious about this field, also check out the videos of machine learning practitioners I have recorded over the past months, this one in particular: