6 Teaching machines to see: image classification with CNNs
This chapter covers,
- Performing exploratory data analysis on image datasets in Python
- Implement an image pipelines in TensorFlow that preprocesses and feeds image data to the model
- Implementing a complex CNN that has parallel layers and other intricacies using Keras Functional API
- Train a CNN model using a validation set for performance monitoring as well as a test set to measure final accuracy
We already have done a fair bit of work on convolutional neural networks. Convolutional neural networks are a type of networks that can operate on 2-dimensional data like images. Convolutional neural networks use the convolution operation to create feature maps of images (i.e. a grid of pixels) by moving a kernel (i.e. a smaller grid of values) over the image to produce new values. The convolutional neural network has several of these layers that generate more and more high-level feature maps as the get deeper. You can also use max or average pooling layers between convolutional layers to reduce the dimensionality of the feature maps. The pooling layers also move a kernel over feature maps to create the smaller representation of the input. The final feature maps are connected to a series fully connected layer, where the final layer produces the prediction (e.g. probabilities of an image belonging to a certain category).