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

how to generate test masks? #13

Open
qsc227 opened this issue Feb 14, 2023 · 5 comments
Open

how to generate test masks? #13

qsc227 opened this issue Feb 14, 2023 · 5 comments

Comments

@qsc227
Copy link

qsc227 commented Feb 14, 2023

Hello,Thanks for your code! I would like to know how do you generate your test masks? I find that when i try to use pretrained models to test on my masked images,the results seems to be not very good.
image
image

@nipponjo
Copy link
Owner

nipponjo commented Feb 14, 2023

Hello, I used the demo app to draw the masks in the examples/inpaint/ folder.

@qsc227
Copy link
Author

qsc227 commented Feb 14, 2023

why i try to push the impaint button , there is nothing like this?
image

@nipponjo
Copy link
Owner

nipponjo commented Feb 14, 2023

I'm not sure. By default, the weight files (e.g. states_tf_places2.pth) need to be put into the pretrained/ folder. The path to the files can be changed in app/models.yaml.

@juntaosun
Copy link

我也遇到同样的问题,使用示例的图片和mask一切正常
I also have the same problem, Everything works fine with the picture and mask of the example

当我使用photoshop进行蒙版绘制,它的结果不正常。在PS中使用白色画笔和透明区,保存为png格式。
when I use photoshop for mask drawing, it doesn't work. Use white brush and transparent area in PS, save as png format.

那么在PS中,该如何正确绘制mask?
So in PS, how to draw the mask correctly ?

@nipponjo
Copy link
Owner

nipponjo commented Apr 13, 2023

It seem like PS saves the channels in a different order, so that
mask = mask[0:1, :h//grid*grid, :w//grid*grid].unsqueeze(0) (e.g., in test.py)
should be changed to
mask = mask[3:4, :h//grid*grid, :w//grid*grid].unsqueeze(0)

I will look into this further later.

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

3 participants