Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

realsr-ncnn-vulkan

> 编程语言
Open source

RealSR super resolution implemented with ncnn library

1.2K stars0 likes1 views
WebsiteGitHub

About

RealSR super resolution implemented with ncnn library

RealSR ncnn Vulkan

ncnn implementation of Real-World Super-Resolution via Kernel Estimation and Noise Injection super resolution.

realsr-ncnn-vulkan uses ncnn project as the universal neural network inference framework.

Download

Download Windows/Linux/MacOS Executable for Intel/AMD/Nvidia GPU

https://github.com/nihui/realsr-ncnn-vulkan/releases

This package includes all the binaries and models required. It is portable, so no CUDA or Caffe runtime environment is needed :)

About RealSR

Real-World Super-Resolution via Kernel Estimation and Noise Injection (CVPRW 2020)

https://github.com/jixiaozhong/RealSR

Xiaozhong Ji, Yun Cao, Ying Tai, Chengjie Wang, Jilin Li, and Feiyue Huang

Tencent YouTu Lab

Our solution is the winner of CVPR NTIRE 2020 Challenge on Real-World Super-Resolution in both tracks.

https://arxiv.org/abs/2005.01996

Usages

Example Command

bash
realsr-ncnn-vulkan.exe -i input.jpg -o output.png -s 4

Full Usages

…
  • input-path and output-path accept either file path or directory path
  • scale = scale level, 4 = upscale 4x
  • tile-size = tile size, use smaller value to reduce GPU memory usage, default selects automatically
  • load:proc:save = thread count for the three stages (image decoding + realsr upscaling + image encoding), using larger values may increase GPU usage and consume more GPU memory. You can tune this configuration with "4:4:4" for many small-size images, and "2:2:2" for large-size images. The default setting usually works fine for most situations. If you find that your GPU is hungry, try increasing thread count to achieve faster processing.
  • format = the format of the image to be output, png is better supported, however webp generally yields smaller file sizes, both are losslessly encoded

If you encounter crash or error, try to upgrade your GPU driver

  • Intel: https://downloadcenter.intel.com/product/80939/Graphics-Drivers
  • AMD: https://www.amd.com/en/support
  • NVIDIA: https://www.nvidia.com/Download/index.aspx

Build from Source

  1. Download and setup the Vulkan SDK from https://vulkan.lunarg.com/
  • For Linux distributions, you can either get the essential build requirements from package manager
bash
dnf install vulkan-headers vulkan-loader-devel
bash
apt-get install libvulkan-dev
bash
pacman -S vulkan-headers vulkan-icd-loader
  1. Clone this project with all submodules
bash
git clone https://github.com/nihui/realsr-ncnn-vulkan.git
cd realsr-ncnn-vulkan
git submodule update --init --recursive
  1. Build with CMake
  • You can pass -DUSE_STATIC_MOLTENVK=ON option to avoid linking the vulkan loader library on MacOS
bash
mkdir build
cd build
cmake ../src
cmake --build . -j 4

Sample Images

Original Image

Upscale 4x with ImageMagick Lanczo4 Filter

bash
convert origin.jpg -resize 400% output.png

Upscale 4x with srmd scale=4 noise=-1

bash
srmd-ncnn-vulkan.exe -i origin.jpg -o 4x.png -s 4 -n -1

Upscale 4x with realsr model=DF2K scale=4 tta=1

bash
realsr-ncnn-vulkan.exe -i origin.jpg -o output.png -s 4 -x -m models-DF2K

Original RealSR Project

  • https://github.com/jixiaozhong/RealSR

Other Open-Source Code Used

  • https://github.com/Tencent/ncnn for fast neural network inference on ALL PLATFORMS
  • https://github.com/webmproject/libwebp for encoding and decoding Webp images on ALL PLATFORMS
  • https://github.com/nothings/stb for decoding and encoding image on Linux / MacOS
  • https://github.com/tronkko/dirent for listing files in directory on Windows

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Camdgpuintelncnn

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言