In this lab, you will build an image processing model using TensorFlow that will classify images into one of multiple categories. You will be performing the entire model creation process, from retrieving the data and formatting it properly, to designing a model architecture and training it to meet a desired metric score.
This lab is designed to be used as a practice exam to test your skills in preparation for the TensorFlow Developer Certificate, and thus, is a very challenging exercise.
Before beginning this lab, you should have PyCharm installed on your local computer. Additionally, you should have installed all packages required by the TensorFlow Developer Certificate exam.
Successfully complete this lab by achieving the following learning objectives:
- Retrieve the ibean Datasets
Retrieve the training, validation, and testing ibean datasets:
- ibean Training Data: https://storage.googleapis.com/ibeans/train.zip
- ibean Validation Data: https://storage.googleapis.com/ibeans/validation.zip
- ibean Test Data: https://storage.googleapis.com/ibeans/test.zip
Extract the compressed data.
- Explore the ibean Data
- Explore the folder structure created by decompressing the data to understand how to load the images.
- Identify the data classes and the file naming convention.
- View some of the images from each class to help you understand the data.
- Load the ibean Data, and Transform It to a Suitable Form for the Model
- Review the model expectations to understand how you should load the data.
- Load the training, validation, and test datasets into the program.
- Label your data according to the expected model output.
- Build and Train a Model to Classify the Images
- Review the model expectations to know how the model should accept and output data.
- Create an appropriate neural network model using Keras.
- Compile your model with the correct loss function for the problem and label type.
- Train your model to reach the desired accuracy. Remember to capture the history!
- Save your model.
- Evaluate Your Model with the Test Data
- Generate model statistics on the test data. Ensure you’ve met or exceeded the desired accuracy.
- Plot your model’s accuracy and loss for the training process.