Skip to content

Conversation

@xenosoz
Copy link
Contributor

@xenosoz xenosoz commented May 16, 2018

As CIFAR-* image labels are encoded numerically, it would be helpful to have string labels for human readers. It's good to know CIFAR archive has metadata for that.

For example, in Pytorch blitz tutorial, we might rewrite the following code:

classes = ('plane', 'car', 'bird', 'cat',
'deer', 'dog', 'frog', 'horse', 'ship', 'truck')

as:

classes = trainset.meta['label_names']

and we can extend CIFAR-10 to CIFAR-100 easily with:

classes = trainset.meta['fine_label_names']
classes = trainset.meta['coarse_label_names']

* cifar10.meta['label_names']

* cifar100.meta['fine_label_names']

* cifar100.meta['coarse_label_names']
@soumith soumith merged commit 972b80c into pytorch:master May 17, 2018
@soumith
Copy link
Member

soumith commented May 17, 2018

thank you!

soumith added a commit that referenced this pull request May 17, 2018
soumith added a commit that referenced this pull request May 17, 2018
varunagrawal pushed a commit to varunagrawal/vision that referenced this pull request Jul 23, 2018
* cifar10.meta['label_names']

* cifar100.meta['fine_label_names']

* cifar100.meta['coarse_label_names']
varunagrawal pushed a commit to varunagrawal/vision that referenced this pull request Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants