esrgan / README.md
Rockerleo's picture
Update README.md
9a9b955 verified

A newer version of the Gradio SDK is available: 5.39.0

Upgrade
metadata
title: Real-ESRGAN Dual-Mode Image Upscaler
emoji: πŸ–ΌοΈ
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: mit

πŸ–ΌοΈ SpectraGAN Dual-Mode Image Upscaler

A lightweight Gradio web app to upscale any image using the Real-ESRGAN model. Simply upload your photo, choose either Standard Upscale (Γ—4) or Premium Upscale (Γ—8), and download the upscaled image.


πŸ“‘ Table of Contents

  1. Features
  2. Project Structure
  3. Prerequisites
  4. Installation
  5. Running Locally
  6. Usage
  7. Contributing
  8. License
  9. Author & Credits

✨ Features

  • Standard Upscale (Γ—4)
    Enhance image resolution by 4x for clearer and larger images.

  • Premium Upscale (Γ—8)
    Upscales first to 4x and then resizes using bicubic interpolation for even higher resolution (8x).

  • Live Preview
    See your original and upscaled images side by side before downloading.

  • Instant Download
    Export the upscaled image as a PNG and use it immediately.


πŸ“ Project Structure

upscale-project/
β”œβ”€β”€ model/
β”‚ └── Real-ESRGAN-x4plus.onnx # ONNX model for upscaling
β”œβ”€β”€ app.py # Main application file
β”œβ”€β”€ requirements.txt # List of Python dependencies
β”œβ”€β”€ .gitignore # Git ignore file to exclude unnecessary files
β”œβ”€β”€ LICENSE # License file for the project
└── README.md # Project documentation


βš™οΈ Prerequisites

  • Python 3.10 or higher
  • git
  • A terminal / command prompt

πŸ”§ Installation

  1. Clone this repository:

    git clone https://github.com/salmanalfarisi11/Upscaler_images.git
    cd Upscaler_images
    
  2. Create and activate a virtual environment:

     python -m venv .venv
     source .venv/bin/activate   # Linux/macOS
     .venv\Scripts\activate      # Windows
    
  3. Install dependencies:

    pip install -r requirements.txt
    

πŸš€ Running Locally

Launch the app on your machine:

python app.py

By default, it will start on http://127.0.0.1:7860/. Open that URL in your browser to access the interface.

🎯 Usage

  1. Upload Photo via the left panel.
  2. Choose a Mode:
    • Click Standard Upscale (Γ—4) for a 4x resolution increase.
    • Click Premium Upscale (Γ—8) for an 8x resolution increase.
  3. Preview your result on the right side.
  4. Click Download PNG to save the upscaled image.

Acknowledgements

This project uses the Real-ESRGAN model developed by Xintao Wang. The model is available under the BSD 3-Clause License.