Log in

View Full Version : Temporal Denoisers scene change artifacts


Atlantis
30th June 2020, 22:36
I just learned that with FFT3D and DFTTest you get bad frames sometimes at scene changes.

https://github.com/pinterf/fft3dfilter/issues/2

This is very annoying once you learn and see it. With bt=5 you get 4 bad frames and with bt=3 you get 2 bad frames at some scene changes. The images are not denoised.

I'm surprised not much people talk about this. This kind of ruins the denoising. I want to use FFT3D because of its speed. Anyways to do a temporal denoising without these artifacts?

feisty2
1st July 2020, 00:34
mcompensate

real.finder
1st July 2020, 00:41
you can do mc, Two birds with one stone

bt=5
sMCwarper(mc=bt,"neo_FFT3D(bt=para1)",prefilter=1,para1=bt)

edit: seems feisty2 was faster than me

Atlantis
1st July 2020, 01:14
Thanks real.finder. I added your code and it says no sMCwarper function.

My original code is this
neo_fft3d(y=3, u=2, v=2, sigma=6)
neo_fft3d(y=2, u=3, v=3, sigma=3)

How should I modify it and what plugin should I load? I'm going to stay with bt=3 the default for the moment.

real.finder
1st July 2020, 01:55
Thanks real.finder. I added your code and it says no sMCwarper function.

My original code is this
neo_fft3d(y=3, u=2, v=2, sigma=6)
neo_fft3d(y=2, u=3, v=3, sigma=3)

How should I modify it and what plugin should I load? I'm going to stay with bt=3 the default for the moment.

sMCwarper in https://github.com/realfinder/AVS-Stuff/raw/Community/avs%202.5%20and%20up/dfttestMC_and_MC_things.avsi

StainlessS
1st July 2020, 02:25
From here:- https://forum.doom9.org/showthread.php?p=1786042#post1786042

Demo to show scene changes [could hack to use in any script, uses MvTools]

FN=".\LowBitrateAnime.avi"
Avisource(FN)

Function EndOfSceneClip(clip c,Int "thSCD1",Int "thSCD2") { # All Luma Samples set 255 at EOS
thSCD1=Default(thSCD1,400) thSCD2=Default(thSCD2,130)
sup=c.MSuper(pel=1,sharp=0,rfilter=2,hpad=16, vpad=16)
bv=sup.MAnalyse(isb=true, delta=1,blksize=16,overlap=8)
Return c.MSCDetection(bv,thSCD1=thSCD1,thSCD2=thSCD2)
}

Function StartOfSceneClip(clip c,Int "thSCD1",Int "thSCD2") { # All Luma Samples set 255 at SOS
thSCD1=Default(thSCD1,400) thSCD2=Default(thSCD2,130)
sup=c.MSuper(pel=1,sharp=0,rfilter=2,hpad=16, vpad=16)
fv=sup.MAnalyse(isb=false,delta=1,blksize=16,overlap=8)
Return c.MSCDetection(fv,thSCD1=thSCD1,thSCD2=thSCD2)
}

EOS = EndOfSceneClip
SOS = StartOfSceneClip
#return EOS
SSS="""
e = EOS.AverageLuma
s = SOS.AverageLuma
Subtitle(String(current_frame)+String(e,"] EOS=%.1f")+String(s," : SOS=%.1f"))
(e!=0.0)
\ ? Subtitle("End Of Scene",Size=48,Text_Color=$FF0000,Y=Height/2-24,Align=5)
\ : (s!=0.0) ? Subtitle("Start Of Scene",Size=48,Text_Color=$0000FF,Y=Height/2+24,Align=5)
\ : NOP
return last
"""

Scriptclip(SSS)


EDIT: Blend of SOS and EOS would be above 127 if either EOS or SOS (actually anything above 0.0 would would detect).
Could use with eg ConditionalSelect or some other runtime filter [as eg above scriptclip].

https://i.postimg.cc/jLX80qs9/sc-00.jpg (https://postimg.cc/jLX80qs9)

Atlantis
1st July 2020, 03:19
sMCwarper in https://github.com/realfinder/AVS-Stuff/raw/Community/avs%202.5%20and%20up/dfttestMC_and_MC_things.avsi

Oh, it uses dfttest and it is so slow. With dfttest I get 1 fps. A 4K HDR movie would take 3-4 days to encode. I guess I have to live with the artifacts. I'm going to stick with neo_fft3d. bt=3 makes it less visible. But it is there and visible to a trained eye.

By the way, who writes these scripts and dfttest. Do they even use them themselves in real life? These look like those high end cloths you see on a fashion show where there is no real function for them in real life at all! :D

real.finder
1st July 2020, 04:52
Oh, it uses dfttest and it is so slow. With dfttest I get 1 fps. A 4K HDR movie would take 3-4 days to encode. I guess I have to live with the artifacts. I'm going to stick with neo_fft3d. bt=3 makes it less visible. But it is there and visible to a trained eye.

By the way, who writes these scripts and dfttest. Do they even use them themselves in real life? These look like those high end cloths you see on a fashion show where there is no real function for them in real life at all! :D

sMCwarper don't use dfttest itself

and indeed 4k need more cpu power, I use it with SD and HD

StainlessS maybe made something faster that only do scene changes things not mc

StainlessS
1st July 2020, 06:09
Nope, the scene change stuff from MvTools aint that fast, but aint really so slow either, also could maybe downsize source to eg 640x480
for the scene change clips (SmallC=BilinearResize(640,480) EOS=SmallC.EndOfSceneClip SOS=SmallC.StartOfSceneClip)
and so only do the scene change detect on smaller clip.
indeed 4k need more cpu power
Indeed, indeed, I would never have patience enough for 4K, and seems like overkill, (leastwise for my lousy eyes).

EDIT: The demo previously posted could be used to apply scene change control to any denoise type function,
do something special if EOS, and something else special if SOS, otherwise normal denoise. The something special
might well depend upon what the denoise does and what problem occurs at EOS, or SOS.

feisty2
1st July 2020, 06:13
By the way, who writes these scripts and dfttest. Do they even use them themselves in real life? These look like those high end cloths you see on a fashion show where there is no real function for them in real life at all! :D

you lack the basic understanding of the computation cost of video processing.
I got some scripts that restore crappy DVD videos to master tape quality and it took 2 weeks to restore a 3 min music video on a server with a Xeon CPU, 256G RAM and 8 2080Ti GPUs, the video being restored was only 720x480, not even HD.

ChaosKing
1st July 2020, 09:24
you lack the basic understanding of the computation cost of video processing.
I got some scripts that restore crappy DVD videos to master tape quality and it took 2 weeks to restore a 3 min music video on a server with a Xeon CPU, 256G RAM and 8 2080Ti GPUs, the video being restored was only 720x480, not even HD.

If possible, could you show some before after pics?

StainlessS
1st July 2020, 12:55
If possible, could you show some before after pics?
Bet its Kylie :)
[Feisty, Kylie got them there gold hotpants for 50 pence in a charity shop in London, best damn 50 pence she ever spent,
she went from being persona-non-grata to shit-hot-new-star over night. (she found it real hard to get rid of the
Aussie good girl image from "Home & Away" soap opera, had spent a decade or more 'out of favour' except for 8YO girl fans [EDIT: and me])].

EDIT: I'm wondering if we will ever get to see Feisty2 in gold hotpants, will match his blue eyes & flatcap great. :)

EDIT:
"Home & Away"
Actually "Neighbours" I think, Homa & Away was the other one.

Atlantis
1st July 2020, 14:19
sMCwarper don't use dfttest itself
Oh, ok, then I'm going to try it.

Tried, it says

There is no function named dither_luma_rebuild
Where should I find that?

StainlessS
1st July 2020, 14:41
Where should I find that?
Real.Finder Zs_RF_Shared.avsi:- https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/ZS%20AVS%20Shared%20Functions.avsi

Used by almost all Real.Finder scripts.

feisty2
1st July 2020, 16:25
If possible, could you show some before after pics?

sure, I'll start a new thread on the General Discussion subforum.

Atlantis
1st July 2020, 23:42
I added Zs_RF_Shared.avsi and now it says no function mt_lut.

real.finder, could you please tell me all the necessary files I should use to test
bt=5
sMCwarper(mc=bt,"neo_FFT3D(bt=para1)",prefilter=1,para1=bt)

Remember, this is a thread made by someone who doesn't know how this work, so one word stuff like mcompensate or a single line of a code doesn't help anyone's time.
This is not a game, this is not a riddle, this is not a puzzle thread. Overall the replies are not very helpful. It's like people chatting among themselves and repeating words
only they know what it means for their own amusement.

real.finder
2nd July 2020, 01:25
if you google it then you know from what it come and what you missed

https://www.google.iq/search?source=hp&ei=Tin9Xs7nHoKZsAfL3J_4Dw&q=mt_lut&oq=mt_lut&gs_lcp=CgZwc3ktYWIQAzIGCAAQHhATMgYIABAeEBMyBggAEB4QEzIGCAAQHhATMgYIABAeEBMyBggAEB4QEzIICAAQChAeEBMyBggAEB4QEzIGCAAQHhATMgYIABAeEBNQ0AdY0Adg6RZoAHAAeACAAbcBiAG3AZIBAzAuMZgBAKABAqABAaoBB2d3cy13aXo&sclient=psy-ab&ved=0ahUKEwjOxqj8pq3qAhWCDOwKHUvuB_8Q4dUDCAY&uact=5

feisty2
2nd July 2020, 04:39
Remember, this is a thread made by someone who doesn't know how this work, so one word stuff like mcompensate or a single line of a code doesn't help anyone's time.
This is not a game, this is not a riddle, this is not a puzzle thread. Overall the replies are not very helpful. It's like people chatting among themselves and repeating words
only they know what it means for their own amusement.

you don't sound very kind for someone who's asking for help from others, no one's obliged to help you and you should be grateful that the one word stuff is concise and informative enough to tell you exactly what you need to solve the problem. if you don't know how to use mcompensate, learn it, it's not rocket science. what gives you the illusion that someone will always spoon-feed you?

ChaosKing
2nd July 2020, 09:06
if you google it then you know from what it come and what you missed

https://www.google.iq/search?source=hp&ei=Tin9Xs7nHoKZsAfL3J_4Dw&q=mt_lut&oq=mt_lut&gs_lcp=CgZwc3ktYWIQAzIGCAAQHhATMgYIABAeEBMyBggAEB4QEzIGCAAQHhATMgYIABAeEBMyBggAEB4QEzIICAAQChAeEBMyBggAEB4QEzIGCAAQHhATMgYIABAeEBNQ0AdY0Adg6RZoAHAAeACAAbcBiAG3AZIBAzAuMZgBAKABAqABAaoBB2d3cy13aXo&sclient=psy-ab&ved=0ahUKEwjOxqj8pq3qAhWCDOwKHUvuB_8Q4dUDCAY&uact=5

Wrong link, use this https://lmgtfy.com/?q=mt_lut

Atlantis
2nd July 2020, 12:13
you don't sound very kind for someone who's asking for help from others, no one's obliged to help you and you should be grateful that the one word stuff is concise and informative enough to tell you exactly what you need to solve the problem. if you don't know how to use mcompensate, learn it, it's not rocket science. what gives you the illusion that someone will always spoon-feed you?
On the contrary, it is you who don't sound kind. Read again what you wrote or other people wrote. I should be grateful? No. You must be joking. You are obviously of bad faith and do not want to help anyone.

This is very easy if I had a tool and was proud of it and wanted people to use it, I would say use this, import these dlls. Very easy. There are still errors and even more functions are missing. This again shows you are not of good faith. It's not worth it. You are not worth it. Play with your tool alone. I'm out.

real.finder
2nd July 2020, 12:27
Open source, open mind

using open source things is not easy, in fact sometimes its very hard (they give you only source code)

maybe you should use commercial software if you don't like what we did :)