In this section, we will take a look at a variant of DNNs, where the structure of the network is modified for image recognition tasks.
In the neural networks that we've discussed so far in this chapter, we've seen that all the input layers are one-dimensional. However, images are two-dimensional. To capture how images are fed to a neural network for training, we have to modify the structure of the input layer. Traditional algorithms require humans to label the edges of the objects in the image. Convolutional neural networks (CNNs) can automatically detect the objects in the image with enough training and, based on the labels of the image, they can learn how to identify objects in the images without explicitly labeling the edges in the image.
CNNs require a preprocessing phase, where the image has to be prepared into a specific...