Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Embedding of individual patches #22

Open
Sino0904 opened this issue Sep 6, 2020 · 1 comment
Open

Embedding of individual patches #22

Sino0904 opened this issue Sep 6, 2020 · 1 comment

Comments

@Sino0904
Copy link

Sino0904 commented Sep 6, 2020

Hello,

This is really a great work! thanks a lot for making the codebase public. I was wondering if its possible to get individual embedding of each patch of size (q x q). From the pytorch model architecture, I was not sure how to do that.

Thanks!

@wielandbrendel
Copy link
Owner

@Sino0904 You could simply modify the output of the Bagnet here:

https://github.com/wielandbrendel/bag-of-local-features-models/blob/master/bagnets/pytorchnet.py#L110-L129

where you would have to leave out the fc-layer. One could even make this an argument so you can choose whether you get logits or embeddings returned. Feel free to open a PR if you implement that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants