waifu2x-glsl
waifu2x-glsl copied to clipboard
Fast waifu2x converter with GPU optimization
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
- Installing OpenGL
- nupengl.core with NuGet
- 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
Demo
Original
Normal Resize
Waifu2x Resize
- ./waifu2x_glsl -s 2.0 -m noise2_model.json waifu_s.jpg -o waifu_d.png
References
- https://github.com/yui0/catseye
- Image Super-Resolution Using Deep Convolutional Networks
- EnhanceNet: Single Image Super-Resolution Through Automated Texture Synthesis
- Waifu2x
- Waifu2x webgl version / GLSL code
- Original implementation
- https://github.com/ueshita/waifu2x-converter-glsl
- https://stanko.github.io/super-resolution-image-resizer
- https://www.slideshare.net/KosukeNakago/seranet
- GLSL
- https://github.com/transcranial/keras-js/tree/master/src/webgl
- https://github.com/scienceai/neocortex/blob/master/src/lib/webgl/matmul_fragment_shader.glsl
- https://tenso.rs/demos/fast-neural-style/
- Picture
- Nyanko: https://www.illust-box.jp/member/view/7263/
- Nyanko: http://www.poipoi.com/yakko/cgi-bin/sb/log/eid5173.html#more-5173
- OpenGL on Mac