This repository contains a Jupyter Notebook implementation of the Super-Resolution Generative Adversarial Network (SRGAN), a deep learning model designed for image super-resolution. The model is trained and evaluated on the DIV2K dataset, which is widely used for benchmarking super-resolution algorithms.
- SRGAN Architecture: Combines a generator (for high-resolution image generation) and a discriminator (to distinguish real from generated images) in an adversarial setup.
- Perceptual Loss: Uses a combination of content loss (based on VGG features) and adversarial loss for sharper, realistic outputs.
- DIV2K Dataset: High-quality dataset of 2K resolution images for super-resolution tasks.
- Training and Evaluation: Demonstrates how to preprocess data, train SRGAN, and evaluate the results.
- Clone the repository and navigate to the project directory.
- Install the required dependencies using:
pip install -r requirements.txt
Download the DIV2K dataset from the official website and place it in the data/ directory. Update the dataset path in the notebook as needed.
- Open the notebook file
srgan-on-div2k.ipynbin Jupyter Notebook or JupyterLab. - Follow the steps in the notebook to:
- Preprocess the DIV2K dataset
- Define the SRGAN architecture
- Train the SRGAN model
- Evaluate the model on test images
The notebook provides qualitative and quantitative results demonstrating the improvement in image resolution. Example outputs include side-by-side comparisons of low-resolution inputs, SRGAN outputs, and ground truth high-resolution images.