LinuxCommandLibrary

realsr-ncnn-vulkan

TLDR

Upscale image

$ realsr-ncnn-vulkan -i [input.jpg] -o [output.png]
copy
Specify scale factor
$ realsr-ncnn-vulkan -i [input.jpg] -o [output.png] -s [4]
copy
Use specific model
$ realsr-ncnn-vulkan -i [input.jpg] -o [output.png] -m [models-DF2K]
copy
Specify GPU
$ realsr-ncnn-vulkan -i [input.jpg] -o [output.png] -g [0]
copy

SYNOPSIS

realsr-ncnn-vulkan [options] -i input -o output

DESCRIPTION

realsr-ncnn-vulkan is a Real-ESRGAN/Real-SR image upscaler using the ncnn neural network framework with Vulkan GPU acceleration. It produces high-quality upscaled images.

PARAMETERS

-i path

Input image file.
-o path
Output image file.
-s scale
Upscale ratio (4 default).
-m path
Model directory.
-g gpu
GPU device ID (-1 for CPU).
-t size
Tile size.
-j threads
Processing threads.

EXAMPLES

$ # Basic 4x upscale
realsr-ncnn-vulkan -i photo.jpg -o photo_4x.png

# 2x scale
realsr-ncnn-vulkan -i photo.jpg -o photo_2x.png -s 2

# Use specific model
realsr-ncnn-vulkan -i anime.png -o anime_up.png -m models-DF2K_JPEG

# CPU only
realsr-ncnn-vulkan -i input.jpg -o output.png -g -1

# Batch process (use loop)
for f in *.jpg; do
  realsr-ncnn-vulkan -i "$f" -o "upscaled_$f"
done
copy

MODELS

$ models-DF2K       - General purpose
models-DF2K_JPEG  - JPEG artifact reduction
copy

CAVEATS

Requires Vulkan-capable GPU. Memory-intensive for large images. Processing can be slow.

HISTORY

realsr-ncnn-vulkan is based on Real-ESRGAN research, ported to ncnn by nihui for efficient cross-platform inference.

SEE ALSO

Copied to clipboard