Skip to content
bloc97 edited this page May 28, 2020 · 12 revisions

Welcome to the Anime4K wiki!

Here you will find information about each specific shader included in Anime4K, their effects and their underlying algorithm.

All shaders fall in one or many of these specific categories:

  • Upscale shaders (Performs super-resolution. Increases (usually double) image size with the expectation that the low resolution image is artifact-free. I.e. No noise, blur or any other degradation.)

    • High quality CNN shaders (M/L/UL variants)
    • Fast DoG shader. It is effectively a repurposed deblur shader. We assume that bilinear upscaling is similar to a gaussian kernel degradation. See deblur shaders section.
    • The original Anime4K algorithm. Is also effectively a deblur shader but designed to handle the specific case of blur caused by bilinear upscaling.
  • Deblur shaders (Performs super-resolution. Decreases blur in an image with the expectation that it is degraded with a gaussian kernel. Image size is left unchanged.)

    • Difference of Gaussians (DoG) deblur shader. Performs non-linear residual enhancement with clamping to prevent overshoot. The power function used turns it from a simple sharpen filter to a deblur filter.
    • The original Anime4K algorithm repurposed as a deblur shader. We assume that a gaussian kernel degradation is similar to the blur produced by bilinear upscaling.
    • CNN upscalers repurposed as a deblur shader (M/L variants). Similar to DoG but the residual is obtained using the CNNs.
    • DTD shader (See mixed shaders section.)
  • Denoise shaders (Performs denoising. Decrease the noise level in an image. Different shaders have different expectation of the noise distribution.)

    • Bilateral filters (Mean/Median/Mode variants) (Each is better at reducing a specific type of noise distribution and have different perceptual qualities.)
    • Mixed Upscale+Denoise CNN shaders (See mixed shaders section.)
  • Resampling artifact removal shaders (Tries to reduce the magnitude of resampling artifacts caused by non-linear resampling. E.g. ringing, aliasing.)

    • High quality CNN shaders (M/L/UL variants)
    • Fast DoG variant (Might blur edges in lower resolution images.)
  • Perceptual enhancement shaders (Enhances perceptual quality by altering the image in some way.)

    • Line thinning shader (Makes lines thinner. Good for older anime where lines are very thick when upscaled to 1080p or 4K.)
    • Line darkening shader (Makes lines darker and increases contrast. Good alongside line thinning, as thinner lines might be very light.)
    • DTD shader (See mixed shaders section.)
  • Mixed shaders (A shader containing a mix of the above for better performance or image quality.)

    • The DTD shader (Short for Darken-Thin-Deblur shader) (Tries to restore perceptual quality of lines in blurry images by darkening lines, thinning them and then applying a deblur shader. This undoes what blur does to lines, since blur spreads lines out, thickens them and makes them lighter.)
    • Upscale + Deblur (Computes the residual using the underlying algorithm, does super-resolution and then uses the same residual to deblur the image for free.)
    • Upscale + Denoise (Upscaling CNNs trained with noisy images, thus they learned joint super-resolution and denoising.)
Clone this wiki locally