You can capture either from your computer's webcam or from the Pi's camera. When you use your computer's webcam, Teachable Machine captures the samples directly from the browser--super quick and easy! When you use the Pi camera, you'll need to run a script to generate the samples, transfer them to your computer, and upload them.
For best results, you should capture samples using the camera you want to use. But, a MacBook Pro webcam worked well enough for us, and it's much easier to use. So, we suggest you first try to use your computer webcam, and use the Pi camera if the model doesn't work well on the Pi.
Be sure you've followed the steps in Create Categories first.
Though this method should work well enough, be warned that the model might not perform differently on the Pi because it uses a different camera. If this happens, you can try the next method to capture samples directly from the Pi camera.
You should have Teachable Machine up on your laptop or desktop to a screen like this:
Now, click the Webcam button. You might need to allow the page access to your computer camera.
Click and hold the Hold to Record button to capture samples!
Samples will appear next to the webcam image.
Try to capture as many unique samples as you can. Remember:
- Try to capture around 200 samples per category.
- Capture different angles and light levels
- Make sure the samples are as representative of the object as they can be
- Try to move the camera around so that the only thing in common between all of the sample images for a given object is the object itself.