Skip to content

mohammeduvez29/UltraRes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖼️ UltraRes – Super-Resolution Web App using ESRGAN

UltraRes is an AI-powered web application for image super-resolution using ESRGAN (Enhanced Super-Resolution GAN). It allows users to upload low-resolution images and upscale them by 2× (1080p) or 4× (4K) using a simple interface built with Flask and a powerful PyTorch backend.

🚀 No distortion. No padding. Just clean, proportional upscaling with preserved aspect ratio.


🔥 Features

  • 🎯 2× and 4× Upscaling Options (based on 1080p and 4K)
  • 🖼️ Maintains original aspect ratio (no black borders or stretching)
  • 📁 Upload support for JPG, PNG, WEBP
  • ⚡ Real-time image preview & download
  • 🌐 Built using Flask, TailwindCSS, and PyTorch
  • 🧠 Uses RRDBNet from ESRGAN for high-fidelity results

🛠️ Tech Stack

  • Frontend: HTML5, TailwindCSS, JavaScript
  • Backend: Python, Flask
  • Model: ESRGAN (RRDBNet architecture)

📂 Project Structure

UltraRes/
├── app.py                  # Main Flask application
├── net_interp.py           # (Optional) Interpolation script
├── RRDBNet_arch.py         # ESRGAN model architecture
├── models/                 # Place downloaded ESRGAN model here
│   └── README.txt          # Contains model download link
├── static/                 # CSS, JS, and assets
    └── script.js           # JS logic for frontend interaction
    └── styles.css          # Tailwind-enhanced styles
├── templates/              # HTML files (index.html)
├── images/                 # Sample output images
└── README.md               # This file

📦 Setup Instructions

1. Clone the Repository

git clone https://github.com/AmanSheikh2004/UltraRes.git
cd UltraRes

2. Install Dependencies

pip install -r requirements.txt
# OR manually:
pip install flask torch torchvision numpy opencv-python pillow

3. 🔗 Download Pre-trained ESRGAN Model

The ESRGAN models are hosted externally. 📥 Download from Google Drive

After downloading, place it in the models/ folder:

models/RRDB_ESRGAN_x4.pth

🚀 Run the App

python app.py

Then open your browser and go to:

http://127.0.0.1:5000

⚙️ How It Works

  1. Upload a low-resolution image.
  2. Select your upscale resolution:
    • 1080p → upscale by 2×
    • 4K → upscale by 4×
  3. ESRGAN enhances the image in the backend.
  4. The upscaled result is returned, previewed, and ready to download.

✅ The image resolution is scaled up, but the original aspect ratio is preserved — no black borders or distortion.


📊 Demo Example

Original Image 2× Upscaled 4× Upscaled
original 2x 4x
original 2x 4x

📚 ESRGAN Model

ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks
Read the Paper

Uses RRDBNet with 23 residual-in-residual dense blocks.


🚧 Future Enhancements

  • Add custom upscale factor (e.g. 1.5×, 3×)
  • Enable drag-and-drop uploads
  • Deploy to Hugging Face Spaces or Render
  • Add video frame upscaling support

🤝 Contribute

Pull requests, feedback, and feature suggestions are welcome!
Feel free to fork the repo or open issues to collaborate.


👥 Contributors


📜 License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors