![]() |
Deoldify Vapoursynth filter - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: Small Talk (https://forum.selur.net/forum-7.html) +--- Thread: Deoldify Vapoursynth filter (/thread-3595.html) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
RE: Deoldify Vapoursynth filter - Dan64 - 03.05.2024 Hello Selur, I do agree with you that moving inside vsdeoldify the grain/noise removal it will be possible to use a more "bold" approach. I opted for writing the following degrain function: def vs_degrain(clip: vs.VideoNode = None, strength: int = 0) -> vs.VideoNode: I decided to use KNLMeansCL because it is fast and can remove both grain and noise. I simplified the input and to the functions ddeoldify_main() and ddeoldify() I added only 1 parameter, that control the strenght of grain/noise removal, called "degrain_strength" (if = 0, is disabled). I attached the new RC7. Thanks, Dan RE: Deoldify Vapoursynth filter - Selur - 03.05.2024 Will look at it tomorrow. RE: Deoldify Vapoursynth filter - Selur - 04.05.2024 Okay, took a look. Unless I overlook something, this is different from what I suggested. (filtering for deoldify, but keeping the luma details) => not implementing this This is the same as applying the denoising before deoldify which Hybrid already can do, but in Hybrid you can use any denoiser not just KNLMeansCL. This does make sense when deoldify is used outside of Hybrid, but in Hybrid, adding this seems like a step back. Cu Selur RE: Deoldify Vapoursynth filter - Dan64 - 04.05.2024 The implemented denoise/degrain will preserve the luma details. The main code is the following: def ddeoldify( Since it was decided to remove the flag "chroma_resize", now this flag is always enabled. This implies that no matter all the changes that are made to the luma by the filters, at the end the original luma is always restored. Dan P.S. I discovered a bug in managing the exception on vs_degrain, I attached the correct version. RE: Deoldify Vapoursynth filter - Selur - 04.05.2024 Ahh,.. chroma_resize_enabled is always true, which calls _clip_chroma_resize, which calls vs_recover_clip_luma which is: def vs_recover_clip_luma(orig: vs.VideoNode = None, clip: vs.VideoNode = None) -> vs.VideoNode: ![]() Cu Selur RE: Deoldify Vapoursynth filter - Selur - 04.05.2024 Why are you using havsfunc? clip = havsfunc.KNLMeansCL(clip=clip, d=1, a=2, s=4, h=dstr, device_type="gpu", device_id=0) clip = core.knlm.KNLMeansCL(clip=clip, d=1, a=2, s=4, h=dstr, channels='Y', device_type="gpu", device_id=0) ![]() https://github.com/Selur/VapoursynthScriptsInHybrid/blob/master/havsfunc.py#L5948 is only used to filter 'Y' and 'UV' separately to speed it up, but in your case there is no need to filter 'UV' at all. ![]() Cu Selur Ps.: uploaded a test version which does include KNLMeans, but not havsfunc. RE: Deoldify Vapoursynth filter - Dan64 - 04.05.2024 Thanks for the advice, I will update the code. Dan RE: Deoldify Vapoursynth filter - Selur - 04.05.2024 No, problem will release a new Hybrid tomorrow then, assuming you release a new DeOldify. Cu Selur RE: Deoldify Vapoursynth filter - Dan64 - 04.05.2024 Ok, I will also release the new version tomorrow. Thanks, Dan (04.05.2024, 12:55)Selur Wrote: Ps.: uploaded a test version which does include KNLMeans, but not havsfunc. I rewrote the "degrain" function as following def vs_degrain(clip: vs.VideoNode = None, strength: int = 0, device_id: int = 0) -> vs.VideoNode: I prefer that in Hybrid the Degrain will display only integer values from 1 to 5. So that in the future I can decide to implement a different mapping and/or denoise/degrain function, without the need to change the input. If you prefer you can call this parameter also "DegrainFactor". Thanks RE: Deoldify Vapoursynth filter - Selur - 04.05.2024 Uploaded a new test version. Cu Selur |