Restoring old photos using AI and Python



Original Source Here

Restoring old photos using AI and Python

Restoring the Old Photos that have suffered severe degradation with time.

The only photographs of your grandparents when they were young which are folded, and torn in some places, have scratches and dust spots have degraded with no digital backup. What if AI was able to restore them? Even convert them to high definition. Isn’t that something you would be interested in?

Photo by Cheryl Winn-Boujnida on Unsplash

Well In this article I am going to show you how to do that. No programming knowledge is required. We will be using a Web app where the AI model is loaded and ready to process your images.

There is also a link to an AI model at the end of the article that will help you colorize these images.

Microsoft Research had released a paper called “Old Photo Restoration via Deep Latent Space Translation” some time ago. It is available here https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life with the PyTorch implementation and a colab notebook.

I will be using replicate.com where the AI model is already published and can be run. I will be using the following image to test the model.

Sample Input Image

Go to https://replicate.com/microsoft/bringing-old-photos-back-to-life
This is where the AI model is hosted. You should see something like this.

Replicate.com Model page

“Click on the Drop a file or click to select ”option. This will ask you for the input image. Select the other options based on the image you uploaded.

Input Options

Click Submit. Predictions typically complete within 88 seconds. after that, you should see something like this.

Input and Output

And Voila! Here is your image reconstructed. Now bring out the old photo album and get started.

Also, Here are a few more samples for input and output images.

Example Image

Here is another example.

Example 2 Input

Output:

Example two Output
Example 3 input and output
Example 4 input and output

Here is the original image we used, input and output side by side.

Original Image Side by Side

Now that we have repaired the images, can we colorize them also using AI?

Yes, we can!

If you like my articles, support me by becoming a medium member using this link. You can also leave a tip using the Reward the writer feature at the end of the article.

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: