From the course: Deep Learning with Python: Convolutional Neural Networks

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Preprocessing image data in Python

Preprocessing image data in Python

- [Instructor] Before we feed raw images into a deep learning model, we often have to transform them into a format that's easier for models to interpret. This process is called "Image Pre-Processing". In this tutorial, we're going to walk through several common pre-processing steps using a well-known dataset known as the "Kaggle Dogs versus Cat" dataset. So before we begin, let's select a Kernel. All right, so the images that we're going to be working with are stored in a directory called "Train". Within that directory, there are two sub directories. One is called "Cat" and the other is called "Dog". And obviously as the names imply, we have cat images in the cat folder and dog images in the dog folder. So let's begin by taking a look at an example from the cat folder. So we have an example image from the cat folder, and we see the image size as 299 by 196 pixels. So let's also take a look at a sample image from the dog folder. Now we have another image. This time around the image…

Contents