This project is a high-performance, command-line tool written in Go for upscaling images and videos. It utilizes a custom, pre-trained model to perform a 3x upscale, with a focus on unblurring and denoising the source material. The processing is done in parallel to leverage multi-core CPUs for significant speed improvements.
Features
3x Image Upscaling: Enhance the resolution of images (PNG) by a factor of 3.
3x Video Upscaling: Process videos by extracting frames, upscaling them individually, and reassembling them into a high-resolution video file.
Unblur & Denoise: The included model is trained not just to enlarge, but also to correct common imperfections like blur and noise.
High Performance: Leverages Go's concurrency features to process image rows or video frames in parallel across all available CPU cores.
Command-Line Interface: Simple and clear flags for easy operation on local files.
Self-Contained Model: Uses a pre-trained model stored in a .gob file, which is Go's native binary format, download here: https://huggingface.co/datasets/nalexand/upscaler_unblur/tree/main
Prerequisites
Before using this tool, you must have the following software installed on your system:
Go: The Go programming language (version 1.18 or newer recommended). You can download it from golang.org.
FFmpeg: A powerful multimedia framework used to extract frames from the input video and reassemble them with audio.
Ensure that both ffmpeg and ffprobe are available in your system's PATH. You can verify this by running ffmpeg -version and ffprobe -version in your terminal.
Installation & Setup
Clone the Repository
git clone <repository-url>
cd <repository-directory>
Get the Model File
This program requires the model file unblur_denoice_shared_model_x3_20.gob to be present in the same directory as the executable. You can dowmload it here: https://huggingface.co/datasets/nalexand/upscaler_unblur/tree/main
Build the Executable
Create a binary from the source code. This command will produce an executable file (e.g., unblur_server_binary on Linux/macOS or unblur_server_binary.exe on Windows).
go build -o unblur_server_binary .
Usage
The tool is operated via command-line flags. The primary mode is upscale.