restoreformer
Blind face restoration with cross-attention between degraded features and a learned high-quality dictionary.
Diffusion and generative · 44 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 61.8K
- Operations
- 44
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR (arXiv 2022)
- Authors
- Zhouxia Wang, Jiawei Zhang, Runjian Chen and others
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m12101
- Graph hash
- a4f585e65334024ac9882a264d2b06d37fea6ce14b9a26f419948db3bcfdfc3a
- Skeleton hash
- dd84a76deaa053282de0ba908e535da8a4bf1a5063cfcbd7478511cd5aed32a7
- Architecture hash
- f41631d074b28635b79ca7c4e50178812e86161ee2b96c03ecbc3ce41c072191
- Diagram SHA-256
- c70a47810ea2de63d9abbcf24c1e174f3bb50ed3a56dcb5fcadb3a6165621a3e
- TorchLens version
- 2.35.3
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
menagerie.classics.restoreformer:build_restoreformer: build({}) What it is
RestoreFormer is a model for blind face restoration, the task of recovering a high-quality face image from unknown degradations. Its premise is that a face image carries a lot of contextual information, so the model uses attention over the full spatial extent of the features where earlier works used local operators.
An encoder first extracts a representation of the degraded face, and the nearest high-quality priors are fetched from a learned store that the paper calls the HQ Dictionary. Two consecutive transformers built on multi-head cross-attention (MHCA) then fuse the degraded features with the priors. In each one the degraded features act as queries and the priors as key-value pairs. A decoder with 12 residual blocks and 5 nearest neighbor upsampling steps recovers the high-quality image.
The HQ Dictionary is learned from undegraded faces by a high-quality face generation network that borrows from vector quantization. In the paper's settings the dictionary contains 1024 elements, each of length 256. The paper reports better results than the methods it compares against on one synthetic dataset and three real-world datasets.
Key idea. RestoreFormer restores degraded faces by cross-attending from corrupted queries to high-quality key-value pairs sampled from a learned reconstruction-oriented dictionary.
- restoreformer
- blind face restoration
- face restoration
- multi-head cross-attention
- hq dictionary
- vector quantization
- key-value pairs
- image restoration
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wang2022restoreformerhighqualityblindface,
title={RestoreFormer: High-Quality Blind Face Restoration from Undegraded Key-Value Pairs},
author={Zhouxia Wang and Jiawei Zhang and Runjian Chen and Wenping Wang and Ping Luo},
year={2022},
eprint={2201.06374},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2201.06374},
}