explaingit

microsoft/bringing-old-photos-back-to-life

15,694PythonAudience · generalComplexity · 4/5Setup · hard

TLDR

Microsoft Research's AI tool that automatically restores old and damaged photographs, repairing fading, scratches, and degraded faces, using deep learning models you run locally with a Python script.

Mindmap

mindmap
  root((Old Photos Restoration))
    What it does
      Restores old photos
      Removes scratches
      Enhances faces
    How it works
      GAN deep learning
      Degradation translation
      Separate face model
    Inputs
      Folder of old photos
      Scratch flag option
      High-res mode
    Use cases
      Family photo restoration
      Archive digitization
      Research experiments
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Restore a batch of old family photos by removing scratches and improving overall image quality with a single script run.

USE CASE 2

Enhance faded or discolored scanned photographs to look clean and sharp using the general degradation model.

USE CASE 3

Improve facial detail in old portrait photographs using the dedicated face enhancement model that runs as a separate pass.

USE CASE 4

Test photo restoration in the cloud without a local GPU by using the provided Google Colab demo notebook.

Tech stack

PythonPyTorchCUDA

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Python 3.6+, a CUDA-capable GPU, and downloading multiple pre-trained model weight files before running.

In plain English

This repository contains Microsoft Research's AI system for automatically restoring old, damaged photographs. It can repair two kinds of problems: general image degradation (fading, discoloration, low quality) and physical scratches. It also applies a separate step specifically for enhancing faces, using a dedicated model trained to restore facial detail at higher quality than a general restoration pass. The system uses deep learning (specifically a type of AI called generative adversarial networks, or GANs, two neural networks competing against each other to produce realistic outputs) to translate old, degraded photo style into clean, modern-looking photo style. It was published as a research paper at CVPR 2020 (a major computer vision research conference) and later extended in a 2022 journal paper. To use it, you run a Python script pointing at a folder of old photos, specify whether they have scratches, and the system outputs restored versions. It supports both standard and high-resolution inputs. A simple graphical interface is also included for non-technical users. A Colab demo (a browser-based environment that runs the code in the cloud, no local installation needed) is available for quick testing. This is primarily a research project from Microsoft Research Asia. It requires Python 3.6 or higher and a graphics card with CUDA support (a GPU, for faster processing). The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
How do I run the microsoft/bringing-old-photos-back-to-life script to restore a folder of scratched old JPEG photos on a local GPU?
Prompt 2
What Python command enables the face enhancement step in bringing-old-photos-back-to-life so faces in portraits are restored at higher quality?
Prompt 3
How do I use the Google Colab demo for bringing-old-photos-back-to-life to restore a photo without installing anything locally?
Prompt 4
Show me how to process high-resolution old photos using the bringing-old-photos-back-to-life pipeline and where the restored output files are saved.
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.