From 188a44ce384a83464aca7342af0371ae1e8e5487 Mon Sep 17 00:00:00 2001 From: K4YT3X Date: Thu, 20 Aug 2020 04:50:19 -0400 Subject: [PATCH] updated Anime4KCPP driver arguments --- src/video2x.yaml | 6 ++++++ src/wrappers/anime4kcpp.py | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/video2x.yaml b/src/video2x.yaml index f2fdda7..17e7c92 100644 --- a/src/video2x.yaml +++ b/src/video2x.yaml @@ -106,10 +106,16 @@ anime4kcpp: postFilters: 40 # Enhancement filter, only working when postProcessing is true,there are 5 options by binary:Median blur=0000001, Mean blur=0000010, CAS Sharpening=0000100, Gaussian blur weak=0001000, Gaussian blur=0010000, Bilateral filter=0100000, Bilateral filter faster=1000000, you can freely combine them, eg: Gaussian blur weak + Bilateral filter = 0001000 | 0100000 = 0101000 = 40(D), so you can put 40 to enable Gaussian blur weak and Bilateral filter, which also is what I recommend for image that < 1080P, 48 for image that >= 1080P, and for performance I recommend to use 72 for video that < 1080P, 80 for video that >=1080P (unsigned int [=40]) GPUMode: false # Enable GPU acceleration CNNMode: false # Enable ACNet + HDN: false # Enable HDN mode for ACNet + HDNLevel: 1 # Set HDN level (int [=1]) listGPUs: null # list GPUs platformID: 0 # Specify the platform ID (unsigned int [=0]) deviceID: 0 # Specify the device ID (unsigned int [=0]) codec: mp4v # Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), hevc(not support in Windowds), av01(not support in Windowds) (string [=mp4v]) + forceFps: 0 # Set output video fps to the specifying number, 0 to disable (float [=0]) + disableProgress: false # disable progress display + webVideo: null # process the video from URL + alpha: false # preserve the Alpha channel for transparent image ffmpeg: ffmpeg_path: '%LOCALAPPDATA%\video2x\ffmpeg-latest-win64-static\bin' intermediate_file_name: 'intermediate.mkv' diff --git a/src/wrappers/anime4kcpp.py b/src/wrappers/anime4kcpp.py index a8de0d2..84c9200 100755 --- a/src/wrappers/anime4kcpp.py +++ b/src/wrappers/anime4kcpp.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ -Name: Waifu2x Caffe Driver +Name: Anime4KCPP Driver Author: K4YT3X Date Created: May 3, 2020 -Last Modified: May 11, 2020 +Last Modified: August 20, 2020 Description: This class is a high-level wrapper -for waifu2x-caffe. +for Anime4KCPP. """ # built-in imports @@ -60,10 +60,16 @@ class WrapperMain: parser.add_argument('-e', '--postFilters', type=int, help='Enhancement filter, only working when postProcessing is true,there are 5 options by binary:Median blur=0000001, Mean blur=0000010, CAS Sharpening=0000100, Gaussian blur weak=0001000, Gaussian blur=0010000, Bilateral filter=0100000, Bilateral filter faster=1000000, you can freely combine them, eg: Gaussian blur weak + Bilateral filter = 0001000 | 0100000 = 0101000 = 40(D), so you can put 40 to enable Gaussian blur weak and Bilateral filter, which also is what I recommend for image that < 1080P, 48 for image that >= 1080P, and for performance I recommend to use 72 for video that < 1080P, 80 for video that >=1080P') parser.add_argument('-q', '--GPUMode', action='store_true', help='Enable GPU acceleration') parser.add_argument('-w', '--CNNMode', action='store_true', help='Enable ACNet') + parser.add_argument('-H', '--HDN', action='store_true', help='Enable HDN mode for ACNet') + parser.add_argument('-L', '--HDNLevel', type=int, help='Set HDN level') parser.add_argument('-l', '--listGPUs', action='store_true', help='list GPUs') parser.add_argument('-h', '--platformID', type=int, help='Specify the platform ID') parser.add_argument('-d', '--deviceID', type=int, help='Specify the device ID') parser.add_argument('-C', '--codec', type=str, help='Specify the codec for encoding from mp4v(recommended in Windows), dxva(for Windows), avc1(H264, recommended in Linux), vp09(very slow), hevc(not support in Windowds), av01(not support in Windowds) (string [=mp4v])') + parser.add_argument('-F', '--forceFps', action='store_true', help='Set output video fps to the specifying number, 0 to disable') + parser.add_argument('-D', '--disableProgress', action='store_true', help='disable progress display') + parser.add_argument('-W', '--webVideo', type=str, help='process the video from URL') + parser.add_argument('-A', '--alpha', action='store_true', help='preserve the Alpha channel for transparent image') return parser.parse_args(arguments) def load_configurations(self, upscaler):