DGDenoise

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

admin wrote:@gonca

First, you have to use Avisynth 2.6 or Avs+. Next, check that you have DGDenoise.dll and DGDenoise.ptx together and that your path to them in the script is correct. Also you have it in the plugins directory AND you try to load it manually. Do one or the other.

If after fixing these things you still have an issue please post a screenshot of the error.
Despite the folder name it is Avisynth 2.6.0.6
The new version with DGDenoise.ptx works properly
Thanks for the patience and help from both of you.
Normally I can do simple scripts (nothing fancy) but this time I seem to have a major blonde period
Now I can start testing your new plugin
Again, thanks for the patience and help
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Good to hear that you have it working, gonca my friend. I have several brain farts per day, so don't get down on yourself. ;)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: About DGDenoise

Post by Guest 2 »

admin wrote:
Guest 2 wrote:Do you plan to create a new DGDecodeNV with DGFilter as option in same dll?
I'm considering it, but wonder about the point if there is already a stand-alone filter.
I am not a programmer but I think that could mean less gpu calls and overhead.

Plus, I know it's not a culprit, you would get more licenses.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Sure, Guest 2, there could be a small performance gain from combining them, but really I think it would be too small to be worth it. If the standalone filter was continued as well I would then have two codebases to maintain. Developers hate that! Nevertheless, I have not excluded the possibility. Higher on my list now is to add a bilateral filter kernel and support for YUV spaces to the standalone filter.

If I wanted to leverage it for more licenses, I could simply add the protection to the standalone filter. My licensing is enough to get me some pocket change for new computers, software, etc. I'm not hoping to get rich off of it, nor would that even be possible given the small niche that I occupy. Hacking around with these technologies is a fine way to avoid terminal boredom. ;)
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: About DGDenoise

Post by Selur »

btw. the new version seems to run fine in Vapoursynth too, used:

Code: Select all

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.avs.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/DenoiseFilter/DGDenoise/DGDenoise.dll")
core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading F:\TestClips&Co\Test-AC3-5.1.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/Test-AC3-5.1.avi", cache=0)
# adjusting color space from YUV420P8 to COMPATBGR32
clip = core.resize.Bicubic(clip=clip, format=vs.COMPATBGR32, matrix_in_s="470bg")
# denoising using DGDenoise
clip = core.avs.DGDenoise(clip)
# Output
clip.set_output()
for a quick test. :D
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Great, thanks for the report, Selur.

I have a native YV12 version working and will combine the two into one filter that accepts both spaces. That could be imported into DGDecodeNV as Guest 2 suggested, if I don't mind maintaining two codebases.

I should probably dilate the edge map. I want to make a bilateral kernel also.

I'm really grokking this CUDA stuff now. :ugeek:
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Some preliminary testing done
Haven't had a chance to check quality of output but compressibility vs fps is really impressive
Don't think my cpu is even being taxed
Quick thought, if you don't mind
separate codes --- easier to maintain --- option for user to have or not and possible easier integration (use) with other software
But you are the boss of the software
Re license along the way
Good scotch ain't cheap
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

gonca wrote:Good scotch ain't cheap
Sad but true. Same for good bourbon.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Some early testing done on DGDenoise
Find that strength=0.5 is quite good,all other settings on default
DGDenoise is really fast
Have AVSMeter results if you wish to see them
Also have bmp of frame 185 for comparison, if you wish to see it, along with some other data
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Thanks for your test results, gonca.

I've been looking into the actual filtering quality, comparing it carefully to KNLMeansCL. It became clear to me that the "quick NLM" algorithm from nVidia is surely much faster but it creates what are to my mind nasty, unacceptable artifacts. The normal NLM is no faster than KNLMeansCL and produces almost identical results. Again we see that there is no free lunch. Therefore, I have decided not to proceed with the current filter design. However, I do plan to modify it and integrate it into DGDecodeNV. The integrated functionality will be the KNN kernel. This will give decent and fast noise reduction.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

You know best
I did notice loss of detail, noticeable, even at strength+0.5
Results were okay but ...
When you integrate into DGDecNV you might want to consider some kind of license for extra functionality or maybe o donation system.
Don't expect much and you can"t be disappointed
We finally have one thing in common --- good scotch and bourbon ain't cheap
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

It's the artifacts that are the concern; there is no loss of detail versus KNLMeansCL for equivalent strengths.

OK, back to quantum physics for a while.

Bottoms up. :lol:
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Loss of the detail was not meant as a comparison to another filter, but to original.
Quantum physics or binary mathematics, glass full -- glass empty (1--0)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: About DGDenoise

Post by Guest 2 »

admin wrote:The integrated functionality will be the KNN kernel. This will give decent and fast noise reduction.
Please keep the three filters, or at least full NLM. KNN is a simplified version of NLM and almost useless in any situation so that we will be back using KNLMeansCL.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

OK, why not. KNN or full NLM, but no quick NLM.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Any news on DGDenoise?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

I'm busy trying to implement deinterlacing in DGDecIM. I'll come back to the denoising.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

thanks for replying
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

You're welcome, gonca my friend.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Yeah, but you are talented and determined. :bravo:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

You make me blush. :oops:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

I got bored today and worked on DGDenoise. :o

I found a way to eliminate the artifacting that had stopped me before. Now the filter is comparable to KNLMeansCL in speed and quality. It's integrated into DGSource() but can also be invoked stand-alone (stand-alone use requires a DG license). So you can do:

LoadPlugin("DGDecodeNV.dll")
DGSource("file.dgi", strength=0.6)

or

LoadPlugin("DGDecodeNV.dll")
AVISource("file.avi") # or other source filter
DGDenoise(strength=0.6)

I'm pretty happy with it but have to do a bit more testing and write documentation. Also I want to look into CUDA kernel optimization. Then I will release a test version for y'all to bang on.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

You da Man :wow:
DAE avatar
Sharc
Posts: 233
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGDenoise

Post by Sharc »

+1 :agree:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Thanks, gents. I'm working on a 35% speed improvement, but ReadModeNormalizedFloat is not fully cooperating. Don't worry, I will beat it into submission. :lol:

Persistence is the key, right gonca?
Post Reply