Yesterday, 19:32
I was able to get this result with the attached script.
![[Image: attachment.php?aid=3537]](https://forum.selur.net/attachment.php?aid=3537)
Let me know if is working on your side.
Dan
Let me know if is working on your side.
Dan
|
ProPainter Vapoursynth filter
|
|
Yesterday, 19:32
I was able to get this result with the attached script.
Let me know if is working on your side. Dan
Nice!!
Yes, I can reproduce the effect with your script. But why doesn't it also work when I use: clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=50, mask_dilation=0, neighbor_length=4, mask_region=(1080,256,0,1300))Your mask doesn't have the same resolution as the video, and it also doesn't even have the same display aspect ratio (340x600 vs 1080x1920) Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Yesterday, 20:51
DOH, your source video also has a lower resolution, so the problem is probably related to vram consumption.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Okay, using the low resolution mask on my full resolution source, even when not lowering dilation, neighbor length, and length:
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/Education_ProPainter_small/mask_small.jpg", mask_region=(1080,256,0,1300))![]() => this seems to be an issue with the mask handling Does it make sense to add an option to vs-propainter to divide mask width&height by a factor X ? Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Yesterday, 22:33
I debugged the source and it seems that sometimes (depending on the input mask) the call to the function:
scipy.ndimage.binary_dilation(mask_img, iterations=mask_dilates)provides a wrong dilated mask. Not clear why and the debugging of "scipy" function is outside my scope. So in summary if you get wrong results try to set mask_dilation=0 # skip the call to scipy.ndimage.binary_dilation()and check if this solve the problem. Dan P.S. If you provide as input a low resolution mask, the mask is resized to the frame dimension inside the filter. In my tests mask_dilation=0 fixed the issue, but I worked on a small size clip. For sure there is a problem on mask handling, probably due to memory constrains and using a mask region is the optimal way to manage it because the inference is performed only on the clip having the size of mask region.
using:
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=12, mask_dilation=0, mask_region=(1080,256,0,1300))![]() same with: clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=12, mask_dilation=0, neighbor_length=4, mask_region=(1080,256,0,1300))![]() so it's not just fault of the dilation. using: clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=12, mask_dilation=0, neighbor_length=4)![]() Converting the PNG to jpg (4:2:0): clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.jpg", length=12, mask_dilation=0, neighbor_length=4, mask_region=(1080,256,0,1300))![]() Converting the PNG to jpg (4:4:4 max quality): clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.jpg", length=12, mask_dilation=0, neighbor_length=4, mask_region=(1080,256,0,1300))![]() so doesn't seem to be a jpg vs png problem. Cu Selur Ps.: going to bed now, but I can do more testing, tomorrow
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Yesterday, 23:11
In the script "propainter_render.py", there is this code
def model_init(self, torch_device, model_dir: str = None, mpath: str = None):So if you provide in input mask_small.jpg is resized as the image attached. So looking to the code there is not difference in providing in input "mask_small.jpg" or "mask_big.png". In effect using "mask_small.jpg" or "mask_big.png" it works while using "mask.png" it doesn't work, it is very crazy. The only explanation that I can find is that the mask's edges in "mask.png" are sharper than in "mask_big.png", probably for a proper identification of mask edges it is better to use smooth edges. Dan
Today, 07:16
Trying:
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask_big.png", length=50, mask_region=(1000,256,0,1300))![]() so maybe adding an optional 'blur' option to vs-propainter might be a good idea. Thanks! Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
8 hours ago
The true problem is that the format of your mask has #bits=1
This format is not properly managed by ProPainter (It fails to recognize the mask) While the format used by mask_big.png is the correct one In any case I decided to ad another option in ProPainter called mask_enhance, that if is enabled (default) will improve the Mask's hedges to allow better Mask recognition. I attached the RC1 of new ProPainter v1.2.4. Let me know if it works on your side. Dan
7 hours ago
Thanks.
Didn't think the png format could be an issue. New version works fine here. With 'Enhance' enabled my inital png works fine. Tested the RC and uploaded a new Hybrid_havc_test file which adds controls mask_enhance. Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page. |
|
« Next Oldest | Next Newest »
|