muzairkhattak / multimodal-prompt-learning

[CVPR 2023] Official repository of paper titled "MaPLe: Multi-modal Prompt Learning".
https://muzairkhattak.github.io/multimodal-prompt-learning/
MIT License
629 stars 45 forks source link

classnames = self.dm.dataset.classnames #78

Open GitHub-Ju opened 1 month ago

GitHub-Ju commented 1 month ago

Dear author, I can not find the definition of self.dm in maple.py. What is the meaning of "self.dm.dataset.classnames"? How to apply this into my own dataset and model? 1722936360155

muzairkhattak commented 2 weeks ago

Hi @GitHub-Ju,

Thank you for showing interest in MaPLe! Sorry for the delayed response.

Regarding your question: self.dm is a built-in class obtained from the Dassl Library (reference). It basically extracts the classnames from the split json file of the dataset. (e.g., this is JSON file for caltech101)

In order to train MaPLe on your custom dataset, you will first need to create a similar JSON file for your dataset, and the code will automatically extract the classnames from it.

Additionally, follow the steps mentioned in this issue for additional details. https://github.com/muzairkhattak/multimodal-prompt-learning/issues/53