Github url


by bloc97

bloc97 /Anime4K

A High-Quality Real Time Upscaler for Anime Video

12.0K Stars 1.1K Forks Last release: 2 months ago (3.1) MIT License 321 Commits 12 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


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.


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.


*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 | 0ravu-r4 | 24.09 | 3.6 | 41.4kFSRCNNX-16 | 24.57 | 30.4 | 10.5kNGU-Sharp-High | 24.69 | 11 | ?Anime4K-M | 24.73 | [1.5] | [1.6k]Anime4K-L | 24.94 | 2.5 | 2.9kAnime4K-UL | [25.14] | 10.7 | 15.9kwaifu2x-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.


*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 for TouchDesigner) - (Anime4K for Unity) - (Anime4K Re-Implemented in C#) - (Anime4K Re-Implemented in Rust) - (Anime4K & more algorithms implemented in C++) - (Anime Video Upscaling Pipeline)

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.