Image Feature Extraction
timm
PyTorch
Safetensors
Transformers

Regarding the Feature extractor

#1
by daniel-richards - opened

Hello,
Thanks for making this possible to use via timm. I tried extracting the intermediate features by following the instructions in the Feature Map Extraction section of the model card. However, I don’t understand the output. It is a list of three tensors, each with shape batch_size × 384 × 16 × 16.
What do these three tensors represent? Are they patch tokens from intermediate layers? If so, which layers do they correspond to? Would it also be possible to fetch the CLS tokens from these layers? Additionally, could this be extended to return features from all intermediate layers?

PyTorch Image Models org
edited 12 days ago

@daniel-richards These days I find answers from Claude or ChatGPT to be really good (and better than the docs) ... you want to use the forward_intermediates API that's now on every timm model, including this one.

Here's what Claude's response is, looks good and quite comprehensive.

https://claude.ai/share/a351e66f-419f-4254-9540-5466508e5098

Sign up or log in to comment