Our First Classifiers

The following classifiers are in no way efficient at the task of Image Classification, but are a good start to observe the concept of a data-driven approach in action.

Here we'll dive into our very first classifiers:

  1. Nearest Neighbor Classifier

  2. K-Nearest Neighbor Classifier

Image Classification Pipeline

Again, although not the most robust, these classifiers will follow the steps for a basic Image Classification Pipeline:

  • Input: Our input consists of a set of N images, each labeled with one of _K _different classes. We will split the input into a training set and a test set. The training set will be used during training and the test set will be used during validation. Generally the training and test set are split 80/20, but this ratio is a hyper-parameter which can be fine tuned later.

  • Training: We will train a classifier on the training set. Our task is to use the training set to learn a model of what each of the classes looks like.

  • Evaluation: In the end, we evaluate the quality of the classifier by asking it to predict labels for the set of images that it has never seen before, in the test set. We will then compare the true labels of these images to the labels predicted by the classifier. Intuitively, we’re hoping that a lot of the predictions match up with the true answers (which we call the ground truth).

Using the CIFAR-10 dataset

We will be using one popular image classification dataset called the CIFAR-10 dataset. This dataset consists of 60,000 tiny 32x32 images labeled as one of ten classes ('airplane, automobile, bird, etc'). These 60,000 images are partitioned into a training set of 50,000 images, and a test set of 10,000 images.

  • 10 classes, 50k training images, 10k testing images, 32x32 px, RGB

results matching ""

    No results matching ""