learnables / learn2learn

A PyTorch Library for Meta-learning Research
http://learn2learn.net
MIT License
2.59k stars 348 forks source link

Fix labels in Aircraft dataset. #404

Closed seba-1511 closed 1 year ago

seba-1511 commented 1 year ago

Description

Fixes #402

Changes the labels in FGVC Aircrafts to be variants instead of families, as in Meta-Dataset.

Contribution Checklist

If your contribution modifies code in the core library (not docs, tests, or examples), please fill the following checklist.

seba-1511 commented 1 year ago

@AntreasAntoniou it turns out the fix was pretty simple: just build the image_labels.pkl archive using the files with the aircraft variants instead of the families. When rerunning your script (requires re-downloading the data) I get 70 train, 15 validation, and 15 test classes.

Do you want to take a look before I merge?

AntreasAntoniou commented 1 year ago

I am having a look right now.

Thanks for tackling this so quickly. I was intending to do that today, but it seems you beat me to it. I did an all nighter on Sunday so I needed to turn in early yesterday, or I would have been able to deliver yesterday!

AntreasAntoniou commented 1 year ago

Seems good to go! The only thing that I would recommend is using pathlib.Path for filesystem operations. It's a lot more fun to use, and generally a lot more resilient (gets ahead of problems).

seba-1511 commented 1 year ago

Thanks for the quick review! Agreed re pathlib but since we've been using os throughout the lib I'll keep it that way.

AntreasAntoniou commented 1 year ago

Fair enough :)