This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Deoldify Vapoursynth filter
Rolleyes Angel
I'll look at it later.

Side note: you might want to thing about using semantic versioning (MAJOR.MINOR.PATCH) for projects which have a public interface/api.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
updated the test download

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
It works!

Thanks,
Dan
Reply
=> will make a public release in ~1hr Smile
(uploading all the stuff takes quite some time)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
Hello Selur,

  good news! I released the new version 3.1.0 : https://github.com/dan64/vs-deoldify/rel...tag/v3.1.0

  Despite the small increment I think that this release represent a big jump.

  I was brave enough to implement what no one has ever implemented in Vapoursynth: The Chroma Adjustment

  Please read the explanation in the README.

  But I think that it is better to try it to understand what this filter is really doing.

  I was finally able to almost solve the problem of fast changing of colors especially in the Magenta/Violet color range of DDColor/Deoldify.

  I hope that you like it.

Dan
Reply
Sounds nice will look at it tomorrow after work.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
new:
ddtweak_p: list = [0.0, 1.0, 2.5, True, 0.2, 0.5, 1.5, 0.5, "70:90,300:360|0.2,0"]
old:
ddtweak_p: list = [0.0, 1.0, 2.5, True, 0.3, 0.6, 0.7, 0.5]
=> Your changelog should mention that you changed the default values for other ddtweak_p-parameters.

A quick glance at https://github.com/dan64/vs-deoldify?tab...adjustment
=> You are aware that you are probably the only person out there that will/can use this, right?

Will look at it after work, but I will have to check every value of each parameter to be sure they match with the defaults. Sad

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
I tried to explain in the README, but there is not a easy way to apply this kind of chroma change, I'm not aware of filters being able to do that.

It could be useful if the Color Panel in vsViewer will be extended to display the values of HSV, currently only RGB and YUV values are shown.

To get the correct range to adjust, at the moment, I save a screenshot of the image with the wrong colors and open it in Paint.NET and use the color picker tool to see the HSV values.

I noted a defect in the current version of Hybrid.

I can add more parameters in the list as shown in this screenshot

[Image: attachment.php?aid=2375]

But when I uncheck the filters are restored the old values

[Image: attachment.php?aid=2374]

Could you fix this issue ?

Thanks,
Dan

(10.04.2024, 05:45)Selur Wrote: new:
ddtweak_p: list = [0.0, 1.0, 2.5, True, 0.2, 0.5, 1.5, 0.5, "70:90,300:360|0.2,0"]
old:
ddtweak_p: list = [0.0, 1.0, 2.5, True, 0.3, 0.6, 0.7, 0.5]
=> Your changelog should mention that you changed the default values for other ddtweak_p-parameters.

Updated the description of changes in the release changelog: https://github.com/dan64/vs-deoldify/rel...tag/v3.1.0

Dan


Attached Files Thumbnail(s)
       
Reply
Quote:Could you fix this issue ?
There is nothing to fix. That is a text field, Hybrid does no validation for it.
(too many parameters to write checks for them)

Updated the download, hopefully I got all changes.

When calling (increased renderfactor to 25):
# adding colors using DeOldify
from vsdeoldify import ddeoldify
clip = ddeoldify(clip=clip, mweight=0.51, deoldify_p=[0, 25, 0.99, 0.01], ddcolor_p=[1, 25, 0.99, 0.01, True], ddtweak=True, ddtweak_p=[0.0, 1.0, 2.5, True, 0.1, 0.5, 1.5, 0.5, "70:90,300:360|0.2,0"])
from vsdeoldify import ddeoldify_stabilizer
clip = ddeoldify_stabilizer(clip=clip, dark=True, dark_p=[0.3, 0.9, "0:20"], smooth=True, smooth_p=[0.2, 0.7, 0.9, 0.05, "none"], stab=True, stab_p=[5, 'A', 1, 15, 0.3, 0.15, "290:360|0.4,0.2"], render_factor=25)
is used, which returns:
Error on frame 0 request:

Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2941, in vapoursynth.publicFunction
File "src\cython\vapoursynth.pyx", line 2943, in vapoursynth.publicFunction
File "src\cython\vapoursynth.pyx", line 683, in vapoursynth.FuncData.__call__
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsddcolor\__init__.py", line 94, in inference
output_ab = module(img_gray_rgb)
^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsddcolor\ddcolor_arch.py", line 59, in forward
out_feat = self.decoder()
^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsddcolor\ddcolor_arch.py", line 107, in forward
out0 = self.layers[0](encode_feat)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsddcolor\ddcolor_arch_utils\unet.py", line 207, in forward
cat_x = self.relu(torch.cat([up_out, self.bn(s)], dim=1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 24 but got size 25 for tensor number 1 in the list.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
The problem is that the input_size in ddcolor must be divisible by 32. Try to increase the render_factor to 26, and should work.
I will release a fix to ensure that the ddcolor input_size will be divisible by 32.

Thanks,
Dan
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)