9 hours ago
In the script "propainter_render.py", there is this code
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
def model_init(self, torch_device, model_dir: str = None, mpath: str = None):
self.device = torch_device
self.img_mask_is_cropped = False
# load image mask if available
if mpath is None:
self.img_mask = None
else:
img_m = Image.open(mpath).convert('RGB')
out_size = img_m.size
if out_size == self.clip_size:
self.img_mask = img_m
else:
self.img_mask = img_m.resize(self.clip_size)
self.img_mask_orig = self.img_maskSo 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

