LinuxCommandLibrary

waifu2x-ncnn-vulkan

Upscale images using waifu2x algorithm with Vulkan

TLDR

Upscale an image

$ waifu2x-ncnn-vulkan -i [path/to/input_file] -o [path/to/output_file]
copy

Upscale an image by a custom scale factor and denoise it
$ waifu2x-ncnn-vulkan -i [path/to/input_file] -o [path/to/output_file] -s [1|2|4|8|16|32] -n [-1|0|1|2|3]
copy

Save the upscaled image in a specific format
$ waifu2x-ncnn-vulkan -i [path/to/input_file] -o [path/to/output_file] -f [jpg|png|webp]
copy

SYNOPSIS

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

PARAMETERS

-i
    Specify the input image or video file.

-o
    Specify the output image or video file.

-s
    Specify the scaling factor (e.g., 2 for 2x upscaling).
Default: 2.

-n
    Specify the noise reduction level (0, 1, 2, 3). Higher values provide stronger noise reduction but might reduce details.
Default: 0

-m
    Specify the model to use (noise, scale, noise_scale).
Default: noise_scale

-g
    Specify the GPU device ID to use. Use -l to list available GPUs.
Default: 0

-l
    List available Vulkan GPU devices.

-v
    Enable verbose output.

-t
    Threads.
Default: Number of CPU cores

-f
    Output format.
Default: png

DESCRIPTION

waifu2x-ncnn-vulkan is a command-line tool based on the waifu2x image upscaling algorithm and optimized for execution on systems with Vulkan-enabled GPUs. It utilizes the ncnn inference framework to achieve high performance, particularly on devices with Nvidia, AMD, and Intel GPUs.

The tool's primary function is to upscale images and videos while reducing noise and artifacts, resulting in clearer and more detailed output. It supports various image formats (e.g., PNG, JPG) and video formats. It provides several options for controlling the upscaling process, including noise reduction levels, scaling factors, and the specific GPU to use for processing. The application is designed for both personal and professional use cases, enhancing the quality of images and videos for improved viewing experiences or further editing.

CAVEATS

Performance heavily depends on the GPU's capabilities and available memory. Large images or videos may require significant processing time and resources. Certain combinations of options might produce unexpected results. Check the github page for compatibility with your hardware.

MODEL SELECTION

The choice of model can significantly impact the output quality. 'noise' focuses on noise reduction, 'scale' focuses on upscaling, and 'noise_scale' combines both functionalities. Experiment to find the optimal model for your specific input and desired results.

GPU SELECTION

If you have multiple GPUs, carefully select the appropriate one for processing using the '-g' flag. Ensure the selected GPU has sufficient memory to handle the input data.

HISTORY

waifu2x-ncnn-vulkan builds upon the original waifu2x algorithm, known for its effectiveness in upscaling anime-style images. The ncnn framework was adopted to leverage GPU acceleration, resulting in a significant performance improvement over CPU-based implementations. This variant has become popular due to its efficiency and ease of use on various platforms.

SEE ALSO

ffmpeg(1)

Copied to clipboard