What You’ll Need
- Webcam
- Computer
- Teachable Machine Website: https://teachablemachine.withgoogle.com/
- Marble run
- Narrow spot at end for marbles to collect
- Marbles
STEP 1
Set up marble run finish line
To make sure the camera has a good view of the winning marble, set up a narrow area to use as the finish line. The Scoring Zone and the Peg Board are both good options.
STEP 2
Position your webcam
Set up your webcam so that it is secure and does not move. If the webcam moves during the training process, you will be teaching it to notice the camera movement, not the marbles. Keep the webcam close to the marbles so that it can see the detail.
STEP 3
Teachable Machine
Use the Google Teachable Machine website to train your AI to recognize your different winning marbles. Follow the instructions in our Teachable Machine Youtube tutorial. You’ll be capturing photos of your different marbles to train your AI on their differences. After this step, your AI judge is ready to go!
STEP 4
Export Teachable Machine Model
In this optional step, make a custom HTML scoreboard to report the winner! The Teachable Machine website is not just a self-contained toy, it can export your fully trained model for use in other code.
Click on the “Export Model” button, and then on the “Upload my model” button. Copy your sharable link for use in the next step
STEP 5
Custom HTML Scoreboard
Open our HTML scoreboard file. and follow the instructions to customize it with your trained model’s URL:
- Click to make your own copy of the scoreboard file.
- Click on “index.html” to edit it, and enter your model’s sharable link in the code after AIModelURL.
- Click the “Show” button at the top to show your edited page
- Click to start running your AI judge!
STEP 6 – Marble Relay
Custom HTML Scoreboard with Marble Relay
Open our HTML Relay scoreboard file. and follow the instructions to customize it with your trained model’s URL:
- Click to make your own copy of the Relay scoreboard file.
- Click on “index.html” to edit it, and enter your model’s sharable link in the code after AIModelURL.
- Click the “Show” button at the top to show your edited page
- Click to start running your AI judge!