faaip / ESRGAN-slicer

A tiny wrapper for slicing and stitching images that are too large for ESRGAN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESRGAN Slicer

A tiny wrapper for ESRGAN. ESRGAN has a limit to the size of pictures you can upscale. This script takes larger images, slices, upscales and then stitches back together.

TODO:

  • CLI
  • Take directories as input
  • Can run with CPU only
  • GUI
  • More progress (TQDM)
  • Distribute

Installing and running the CLI:

Install dependencies from requirements.txt using pip.

pip3 install -r requirements.txt

Run GUI

python3 slicer_gui.py

Run CLI

Run the script as so:

python3 upscaler.py -i input.png -o output.png

it can also upscale contents of directories:

python3 upscaler.py -i input_dir -o output_dir

When the scripts run for the first time, it will download the RRDB_ESRGAN_x4.pth-model from Google Drive and place the model in ./models.

About

A tiny wrapper for slicing and stitching images that are too large for ESRGAN


Languages

Language:Python 100.0%