Skip to content

Fast waifu2x converter with GPU optimization

Notifications You must be signed in to change notification settings

XHatan/waifu2x-glsl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

waifu2x-glsl

Fast waifu2x converter with GPU optimization. Using GLSL.

Platform

  • Linux with GLEW
  • macOS with GLEW
  • Windows with GLFW and GLEW

Download

  • You can download this program from here.

How to build on macOS

$ #/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install glfw
$ make

How to build on Linux

# #dnf install mesa-libgbm-devel libdrm-devel mesa-libGL-devel mesa-libGLU-devel mesa-libEGL-devel mesa-libGLES-devel
# dnf install glfw-devel
$ make

How to build on Windows

  1. Installing OpenGL
  • nupengl.core with NuGet
  1. Linking OpenGL
  • Choose ‘Linker-> General’.
  • In the ‘Additional Dependencies’ field click on the arrow that appears at the end of the field and choose Edit…
  • In the dialog that appears enter “opengl32.lib”

How to use

$ ./waifu2x_glsl -h
Usage: ./waifu2x_glsl [options] file

Options:
-h                 Print this message
-m <model name>    waifu2x model name [noise2_model.json...]
-s <scale>         Magnification [1.0, 1.6, 2.0...]
-o <output name>   output file name [*.png, *.jpg]

$ ./waifu2x_glsl -s 1.0 nyanko.jpg
$ ./waifu2x_glsl -m vgg_7/art_y/noise3_model.json nyanko.jpg

How to work

01.Nyanko 02.Nyanko 03.Nyanko 04.Nyanko 05.Nyanko 06.Nyanko 07.Nyanko

Demo

Original

Original

Normal Resize

Normal

Waifu2x Resize

  • ./waifu2x_glsl -s 2.0 -m noise2_model.json waifu_s.jpg -o waifu_d.png Waifu2x

References

About

Fast waifu2x converter with GPU optimization

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.8%
  • Makefile 0.2%