mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #214] Modify visual positional embedding to make CLIP independent of input resolution #188
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ABaldrati on GitHub (Feb 9, 2022).
Original GitHub issue: https://github.com/openai/CLIP/issues/214
Thank you guys for the awesome work and for releasing CLIP models.
In ResNet models the only component which prevents an arbitrary input resolution is the learned positional embedding in the 2D attention pooling.
I would like to ask if you have performed some experiments with a different approach: for example using a positional encoding which can adapt to a different sequence length or directly removing the positional encoding.
Thanks again for the amazing work
@jongwook commented on GitHub (Apr 11, 2022):
Thanks for the kind words!
We haven't done the specific experiments you described, but I expect replacing the attention pool layer with a simple average pooling, or pooling the attention-pooled features from different crops from the original image, would still work to some degree.
We did bilinear interpolation of the positional encoding vectors when fine-tuning the ViT/L-14 model on 336px which expanded the 16x16 grid to 24x24.