facebookresearch / facebookresearch/segment-anything
Change input image size
- Dominant language
- Jupyter Notebook
- Stars
- 54.9k
- Forks
- 6.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Thanks for the release!
I am trying to use only the image_encoder model to extract features from small images (64x64), which is easy to do with other ViT models such as DINO.
However, it seems that the pretrained image_encoder model only accepts fixed size images (1024x1024). I can always resize the image but it is highly computationally/memory inefficient.
If I don't apply image reshaping to 1024, I get an error because it seems that the input image size has been hard coded into the model during training (self.pos_embed size for example).
I must have missed something because it seems highly non-generic for a foundation model.
Any solution for this problem?
Contributor guide
Assessment
This issue has not been assessed yet.