This repository contains the implementation of an Enhanced Super-Resolution Generative Adversarial Network (ESRGAN) for image enhancement tasks.
This project aims to enhance low-resolution images using deep learning techniques, specifically leveraging the power of ESRGAN. The model is trained on diverse datasets to improve image quality, making it suitable for various applications in image processing.
- RRDBNet Architecture: Includes the RRDBNet architecture, which consists of Residual in Residual Dense Blocks (RRDB) for robust feature extraction and enhancement.
- Model Interpolation: Ability to interpolate between PSNR and ESRGAN models to explore trade-offs in image quality.
- Web Interface: Integrates a Flask-based web application to upload images and receive enhanced outputs in real-time.
- Python 3.x
- PyTorch
- Flask
- OpenCV
- Other dependencies (specified in
requirements.txt
)
-
Clone the repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo
-
Install dependencies:
pip install -r requirements.txt
- Navigate to the repository directory.
- Start the Flask app:
python test.py
- Open your browser and go to
http://localhost:5000
to access the application. - Upload an image and click 'Enhance' to see the output.
To interpolate between PSNR and ESRGAN models, use the provided script interpolate_models.py
:
python interpolate_models.py 0.5 # Replace with desired alpha value (0.0 to 1.0)
models/
: Contains pretrained models for PSNR and ESRGAN.LR/
: Directory for low-resolution images used for testing.test.py
: Flask web application for image enhancement.interpolate_models.py
: Script to interpolate between PSNR and ESRGAN models.README.md
: This file.
Contributions are welcome! Fork the repository and submit a pull request with your improvements.
This project is licensed under the MIT License.