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. |
14th October 2018, 14:47 | #21 | Link | |
Registered User
Join Date: Aug 2012
Posts: 203
|
Quote:
|
|
22nd January 2019, 05:25 | #22 | Link |
Registered User
Join Date: Jan 2004
Location: earth, barely
Posts: 96
|
Does anyone have any guidance on compiling the contents of this repo on linux:
https://github.com/kice/vs_mxnet I've modified a few of the include files within vsMXNet.cpp so their reference is local. E.g. #include <VapourSynth/VapourSynth.h> has been changed to: #include "VapourSynth.h" then I'm explicitly including paths with a command like this: g++ -I /code-vsynth/vapoursynth/include -I /code-vsynth/opencv/modules/core/include/opencv2/ -I code-vsynth/opencv/modules/core/include/ vs_mxnet/vsMXNet.cpp -o libvsMXNet.so -lmxnet -std=gnu++11 But I'm getting this error: In file included from vs_mxnet/MXDll.h:3:0, from vs_mxnet/vsMXNet.cpp:24: vs_mxnet/PDll.h:12:21: fatal error: windows.h: No such file or directory #include <windows.h> ^ compilation terminated. Given that I'm trying to compile on Ubuntu 16.04, that windows error leads me to believe this might be insurmountable. Can I include this dependency on Linux? More generally, has anyone had success compiling this project on linux? |
13th April 2019, 00:50 | #23 | Link |
Pajas Mentales...
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
|
here problem with vs_mxDnCNN
Code:
sed 's|VapourSynth/||g' -i vs_mxDnCNN/mxDnCNN.cpp echo "all: g++ -c -fPIC ${CXXFLAGS} ${CPPFLAGS} -I. -I/usr/include/mxnet $(pkg-config --cflags vapoursynth) -o vs_mxDnCNN/mxDnCNN.o vs_mxDnCNN/mxDnCNN.cpp g++ -shared -lmxnet -fPIC ${LDFLAGS} -o libvs${_plug}.so vs_mxDnCNN/mxDnCNN.o"> Makefile but i have a problem when try to load, for example, this script: Code:
import vapoursynth as vs import mxnet core = vs.get_core() clip = core.lsmas.LWLibavSource("sample.m2ts") clip = core.fmtc.bitdepth(clip, bits=32) clip = core.fmtc.resample (clip, css="444") noise = core.mx.mxDNCNN(clip, param=88, ctx=2, dev_id=0) res = core.std.MakeDiff(clip, noise) # For multi-GPU processing (scales almost linearly) even = core.mx.mxDNCNN(core.std.SelectEvery(clip, 2, 0), ctx=2, dev_id=0) odd = core.mx.mxDNCNN(core.std.SelectEvery(clip, 2, 1), ctx=2, dev_id=1) res = core.std.Interleave([even, odd]) clip=core.fmtc.bitdepth(clip, bits=8) clip.set_output() Code:
└───╼ vspipe --info mxnet.vpy - [01:44:57] /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.0.0. Attempting to upgrade... [01:44:57] /tmp/makepkg/sl1-mxnet-git/src/incubator-mxnet/src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded! Script evaluation failed: Python exception: mxDncnn: Create Predictor failed Traceback (most recent call last): File "vapoursynth.pyx", line 1937, in vapoursynth.vpy_evaluateScript File "vapoursynth.pyx", line 1938, in vapoursynth.vpy_evaluateScript File "mxnet-test.vpy", line 15, in <module> odd = core.mx.mxDNCNN(core.std.SelectEvery(clip, 2, 1), ctx=2, dev_id=1) File "vapoursynth.pyx", line 1843, in vapoursynth.Function.__call__ vapoursynth.Error: mxDncnn: Create Predictor failed linux and mxnet compiled from sources (1.4.0) greetings Last edited by sl1pkn07; 13th April 2019 at 14:53. |
23rd April 2019, 04:14 | #24 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
can anyone get these to work on windows?
1) for vs_mxnet I get "Vapoursynth.Error: mxnet: Create MXNet Predictor failed" . I followed the instructions, visual studio (do you need a specific version or type of install), cuda, cuda_dnn, mxnet 1.5 with cuda 2) for muvsfunc - super_resolution_mxnet.vpy , I'm having problems with the syntax for loading both params and json file . I tried a bunch of different things , not working. It's probably something simple I'm overlooking Quote:
|
|
23rd April 2019, 06:00 | #25 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
|
|
23rd April 2019, 06:19 | #26 | Link | |||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
I'm trying ESRGAN out . I copy/pasted the super_resolution_mxnet.vpy example, but the dict model_filename argument doesn't have 2 entries . So the usual error is Quote:
Quote:
elif sr_algorithm == 1: # sr_args = dict(model_filename=r'VDSR\pytorch-vdsr@twtygqyy\VDSR', # device_id=device_id, block_w=128, block_h=128, # up_scale=2, is_rgb_model=False, pre_upscale=True) sr_args = dict(model_filename="ESRGAN_4x-symbol.json", "ESRGAN_4x-0000.params", up_scale=4, is_rgb_model=True, pad=None, crop=None, pre_upscale=False) |
|||
23rd April 2019, 06:33 | #27 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
And I'm able to get vs_mxDnCNN denoiser working, so presumably the mxnet part is working
https://github.com/kice/vs_mxDnCNN On the other hand, everything was bundled with that package separately including libmxnet.dll and the older cuda 9.0 , not relying on system installed stuff - so maybe not Last edited by poisondeathray; 23rd April 2019 at 06:36. |
23rd April 2019, 10:38 | #28 | Link | |
Registered User
Join Date: Jan 2016
Posts: 162
|
Quote:
Code:
sr_args = dict(model_filename=r"path_to_parent_folder\ESRGAN_4x", up_scale=4, is_rgb_model=True, pad=None, crop=None, pre_upscale=False) |
|
23rd April 2019, 11:25 | #29 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
EDIT: But the returned image is just black... Or can I only use it in conbination with MadeDiff? The makediff output has some banding like texture. Code:
noise = core.mx.mxDNCNN(clip, param=88, ctx=2, dev_id=0) res = core.std.MakeDiff(clip, noise)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 23rd April 2019 at 11:38. |
|
23rd April 2019, 15:11 | #30 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
"vapoursynth.Error: mxnet: Create MXNet Predictor failed" like vs_mxnet |
|
23rd April 2019, 15:36 | #32 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
Code:
Failed to evaluate the script: Python exception: [08:33:01] c:\jenkins\workspace\mxnet\mxnet\3rdparty\dmlc-core\include\dmlc\./json.h:731: Check failed: ch == '{' (60 vs. {) : Error at Line 6, around ^`!DOCTYPE html>`, Expect '{' but get ' File "C:\Python37\lib\site-packages\mxnet\symbol\symbol.py", line 2714, in load check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle))) File "C:\Python37\lib\site-packages\mxnet\base.py", line 254, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [08:33:01] c:\jenkins\workspace\mxnet\mxnet\3rdparty\dmlc-core\include\dmlc\./json.h:731: Check failed: ch == '{' (60 vs. {) : Error at Line 6, around ^`!DOCTYPE html>`, Expect '{' but get ' Who is this c:\jenkins ? Does it make a temp directory ? |
|
23rd April 2019, 15:59 | #33 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I'm also trying to get mxnet-gpu to work, but no luck so far.
Code:
2019-04-23 16:50:48.035 Failed to evaluate the script: Python exception: simple_bind error. Arguments: data: (1, 3, 128, 128) [16:50:48] C:\Jenkins\workspace\mxnet-tag\mxnet\src\storage\storage.cc:143: Compile with USE_CUDA=1 to enable GPU usage Traceback (most recent call last): File "C:\Python37\lib\site-packages\mxnet\symbol\symbol.py", line 1523, in simple_bind ctypes.byref(exe_handle))) File "C:\Python37\lib\site-packages\mxnet\base.py", line 252, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [16:50:48] C:\Jenkins\workspace\mxnet-tag\mxnet\src\storage\storage.cc:143: Compile with USE_CUDA=1 to enable GPU usage During handling of the above exception, another exception occurred: Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 1927, in vapoursynth.vpy_evaluateScript File "src\cython\vapoursynth.pyx", line 1928, in vapoursynth.vpy_evaluateScript File "", line 21, in File "C:\Users\abcd\AppData\Roaming\Python\Python37\site-packages\muvsfunc_numpy.py", line 1692, in super_resolution net.bind(for_training=False, data_shapes=[('data', data_shape)]) File "C:\Python37\lib\site-packages\mxnet\module\module.py", line 429, in bind state_names=self._state_names) File "C:\Python37\lib\site-packages\mxnet\module\executor_group.py", line 279, in __init__ self.bind_exec(data_shapes, label_shapes, shared_group) File "C:\Python37\lib\site-packages\mxnet\module\executor_group.py", line 375, in bind_exec shared_group)) File "C:\Python37\lib\site-packages\mxnet\module\executor_group.py", line 662, in _bind_ith_exec shared_buffer=shared_data_arrays, **input_shapes) File "C:\Python37\lib\site-packages\mxnet\symbol\symbol.py", line 1529, in simple_bind raise RuntimeError(error_msg) RuntimeError: simple_bind error. Arguments: data: (1, 3, 128, 128) [16:50:48] C:\Jenkins\workspace\mxnet-tag\mxnet\src\storage\storage.cc:143: Compile with USE_CUDA=1 to enable GPU usage My steps so far: - pip install mxnet-cu92 --pre Installation ok, but importing mxnet failed. - installed CUDA from nvidia https://developer.nvidia.com/cuda-do..._type=exelocal mxnet import failed - pip install mxnet This one works (as in import works), but it seems this is cpu only I also uninstalled mxnet-cu92 and reinstalled via pip after I installed CUDA from nvidia, but te result is the same. What am I missing? Maybe the cuda version from nvidia is too new?
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 23rd April 2019 at 16:04. |
23rd April 2019, 16:16 | #36 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
No only the import works or for example this check
Quote:
vs_mxDnCNN works for me too.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 23rd April 2019 at 16:20. |
|
23rd April 2019, 16:57 | #38 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Ok we need cuda 9.2!!! Google always showed me the newest version. It works now
Here is 9.2: https://developer.nvidia.com/cuda-92..._type=exelocal I removed mxnet via pip again pip uninstall mxnet also pip uninstall mxnet-cu92 and re-installed again pip install mxnet-cu92 (restart powershell) python -c "import mxnet; print(mxnet.__version__)" returns 1.5.0 and this script works now too: Code:
import muvsfunc_numpy as mufn core = vs.core clip = core.lsmas.LWLibavSource(source=r"D:\test.mkv") clip = mufn.super_resolution(clip, model_filename = "C:/somefolder/waifu2x/upconv_7_anime_style_art_rgb/scale2.0x_model") EDIT With model_filename = "ESRGAN/ESRGAN_4x" i get this error message: could not broadcast input array from shape (1,3,512,512) into shape (1,3,256,256) input is 1080p yuv420 EDIT2 you need to set this params for ESRGAN_4x (see info.md): up_scale=4, is_rgb_model=True, pad=None, crop=None, pre_upscale=False
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 23rd April 2019 at 19:03. |
23rd April 2019, 19:32 | #40 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I noticed that some denoising models produce large "blocks" in the video. Can this be avoided somehow? With pad and crop maybe? But in the info.md pad and crop is set to None and other values doesn't seem to work.
ex Super-Resolution-Zoo-master\MoePhoto\denoising muf.super_resolution(clip, block_w=128, block_h=128, up_scale=1, is_rgb_model=False, pad=None, crop=None, pre_upscale=False, upscale_uv=False, model_filename = "C:/denoising/dn_lite15")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 23rd April 2019 at 19:35. |
|
|