View Full Version : Oyster, placebo compression artifacts buster
kedautinh12
26th January 2023, 10:54
@Dogway, if you had problem with KNLMeansCL, you can ask Asd-g to port nlm_cuda to avs+
https://github.com/Asd-g/AviSynthPlus-Scripts/issues
Dogway
26th January 2023, 11:48
I think he is taking a break, anyway I think it's better he does what he pleases.
DGDenoise is CUDA NL Means, but it lacks the options KNLMeansCL has besides the important 'rclip' for guidance.
BTW, updated Oyster to fix a chroma issue, chroma always happens to be an afterthought, poor chroma...
ChaosKing
26th January 2023, 11:50
This as a graph
clip = core.vivtc.VFM(clip,0).vivtc.VDecimate()
clip = core.fmtc.bitdepth( clip, bits = 32 )
clip = core.fmtc.resample( clip, css = "444")
ref_s = Oy.Basic(clip, short_time=True,radius=2)
clip = Oy.Deringing(clip, ref_s, block_step=2,radius=2)
Oyster: https://i.imgur.com/ggNKprI.png
My gpu mod: https://i.imgur.com/2uvZ1Z7.png
I counted 10 KNLMeansCL calls and 4 Dfttest calls
You can created it with vspipe -g full or simple
Use https://dreampuf.github.io/GraphvizOnline with dot engine
Dogway
26th January 2023, 12:10
My gosh... did he ever manage to run that? in 2017 or therebouts?
Looks like he did some kind of manual NN, using NLMeans residuals and then refining the output.
I liked the deblocking, looks like a clean reinterpretation, I wonder if there's any actual ML model designed for this task.
As for neo_dfttest I tested it before but didn't make a big difference speed wise, just testing on AvsPmod GuidedBlur felt much faster but haven't benchmarked, also I had to parametrize it. GuidedBlur is also in VS so maybe you can check if it makes it any faster.
Those graphs look cool, although I'm still searching for an IDE with logic highlighting.
ChaosKing
26th January 2023, 12:18
My gosh... did he ever manage to run that? in 2017 or therebouts?
You click on run, got to sleep and in the morning 5 seconds are rendered :p
He showed mostly Britney Spears music videos, so not that unreasonable for a ~3min long clip if Oyster was created for these short clips.
I think it was more for education purpouses.
ChaosKing
26th January 2023, 12:33
As for neo_dfttest I tested it before but didn't make a big difference speed wise, just testing on AvsPmod GuidedBlur felt much faster but haven't benchmarked, also I had to parametrize it. GuidedBlur is also in VS so maybe you can check if it makes it any faster.
Where did you saw GuidedBlur for VS?
Dogway
26th January 2023, 13:00
Sorry was called GuidedFilter (https://github.com/WolframRhodium/muvsfunc/blob/master/muvsfunc.py#L2983).
Yes I remember encoding anime shorts at 0.1 fps with tnlmeans, the good days haha
zorr
26th January 2023, 22:15
There's also WNNM (https://github.com/AmusementClub/VapourSynth-WNNM). I'm running some tests with it but can't say anything conclusive yet. It's supposed to be better quality than BM3D.
ChaosKing
26th January 2023, 23:18
Quality seems to be better with the loop approach compared to plain bm3d (not Oyster related)
ref = haf.SMDegrain(clip,tr=3, thSAD=1000)
clip = core.fmtc.bitdepth( clip, bits = 32)
ref = core.fmtc.bitdepth( ref, bits = 32 )
for i in range(5):
if i == 0:
previous = clip
elif i == 1:
previous = denoised
else:
previous = core.std.Expr([clip, previous, denoised], "x y - {factor} * z +".format(factor=0.1))
denoised = previous.wnnm.WNNM(sigma=7, radius = 3, rclip = ref)
The more iterations the lower sigma needs to be it seems.
Even 10 iterations are still faster then Oyster :p
zorr
27th January 2023, 00:32
ref = haf.SMDegrain(clip,tr=3, thSAD=1000)
...
denoised = previous.wnnm.WNNM(sigma=7, radius = 3, rclip = ref)
I was wondering about the reference clip. The official implementation doesn't use it and it's probably there just because BM3D has it and it was easy to add.
Perhaps the loop approach is a replacement for the reference clip. Or maybe you're supposed to generate a new ref clip for each iteration. Have you tried it without the reference clip?
Emulgator
27th January 2023, 01:28
AviSynth+ 3.7.3 Oyster attempt, thanks Dogway for your patience !
<Sourcefilter>
<Sourcefilter>
va=AudioDub(v,a)
clp=va.ConvertToYV24().ConvertBits(32)
sup = oyster_Super(clp)
ref_f = oyster_Basic(clp, sup, short_time=False)
ref_s = oyster_Basic(clp, sup, short_time=True)
oyster_Deblocking(clp, ref_f, block_step=2)
still gets me
"nnedi3wrap: Field must be 0 or 1 for scaling"
ResizersPack 10.9.avsi, line 678
DeblockPack 2.7.avsi, line 396
Path\File\script.avs line 62,
(which is sup=oyster_Super(clp))
Which version of nnedi3 is it I am hunting ?
I have NNEDI3CL.dll 1.0.6.0 with nnedi3_weights.bin
and nnedi3.dll 0.9.4.61
Dogway
27th January 2023, 02:52
Maybe your source is tagged as interlaced in frameprops?
Try with:
propSet("_FieldBased",0)
sup = oyster_Super(clp)
ref_s = oyster_Basic(clp, sup, short_time=True)
oyster_Deblocking(clp, ref_s, block_step=2)
You also need latest yugefunc on my repo.
Emulgator
27th January 2023, 14:22
Thanks for the tip, Dogway!
I had yugefunc 0.9, now 1.0 is in, still no success.
Properties were Frame Based before and still is...
P.S. Ouch, AvsPMod tells so at its status bar.
The real frame properties are _FieldBased (2 [top-field])
(Source is 23.976 pulldowned to 29.97fps.
Sourcefilter was .d2v with Forced Film so good I hoped.)
propSet("_FieldBased",0) returns error: invalid arguments to propSet, I have to dig...
Was MYFAULTOFCOURSE, I had videostream named variable, so last() was empty or contained something else...
To use PropSet was the right hint, thanks again, Dogway.
Now with these elaborated scripts under AviSynth+ I have to use these property guided thingies much more often.
And now under AviSynth+ oyster_Deblocking has indeed delivered the first frame in like 30secs ! Yay !
And the next frames within 1..2secs. RTX3080 doing the dirty work. Wow.
Many thanks to all involved ! That had been a nice community climbing.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.