Skip to content

Command-line background manager using OpenCL implementation of waifu2x

License

Notifications You must be signed in to change notification settings

ziqizh/waifu2x-bash

 
 

Repository files navigation

waifu2x-bash

This is a command line background manager for personal use. It adjusts the background image to proper size, rename and rearrange files. Many parameters in the scripts are hardcoded so you may need to change these values accrodingly.

WARNING: The Python Waifu2x code used here is not yet optimized. Tread with caution.

Based on waifu2x by nagadomi.

Dependencies

  • Python 2.7
  • numpy
  • scipy
  • PIL (or Pillow)
  • PyOpenCL

And an OpenCL implementation.

Usage

Record your parameters

$ python2 cl-waifu2x.py miku_small.png miku_small_cl.png models/scale2.0x_model.json
Choose platform:
[0] <pyopencl.Platform 'Intel(R) OpenCL' at 0x7fa4d7f10110>
[1] <pyopencl.Platform 'NVIDIA CUDA' at 0x7fa4d8026f80>
Choice [0]: 1
Set the environment variable PYOPENCL_CTX='' to avoid being asked again.
100.0%...Done
29004 pixels/sec
925359122 ops/sec

Before running script, first run the sample once and record your choices. For example, your input is '1' for the prompt "Choice [0]".

Update automated script

Open 'expect' and find 'send "1\n"' lines. Put your values in accrodingly.

Performance

This script is for Mac so there is no much difference

About

Command-line background manager using OpenCL implementation of waifu2x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.0%
  • Shell 12.1%
  • Lua 5.9%