TensorFlow's documentation to plot the processed images within our Jupyter notebook.įig, axes = plt.subplots( 1, 10, figsize=( 20, 20)) Next, we'll use this plotImages() function obtained from Let's now see how we can perform data augmentation using Keras.įirst, we import all the libraries we'll be using.įrom import ImageDataGenerator We can do that by augmenting our existing data and then adding that data to the training set.Īnother reason to use data augmentation is to reduce overfitting. Maybe we have a small training set, or maybe we just want to make our training set larger. For image data specifically, data augmentation could consist of things like flipping the image horizontally or vertically, rotating the image, zooming in or out, cropping, or varying the color.įor starters, it will help us obtain more data for training. In our case, the data we'll work with will be images. We'll touch on the concept of data augmentation a bit more before we jump into the code, but for a more thorough presentation of the concept, check out theĭata augmentation episode from the Deep Learning Fundamentals course. In this episode, we'll demonstrate how to use data augmentation on images using TensorFlow's Keras API.ĭata augmentation occurs when new data is created based on modifications of existing data. Performing data augmentation with TensorFlow's Keras API
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |