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. |
|
8th September 2018, 05:09 | #1 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
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]) |
8th September 2018, 06:03 | #2 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
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) (haven't tested the filter myself, but that seemed an obvious question) |
8th September 2018, 06:18 | #3 | Link | |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Quote:
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. |
|
8th September 2018, 06:40 | #6 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
|
8th September 2018, 06:54 | #8 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
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. Last edited by Cary Knoop; 8th September 2018 at 07:02. |
8th September 2018, 07:07 | #9 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
Quote:
people tend to use free 3rd party image hosting sites e.g https://postimages.org/ |
|
8th September 2018, 07:03 | #10 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
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
|
8th September 2018, 07:29 | #11 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
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. |
8th September 2018, 08:07 | #12 | Link |
Helenium(Easter)
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
|
You can also try DnCNN made by WolframRhodium. Usage is in info.md
Main function: muvsfunc_numpy.super_resolution()
__________________
Monochrome Anomaly |
9th September 2018, 14:14 | #14 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
@kice vs_mxnet and vs_mxDnCNN have the same namespace "mx", maybe you could change one to avoid conflicts?
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 9th September 2018 at 14:16. |
9th September 2018, 17:27 | #15 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
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. |
|
13th October 2018, 17:58 | #17 | Link |
Registered User
Join Date: Aug 2012
Posts: 203
|
Has anyone had this problem:
Code:
Cannot load MXNet. Please install MXNet If i import mxnet from python's REPL it seems to work, but from this script Code:
import vapoursynth as vs import MFunc as mon import havsfunc as has import nnedi3_resample core = vs.get_core() src = mon.Source("file:///D:/Working/video_source (1).mkv", False) srcf = nnedi3_resample.nnedi3_resample(src, 1920,1080, csp=vs.RGBS, fast=True, chromak_up="bicubic") #srcf = core.fmtc.bitdepth(src, flt=True) #denMV = mon.Denoise2(src, 500, blksize=16, fast=False) denNN = core.mx.Predict(srcf, "DnCNN-S-15-symbol.json", "DnCNN-S-15-0000.params", ctx=2, scale=1) #, patch_w, patch_h, scale, output_w, output_h, frame_w, frame_h, step_w, step_h, outstep_w, outstep_h, padding, boder_type, dev_id) denNN = core.fmtc.bitdepth(denNN, bits=8) srcf.set_output() Any suggestion? |
14th October 2018, 11:49 | #19 | Link |
Registered User
Join Date: Aug 2012
Posts: 203
|
Thank you, this solved the problem
I guess there are some bug in your muvsfunc regarding YUV clip, for example the ShufflePlanes at line 4380 should result in [0,0,0], not [0,1,2] |
14th October 2018, 14:14 | #20 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
This bug has been identified and fixed at previous commit 5bbb212. I always post the code at specific commit rather than at latest status in this forum for clarity. In this case the latest code on GitHub has been fixed while link in this forum was not. Sorry for the inconvenience. Last edited by WolframRhodium; 14th October 2018 at 14:37. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|