Be sure you've followed the steps in Create Categories first.
First, follow the instructions in Raspberry Pi Setup. This will load the software onto the Pi.
SSH to the pi, or open a Terminal. Then, run these commands to set up the shell:
$ cd rpi-vision $ sudo bash # source .venv/bin/activate
Get ready to capture the first samples. Then, at the same shell, type:
# python3 tests/pitft_capture.py pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Ready. Press ENTER to toggle capture/standby. Press Ctrl+C to quit.
In RECORD mode, the script is capturing frames and saving them to the Pi's SD card. The display looks like this.
Press ENTER to toggle between STANDBY and RECORD modes.
When finished, press CTRL + C to stop the process.
Here we show you how to use either
scp to copy the generated tar to your desktop/laptop for use with Teachable Machine.
The easiest way is to setup your Raspberry Pi as a file server using Samba. Follow these steps.
Now, copy the generated tarball into your samba share:
$ cp ~/rpi_vision/<<OBJECT_NAME>>.tar /share
On your local desktop, look for the
RASPBERRYPI machine on your network. Connect to the share and copy the tar to your local machine.
On your local machine (i.e. not the raspberry pi), run:
$ scp [email protected]:~/rpi_vision/<<OBJECT_NAME>>.tar .
Be sure to change
<<OBJECT_NAME>>.tar to the actual path you specified to your
pitft_capture.py command above.
Extract the tar by double-clicking it. On Windows, you may need a utility like 7-zip.
Now, in the Teachable Machine UI, follow these steps:
Now drag-n-drop the images from your file browser onto the dialog.
You can also click on the folder to find them from within the browser.
Repeat this process for all categories in your project.