Skip to content

realsr converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan

License

Notifications You must be signed in to change notification settings

AaronFeng753/realsr-ncnn-vulkan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

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

Full Usages

Usage: realsr-ncnn-vulkan -i infile -o outfile [options]...

  -h                   show this help
  -v                   verbose output
  -i input-path        input image path (jpg/png) or directory
  -o output-path       output image path (png) or directory
  -s scale             upscale ratio (4, default=4)
  -t tile-size         tile size (>=32/0=auto, default=0)
  -m model-path        realsr model path (default=models-DF2K_JPEG)
  -g gpu-id            gpu device to use (default=0)
  -j load:proc:save    thread count for load/proc/save (default=1:2:2)
  -x                   enable tta mode
  • 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 is 400
  • load:proc:save = thread count for the three stages (image decoding + realsr upscaling + image encoding), use larger value may increase GPU utility and consume more GPU memory. You can tune this configuration as "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, do increase thread count to achieve faster processing.

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

Sample Images

Original Image

origin

Upscale 4x with ImageMagick Lanczo4 Filter

convert origin.jpg -resize 400% output.png

browser

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

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

waifu2x

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

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

realsr

Original RealSR Project

Other Open-Source Code Used

About

realsr converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.9%
  • C++ 9.3%
  • CMake 1.8%