Code Monkey home page Code Monkey logo

anime4k's Introduction

Anime4K

Anime4K is a set of open-source, high-quality real-time anime upscaling/denoising algorithms that can be implemented in any programming language.

The simplicity and speed of Anime4K allows the user to watch upscaled anime in real time, as we believe in preserving original content and promoting freedom of choice for all anime fans. Re-encoding anime into 4K should be avoided as it is non-reversible, potentially damages original content by introducing artifacts, takes up to O(n2) more disk space and more importantly, does so without any meaningful decrease in entropy (lost information is lost).

Thumbnail Image

Disclaimer: All art assets used are for demonstration and educational purposes. All rights are reserved to their original owners. If you (as a person or a company) own the art and do not wish it to be associated with this project, please contact us at [email protected] and we will gladly take it down.

v3

The monolithic Anime4K shader is broken into modular components, allowing customization for specific types of anime and/or personal taste.

What's new:

  • A complete overhaul of the algorithm(s) for speed, quality and efficiency.
  • Real-time, high quality line art CNN upscalers. (6 variants)
  • Line art deblurring shaders. ("blind deconvolution" and DTD shader)
  • Denoising algorithms. (Bilateral Mode and CNN variants)
  • Blind resampling artifact reduction algorithms. (For badly resampled anime.)
  • Experimental line darkening and line thinning algorithm. (For perceptual quality. We perceive thinner/darker lines as perceptually higher quality, even if it might not be the case.)

Installation Instructions for GLSL/MPV

More information about each shader.

Real-Time Denoising (Experimental, WIP)

The upcoming version 3.2 will focus on denoising. One version (Heavy-CNN-L) of the experimental denoiser is released for preview. This version is for heavily compressed video.

Note that it will likely change/improve upon release. The main focus will be speed, while also keeping a good quality.
The new denoisers are/will be trained using a mix of the SYNLA Dataset, DIV2K Dataset, In-The-Wild Images and a tiny subset of the Danbooru2019 Dataset.

Comparison

*Note: Here it is evident that PSNR is not always the best indicator of perceived image quality. The waifu2x denoiser looks shaper, but hallucinates many artifacts, especially near line edges.

Real-Time Upscalers Comparison

The new Anime4K upscalers were trained using the SYNLA Dataset. They were designed to be extremely efficient at using GPU shader cores (extremely thin, densely connected CNNs). All three versions outperform NGU and FSRCNNX both in upscale quality and speed while also keeping the number of parameters low, as seen in the test image below. This test image was not part of the training dataset, nor is it used as validation for hyperparameter tuning. Performance benchmarks are based on 1080p->4K upscaling and were performed using an AMD Vega 64 GPU.

First in each category is highlighted in brackets.

Algorithm x2 PSNR (dB) ↑ Runtime @4K (ms) ↓ Parameters ↓
Bilinear 23.03 0 0
ravu-r4 24.09 3.6 41.4k
FSRCNNX-16 24.57 30.4 10.5k
NGU-Sharp-High 24.69 11 ?
Anime4K-M 24.73 [1.5] [1.6k]
Anime4K-L 24.94 2.5 2.9k
Anime4K-UL [25.14] 10.7 15.9k
waifu2x-CUNet [25.61]* >1000 1283.3k

*waifu2x is technically first in PSNR, but it is not a realtime algorithm and is 80 times larger than Anime4K-UL. It is included only for comparison purposes.

The complete images from this comparison can be found under results/Comparisons/Bird.

Comparison

*FSRCNNX-56 failed to launch when playing back 1080p video.

Projects that use Anime4K

Note that they might be using an outdated version of Anime4K. There have been significant quality improvements since v3.

anime4k's People

Contributors

bloc97 avatar dextrosere avatar greywing3 avatar medhefgo avatar azhao12345 avatar rjworks avatar bradybromley avatar mrstandu33 avatar piroton avatar importtaste avatar k4yt3x avatar lukad avatar neurowhai avatar slagrave avatar tianzerl 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.