advimman / lama

🦙 LaMa Image Inpainting, Resolution-robust Large Mask Inpainting with Fourier Convolutions, WACV 2022
https://advimman.github.io/lama-project/
Apache License 2.0
8.14k stars 864 forks source link

Artifacts show up on outputs when using sharp edge mask #262

Open karolzak opened 1 year ago

karolzak commented 1 year ago

Hi!

When I programmatically generate masks for inpainting (with very sharp edges, no blur or smooth transitioning between mask/background) I get slightly worse outputs (visible artifacts) but when I apply Gaussian Blur on these masks, the results are suddenly much better.

Anyone knows where is this coming from?

good results from blurred edge masks visible artifacts from sharp edge masks
mask edge image image
mask histogram image image
output image image
day-dreaming-guy commented 11 months ago

Did you figure why it's occurring? Did you decided to blur all the masks before using them in the model?

karolzak commented 11 months ago

Did you figure why it's occurring? Did you decided to blur all the masks before using them in the model?

Yes, bluring seems to help for my inputs, so I kept it