Chapter 2. What’s in the Picture: Image Classification with Keras
If you have skimmed through deep learning literature, you might have come across a barrage of academic explanations laced with intimidating mathematics. Don’t worry. We will ease you into practical deep learning with an example of classifying images with just a few lines of code.
In this chapter, we take a closer look at the Keras framework, discuss its place in the deep learning landscape, and then use it to classify a few images using existing state-of-the-art classifiers. We visually investigate how these classifiers operate by using heatmaps. With these heatmaps, we make a fun project in which we classify objects in videos.
Recall from the “Recipe for the Perfect Deep Learning Solution” that we need four ingredients to create our deep learning recipe: hardware, dataset, framework, and model. Let’s see how each of these comes into play in this chapter:
We begin with the easy one: hardware. Even an inexpensive laptop would suffice for what we we’re doing in this chapter. Alternatively, you can run the code in this chapter by opening the GitHub notebook (see http://PracticalDeepLearning.ai) in Colab. This is just a matter of a few mouse clicks.
Because we won’t be training a neural network just yet, we don’t need a dataset (other than a handful of sample photos to test with).
Next, we come to the framework. This chapter’s title has Keras in it, so that is what we will be using for now. In fact, we use Keras ...