I released a new version RC2 with a small update (see attachment).
I tried to be compatible as much as possible with the previous version 3.5.x
The main idea is to use HAVC_deolddify as a source of "exemplar" frames for "Deep-Exemplar-based Video Colorization" but at the same time to keep the use of HAVC_deolddify in "standalone" mode as in the version 3.5.x. Also HAVC_deepex can using HAVC_deolddify as source or can work in "standalone" using only external "exemplar" frames. It is implemented (in RC2) also a mixed mode, where HAVC_deepex can use as sources both HAVC_deolddify and external "exemplar" frames.
I not only renamed the old filter functions (even if the old one are still available but are "deprecated") but for some of them I added/removed some parameters.
With the only exception of
HAVC_stabilizer, which is the same as in version 3.5.x and need to be the last function in the rendering pipeline, I applied the following changes:
HAVC_ddeoldify
removed: dotweak, dotweak_p, degrain_strength (KNLMeansCL.dll not more necessary to be loaded)
added: sc_threshold, sc_min_freq (is necessary to load MiscFilters.dll)
if sc_threshold==0 no reference frames are generated and HAVC_ddeoldify will work in "standalone" mode as in version 3.5.x, so is not necessary to add a flag EnableDeepEx
HAVC_main
removed: degrain_strength
added: EnableDeepEx, DeepExMethod, DeepExPreset, ScFrameDir, ScThreshold, ScMinFreq
The "custom" Preset need to be still supported, with the following logic:
If EnableDeepEx == False
The behavior is similar to the one already implemented in 3.5.x
If EnableDeepEx == True
There are 2 cases (introduced in RC2)
If DeepExMethod in (0,1,2)
in the "custom" section need to be enabled the parameters of HAVC_ddeoldify and HAVC_deepex
in this case the rendering pipeline will be:
Code:
clip_ref = HAVC_ddeoldify(clip, method=2, mweight=ddcolor_weight[w_id],
deoldify_p=[0, deoldify_rf, 1.0, 0.0], ddcolor_p=[1, ddcolor_rf, 1.0, 0.0, enable_fp16],
ddtweak=True, ddtweak_p=[0.0, 1.0, 2.5, True, 0.3, 0.6, 1.5, 0.5, hue_range],
sc_threshold=ScThreshold, sc_min_freq=ScMinFreq)
clip_colored = HAVC_deepex(clip=clip, clip_ref=clip_ref, method=DeepExMethod, render_speed=DeepExPreset, render_vivid=True,
enable_resize=False, sc_framedir=None, only_ref_frames=False, dark=True, dark_p=[0.2, 0.8],
smooth=True, smooth_p=[0.3, 0.7, 0.9, 0.0, "none"], colormap=chroma_adjust)
If DeepExMethod in (3,4)
HAVC_deepex will work in "standalone" using only the external reference frames (clip_ref = None) and in this case in the custom section need to be enabled only the parameters for HAVC_deepex
Code:
clip_colored = HAVC_deepex(clip=clip, clip_ref=None, method=DeepExMethod, render_speed=DeepExPreset, render_vivid=True,
enable_resize=False, sc_framedir=ScFrameDir, only_ref_frames=False, dark=True, dark_p=[0.2, 0.8],
smooth=True, smooth_p=[0.3, 0.7, 0.9, 0.0, "none"], colormap=chroma_adjust)
see the code of HAVC_main for a full example.
There is an interesting option implemented in HAVC_deepex that is "only_ref_frames" (available only in "custom" mode). If this option is enabled, in the folder specified by the parameter "sc_framedir" will be saved the reference frames used by HAVC_deepex , since this option is added mainly for debugging in this case the clip is not colored by HAVC_deepex and it will be still in black and white and only the reference frames will be colored. This option is useful not only for debug but also to manually adjust the bad colored frames. In this case it is possible to put in another directory only the bad frames with the fixed colors and eventually new reference frames and use the DeepExMethod=1 and set "sc_framedir" with the name of new folder containing the adjusted frames, to regenerate the video containing the "improved" frames. This feature was not available in version 3.5.x and thanks to "Deep-Exemplar-based Video Colorization" it is also possible to perform some kind of semi-automatic colorization.
Dan