Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Image Completion (Reference image only) #36

Open
szgy66 opened this issue Jul 3, 2024 · 1 comment
Open

About Image Completion (Reference image only) #36

szgy66 opened this issue Jul 3, 2024 · 1 comment

Comments

@szgy66
Copy link

szgy66 commented Jul 3, 2024

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

@LouieStark
Copy link
Collaborator

LouieStark commented Jul 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants