15. Herding π± πΆ#
15.1. Pre-Reading#
Picamera2 Library Docs Chapter 1. Introduction
github.com/raspberrypi/picamera2/examples/tensorflow/real_time.py
Objectives#
Close the loop on the ML workflow with cats and dogs
Conduct inference on real-life critters!
15.2. The lab#
We will have a live cat and dog for you to test your system on!
Recall that the machine learning workflow is:
Decide on a goal
Collect a dataset
Examine and understand the data
Design a model architecture
Consider the data input pipeline
Train the model
Convert the model
Run inference
Evaluate and troubleshoot
You have accomplished most of this in a sterile testing environment. Now itβs time to use a physical input pipeline and add in real-world chaos!
Starting point#
Complete the following code and get it to your Pi 4.
# A script that uses TensorFlow Lite and Picamera
# to classify a Cat vs. Dog.
#
# Designed to use a pre-converted fine-tuned MobilenetV2 model.