how to remove shadow in mask position in the output image
chenbolin-master opened this issue · 13 comments
how to remove shadow in mask position in the output image
hi, what's the meaning of shadow? can you provide a example?
Color discontinuities and significant chromatic aberrations
such problems are usually occurred in recovering large color space, which are not significant in real-world cases. We recommand to use soft mask to solve this problem trivially (using masks with continue values from 0 to 1 in the boundary areas). soft mask here indicates blur the binary mask, can be implemented through nearst neighbourhood upsampling the mask following by bilinear downsampling the mask.
we also think that training for more iterations could alleviate this problem
Missing specific masking types during the training may also cause this problem (such as missing rectangular masks during the training).
m 0 to
such problems are usually occurred in recovering large color space, which are not significant in real-world cases. We recommand to use soft mask to solve this problem trivially (using masks with continue values from 0 to 1 in the boundary areas). soft mask here indicates blur the binary mask, can be implemented through nearst neighbourhood upsampling the mask following by bilinear downsampling the mask. we also think that training for more iterations could alleviate this problem
How to implement it in python , can you provide a demo ?
you can use cv2.resize, first set interpolation=INTER_NEAREST and upsampling the mask, following by setting interpolation=INTER_LINEAR then downsampling the mask to original resolution.
you can use cv2.resize, first set interpolation=INTER_NEAREST and upsampling the mask, following by setting interpolation=INTER_LINEAR then downsampling the mask to original resolution.
not useful
you can use cv2.resize, first set interpolation=INTER_NEAREST and upsampling the mask, following by setting interpolation=INTER_LINEAR then downsampling the mask to original resolution.
not useful
mask = cv2.resize(mask, (w*2, h*2), interpolation=cv2.INTER_NEAREST)
mask = cv2.resize(mask, (w, h), interpolation=cv2.INTER_LINEAR)
Maybe you could also try to use poison fusion of cv2.seamlessclone
.
mask = cv2.resize(mask, (w2, h2), interpolation=cv2.INTER_NEAREST)
mask = cv2.resize(mask, (w, h), interpolation=cv2.INTER_LINEAR)
cv2.seamlessclone
it is not useful
pixel inside the mask is 1 pixels( or 2、3、4 pixels) smaller than pixel outside the mask
such as missing rectangular masks during the
what does missing rectangular masks mean? only irregular and segmentation mask is not ok?
such as missing rectangular masks during the
what does missing rectangular masks mean? only irregular and segmentation mask is not ok?
That means we do not use rectangular masks during our training. We think only irregular and segmentation mask is not enough for inpainting model to generalize well to other mask types.
how to remove shadow in mask position in the output image
Hello, I also met the same problem, may I ask whether you have solved this problem