Skip to content

yeeecheng/directIR

Repository files navigation

👆 DirectIR: Training-Free Enhancement for Diffusion-Based Image Restoration via Contrastive Guidance

Image Processing 2024 Final Project

Group 5: Group-SEVEN

Youtube DEMO LINK

Environment Setup

Follow the steps below to clone the repository, set up the environment, and install dependencies. The code is tested on Python 3.10.

git clone https://github.com/yeeecheng/directIR.git
cd directIR
conda create -n directIR python=3.10 -y
conda activate directIR
pip install -r requirements.txt

Inference

To process the default image examples, run the following command. The pre-trained model weights will be automatically downloaded from Hugging Face and placed under the checkpoints/ directory:

bash scripts/inference.sh

Overall Pipeline

Overview

alt text

Textual Contrastive Loss

alt text

Experimental Results

Degraded Image Ground truth PromptFix PromptFix w/ Ours
Low-Light Degraded Image Ground truth PromptFix PromptFix w/ Ours
Motion-Blur Degraded Image Ground truth PromptFix PromptFix w/ Ours
Snow Degraded Image Ground truth PromptFix PromptFix w/ Ours

🙏 Acknowledgments

We would like to thank the authors of Promptfix, InstructDiffusion, Stable Diffusion, and InstructPix2Pix for sharing their codes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors