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

How can I get the latent representations for each image in my custom dataset using the extracted backbone network? #760

Open
artunboz opened this issue Jun 12, 2023 · 1 comment
Assignees

Comments

@artunboz
Copy link

artunboz commented Jun 12, 2023

Checklist

  1. I have searched related issues but cannot get the expected help. Yes
  2. I have read the FAQ documentation but cannot get the expected help. Yes

I have trained a simclr model on my custom dataset. Now, I would like to get the latent representation for each image in my dataset. I have extracted the backbone resnet from simclr using the tools/model_converters/extract_backbone_weights.py script. I have checked mmselfsup/demo/mmselfsup_colab_tutorial.ipynb. There, the author uses a benchmark config for resnet and runs a training loop but with a val_loader. I don't think that example actually saves the latent representations anywhere.

How can I simply get the latent representations per image by applying the exact same preprocessing steps of simclr as well as transforming my images to 224 x 224 and forward passing them through my backbone resnet?

@artunboz artunboz changed the title How can I get the latent representations for each image in my custom dataset with the extracted backbone network? How can I get the latent representations for each image in my custom dataset using the extracted backbone network? Jun 12, 2023
@Lhc0623
Copy link

Lhc0623 commented Nov 3, 2023

I have a similar question, is there an unified API to get image embeddings or representations?

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

3 participants