/waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV

Primary LanguageC++MIT LicenseMIT

Discord * Downloads * Downloads

waifu2x (converter only version)

This is a reimplementation of waifu2x (original) converter function, in C++, using OpenCV. This is also a reimplementation of waifu2x python version by Hector Martin. You can use this as command-line tool of image noise reduction or/and scaling.

I also have a Discord at:

https://discord.gg/gAvufS2 It's often easier to chat in real time, so if you want feel free to join.

Prebuilt binary-form release

https://github.com/DeadSix27/waifu2x-converter-cpp/releases/tag/5.0

Dependencies

Platform

  • Ubuntu
  • Windows
  • Mac OS X?

(This program probably can be built under MacOSX, because OpenCV and other libraries support OS X)

Libraries

  • OpenCV(version 3.3.0)
  • Now requires openCV 3.3.0

This programs also depends on libraries shown below, but these are already included in this repository. CUDA Support in OpenCV is optional, since not required. (in version 1.0.0, CUDA Support is not used.)

How to build

See BUILDING.md for more information.

Usage

Usage of this program can be seen by executing this with -h option.

(My native language is not English, then I'm sorry for my broken English.)

modifided by tanakamura

  • Added CUDA, OpenCL(AMD GPU), x86 FMA, x86 AVX Support (That is selected automatically at runtime)
  • OpenCL(AMD GPU) version achieves 40% of peak performance (291GFLOPS @ A10-7850K)
  • Added CMakeLists.txt
  • You can build it by cmake ($ cmake -D OPENCV_PREFIX=<OpenCV include/lib dir>)
  • DLL interface
  • You can use waifu2x as library. include w2xconv.h & link w2xc.lib.

modifided by max20091

  • Updated tclap, PicoJSON, Waifu2x model
  • Added Noise Reduction Level 3
  • Using nagadomi original model
  • Added Windows build guide

modifided by DeadSix27

  • Improved build guide BUILDING.md
  • Added support for Ubuntu 17.04 amd64
  • Added support for Visual Studio 2017 amd64
  • Added option to override OpenCV Detection for when you're sure its there (OVERRIDE_OPENCV)
  • VC14: Now requires OpenCV3.2 (VC12 still requires OpenCV3.0, Linux now requires OpenCV3.2 as well (only tested Ubuntu 16.10))
  • VC14: Will not statically link OpenCV, you will need opencv_world320.dll in the w2x folder.
  • Added Cuda checks to prevent the cuda code mess, and get rid of the extra NoCuda branch of max20091 may or may not work properly, I have no nVidia GPU to test
  • TODO: Fix CL-binary file handling (Now fixed see: f963753)
  • TODO: Add proper UTF8/Unicode support
  • ^Keep an eye out on my fork for those: https://github.com/DeadSix27/waifu2x-converter-cpp