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

Why is the model constrained to fixed Image sizes? #29

Open
PardoAlejo opened this issue May 16, 2022 · 3 comments
Open

Why is the model constrained to fixed Image sizes? #29

PardoAlejo opened this issue May 16, 2022 · 3 comments

Comments

@PardoAlejo
Copy link

Hi guys,
Thanks again for such a nice work. I want to ask you why is this assertion on the image size necessary? In case it is, any ideas on how to fix it? Thank you!

assert H == self.img_size[0] and W == self.img_size[1], \

@xvjiarui
Copy link
Contributor

Hi @PardoAlejo

Thanks for your kind words.
It's not necessarily asserted. It's just a sanity check.
You may comment it out.

@PardoAlejo
Copy link
Author

Thanks for your reply, @xvjiarui.
Have you tried training the model with different image sizes? One would expect that larges image sizes or smaller patch sizes would give better segmentations.

@xvjiarui
Copy link
Contributor

Hi @PardoAlejo

The smaller patch size will yield much more image tokens, and the self attention operator will require much more memory.
We didn't do that since we would like to pre-train with large batch size.

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