In the Bringing-Old-Photos-Back-to-Life directory, issue the command.
$ python run.py --input_folder [directory] --output_folder [directory]
The software runs through the input folder in a four stage process including face detection and face enhancement, and outputs the restored photos to the output folder. The software uses a progressive generator to refine the face regions of old photos.
We can append the flag
--GPU to use the graphics card (GPU can be set to 0 or 0,1,2 or 0,2; use -1 for CPU). If the image has scratches, append the flag
--with_scratch. And if the image is high-resolution, append the flag
Here is one of the example images included with the project; before and after.
Here’s the Python GUI.
From testing a wide range of old photos, the results are impressive to say the least although the face recognition output isn’t nearly as refined compared to GFPGAN.
The software is particularly strong at removing scratches on photos, although we had a few images where part of a scratch still remains.
The GUI is more of a proof-of-concept. It’s very buggy. We recommend using the command-line.
It’s not often we feature Microsoft software on LinuxLinks. That’s not because we dislike the company, it’s simply because most of their software is proprietary, expensive, and doesn’t run natively under Linux. This project is copyrighted by Microsoft, the maintainer was a research intern at Microsoft Research. This is open source software.
The project has amassed over 11k GitHub stars.
Developer: Microsoft Corporation
License: MIT License
Old Photo Restoration is written in Python. Learn Python with our recommended free books and free tutorials.
For other useful open source apps that use machine learning/deep learning, we’ve compiled this roundup.
Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary