Skip to content

myeong-kim/RGFormer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RGFormer: Reference-Guided Transformer for Face Super-Resolution (Neurocomputing 2026)

Paper

Min-Yeong Kim*, Seung-Wook Kim*, and Keunsoo Ko, "Reference-Guided Transformer for Face Super-Resolution"

*These authors contributed equally to this work.


Requirements

# 1. Clone repository
git clone https://github.com/keunsoo-ko/RGFormer.git
cd RGFormer

# 2. Create anaconda environment
conda create -n rgformer python=3.9 -y
conda activate rgformer

# 3. Install PyTorch
pip install torch==2.0.0+cu118 torchvision==0.15.0+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

# 4. Install dependencies
pip install -r requirements.txt

# 5. Install CodeFormer
git clone https://github.com/sczhou/CodeFormer.git
cd CodeFormer
pip install -r requirements.txt
cd ..

Pretrained Weights

Download the pretrained weights from Google Drive and place them in the weights/ directory.

weights/
└── best.pt

Dataset Preparation

dataset/
├── LR/
│   ├── 000001.jpg
│   └── ...
├── Ref/
│   ├── 000001.jpg
│   └── ...
└── Mask/
    ├── 000001.jpg
    └── ...

Training

python train.py \
    --lq_dir /path/to/LR \
    --ref_dir /path/to/Ref \
    --mask_dir /path/to/Mask \
    --save_path ./results \
    --batch_size 32 \
    --max_epoch 150

Inference

python infer.py \
    --lq_dir /path/to/LR \
    --ref_dir /path/to/Ref \
    --mask_dir /path/to/Mask \
    --check_path ./weights/best.pt \
    --save_path ./infer_results

Testset

Download test pairs of target and reference: Google Drive


Qualitative comparison on the Wider dataset

image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages