Photo Restoration

New advances in AI has enabled computers to perform tasks that were seemingly impossible to achieve less than a decade ago.

C05348A3-9AB8-42C9-A6E0-81DB3AC59FEB
           

Restoring damaged photos, enhancing grainy and blurry images, and colorizing films are all tasks that were clearly impossible to achieve just a few years ago, tasks reserved for skilled and talented artists to painstakingly complete. But recent advances in artificial intelligence have enabled many people to train AI models to perform all of these automatically, and the results are pretty good, maybe sometimes too good?

The 2018 documentary They Shall Not Grow Old, which was created using original footage of the First World War from the British Imperial War Museum's archives, proved that restoring and enhancing old footage can make audiences relate to the story in a much more profound way.

While there are now several commercially available software packages available to restore, enhance, and colorize old photos, several research teams have published solutions that are enabling anyone to leverage these advancements in computer vision.

Super Resolution

As we have all seen in movies, spies can zoom in on a highly pixelated part of an image and have it magically enhanced to clearly reveal the face of the perpetrator.

Enhancing low-resolution images has been one of the holy grails of computer vision, but specially trained AI models are now able to accomplish this task with very good results. Super-resolution is now included in several commercial applications such as Pixelmator Pro, but it is also available in OpenCV, one of the most popular Computer Vision libraries available. See Enhancing Photos With Deep Learning for a tutorial on how to accomplish this.

Image Enhancement and Colorization

One of the best research projects for image enhancement and colorization is DeOldify, which published an early version of its tools in a GitHub repository as well as in a CoLab Jupyter notebook.

Their tools solution, which has now evolved into a new commercial solution exclusively available on MyHeritage, is capable of enhancing your family photos automatically with deep learning technology, bringing faces into sharp focus. I find their results to be very good and natural-looking, while the enhancement could sometimes be a little bit better.

Bringing Old Photo Back to Life (CVPR 2020 oral) - Old Photo Restoration (Official PyTorch Implementation) is another noteworthy research project, which is also available as a CoLab Jupyter notebook, but I find their facial enhancement to be a bit unnatural as they, in my opinion, take too much liberty in reconstructing the faces of loved ones.

The GFPGAN project has had some success as a Practical Algorithm for Real-world Face Restoration. Visit their GitHub repository and try their solution in Colab.

The Open-Image-Restoration Toolkit is also a great resource, they offers a selection of State-of-the-art, Open-source, Usable, and Pythonic techniques for Image Restoration.

There are of course cloud-based API solutions, such as the DeepAI Image Colorization API, which allows you to add color to old family photos and historic images or bring an old film back to life with colorization. This image colorization API is a deep learning model that has been trained on pairs of color images with their grayscale counterpart. After hours of training, the models learn how to add color back to black-and-white images.

Image Stitching

Image stitching or photo stitching is another Computer Vision technique used to combine multiple photographic images with overlapping fields of view to produce a segmented panorama or high-resolution image. While OpenCV does offer a library to accomplish this, I find that AutoStitch, a research project from the University of British Columbia, and Image Composite Editor (ICE) from the Microsoft computational photography research team to produce absolutely outstanding results!

Posted Comments: 0