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

The input size cannot be divided by the patch size #24

Open
tangdk opened this issue Nov 12, 2024 · 1 comment
Open

The input size cannot be divided by the patch size #24

tangdk opened this issue Nov 12, 2024 · 1 comment

Comments

@tangdk
Copy link

tangdk commented Nov 12, 2024

If the input image size cannot be divided by the patch size, what should I do?
Just resize it?
For example, if the input size is 121 * 256 and the patch size is 16

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@chg0901
Copy link

chg0901 commented Dec 19, 2024

please check this two parameters and make sure your input image could be divided by patch_size

    image_size = 256,
    patch_size = 32,

https://github.com/kyegomez/NaViT/blob/2ae84371103917608603182f08a802cb453d1008/navit/main.py#L219C9-L219C153

assert divisible_by(image_height, patch_size) and divisible_by(image_width, patch_size), 'Image dimensions must be divisible by the patch 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