Introduction

In this section you will learn about image processing with TensorFlow and PIL. Before doing any image-related tasks, we need to convert the images into a usable form for deep learning models. TensorFlow and PIL provide us utilities that make image processing very straightforward.

A. Image recognition

Computer vision, the field concerning machines being able to understand images and videos, is one of the hottest topics in the tech industry. Robotics, self-driving cars, and facial recognition all rely on computer vision to work. At the core of computer vision is image recognition, the task of recognizing what an image represents.

Before performing any task related to images, it is almost always necessary to first process the images to make them more suitable as input data. This section of the course focuses on image processing, specifically how we can convert images from JPEG or PNG files to usable data for our neural networks.

B. Core libraries

The two main libraries that will be used in this Lab for image processing are TensorFlow and PIL. TensorFlow provides a variety of utility functions to obtain image data from files, resize the images, and even transform a large set of images all at once. The original PIL (Python Imaging Library) is an image manipulation library built for Python. Although its development stopped in 2011, an offshoot called Pillow was created and continues to be developed to provide better image manipulation tools for Python users. We'll use the Pillow version of PIL for more fine-grain image processing.