9 hours ago
I debugged the source and it seems that sometimes (depending on the input mask) the call to the function:
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
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.
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.

