Skip to content

FaithDiff for Classic Film Rejuvenation, Old Photo Revival, Social Media Restoration, Image Enhancement

Notifications You must be signed in to change notification settings

JyChen9811/FaithDiff

Repository files navigation

FaithDiff: Unleashing Diffusion Priors for Faithful Image Super-resolution

[Project Page]   [Paper]

Junyang Chen, Jinshan Pan, Jiangxin Dong
IMAG Lab, Nanjing University of Science and Technology


🚩 New Features/Updates

To do

  • FaithDiff-Flux
  • Release the training code
  • Release the testing code and pre-trained model

How to evaluate

Environment

conda env create --name faithdiff -f environment.yml

Download Dependent Models

Val Dataset

RealDeg: Google Drive

To evaluate the performance of our method in real-world scenarios, we collect a dataset of 238 images with unknown degradations, consisting of old photographs, social media images, and classic film stills. The category of old photographs includes black-and-white images, faded photographs, and colorized versions. Social media images are uploaded by us to various social media platforms (e.g., WeChat, RedNote, Sina Weibo and Zhihu), undergoing one or multiple rounds of cross-platform processing. The classic film stills are selected from iconic films spanning the 1980s to 2000s, such as The Shawshank Redemption, Harry Potter, and Spider-Man, etc. The images feature diverse content, including people, buildings, animals, and various natural elements. In addition, the shortest side of the image resolution is at least 720 pixels.

Python Script

# Scripts that support two GPUs. 
CUDA_VISIBLE_DEVICES=0,1 python test.py --img_dir='./dataset/RealDeg' --save_dir=./save/RealDeg --load_8bit_llava --upscale=2
# Scripts that support only one GPU.
CUDA_VISIBLE_DEVICES=0 python test_generate_caption.py --img_dir='./dataset/RealDeg' --save_dir=./save/RealDeg_caption --load_8bit_llava
CUDA_VISIBLE_DEVICES=0 python test_wo_llava.py --img_dir='./dataset/RealDeg' --json_dir=./save/RealDeg_caption --save_dir=./save/RealDeg --upscale=2

BibTeX

@article{chen2024faithdiff,
title={FaithDiff: Unleashing Diffusion Priors for Faithful Image Super-resolution},
author={Chen, Junyang and Pan, Jinshan and Dong, Jiangxin},
eprint={2411.18824},
archivePrefix={arXiv},
primaryClass={cs.CV}
year={2024}
}

Contact

If you have any questions, please feel free to reach me out at jychen9811@gmail.com.


Acknowledgments

Our project is based on diffusers and SUPIR. Thanks for their awesome works.

About

FaithDiff for Classic Film Rejuvenation, Old Photo Revival, Social Media Restoration, Image Enhancement

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published