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

(DINOv2) Implement positional encoding interpolation #343

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

Laurent2916
Copy link
Member

@Laurent2916 Laurent2916 commented Mar 29, 2024

This PR allows DINOv2 models to compute embeddings on tensors whose "resolution" is different from the default 518x518px resolution.

This implementation doesn't use the scale_factor argument of torch.nn.interpolate, as per facebookresearch/dinov2#378.

@Laurent2916 Laurent2916 self-assigned this Mar 29, 2024
@Laurent2916 Laurent2916 force-pushed the pr/dinov2-pos_emb_interpolation branch 3 times, most recently from 00bd5fa to 5bc84f2 Compare March 29, 2024 16:10
@Laurent2916 Laurent2916 force-pushed the pr/dinov2-pos_emb_interpolation branch from 5bc84f2 to f720e4f Compare March 29, 2024 17:43
@Laurent2916 Laurent2916 merged commit 1a8ea91 into main Apr 2, 2024
3 checks passed
@Laurent2916 Laurent2916 deleted the pr/dinov2-pos_emb_interpolation branch April 2, 2024 08:02
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

Successfully merging this pull request may close these issues.

2 participants