Command Palette
Search for a command to run...
Towards Robust Blind Face Restoration with Codebook Lookup Transformer
Zhou Shangchen ; Chan Kelvin C. K. ; Li Chongyi ; Loy Chen Change

Abstract
Blind face restoration is a highly ill-posed problem that often requiresauxiliary guidance to 1) improve the mapping from degraded inputs to desiredoutputs, or 2) complement high-quality details lost in the inputs. In thispaper, we demonstrate that a learned discrete codebook prior in a small proxyspace largely reduces the uncertainty and ambiguity of restoration mapping bycasting blind face restoration as a code prediction task, while providing richvisual atoms for generating high-quality faces. Under this paradigm, we proposea Transformer-based prediction network, named CodeFormer, to model the globalcomposition and context of the low-quality faces for code prediction, enablingthe discovery of natural faces that closely approximate the target faces evenwhen the inputs are severely degraded. To enhance the adaptiveness fordifferent degradation, we also propose a controllable feature transformationmodule that allows a flexible trade-off between fidelity and quality. Thanks tothe expressive codebook prior and global modeling, CodeFormer outperforms thestate of the arts in both quality and fidelity, showing superior robustness todegradation. Extensive experimental results on synthetic and real-worlddatasets verify the effectiveness of our method.
Code Repositories
Benchmarks
| Benchmark | Methodology | Metrics |
|---|---|---|
| blind-face-restoration-on-celeba-test | CodeFormer | FID: 60.62 IDS: 60 LPIPS: 29.9 PSNR: 22.18 SSIM: 0.61 |
| blind-face-restoration-on-lfw | PULSE | FID: 64.86 |
| blind-face-restoration-on-lfw | GPEN | FID: 57.58 |
| blind-face-restoration-on-lfw | CodeFormer | FID: 52.02 |
| blind-face-restoration-on-lfw | PSFRGAN | FID: 51.89 |
| blind-face-restoration-on-lfw | GLEAN | FID: 53.49 |
| blind-face-restoration-on-lfw | DFDNet | FID: 62.57 |
| blind-face-restoration-on-lfw | GFP-GAN | FID: 49.96 |
| blind-face-restoration-on-wider | GLEAN | FID: 47.11 |
| blind-face-restoration-on-wider | PSFRGAN | FID: 51.16 |
| blind-face-restoration-on-wider | CodeFormer | FID: 39.06 |
| blind-face-restoration-on-wider | GPEN | FID: 46.99 |
| blind-face-restoration-on-wider | DFDNet | FID: 57.84 |
| blind-face-restoration-on-wider | PULSE | FID: 73.59 |
| blind-face-restoration-on-wider | GFP-GAN | FID: 40.59 |
Build AI with AI
From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.