azshue / TPT

Test-time Prompt Tuning (TPT) for zero-shot generalization in vision-language models (NeurIPS 2022))
https://azshue.github.io/TPT/
MIT License
136 stars 16 forks source link

Prompt Visualization #6

Closed Zenvi closed 1 year ago

Zenvi commented 1 year ago

Hi, thank you for your work and code sharing. I want to visualize the prompts after inputing an image, any ideas how?

azshue commented 1 year ago

Hi,

Thank you for your interest in our work. The learnable prompt is located in PromptLearner. After tuning it on an image, you could retrieve the learned prompt by inspecting PromptLearner.ctx. Our code doesn't provide any visualization tool for visualizing the prompt, but you could analyze the learned prompt with other open-source tools, for example, this script provided in the CoOp codebase.

Zenvi commented 1 year ago

Thanks a lot for your reply! Closing the issue