Log in

View Full Version : vcmod a plugin for vapoursynth


vcmohan
22nd November 2014, 12:33
vcmod is a plugin for vapoursynth. It has several functions which essentially operate on pixel values and modify it as per some criteria. Useful for denoising.
The functions are

1.Amplitude
2.Histogram
3.Median
4.Variance
5.Gaussian Blur GBlur
6.Motion Blur MBlur.

A full description is available at vcmod (http://www.avisynth.nl/users/vcmohan/vcmod/vcmod.html).
Request comments. This plugin is compiled for windows.

mawen1250
8th October 2015, 16:41
http://i.imgur.com/tUOkuuh.png
(4x)

I've got these artifacts with vcmod.Median(clip, 7, [1,1,1]).
Is it expected by the algorithm?

vcmohan
9th October 2015, 12:47
It is not expected. Will it be possible to attach your input one frame and send me by email? I can checkup easily then.

mawen1250
9th October 2015, 16:43
That's OK. Already sent.

vcmohan
11th October 2015, 13:27
An updated version is at my page. Please check it .

cwk
9th October 2017, 16:03
@vcmohan, Is the neural net function included with your vcmod plugin? The web page (http://www.avisynth.nl/users/vcmohan/vcmod/vcmod.html) does not reflect its presence.

vcmohan
10th October 2017, 12:10
Sorry. (I have not yet ported it to vcmod. It is currently available in modplus a avisynth+ plugin. If you are particular I will port it to vapoursynth in a week.

cwk
11th October 2017, 03:54
Your comment on the avisynth thread about sharpening and denoising sparked my interest, though I only use Vapoursynth these days. I would like to try using a different source of the same video as a training clip for some old VHS captures.

vcmohan
12th October 2017, 13:30
I am almost done. But I am getting a error message "invalid plane requested" from vseditor. I am unable to see why this message. Still trying to check.

Myrsloik
12th October 2017, 14:04
I am almost done. But I am getting a error message "invalid plane requested" from vseditor. I am unable to see why this message. Still trying to check.

Most likely you're calling getStride() or getReadPtr() with a plane argument that's out of range. For example plane=1 for grayscale.

vcmohan
17th October 2017, 13:20
I have now uploaded the new vcmod having saltpepper, fan veed and neural functions additionally. Please check for any bugs or misinfo typos etc;

ChaosKing
17th October 2017, 13:38
broken file upload? vcmod64.7z is 0 bytes

//Edit: works now, thx.

vcmohan
18th October 2017, 08:26
Sorry for that. I uploaded again. Kindly check.

cwk
20th October 2017, 00:49
Thanks for updating vcmohan. Do you have any guidance for building on linux?

Are_
20th October 2017, 01:39
sed -i -e s/vapoursynth.h/VapourSynth.h/g -e s/vshelper.h/VSHelper.h/g *.cpp

gcc -O3 -msse2 -fPIC -shared -std=c++11 -Wl,-O1 -Wl,--as-needed -o libvcmod.so vcmod.cpp

vcmohan
20th October 2017, 13:54
Do you have any guidance for building on linux? Frankly I have no experience. I remember some one tried to transfer to GCC. He got lots of errors and warnings. While I do not care for most of the warnings VC++ (community version 13) generates, as these conversions are intended (for example int to float etc; ) probably GCC may not allow. You may pose this question to experts.

cwk
20th October 2017, 15:10
sed -i -e s/vapoursynth.h/VapourSynth.h/g -e s/vshelper.h/VSHelper.h/g *.cpp

gcc -O3 -msse2 -fPIC -shared -std=c++11 -Wl,-O1 -Wl,--as-needed -o libvcmod.so vcmod.cpp

Thanks Are_

Builds without issue. I'll give it a try this weekend.

cwk
23rd October 2017, 04:27
I'm looking at the file generated during training

iter:9980
4.29846e+11 4.2984e+11 4.29845e+11 4.2984e+11 4.29845e+11
4.29839e+11 4.29845e+11 4.29839e+11 4.29845e+11 4.29838e+11
4.29844e+11 4.29838e+11 4.29844e+11 4.29838e+11 4.29844e+11
4.29838e+11 4.29845e+11 4.29838e+11 4.29844e+11 4.29837e+11

It looks like Neural generates of convoltion matrix of: xpts * ypts, but the error is calculated against 5 * 5. Is that correct?

vcmohan
23rd October 2017, 08:04
It looks like Neural generates of convoltion matrix of: xpts * ypts, but the error is calculated against 5 * 5. Is that correct?

No. You are looking at error of covolution at iter 9980 to 9999. A convolution matrix of xpts*ypts + 1 is generated. The one that gives least error is selected and used.
It looks you are using a very large number of iterations iter. Instead it may give a better result if you try bestof of 5 to 10 and iter of 100 to 300.
The reason is that sometimes it will not be able to get off a local minimum. Also several times it may not converge to a good solution.

cwk
23rd October 2017, 17:12
ok, thank you for the explanation. I'll try larger values of bestof.

One observation is that the training process is single-threaded. Users could potentially use larger values for both iter and bestof if all cores could be used.

vcmohan
24th October 2017, 07:48
ok, thank you for the explanation. I'll try larger values of bestof.

One observation is that the training process is single-threaded. Users could potentially use larger values for both iter and bestof if all cores could be used. Training occurs in the plugin init section which is guarenteed to be single threaded. As the previous convolution error is used to adjust weights which are used for next convolution, iterations can not be multi threaded. Neural Networks Learning process is therefore slow. This is the reason option to save weights and other parameters is provided. Next time for a very similar input data those weights can be used by read file option.