
CodeFormer
NeurIPS 2022 robust blind face restoration with codebook lookup transformer.
About
CodeFormer (Towards Robust Blind Face Restoration with Codebook Lookup Transformer) is a NeurIPS 2022 project by Shangchen Zhou and colleagues at NTU S-Lab. It restores faces using a learned discrete codebook and transformer-based prediction, making it robust to severe degradation in old photos and AI-generated faces.
Beyond face restoration, the repo ships whole-image enhancement, video enhancement, face colorization, and face inpainting scripts. It is licensed under the NTU S-Lab License 1.0, which restricts use to non-commercial purposes, so check the license before commercial deployment.
What it can do
- Robust blind face restoration
- Whole image and video enhancement
- Face colorization and inpainting
- Fidelity-quality tradeoff control
Setup
Clone the repo, install requirements, download pretrained models, and run inference scripts.
Prerequisites
Python, PyTorch, and a GPU; ffmpeg for video enhancement.
Use cases
Works with
Trust score — 7/10
Scored 7/10 (metrics tier, metrics-v1). Evidence: Verified via vendor site/docs/GitHub and reputable coverage, wave 103; Trending score 74/100 from researcher assessment.
Sources
Every fact above was checked against these sources. Where a claim comes from the provider and couldn't be independently verified, the text says so.