10-03-2018, 07:51 AM
Even better image upscaling with Waifu2x
You may have already seen the article here in the Magazine about upscaling bitmap images with better quality. That article covered a few utilities to achieve good results, but there’s always room for enhancement. Meet Waifu2x, a sophisticated tool that uses deep convolutional neural networks, or machine learning for short. Therefore it benefits from trained model data sets. Read on to see how well it performs to upscale your images, and how to get the same benefits even without an Nvidia card.
Here are some examples. First, a character that will be familiar to Fedora fans:
Making the Beefy Miracle hot dog four times larger keeps it nearly perfect!
Here’s another example:
Upscaling a drawing from an old book delivers really outstanding results.
Because Waifu2x performs the calculations using Nvidia CUDA computing platform, it requires an Nvidia graphics card. This article, however, covers a more portable version called Waifu2x-converter-cpp that runs everywhere.
Waifu2x-converter-cpp doesn’t require a dedicated Nvidia GPU. Instead, it leverages the OpenCV and OpenCL libraries. Although the overall performance is slower compared to the original code, it’s portable and more people are able to use it. And of course it runs on Fedora!
Follow the directions below to give it a spin.
Installing Waifu2x-converter-cpp in Fedora
To build the application from source, first install build dependencies:
Then grab the source code, build it and install the files:
Tell the dynamic library linker to index the directory with locally installed libraries:
Now everything is ready for upscaling. The example command for processing an image is as follows:
Don’t miss this very helpful command for extras, such as switching OpenCL on/off, playing with noise level, and so on:
Using a graphical front-end for Waifu2x
Another step forward is to install Qtwaifu2x, a graphical tool that lets you escape Fedora terminal and process images with comfort and convenience.
Practically all you have to do is hit Browse and Start to launch the upscaling task.
Installing Qtwaifu2x in Fedora
First, install the main build dependency:
Then get the code and build it:
To run the application from the current directory:
The main window has quite a few options, but it’s usually enough to provide the input file and hit the Start button.
Brew yourself a cup of tea and come back in a while to enjoy the perfectly upscaled image!
You may have already seen the article here in the Magazine about upscaling bitmap images with better quality. That article covered a few utilities to achieve good results, but there’s always room for enhancement. Meet Waifu2x, a sophisticated tool that uses deep convolutional neural networks, or machine learning for short. Therefore it benefits from trained model data sets. Read on to see how well it performs to upscale your images, and how to get the same benefits even without an Nvidia card.
Here are some examples. First, a character that will be familiar to Fedora fans:
Making the Beefy Miracle hot dog four times larger keeps it nearly perfect!
Here’s another example:
Upscaling a drawing from an old book delivers really outstanding results.
Because Waifu2x performs the calculations using Nvidia CUDA computing platform, it requires an Nvidia graphics card. This article, however, covers a more portable version called Waifu2x-converter-cpp that runs everywhere.
Waifu2x-converter-cpp doesn’t require a dedicated Nvidia GPU. Instead, it leverages the OpenCV and OpenCL libraries. Although the overall performance is slower compared to the original code, it’s portable and more people are able to use it. And of course it runs on Fedora!
Follow the directions below to give it a spin.
Installing Waifu2x-converter-cpp in Fedora
To build the application from source, first install build dependencies:
Code:
sudo dnf install -y gcc-c++ cmake opencv-devel opencl-utils-develThen grab the source code, build it and install the files:
Code:
git clone https://github.com/DeadSix27/waifu2x-converter-cpp.git cd waifu2x-converter-cpp/build cmake -DLIB_SUFFIX=64 ../ make sudo make installTell the dynamic library linker to index the directory with locally installed libraries:
Code:
sudo ldconfig /usr/local/lib64Now everything is ready for upscaling. The example command for processing an image is as follows:
Code:
waifu2x-converter-cpp --scale_ratio 2 -i /path/to/input_file -o /path/to/output_fileDon’t miss this very helpful command for extras, such as switching OpenCL on/off, playing with noise level, and so on:
Code:
waifu2x-converter-cpp --helpAnother step forward is to install Qtwaifu2x, a graphical tool that lets you escape Fedora terminal and process images with comfort and convenience.
Practically all you have to do is hit Browse and Start to launch the upscaling task.
Installing Qtwaifu2x in Fedora
First, install the main build dependency:
Code:
sudo dnf install -y qt5-qtbase-develThen get the code and build it:
Code:
git clone https://github.com/cmdrkotori/qtwaifu2x.git cd qtwaifu2x qmake-qt5 && makeTo run the application from the current directory:
Code:
./qtwaifu2xThe main window has quite a few options, but it’s usually enough to provide the input file and hit the Start button.
Brew yourself a cup of tea and come back in a while to enjoy the perfectly upscaled image!

