NeurIPS 2024
π© Updates
- Release FFHQ-Ref Dataset
- Release ReF-LDM model and inference script
π TODO
- inference script for testing datasets
ReF-LDM leverages a flexible number of reference images to restore a low-quality (LQ) face image into a high-quality (HQ) one.
-
π Download model
-
Place model weights
refldm.ckpt
andvqgan.ckpt
underckpts/
-
Run
inference.py
python inference.py --ddim_step 50 --output_path result.png --lq_path assets/demo/lq.png --ref_paths assets/demo/ref0.png assets/demo/ref1.png assets/demo/ref2.png assets/demo/ref3.png
π Download data
FFHQ-Ref/
β
βββ reference_mapping/
β βββ train_references.csv
β βββ val_references.csv
β βββ test_references.csv
β
βββ id_based_ffhq_split/
β βββ train_image.txt
β βββ val_image.txt
β βββ test_image.txt
β
βββ test_images/
βββ severe_degrad/
βββ moderate_degrad/
FFHQ-Ref contains 20,405 high-quality face images with corresponding reference images. It is constructed from the 70,000 images of the FFHQ dataset using facial identity labels predicted by ArcFace.
- High-quality images
- Download from FFHQ dataset (
images1024x1024/
)
- Download from FFHQ dataset (
reference_mapping/
- CSV files that list target images and their corresponding reference images
id_based_ffhq_split/
- Text files that list images for identity-based train/val/test splits of FFHQ dataset (70,000 images)
- Why is this needed? Previous works randomly split the FFHQ dataset, which resulted in images of the same person being distributed across both training and evaluation sets. We provide identity-based data splits to address this issue.
test_images/
- Low-quality test images with two degradation levels
An additional testing dataset for reference-based face restoration, containing 2,533 images with corresponding reference images.
- High-quality images
- Download from CelebAMask-HQ (
CelebAMask-HQ/CelebA-HQ-img/
)
- Download from CelebAMask-HQ (
test_references.csv
- Lists target images and their corresponding reference images
celeba_test_images/
- Contains low-quality test images and high-quality ground truth images
- The code of ReF-LDM model is modified from CompVis/latent-diffusion.
- All images in the FFHQ-Ref dataset come from NVlabs/ffhq-dataset.
- We used the ArcFace model from deepinsight/insightface to find reference images.
- We used dchen236/FairFace to analyze the age, gender, and race distribution of the FFHQ-Ref dataset.
The FFHQ-Ref dataset and ReF-LDM model are provided for non-commercial research purposes only. Any commercial use is strictly prohibited.
@inproceedings{hsiao2024refldm,
title={ReF-LDM: A Latent Diffusion Model for Reference-based Face Image Restoration},
author={Chi-Wei Hsiao and Yu-Lun Liu and Cheng-Kun Yang and Sheng-Po Kuo and Yucheun Kevin Jou and Chia-Ping Chen},
journal={Advances in Neural Information Processing Systems},
year={2024}
}