Building the dataset to classify desk objects
In this recipe, we will build the dataset by collecting images of the mug and book, with the OV7670 camera and the Arduino Nano. The image files will then be uploaded to Google Drive to train the ML model in the next recipe.
Getting ready
Training a deep neural network from scratch for image classification commonly requires a dataset with 1,000 images per class. As you might guess, collecting such a vast number of pictures would be time-consuming. To overcome this challenge, we will employ the technique we applied in the previous Chapter 7, Detecting Objects with Edge Impulse Using FOMO on the Raspberry Pi Pico: transfer learning.
This ML technique, which we will exploit in the following recipe, allows us to build a dataset with just 20 samples per class.
How to do it…
Before implementing the Python script, remove the test pattern mode (Camera.testPattern()
) in the Arduino sketch so that you can acquire live...