
Bringing Old Photos Back to Life
Research code that restores old, damaged, or scratched photos using a deep learning model.
- Stars
- 15.7k
- Forks
- 2.1k
- Licence
- MIT
- Language
- Python
- Last update
- 3.0 years ago
- Type
- AI model / agent
This repository is archived and no longer maintained.
What it is
This is the official PyTorch implementation of a research project from CVPR 2020 that repairs old photos, removing scratches, fixing faded or degraded quality, and enhancing faces. It runs a pipeline of pretrained neural networks over a folder of images and saves the restored results. The repository is archived, so it is no longer actively maintained.
- Restore a folder of scanned or faded old photos with one run.py command
- Restore photos that have scratches by using the --with_scratch option
- Run the high-resolution option (--HR) on scratched images
- Run scratch detection to generate masks for your own damaged photos
- Experiment with the GUI to remove scratches from a single image
Great for
- Researchers studying image restoration with GANs
- Developers who want to run a pretrained photo restoration pipeline on an NVIDIA GPU
- Students learning how a multi-stage restoration pipeline is built and trained
- People comfortable with Python setup and command-line tools
Not ideal for
- Non-technical users wanting a polished app, since the README describes the code as research-oriented and not optimized for product use
- Users without an NVIDIA GPU, since the README says the code is tested on Ubuntu with Nvidia GPUs and CUDA (CPU mode is mentioned only as a flag)
- Anyone needing high-resolution or arbitrary-size restoration, since the README says the model was pretrained on 256x256 images and may not work well at other resolutions
- Teams needing ongoing support or updates, since the repository is archived
How to get it
- 1
Clone and build from source
You'll need: Python 3.6 or newer · Nvidia GPU with CUDA installed (code tested on Ubuntu) · Git · wget and unzip for downloading pretrained checkpoints
Download the pretrained face checkpoints
wget https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life/releases/download/v1.0/face_checkpoints.zipDownload the pretrained global checkpoints
wget https://github.com/microsoft/Bringing-Old-Photos-Back-to-Life/releases/download/v1.0/global_checkpoints.zipInstall Python dependencies
pip install -r requirements.txt - 2
Run it
- Clone the repository and complete the Synchronized-BatchNorm and dlib landmark model setup described in the README
- Download and unzip the face and global checkpoints into Face_Enhancement and Global
- Install dependencies with pip install -r requirements.txt
- Run python run.py --input_folder [test_image_folder_path] --output_folder [output_path] --GPU 0 using absolute paths
- Find results in ./output_path/final_output/
- 3
Get the most out of it
- Add --with_scratch for photos that have visible scratches
- Add --HR together with --with_scratch for high-resolution scratched images
- Check intermediate outputs in the output folder to see results from each step
- Use the GUI.py file for single-image scratch removal
- Use the Colab demo linked in the README if you lack a local GPU
Downloads
Strengths
- Official implementation of a peer-reviewed CVPR 2020 oral paper with a published pretrained model
- Single command runs the full pipeline for images with or without scratches
- MIT license permits reuse and modification
Trade-offs
- Archived repository with last push in October 2023, so no future fixes are expected
- Research-grade code: the README says it has not been optimized for running performance or product use, and 256x256 pretrained resolution limits results on other sizes
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| Bringing-Old-Photos-Back-to-Life (this) | 15.7k | AI model / agent | advanced | 3.0 years ago | Researchers studying image restoration with GANs |
| DeOldify | 18.5k | AI model / agent | intermediate | 2.0 years ago | People who want to colorize old family or archival photos without paying for a service |
| JARVIS | 25.5k | AI model / agent | advanced | 1.3 years ago | Researchers studying LLM-driven task planning and tool use |
| FinGPT | 21.5k | AI model / agent | advanced | 12 days ago | Developers who want to experiment with finance-tuned LLMs for sentiment analysis |
| LaTeX-OCR | 16.6k | AI model / agent | intermediate | 1.8 years ago | Students who want to turn a handwritten or printed formula photo into editable LaTeX |
| annotated_deep_learning_paper_implementations | 67.6k | Learning resource | intermediate | 4 days ago | Students learning how transformers, GANs, or optimizers work internally |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.