KaiyangZhou / CoOp

Prompt Learning for Vision-Language Models (IJCV'22, CVPR'22)
MIT License
1.66k stars 190 forks source link

Running on Multi-label Classification #36

Open SZUHvern opened 2 years ago

SZUHvern commented 2 years ago

Dear Zhou, Thank you for sharing Dassl!

I encounter some problem when implementing 'coop' with multi-label classification. My label in One-hot presentation is like: [0,1,0,1,0,0,0,1], so how to define '_classnames' and '_lab2cname' in 'base_dataset.py'? I have already reshape my data like:{train:classname:[[name1],[name7]], impath: xxx, label: [0,1,0,0,0,0,0,1]} and feed it into 'Datum'

Do you have any good suggestions, or is it possible to update dassl to be compatible with multi-label tasks?

Many Thanks

wj7486 commented 1 year ago

Have you solved the problem?Thanks