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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th September 2018, 05:09   #1  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 95
mxnet : vs_mxDnCNN function

Is there anyone who can help with getting this to work? I like to test it.

https://github.com/kice/vs_mxDnCNN

I installed the required data in the vs plugins folder and installed mxnet using pip.

I get an error saying no module named.....

I tried mx and mxnet, none worked.


Code:
def NeuralDenoise(c, strength=88):
	even = core.mx.mxDNCNN(core.std.SelectEvery(c, 2, 0), param=strength, ctx=2, dev_id=0)
	odd = core.mx.mxDNCNN(core.std.SelectEvery(c, 2, 1), param=strength, ctx=2, dev_id=1)
	return core.std.Interleave([even, odd])
Cary Knoop is offline   Reply With Quote
Old 8th September 2018, 06:03   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,622
You do have a multi-device setup, yes?
Otherwise you should probably simply use:
Code:
clip = core.mx.mxDNCNN(clip, param=88, ctx=2, dev_id=0)
and adjust param to change the strength,...
(haven't tested the filter myself, but that seemed an obvious question)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 8th September 2018, 06:18   #3  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 95
Quote:
Originally Posted by Selur View Post
You do have a multi-device setup, yes?
Otherwise you should probably simply use:
Code:
clip = core.mx.mxDNCNN(clip, param=88, ctx=2, dev_id=0)
and adjust param to change the strength,...
(haven't tested the filter myself, but that seemed an obvious question)
Yes, I have a multi-device setup.

Ah, found out that the actual plugin is separate:
https://github.com/kice/vs_mxDnCNN/releases

It "works" now, I don't get a denoised image though, but it seems to return some kind of noise, am I suppose to subtract it from the image?

Last edited by Cary Knoop; 8th September 2018 at 06:26.
Cary Knoop is offline   Reply With Quote
Old 8th September 2018, 06:34   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
Quote:
Originally Posted by Cary Knoop View Post
It "works" now, I don't get a denoised image though, but it seems to return some kind of noise, am I suppose to subtract it from the image?
Yes, MakeDiff - there is an example on the usage page
poisondeathray is offline   Reply With Quote
Old 8th September 2018, 06:39   #5  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 95
Quote:
Originally Posted by poisondeathray View Post
Yes, MakeDiff - there is an example on the usage page
Where is the usage page, I only see the readme?
Cary Knoop is offline   Reply With Quote
Old 8th September 2018, 06:40   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
Quote:
Originally Posted by Cary Knoop View Post
Where is the usage page, I only see the readme?
You linked to it in the first post There is a usage section

https://github.com/kice/vs_mxDnCNN
poisondeathray is offline   Reply With Quote
Old 8th September 2018, 06:44   #7  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
But there is typo , it should be core.std.MakeDiff not std.core.MakeDiff
poisondeathray is offline   Reply With Quote
Old 8th September 2018, 06:54   #8  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 95
Thanks! It is working now.

88 is very strong, 125 starts to look better, but hf details are definitely touched.

Also, the resulting image gives me some artifacts near the top spanning the full width of the frame.
Attachments Pending Approval
File Type: jpg complete-01.jpg

Last edited by Cary Knoop; 8th September 2018 at 07:02.
Cary Knoop is offline   Reply With Quote
Old 8th September 2018, 07:03   #9  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
Yes, it would be nicer if it had more settings , more than 2 param data. I wonder how difficult it would be to generate ? In the dncnn folder , I'm assuming DnCNN88-0000.params, and DnCNN125-0000.params refer to 88 and 125
poisondeathray is offline   Reply With Quote
Old 8th September 2018, 07:07   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
Quote:
Originally Posted by Cary Knoop View Post

Also, the resulting image gives me some artifacts near the top spanning the full width of the frame.
attachments can take a while to get approved...sometimes days

people tend to use free 3rd party image hosting sites e.g https://postimages.org/
poisondeathray is offline   Reply With Quote
Old 8th September 2018, 07:29   #11  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 95
Ok, here is a dropbox of a fraction of a frame showing the issue:
https://www.dropbox.com/s/29s3qcm9jb...te-01.jpg?dl=0

I suppose it is avoidable by adding some extra black space to the top of the video frames.
Cary Knoop is offline   Reply With Quote
Old 8th September 2018, 08:07   #12  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 58
You can also try DnCNN made by WolframRhodium. Usage is in info.md

Main function: muvsfunc_numpy.super_resolution()
__________________
ロイヤルネイビーユニコーン
Wolfberry is offline   Reply With Quote
Old 9th September 2018, 12:57   #13  |  Link
kice
Registered User
 
Join Date: Sep 2015
Posts: 1
Try this out:

https://github.com/kice/vs_mxnet
kice is offline   Reply With Quote
Old 9th September 2018, 14:14   #14  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 406
@kice vs_mxnet and vs_mxDnCNN have the same namespace "mx", maybe you could change one to avoid conflicts?
__________________
Search and denoise

Last edited by ChaosKing; 9th September 2018 at 14:16.
ChaosKing is offline   Reply With Quote
Old 9th September 2018, 17:27   #15  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 73
Quote:
Originally Posted by ChaosKing View Post
@kice vs_mxnet and vs_mxDnCNN have the same namespace "mx", maybe you could change one to avoid conflicts?
I believe vs_mxDnCNN has been deprecated. Use vs_mxnet instead.

I will try to make a comparison between vs_mxDnCNN and vs_mxnet:

The former one is too specific:
It tailored to the DnCNN models that were trained by him in early days, only works on YUV444 data, and it does not support models for super-resolution which enlarge images.

The later one is more general:
It currently has RGB and gray scale support, and can work on versatile models like super-resolution models. (waifu2x for example. See model-zoo. And I have also written a wrapper function for it. You can go to demo for more information)

Last edited by WolframRhodium; 10th September 2018 at 01:05.
WolframRhodium is offline   Reply With Quote
Old 9th September 2018, 20:07   #16  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,514
Thanks for all the new stuff to play with!

Does anyone have any comments / general impressions for any of the models , or any interesting examples outside of the pdf /original research papers ?
poisondeathray 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 15:10.


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