mlfoundations / wise-ft

Robust fine-tuning of zero-shot models
https://arxiv.org/abs/2109.01903
Other
644 stars 68 forks source link

Zero Shot Classification on my own Dataset #23

Open deadpipe opened 10 months ago

deadpipe commented 10 months ago

Hello,

I am trying to fine tune CLIP on my own dataset for Zero Shot Classification. My question is - is there a way to load a CSV containing all the file paths and their corresponding labels? OR a Folder which contains all the images in subfolders?

gabrielilharco commented 10 months ago

Hi @deadpipe. The easiest way to do this in this codebase is the last option you mentioned. You'll need to write a dataset class for this, see https://github.com/mlfoundations/wise-ft/blob/master/src/datasets/imagenet.py#L8 for an example

deadpipe commented 10 months ago

So i have to create a new .py file which consists of my class or i should write another class within that file?