Phase 1: Capture a starter set from your webcam
At the end of this phase, your webcam streams in the camera card’s Test section and a dataset named dice-starter holds about 30 images of dice.
You start small on purpose.
In the next two phases you label these 30 images by hand and train a rough starter model on them, which then labels the rest of your images for you.
Set up your workspace
The camera doesn’t need to point straight down, but keep it at the same height and angle for the whole workshop, except where Phase 7 asks you to move it. A model learns what dice look like from the distance and angle you train it on, so moving the camera changes what it sees. A steep angle, closer to straight down, makes the top face of each die easier to read, for you and the model.
- Put a plain background to roll on, such as a dice tray or a sheet of plain paper, on a table with even light.
- Mount the webcam about 30 cm above the background, aimed at it.
- Plug the webcam into your computer.

Configure your webcam
The webcam discovery service lists every camera plugged into your computer and adds the one you pick as a camera component. That way you get your webcam, not a laptop’s built-in camera.
- In the Viam app, open your machine and go to the CONFIGURE tab.
- Click + and select Blocks.
- Search for
find-webcams, select the webcam-discovery service, and add it to your machine. - Click Save and wait a moment for the service to start.
- Open the discovery service’s Test section. It lists the cameras connected to your computer. The same camera can appear more than once, once for each resolution and frame rate it supports.
- Find your webcam and click Add component next to one of its entries. The new camera component is named after the device.
- On the new camera component’s card, click the … menu and select Rename.
Enter
cameraas the new name. - Click Save.
You can delete the discovery service from your machine once the camera is working; you don’t need it for the rest of the workshop.
Checkpoint
camera card shows a live view of the background, and the dice are sharp.
If the image is from your laptop’s own camera, delete the camera component and add a different entry from the discovery service’s Test section.
If the dice are blurry, raise the camera a little until the webcam can focus.Create the starter dataset
A dataset is a named collection of images in your organization, which you label and train models on. The starter dataset is a small set of about 30 images that you label by hand in Phase 2. In Phase 3 you train a rough starter model on it, and in Phase 4 that model labels the larger training set for you, so you only correct its boxes instead of drawing every one. The starter set lives in its own dataset because a training job rejects a dataset with more than 20% of its images unlabeled, and the training set stays mostly unlabeled until the starter model labels it.
- Go to the DATA tab and click DATASETS.
- Click Create dataset.
- In the Dataset Name field, enter
dice-starter. - Leave Data type set to Binary Data.
- Click Create dataset.
Checkpoint
dice-starter with 0 images.
If the name is taken, another dataset in your organization already uses it; pick a different name and use it wherever this workshop says dice-starter.Add 30 images from the camera
Each image you add here is one you’ll label in Phase 2, so aim for variety rather than volume.
- On the CONFIGURE tab, open the Test section of the
cameracard. - Roll one to five dice onto the background.
- Click Add to dataset, select
dice-starter, and confirm. - Roll again and repeat until you’ve added 30 images.

Vary each roll:
- Use different numbers of dice, from one to five.
- Let some dice land near the edges and some in the middle.
- Let two or three dice touch in a few images.
- Make sure every face, 1 to 6, shows up at least 10 times across the 30 images. Turn dice by hand if a face is rare.
A good starter set mixes how many dice are in each image, where they land, and whether they touch, like these three:

Checkpoint
dice-starter on the DATASETS page shows 30 images, and each one shows dice from above.
If the count is lower, check that you selected dice-starter each time you added an image.In the next phase, you draw a box around every die in these 30 images and label it with its value.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!