-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Algorithms
Currently, Video2X
supports two waifu2x
drivers: waifu2x-caffe
and waifu2x-converter-cpp
. This page will cover the differences between the two drivers and how to configure Video2X
to use the two different drivers.
Video2X
is capable of downloading and configuring both waifu2x-caffe
and waifu2x-converter-cpp
automatically using the video2x_setup.py
setup script. You can simply execute the script, and it will download, decompress, and write the configuration file for you:
python video2x_setup.py
By default, it will download and configure all waifu2x-caffe
, waifu2x-converter-cpp
, waifu2x-ncnn-vulkan
and Anime4K
. If you would like the script to only download one of them, you can specify the driver like such:
python video2x_setup.py -d waifu2x_caffe
python video2x_setup.py -d waifu2x_converter
The waifu2x-caffe
driver is a high-level Python wrapper around waifu2x-caffe. This driver is a waifu2x
implementation based on Nvidia CUDA and Nvidia CUDNN. Therefore, it can only be used on computers with Nvidia GPUs. It has a convenient GUI user interface for enlarging images, but Video2X
only uses its CUI, waifu2x-caffe-cui.exe
.
- Go to the release page of
waifu2x-caffe
, and download the zip file of the latest release (usually namedwaifu2x-caffe.zip
). - Decompress the zip file and place the decompressed files in any desired location.
- In the
video2x.json
configuration file, modify thewaifu2x_caffe/waifu2x_caffe_path
key's value to thewaifu2x-caffe-cui.exe
binary file's path:
"waifu2x_caffe": {
...
"waifu2x_caffe_path": "C:\\Users\\K4YT3X\\AppData\\Local\\video2x\\waifu2x-caffe\\waifu2-caffe-cui.exe",
...
},
The most important difference between waifu2x-converter-cpp
and waifu2x-caffe
is that it supports the AMD platform, due to it's support for OpenCL and OpenCV. It also comes with native support for multi-threading, thus eliminating the need for a multi-threading implementation on the wrapper.
- Go to the release page of
waifu2x-converter-cpp
, and download the latest release package. The name of the file you should download looks something likewaifu2x-DeadSix27-vc15-cv401-win64_v523.7z
. - Decompress the 7z compressed file, and store it to any desired place. You might need to download
7zip
for decompression. - Change the
waifu2x_converter/waifu2x_converter_path
key's value to the parent folder of that contains thewaifu2x-converter-cpp.exe
file:
"waifu2x_converter": {
...
"waifu2x_converter_path": "C:\\Users\\K4YT3X\\AppData\\Local\\video2x\\waifu2x-converter-cpp",
...
}
This build of Waifu2X uses the Vulkan API. According to WikiPedia, "compared to OpenGL and Direct3D 11, and like Direct3D 12 and Metal, Vulkan is intended to offer higher performance and more balanced CPU/GPU usage". To read more about Vulkan, click here.
- Go to the release page of
waifu2x-ncnn-vulkan
, and download the latest release package. The name of the file you should download looks something likewaifu2x-ncnn-vulkan-20190611.zip
. - Decompress the zip file, and store it to any desired place.
- Change the
waifu2x_ncnn_vulkan/waifu2x_ncnn_vulkan_path
key's value to the parent folder of that contains thewaifu2x.exe
file:
"waifu2x_ncnn_vulkan": {
...
"waifu2x_ncnn_vulkan_path": "C:\\Users\\K4YT3X\\AppData\\Local\\video2x\\waifu2x-ncnn-vulkan\\waifu2x.exe",
...
}
Anime4K is unlike any of the waifu2x drivers. It is a non-machine-learning based image scaling algorithm optimized for animation styled images.
- Download Anime4K's cached pre-compiled JAR files or compile your own JAR files from source code.
- Decompress the zip file or compile your code and place the Anime4K files in any desired places.
- Change the
anime4k/path
key's value to path of the JAR file. - Download and install JRE 12. This specific version of JRE is required due to how the JAR file is compiled. If you compiled your own copy of Anime4K, use the appropriate version of JRE JAR file. Change the
anime4k/java_path
key's value to the path to JRE'sjava.exe
file path.
"anime4k": {
...
"path": "C:\\Users\\K4YT3X\\AppData\\Local\\video2x\\anime4k\\Anime4K.jar",
"java_path": "C:\Program Files\Java\jdk-12.0.2\bin\java.exe",
...
}