Skip to content

Instantly share code, notes, and snippets.

@henrique
Last active July 25, 2021 15:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrique/27d8c537e3f7735a0eb8eb361c2cb881 to your computer and use it in GitHub Desktop.
Save henrique/27d8c537e3f7735a0eb8eb361c2cb881 to your computer and use it in GitHub Desktop.
CIFAR100 classes list (and 20 superclasses) as in https://www.cs.toronto.edu/~kriz/cifar.html
{
"classes": ["apple", "aquarium_fish", "baby", "bear", "beaver", "bed", "bee", "beetle", "bicycle", "bottle", "bowl", "boy", "bridge", "bus", "butterfly", "camel", "can", "castle", "caterpillar", "cattle", "chair", "chimpanzee", "clock", "cloud", "cockroach", "couch", "crab", "crocodile", "cup", "dinosaur", "dolphin", "elephant", "flatfish", "forest", "fox", "girl", "hamster", "house", "kangaroo", "keyboard", "lamp", "lawn_mower", "leopard", "lion", "lizard", "lobster", "man", "maple_tree", "motorcycle", "mountain", "mouse", "mushroom", "oak_tree", "orange", "orchid", "otter", "palm_tree", "pear", "pickup_truck", "pine_tree", "plain", "plate", "poppy", "porcupine", "possum", "rabbit", "raccoon", "ray", "road", "rocket", "rose", "sea", "seal", "shark", "shrew", "skunk", "skyscraper", "snail", "snake", "spider", "squirrel", "streetcar", "sunflower", "sweet_pepper", "table", "tank", "telephone", "television", "tiger", "tractor", "train", "trout", "tulip", "turtle", "wardrobe", "whale", "willow_tree", "wolf", "woman", "worm"],
"superclasses": {
"aquatic mammals": [4, 30, 55, 72, 95],
"fish": [1, 32, 67, 73, 91],
"flowers": [54, 62, 70, 82, 92],
"food containers": [9, 10, 16, 28, 61],
"fruit and vegetables": [0, 51, 53, 57, 83],
"household electrical devices": [22, 39, 40, 86, 87],
"household furniture": [5, 20, 25, 84, 94],
"insects": [6, 7, 14, 18, 24],
"large carnivores": [3, 42, 43, 88, 97],
"large man-made outdoor things": [12, 17, 37, 68, 76],
"large natural outdoor scenes": [23, 33, 49, 60, 71],
"large omnivores and herbivores": [15, 19, 21, 31, 38],
"medium-sized mammals": [34, 63, 64, 66, 75],
"non-insect invertebrates": [26, 45, 77, 79, 99],
"people": [2, 11, 35, 46, 98],
"reptiles": [27, 29, 44, 78, 93],
"small mammals": [36, 50, 65, 74, 80],
"trees": [47, 52, 56, 59, 96],
"vehicles 1": [8, 13, 48, 58, 90],
"vehicles 2": [41, 69, 81, 85, 89]
}
}
@henrique
Copy link
Author

groups = [
  ["beaver", "dolphin", "otter", "seal", "whale"],
  ["aquarium_fish", "flatfish", "ray", "shark", "trout"],
  ["orchid", "poppy", "rose", "sunflower", "tulip"],
  ["bottle", "bowl", "can", "cup", "plate"],
  ["apple", "mushroom", "orange", "pear", "sweet_pepper"],
  ["clock", "keyboard", "lamp", "telephone", "television"],
  ["bed", "chair", "couch", "table", "wardrobe"],
  ["bee", "beetle", "butterfly", "caterpillar", "cockroach"],
  ["bear", "leopard", "lion", "tiger", "wolf"],
  ["bridge", "castle", "house", "road", "skyscraper"],
  ["cloud", "forest", "mountain", "plain", "sea"],
  ["camel", "cattle", "chimpanzee", "elephant", "kangaroo"],
  ["fox", "porcupine", "possum", "raccoon", "skunk"],
  ["crab", "lobster", "snail", "spider", "worm"],
  ["baby", "boy", "girl", "man", "woman"],
  ["crocodile", "dinosaur", "lizard", "snake", "turtle"],
  ["hamster", "mouse", "rabbit", "shrew", "squirrel"],
  ["maple_tree", "oak_tree", "palm_tree", "pine_tree", "willow_tree"],
  ["bicycle", "bus", "motorcycle", "pickup_truck", "train"],
  ["lawn_mower", "rocket", "streetcar", "tank", "tractor"]
]

superclasses = ["aquatic mammals", "fish", "flowers", "food containers", "fruit and vegetables", "household electrical devices", "household furniture", "insects", "large carnivores", "large man-made outdoor things", "large natural outdoor scenes", "large omnivores and herbivores", "medium-sized mammals", "non-insect invertebrates", "people", "reptiles", "small mammals", "trees", "vehicles 1", "vehicles 2"]

{superclasses[i]:[list(CLASS_NAMES).index(c) for c in g] for i,g in enumerate(groups)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment