Giter Club home page Giter Club logo

cl-waifu2x's Introduction

cl-waifu2x

WARNING: This software is under active development and not yet inteded for production or use by end-users. It is not yet optimized. Tread with caution.

cl-waifu2x is an implementation of the waifu2x algorithm in OpenCL. It focuses on use of the neural network algorithm, not its training, and therefore it relies on models produced with the original waifu2x.

cl-waifu2x aims to be compatible with most mainstream OpenCL implementations, including GPU-based and CPU-based ones from major vendors.

Based on waifu2x by nagadomi.

Dependencies

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

And an OpenCL implementation.

Usage

$ 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]:
Set the environment variable PYOPENCL_CTX='' to avoid being asked again.
100.0%...Done
29004 pixels/sec
925359122 ops/sec

OpenCL implementations that are being used for testing:

  • Intel (CPU) (test platform: Intel Core i7 3820QM)
  • Nvidia (GPU) (test platform: Nvidia GeForce GTX 660M)

Performance

The current kernel is very dumb and not yet GPU-optimized. Performance is currently about equal on CPU and GPU, and about 6 times slower than the original waifu2x CUDA version on the same GPU, though also several times faster than the trivial single-threaded waifu2x.py on the same CPU.

cl-waifu2x's People

Contributors

marcan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.