|
--- |
|
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](#features) |
|
2. [Project Structure](#project-structure) |
|
3. [Prerequisites](#prerequisites) |
|
4. [Installation](#installation) |
|
5. [Running Locally](#running-locally) |
|
6. [Usage](#usage) |
|
7. [Contributing](#contributing) |
|
8. [License](#license) |
|
9. [Author & Credits](#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: |
|
|
|
```bash |
|
git clone https://github.com/salmanalfarisi11/Upscaler_images.git |
|
cd Upscaler_images |
|
``` |
|
|
|
2. Create and activate a virtual environment: |
|
|
|
```bash |
|
python -m venv .venv |
|
source .venv/bin/activate # Linux/macOS |
|
.venv\Scripts\activate # Windows |
|
``` |
|
|
|
3. Install dependencies: |
|
|
|
```bash |
|
pip install -r requirements.txt |
|
``` |
|
|
|
## π Running Locally |
|
|
|
Launch the app on your machine: |
|
|
|
```bash |
|
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. |
|
|