Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th April 2022, 22:31   #341  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by Dogway View Post
Yep, so far our tests have been quite focused, truemotion=true, refinemotion=true.
Truemotion is just a preset for variables lambda, lsad, plevel, pnew and global. We're optimizing all of those individually so the preset value has no effect.

What's refinemotion?

Quote:
Originally Posted by Dogway View Post
But I think this is fine in order to win small battles first. For example I noticed that for copulas I shouldn't mix continuous with discreet distributions so I also need to lock those args that are boolean or with a narrow range like DCT.
Definitely you have to start from the small battles as even they can be overwhelming at first. You could also consider all distributions discrete since Zopti doesn't support anything else. All the real-valued parameters need to be discretized.

But some of the parameters are also non-continuous, like the dct you mentioned. There's no expectation that changing dct one bigger will change the results in certain direction as it's simply switching to a different algorithm. Those might cause problems with any statistical methods. I haven't read about copulas before so I don't know how those behave though.

Quote:
Originally Posted by Dogway View Post
currently looking on T-copula as our samples (slices in the section area) are rather few.
Well nothing's stopping you from using more samples, there are 100k of them after all. I do get that you want to focus on the higher quality results but even there you could widen the range and get more statistically robust results using more samples. Or do several tests using different amount of samples.

Quote:
Originally Posted by Dogway View Post
In any case I'm going to lock those and a few more args and run a test so I can actually use all the samples (I presume most will be confined around the original 'action' area).
Ok, let me know when you find a good range, I can provide more results.

Quote:
Originally Posted by Dogway View Post
There are also some/many args that depend on motion/vector length. This is a double-edged sword, default for high motion or for low motion? You can't have both so in my opinion for MDegrain it's better to default for low motion as some of my visual tests have shown.
Yes for noise removal to be effective relatively low motion is required (and noticing the noise in high motion frames is much more difficult anyway).

I stumbled upon this new correlation algorithm called "distance correlation" which can reveal not just linear dependencies but pretty much any kind of relationship. That could also be useful metric.
zorr is offline   Reply With Quote
Old 22nd April 2022, 09:45   #342  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I had a break to do some Zopti and finally did a random run with the locked params, all in all only optimizing the next:
lambda,lambdaR,pnew,pnewR,pzero,lsad,pglobal,badSAD,badrange

Very interesting results:



That diagonal blob happened by chance showing a strong relationship between the params so it looks like they are all mostly correlated in some way which makes it perfect to construct qual/perf trade-off presets.

I don't know what kind of distributions they follow, actually looking at "-vismode line" it doesn't show any pattern whatsoever even in the original sectioned AREA so I will do it "by hand" with a scatter plot matrix. 1K is not much so I will go up to around 3K.

First correlate obvious params; lambda with lambdaR, pnew to pnewR, badSAD to badrange, and all the penalties. lsad might be also related to lambda. Prune outliers and finally correlate all of them.

After this I will run again a clean 3K random run with a synthetic clip by adding grain with cretindesalpes' new plugin and reassess the results.

At the end I will add in the variables, everything should be automatized by 4 variables; thSAD, tr, clip/scene motion and qual/perf preset.
There are settings that depend on other things but they should correlate with the above 4, for example badrange is in pixel units, therefore depends on input_size*pel, same for searchRange and searchRangeFinest. lambda depends on blksize, such that by default is 1000*blksize*blksizeV/64, with 1000 being substituted with my correlation function which depends on thSAD and probably lsad.

I'm creating now a global clip stats parse filter from the output of SceneStats() log file, so one can know how much motion has the whole clip (in average) so people can set up better MVTools settings. A per-scene is also possible but some people might not want to run MVTools in a runtime environment.
A SAD analysis tool is also in the works, would like to do with expressions since MVTools is so slow.


EDIT: I was testing the new additions on -vismode line and I find them great, specially the average mode. Typically I like median more as it's more robust but it creates spikes. Do you think IQM could be added? it mixes the best of both worlds. Simply create a ranking order, prune the the first and last 25% of the samples and calculate the average of the remaining. There are softer versions though like the Trimean or Winsorized mean.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 22nd April 2022 at 11:03.
Dogway is offline   Reply With Quote
Old 23rd April 2022, 21:30   #343  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by Dogway View Post
I had a break to do some Zopti and finally did a random run with the locked params
...
everything should be automatized by 4 variables; thSAD, tr, clip/scene motion and qual/perf preset
Looks interesting and hopefully you'll find those correlations.

Quote:
Originally Posted by Dogway View Post
After this I will run again a clean 3K random run with a synthetic clip by adding grain with cretindesalpes' new plugin and reassess the results.
Yes that's a good idea also, looks like the grain is very realistic and we can have a "perfect" reference clip.

Quote:
Originally Posted by Dogway View Post
I'm creating now a global clip stats parse filter from the output of SceneStats() log file, so one can know how much motion has the whole clip (in average) so people can set up better MVTools settings.
Would be interesting to figure out the best settings automatically based on the scene stats. That would involve a lot of testing though.

Quote:
Originally Posted by Dogway View Post
EDIT: I was testing the new additions on -vismode line and I find them great, specially the average mode. Typically I like median more as it's more robust but it creates spikes. Do you think IQM could be added?
Sure, IQM sounds very simple. There are some subtle rules when the number of results is not divisible by 4 but those are not a problem.
zorr is offline   Reply With Quote
Old 23rd April 2022, 23:21   #344  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by zorr View Post
Yes that's a good idea also, looks like the grain is very realistic and we can have a "perfect" reference clip.
Just made a simulation of a high ISO uhd clip with and without noise if someone is interested. I recorded a clean plate with very high ISO in low light to isolate as noise and then applied it onto a clean noise free clip and matched the noise to another real noisy clip.
anton_foy is offline   Reply With Quote
Old 24th April 2022, 07:07   #345  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
For low self-noise silicon-imaging new cameras most of noise is photon shot. It have poisson distribution on low levels and gauss at medium and high. Film grain may have different distribution. So for degrain/denoise work we need to use different noise simulators. For film intermediate image capturing and direct electronic low self-noise image capturing cameras. The film is some mix of both photon shot noise with film grain.
DTL is offline   Reply With Quote
Old 24th April 2022, 09:36   #346  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I finished the 3K run, I'm going to plot the scatter plot matrix. I tried showing the optimize animation but all I got was rendering png's to the animation folder. Is there a way to show the animation in the scatter plot window?
I used:
Code:
zopti -mode evaluate -autorefresh true -animation 1
I also noticed the CSV output is rounding score to 3 decimals

@DTL: I haven't read the implementation papers but most content that is to denoise use to be bluray films, specially non-digital, so most of the grain would be a mix of shot noise (low light), negative stock grain, and positive print film stock grain. Each stock has its own characteristics but probably targeting a 5207+2383/2393 would work for films in the last 30 years. Grain is better (more filmic) implemented in log space by the way.

EDIT: Here the 3K plot with traced limits


EDIT: Here the scatter plot matrix of the first 6 patches out of 18. Maybe I need more samples.




EDIT: By the way, I took the liberty to optimize bicubic's b and c coefficients and for upscaling it always optimized to Catmull-Rom, although I like Precise better (adds some acutance). For downscaling it optimized to -0.83,0.14 for halving, and -1.00,0.16 for 1080p to 720p. My reference was a tuned SSIM_downsample().
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 30th April 2022 at 20:34.
Dogway is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.