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

Question about the test-time prompt learning procedure #14

Closed 1215481871 closed 2 months ago

1215481871 commented 2 months ago

Thanks for your work!

I am wondering that given a single test image and conduct the test-time prompt learning procedure, is this test image immediately evaluated on the optimized prompt?

Furthuremore, once the evaluation of a single test image is finished and the corresponding prompts is optimized, for the next coming test image, the prompts will be re-initialized to "a photo of a" or just using the optimized one from the previous step?

azshue commented 2 months ago

Hi, thank you for your interest in our work. To answer your questions:

  1. Yes, the test image is evaluated immediately on the optimized prompt.
  2. When a new test image comes in, the prompt will be reset to its initial state ("a photo of a" or the initial CoOp weight).
1215481871 commented 2 months ago

Thanks for your response! My confusion is resolved.