[Paper] [Project Page] [Demo]
Jingwen He, Wu Shi, Kai Chen, Lean Fu, Chao Dong
Bytedance, Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences, Shanghai AI Laboratory, Shanghai, China.
- 2022.11.21: Release inference code for blind face restoration.
- 2022.03.23: This repo is created.
- Python >= 3.7 (Recommend to use Anaconda or Miniconda)
- PyTorch >= 1.7
- Option: NVIDIA GPU + CUDA
- Option: Linux
-
Clone repo
git clone https://github.com/hejingwenhejingwen/GCFSR cd GCFSR
-
Install dependent packages
pip install -r requirements.txt python setup.py develop
Inference for blind face restoration
python inference_gcfsr_blind.py --model_path experiments/pretrained_models/gcfsr_blind_512.pth --input inputs/sample
Inference (TODO)
python inference_gcfsr.py --model_path experiments/ --scale 32 --input inputs/sample --output outputs/tmp
We provide the training codes for GCFSR.
Procedures
-
Training dataset preparation: FFHQ
-
Validation dataset preparation: CelebA-val
python make_val_dataset.py --input datasets/celeba_val --output datasets/celeba_val_input
-
Modify the configuration file
options/train_gcfsr.yml
accordingly. -
Training
python -m torch.distributed.launch --nproc_per_node=8 --master_port=22021 basicsr/train.py -opt options/train/train_gcfsr.yml --launcher pytorch
Model Name | Description |
---|
| gcfsr-512-blind | blind face restoration. | | gcfsr-1024 | Controllable face super resolution. |
@inproceedings{he2022gcfsr,
title={GCFSR: a Generative and Controllable Face Super Resolution Method Without Facial and GAN Priors},
author={He, Jingwen and Shi, Wu and Chen, Kai and Fu, Lean and Dong, Chao},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={1889--1898},
year={2022}
}
If you have any question, please email [email protected]
.