Oussama Kharouiche

Image Super-Resolution with Conditional Diffusion

A personal project implementing an image super-resolution model using a conditional diffusion approach.


Presentation

This project explores the application of conditional diffusion models to the task of image super-resolution. By leveraging a diffusion-based generative process conditioned on low-resolution inputs, the model learns to reconstruct high-fidelity images at four times the original resolution. The implementation is based on PyTorch and demonstrates how conditional diffusion can produce sharper and more realistic outputs compared to traditional upsampling methods.


Overview


Technologies Used


Installation

  1. Clone the repository:

    git clone https://github.com/oussamakharouiche/image-super-resolution.git
    cd image-super-resolution
    
  2. Create a virtual environment and install dependencies:

    python3 -m venv superres
    source superres/bin/activate
    pip install -r requirements.txt
    

Usage

  1. Generate the dataset:
    python3 prepare_dataset.py --low 64 --high 256
    
  2. Train the Super Resolution model:
    python3 train.py 
    
  3. evaluate the Super Resolution model on the test data:
    python3 evaluate.py 
    

Results

Below are examples comparing the real low-resolution input, the bicubic upsample, the model output, and the ground-truth high-resolution image.

Low-Res Input (64×64) Bicubic Upsample Model Output Ground Truth (256×256)
lowres bicubic superres gt
lowres bicubic superres gt

Our initial results are promising, especially considering the model’s large size of approximately 280 million parameters. It was trained on a relatively small dataset of 720 images from DIV2K, with 80 images reserved for testing.

To further enhance the model’s performance and generalizability, our next steps will focus on:


Bibliography

  1. Image Super-Resolution via Iterative Refinement.
  2. Large Scale GAN Training for High Fidelity Natural Image Synthesis.
  3. Denoising Diffusion Probabilistic Models.
  4. Deep Unsupervised Learning using Nonequilibrium Thermodynamics.

🔗 Links