In this section, we will use a subset of the CIFAR10 dataset to develop a convolutional neural network-based image classification model and assess its classification performance.
Image classification with CNN
Data preparation
We will keep the data size smaller by using only the first 2,000 images in the training and test data from CIFAR10. This will allow the image classification model to be run on a regular computer or laptop. We will also resize the training and test images from 32 x 32 dimensions to 224 x 224 dimensions to be able to compare classification performance with the pretrained model. The following code includes the necessary preprocessing that we went over earlier in this chapter:
# Selecting first 2000 images...