scepter icon indicating copy to clipboard operation
scepter copied to clipboard

About Image Completion (Reference image only)

Open szgy66 opened this issue 1 year ago • 1 comments

Dear author, thank you for your great work and release the code. When I tried your LAR-gen in my project, it was not appropriate to include text hints because my sample was defect data, so I only used reference images. Below are my original (left), reference (top right), and generated (bottom right) images. It can be clearly seen from the generated graph that there is an obvious rectangular box in the generated area. May I ask why this is, and what measures can be taken to eliminate this rectangular box? Also, is there a correlation between the size of the reference image and the background mask? Looking forward to your reply! 图片1

szgy66 avatar Jul 03 '24 02:07 szgy66

The occurrence of the rectangular box can be attributed to the irregular edges of the smeared reference object. Consequently, padding is applied to create a 224x224 image that is fed into the model. However, since the model does not recognize the object ('defect pattern’), it mistakenly considers the white padded edges as part of the object itself. To address this issue, you could directly upload a square reference image and smear the entire picture to avoid the need for padding. Additionally, it is essential to ensure that the background mask avoids resembling any regular patterns (such as circular or square shapes) because if the model does not recognize the object, it will tend to generate edges that mimic these geometric shapes to fit the smeared shape of the mask. 1234 cur_gallery_1 cur_gallery_2

LouieStark avatar Jul 04 '24 11:07 LouieStark