CIFAR-10 and CIFAR-100 Dataset in PyTorch
In the previous topic, we learn how to use the endless dataset to recognized number image. The endless dataset is an introductory dataset for deep learning because of its simplicity. The endless dataset is a hello world for deep learning.
The CIFAR 10(Canadian Institute for Advanced Research) will be harder to classify and will come with new barriers which we will need to overcome. It is a collection of the image which is commonly used to train machine learning and computer vision algorithms. The CIFAR 10 dataset contains 50000 training images and 10000 validation images such that the images can be classified between 10 different classes.
The CIFAR-10 dataset consists of 60000 thirty by thirty color images in 10 classes means 6000 images per class. This dataset is divided into one test batch and five training batches. Every batch contains 10000 images. In the test batch, there are 1000 images which are randomly selected from each class. The training batch contains remaining images in random order. Some of the training batches may contain more images from one class than another.
The classes will be completely mutually exclusive. There will be no overlapping between automobiles and trucks. Automobiles include things which are similar to sedans and SUVs. Trucks class includes only big trucks, and it neither includes pickup trucks. As opposed to the MNIST dataset, the objects within these classes are much more complex in nature and extremely varied. If we are looked through the CIFAR dataset, we realize that there is not just one type of bird or cat. The bird and cat class contains many different types of birds and cat varying in size, color, magnification, different angles, and different poses.
With the endless dataset, although there are many ways in which we can write the number one and number two. It just was not as varied, and on the top of that, the endless dataset is a gray scalar. The CIFAR dataset contains a larger 32 by 32 color images, and each image is with three different color channels. Now our biggest question is that the LeNet model which performed so well on the endless dataset will it be enough to classify CIFAR dataset?
It is just like the CIFAR-10 dataset. The only difference is that it has 100 classes containing 600 images per class. There are 100 testing images and 500 training images per class. These 100 classes are grouped into 20 superclasses, and each image comes with a "coarse" label (the superclass to which it belongs) and a "fine" label (the class to which it belongs).
There are the following classes in the CIFAR-100 dataset: