Anime4KCPP

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (typo)
(v2.5.0 update)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Resizers}}
+
{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Resizers|Deep_color_tools}}
 
{{Filter3
 
{{Filter3
 
|1=[https://github.com/TianZerL TianZerL]
 
|1=[https://github.com/TianZerL TianZerL]
|2=beta (2020/05/24)
+
|2=v2.5.0
|3=[https://github.com/TianZerL/Anime4KCPP/releases Anime4KCPP_AviSynthPlus_plugin-beta-Win64-msvc.7z]
+
|3=[https://github.com/TianZerL/Anime4KCPP/releases Anime4KCPP_AviSynthPlus_plugin-2.5.0-Win64-msvc.7z]
 
|4=Resize  
 
|4=Resize  
 
|5=[https://github.com/TianZerL/Anime4KCPP/blob/master/LICENSE MIT]
 
|5=[https://github.com/TianZerL/Anime4KCPP/blob/master/LICENSE MIT]
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
Anime4K is a simple high-quality anime upscale algorithm for anime. it does not use any machine learning approaches, and can be very fast in real-time processing or pretreatment.<br>
+
Anime4K is a simple high-quality anime upscale algorithm with GPU acceleration support.<br>
 +
 
 +
Starting with v2.0.0 it also provides its own CNN (Convolutional Neural Network) algorithm '''ACNet''':
 +
* ACNet is a CNN based anime upscale algorithm. It aims to provide both high-quality and high-performance.
  
 
*See: https://github.com/TianZerL/Anime4KCPP/wiki/AviSynthPlus-plugin
 
*See: https://github.com/TianZerL/Anime4KCPP/wiki/AviSynthPlus-plugin
Line 15: Line 18:
 
== Requirements ==
 
== Requirements ==
 
* [x64]: [[AviSynth+]]
 
* [x64]: [[AviSynth+]]
* Supported color formats: [[RGB24]]
+
* Supported color formats: [[RGB24]], [[planar]] Y/YUV444 8-32bit
 +
** [[Planar]] YUV422 and YUV420 (8-32bit) is also supported when <code>ACNet=true</code>
 
<br>
 
<br>
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
  
 
===Anime4KCPP===
 
===Anime4KCPP===
:{{Template:FuncDef| Anime4KCPP (clip "src", int "passes", int "pushColorCount", float "strengthColor", float "strengthGradient", int "zoomFactor", bool "GPUMode", int "platformID", int "deviceID")}}
+
:{{Template:FuncDef| Anime4KCPP (clip, int "passes", int "pushColorCount", float "strengthColor", float "strengthGradient", int "zoomFactor", bool "ACNet", bool "GPUMode", string "GPGPUModel", bool "HDN", int "HDNlevel", int "platformID", int "deviceID", int "OpenCLQueueNum", bool "OpenCLParallelIO")}}
 +
 
 +
:{{Template:FuncDef| Anime4KCPP2 (clip src, int "passes", int "pushColorCount", float "strengthColor", float "strengthGradient", int "zoomFactor", bool "ACNet", bool "GPUMode", string "GPGPUModel", bool "HDN", int "HDNlevel", int "platformID", int "deviceID", int "OpenCLQueueNum", bool "OpenCLParallelIO")}}
  
 
<br>
 
<br>
::{{Par2|src|clip| }}
+
::{{Par2| |clip| }}
:::Input clip must be [[RGB24]]
+
:::Input clip.
 +
:::*If <code>ACNet=false</code>, the input clip must be RGB24, Y8/16/32, YUV444P8/16/PS.
 +
:::*If <code>ACNet=true</code>, the input clip must be RGB24, Y8/16/32, YUV420P8/16/PS, YUV422P8/16/PS, or YUV444P8/16/PS.
 +
:::'''Note:''' named input clip is only for <code>Anime4KCPP2</code>, for example <code>Anime4KCPP2(src=last, .....)</code>.
 
<br>
 
<br>
 
::{{Par2|passes|int|2}}
 
::{{Par2|passes|int|2}}
Line 40: Line 49:
 
::{{Par2|zoomFactor|int|1}}
 
::{{Par2|zoomFactor|int|1}}
 
:::Upscaling ratio for resizing.
 
:::Upscaling ratio for resizing.
 +
<br>
 +
::{{Par2|ACNet|bool|false}}
 +
:::Set to <code>true</code> to enable ACNet.
 
<br>
 
<br>
 
::{{Par2|GPUMode|bool|false}}
 
::{{Par2|GPUMode|bool|false}}
:::Enable GPU acceleration
+
:::Enable GPU acceleration.
 +
<br>
 +
::{{Par2|GPGPUModel|string|"opencl"}}
 +
:::OpenCL or CUDA.
 +
<br>
 +
::{{Par2|HDN|bool|false}}
 +
:::Enable HDN mode for ACNet.
 +
<br>
 +
::{{Par2|HDNLevel|int|1}}
 +
:::Set HDN level, higher for better denoising but may cause blur and lack of detail, range 1 to 3.
 
<br>
 
<br>
 
::{{Par2|platformID|int|0}}
 
::{{Par2|platformID|int|0}}
 
::{{Par2|deviceID|int|0}}
 
::{{Par2|deviceID|int|0}}
:::For specifying the GPU.  
+
:::For specifying the GPU.
 
<br>
 
<br>
 +
::{{Par2|OpenCLQueueNum|int|4}}
 +
:::Number of OpenCL queue, may affect performance, especially for NVIDIA graphics card.
 +
<br>
 +
::{{Par2|OpenCLParallelIO|bool|false}}
 +
:::Use a separate OpenCL queue to handle IO, may affect performance, especially for AMD graphics cards.
 +
<br>
 +
 
===listGPUs===
 
===listGPUs===
  
Line 58: Line 86:
 
Anime4KCPP with default settings:
 
Anime4KCPP with default settings:
 
  [[AviSource]]("Blah.avi")
 
  [[AviSource]]("Blah.avi")
  Anime4KCPP(passes=2, pushColorCount=2, strengthColor=0.3, strengthGradient=1.0, zoomFactor=1, GPUMode=false, platformID=0, deviceID=0)
+
  Anime4KCPP(passes=2, pushColorCount=2, strengthColor=0.3, strengthGradient=1.0, zoomFactor=1, ACNet=false, GPUMode=false, \
 +
            GPGPUModel="opencl", HDN=false, HDNlevel=1, platformID=0, deviceID=0, OpenCLQueueNum=4, OpenCLParallelIO=false)
 
<br>
 
<br>
  
 
== Changelog ==
 
== Changelog ==
 
  Version      Date            Changes<br>
 
  Version      Date            Changes<br>
  beta        2020/05/24      - Initial release
+
v2.5.0      2021/01/18      - Support 16bit integer and 32bit float processing (YUV)
 +
                              - Support grayscale input
 +
                              - Provide both anonymous clip (Anime4KCPP) and manually specified clip (Anime4KCPP2) interfaces [https://github.com/TianZerL/Anime4KCPP/issues/51 #51]<br>
 +
v2.3.0      2020/08/07      - Add HDNlevel switching for ACNet, range from 1 to 3, higher for better
 +
                                denoising but may cause blur and lack of detail.
 +
                              - Improve performance.<br>
 +
v2.2.1      2020/06/30      - Fixed weird borders in some AMD cards.
 +
                              - AviSynthPlus and VapourSynth plugin
 +
                                * Add YUV444 input support for Anime4K09.
 +
                                * Reduce memory consumption.
 +
                                * Improve performance.<br>
 +
v2.2.0      2020/06/22      - AviSynthPlus plugin
 +
                                * Add all YUV 8 bit format (YUV444, YUV422 and YUV420) input support of ACNet.
 +
                                * Improve performance, now you can use it to real time playback, see how.
 +
                              - VapourSynth plugin
 +
                                * Add safe mode, and default is on, it usually faster, no extra pixels
 +
                                ([https://github.com/TianZerL/Anime4KCPP/issues/11 weird border #11]), but may use more memory.
 +
                                * Add all YUV 8 bit format (YUV444, YUV422 and YUV420) input support of ACNet,
 +
                                  need safe mode is turned on (otherwise only RGB24 and YUV444 is supported).<br>
 +
v2.1.0      2020/06/13      - Add HDN mode of ACNet for better denoise.
 +
                              - Improve quality of ACNet.
 +
                              - Improve performance of ACNet.<br>
 +
v2.0.0      2020/06/05      - New CNN based algorithm ACNet, greatly improve quality
 +
                                while ensuring performance, all platforms support it now!
 +
                              - YUV444 input support (only for ACNet) for VapourSynth and AviSynth+.
 +
                              - Improve performance.
 +
                              - Miscellaneous bug fixes.
 +
                              - Other detail enhancements.<br>
 +
  beta        2020/05/24      - Initial beta release for AviSynth+
 
<br>
 
<br>
 
== External Links ==
 
== External Links ==

Latest revision as of 08:02, 27 August 2021

Abstract
Author TianZerL
Version v2.5.0
Download Anime4KCPP_AviSynthPlus_plugin-2.5.0-Win64-msvc.7z
Category Resize
License MIT
Discussion

Contents

[edit] Description

Anime4K is a simple high-quality anime upscale algorithm with GPU acceleration support.

Starting with v2.0.0 it also provides its own CNN (Convolutional Neural Network) algorithm ACNet:

  • ACNet is a CNN based anime upscale algorithm. It aims to provide both high-quality and high-performance.


[edit] Requirements

  • [x64]: AviSynth+
  • Supported color formats: RGB24, planar Y/YUV444 8-32bit
    • Planar YUV422 and YUV420 (8-32bit) is also supported when ACNet=true


[edit] Syntax and Parameters

[edit] Anime4KCPP

Anime4KCPP (clip, int "passes", int "pushColorCount", float "strengthColor", float "strengthGradient", int "zoomFactor", bool "ACNet", bool "GPUMode", string "GPGPUModel", bool "HDN", int "HDNlevel", int "platformID", int "deviceID", int "OpenCLQueueNum", bool "OpenCLParallelIO")
Anime4KCPP2 (clip src, int "passes", int "pushColorCount", float "strengthColor", float "strengthGradient", int "zoomFactor", bool "ACNet", bool "GPUMode", string "GPGPUModel", bool "HDN", int "HDNlevel", int "platformID", int "deviceID", int "OpenCLQueueNum", bool "OpenCLParallelIO")


clip   =
Input clip.
  • If ACNet=false, the input clip must be RGB24, Y8/16/32, YUV444P8/16/PS.
  • If ACNet=true, the input clip must be RGB24, Y8/16/32, YUV420P8/16/PS, YUV422P8/16/PS, or YUV444P8/16/PS.
Note: named input clip is only for Anime4KCPP2, for example Anime4KCPP2(src=last, .....).


int  passes = 2
Passes for processing.


int  pushColorCount = 2
Limit the number of color pushes, make sure the edge won't be too thin


float  strengthColor = 0.3
Strength for pushing color, range 0.0 to 1.0, higher for thinner.


float  strengthGradient = 1.0
Strength for pushing gradient, range 0.0 to 1.0, higher for sharper.


int  zoomFactor = 1
Upscaling ratio for resizing.


bool  ACNet = false
Set to true to enable ACNet.


bool  GPUMode = false
Enable GPU acceleration.


string  GPGPUModel = "opencl"
OpenCL or CUDA.


bool  HDN = false
Enable HDN mode for ACNet.


int  HDNLevel = 1
Set HDN level, higher for better denoising but may cause blur and lack of detail, range 1 to 3.


int  platformID = 0
int  deviceID = 0
For specifying the GPU.


int  OpenCLQueueNum = 4
Number of OpenCL queue, may affect performance, especially for NVIDIA graphics card.


bool  OpenCLParallelIO = false
Use a separate OpenCL queue to handle IO, may affect performance, especially for AMD graphics cards.


[edit] listGPUs

This function will list the available platform IDs and device IDs by throwing an error, you can use them to specify the GPU for processing.

listGPUs ()


[edit] Examples

Anime4KCPP with default settings:

AviSource("Blah.avi")
Anime4KCPP(passes=2, pushColorCount=2, strengthColor=0.3, strengthGradient=1.0, zoomFactor=1, ACNet=false, GPUMode=false, \
           GPGPUModel="opencl", HDN=false, HDNlevel=1, platformID=0, deviceID=0, OpenCLQueueNum=4, OpenCLParallelIO=false)


[edit] Changelog

Version      Date            Changes
v2.5.0 2021/01/18 - Support 16bit integer and 32bit float processing (YUV) - Support grayscale input - Provide both anonymous clip (Anime4KCPP) and manually specified clip (Anime4KCPP2) interfaces #51
v2.3.0 2020/08/07 - Add HDNlevel switching for ACNet, range from 1 to 3, higher for better denoising but may cause blur and lack of detail. - Improve performance.
v2.2.1 2020/06/30 - Fixed weird borders in some AMD cards. - AviSynthPlus and VapourSynth plugin * Add YUV444 input support for Anime4K09. * Reduce memory consumption. * Improve performance.
v2.2.0 2020/06/22 - AviSynthPlus plugin * Add all YUV 8 bit format (YUV444, YUV422 and YUV420) input support of ACNet. * Improve performance, now you can use it to real time playback, see how. - VapourSynth plugin * Add safe mode, and default is on, it usually faster, no extra pixels (weird border #11), but may use more memory. * Add all YUV 8 bit format (YUV444, YUV422 and YUV420) input support of ACNet, need safe mode is turned on (otherwise only RGB24 and YUV444 is supported).
v2.1.0 2020/06/13 - Add HDN mode of ACNet for better denoise. - Improve quality of ACNet. - Improve performance of ACNet.
v2.0.0 2020/06/05 - New CNN based algorithm ACNet, greatly improve quality while ensuring performance, all platforms support it now! - YUV444 input support (only for ACNet) for VapourSynth and AviSynth+. - Improve performance. - Miscellaneous bug fixes. - Other detail enhancements.
beta 2020/05/24 - Initial beta release for AviSynth+


[edit] External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools