File size: 2,789 Bytes
9a9b955 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
---
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.
|