Fastai is so cool dealing with multilabel classification! But I met such a problem that in my data set, every image might be assigned to {0,1,…8} labels, for example: no animal, Animal A, Animal B and so on. The label is shown in a csv file, and when one is assigned to 0 label, the corresponding position says “NaN”. Just as bellows:
Image,Label
1.jpg,Animal A Animal B
2.jpg,NaN
3.jpg,Animal C
I found I could not establish the dataloader by using the method ImageDataloader.from_df, which throws errors when the length of the label is 0. I do not want to set “NaN” into the ninth class, for I found there will be strange prediction as “NaN Animal A” if I do so.(i.e. NaN must be exclusive from other 8 classes, but other 8 classes could mix up.)
Can anybody help me with the this multilabel classification problem including NaN labels? Thank you very much!