Skip to content

Dandere2x Architecture (Overview)

Tyler edited this page May 3, 2019 · 4 revisions

Dandere2x is essentially a very primate compression algorithm built around different constraints.

Normal Compression vs Waifu2x Compression

While Dandere2x is a compression algorithm for Waifu2x, it differs in many ways from a normal compression algorithm due to undesired restrictions.

Compression (Codecs such a 265 or AV1)

  • Bandwidth/space is limited

  • Encoding time not as relevant

  • Any sized blocks

  • Perfect information, we have access to every piece of information within a video.

Waifu2x Optimization (Dandere2x)

  • Bandwidth/space is not limited

  • Encoding / Processing time must be faster than strictly using waifu2x

  • Block size capped due to how Waifu2x was trained

  • Non-perfect information, Waifu2x affects blocks after being processed, so the final image is unknown until it's produced.

Dandere2x Architecture - Python

General Description

Dandere2x - Python (D2xPython)

D2xPython does most of the image handling in the Dandere2x algorithm. From managing / deleting files, starting processes, to saving information, D2xPython operates as the main control mechanism.

Major Tasks of Dandere2x Python

  • Starting subtasks, such as FFMPEG to extract frames, Waifu2x-Caffe to upscale a folder, or Dandere2xCpp to create vectors.

  • Create folders

  • Parse User inputs

  • Uses vectors produced by D2xCpp to create finished frames

  • Saving images

Dandere2x Architecture (Overview) - C++ (D2xCpp)

General Description

The cost of intensive functions within Dandere2x happen within the C++ module. Tasks like matching blocks are performing corrections are cost intensive tasks, and thus needs to be done in a more effecient than Python. It's worth noting that D2xCpp only creates vectors - no saving of image files occur here.

Major Tasks of Dandere2x C++

  • Create vectors matching blocks between two images for D2xPython to use.

  • Create correction vectors for D2x-Python to use.

To Do list for Dandere2x C++

  • Add sub processing to speed up image processing times. Right now it's single core and very slow

  • Add a testing class to debug images