{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import os\n", "import tensorflow as tf\n", "import numpy as np\n", "from mlp.data_providers import CIFAR10DataProvider, CIFAR100DataProvider\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## CIFAR-10 and CIFAR-100 datasets\n", "\n", "[CIFAR-10 and CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) are a pair of image classification datasets collected by collected by Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. They are labelled subsets of the much larger [80 million tiny images](dataset). They are a common benchmark task for image classification - a list of current accuracy benchmarks for both data sets are maintained by Rodrigo Benenson [here](http://rodrigob.github.io/are_we_there_yet/build/).\n", "\n", "As the name suggests, CIFAR-10 has images in 10 classes:\n", "\n", " airplane\n", " automobile\n", " bird \n", " cat\n", " deer\n", " dog\n", " frog\n", " horse\n", " ship\n", " truck\n", "\n", "with 6000 images per class for an overall dataset size of 60000. Each image has three (RGB) colour channels and pixel dimension 32×32, corresponding to a total dimension per input image of 3×32×32=3072. For each colour channel the input values have been normalised to the range [0, 1].\n", "\n", "CIFAR-100 has images of identical dimensions to CIFAR-10 but rather than 10 classes they are instead split across 100 fine-grained classes (and 20 coarser 'superclasses' comprising multiple finer classes):\n", "\n", "
Superclass | \n", "Classes | \n", "
aquatic mammals | \n", "beaver, dolphin, otter, seal, whale | \n", "
fish | \n", "aquarium fish, flatfish, ray, shark, trout | \n", "
flowers | \n", "orchids, poppies, roses, sunflowers, tulips | \n", "
food containers | \n", "bottles, bowls, cans, cups, plates | \n", "
fruit and vegetables | \n", "apples, mushrooms, oranges, pears, sweet peppers | \n", "
household electrical devices | \n", "clock, computer keyboard, lamp, telephone, television | \n", "
household furniture | \n", "bed, chair, couch, table, wardrobe | \n", "
insects | \n", "bee, beetle, butterfly, caterpillar, cockroach | \n", "
large carnivores | \n", "bear, leopard, lion, tiger, wolf | \n", "
large man-made outdoor things | \n", "bridge, castle, house, road, skyscraper | \n", "
large natural outdoor scenes | \n", "cloud, forest, mountain, plain, sea | \n", "
large omnivores and herbivores | \n", "camel, cattle, chimpanzee, elephant, kangaroo | \n", "
medium-sized mammals | \n", "fox, porcupine, possum, raccoon, skunk | \n", "
non-insect invertebrates | \n", "crab, lobster, snail, spider, worm | \n", "
people | \n", "baby, boy, girl, man, woman | \n", "
reptiles | \n", "crocodile, dinosaur, lizard, snake, turtle | \n", "
small mammals | \n", "hamster, mouse, rabbit, shrew, squirrel | \n", "
trees | \n", "maple, oak, palm, pine, willow | \n", "
vehicles 1 | \n", "bicycle, bus, motorcycle, pickup truck, train | \n", "
vehicles 2 | \n", "lawn-mower, rocket, streetcar, tank, tractor | \n", "