<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Viam Documentation – Training</title><link>https://docs.viam.com/tags/training/</link><description>Recent content in Training on Viam Documentation</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 06 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://docs.viam.com/tags/training/feed.xml" rel="self" type="application/rss+xml"/><item><title>Tutorials: Train a dice reader and score Yahtzee</title><link>https://docs.viam.com/tutorials/dice-vision/</link><pubDate>Fri, 06 Nov 2026 00:00:00 +0000</pubDate><guid>https://docs.viam.com/tutorials/dice-vision/</guid><description>
&lt;p&gt;In this workshop you teach a webcam to read dice, then use what it sees to score Yahtzee.
You capture and label your own images, train two detection models two different ways, measure which one reads dice better, and build a Yahtzee scorer on the winner that runs on your machine.&lt;/p&gt;
&lt;picture&gt;
&lt;source srcset="https://docs.viam.com/tutorials/dice-vision/hero-yahtzee-roll_hu_c6968bc980d56144.webp" type="image/webp" width="1200" height="900"&gt;
&lt;img src="https://docs.viam.com/tutorials/dice-vision/hero-yahtzee-roll.jpg" width="1200" height="900" alt="A webcam on a purple post at the back of a white desk, facing eight translucent colored dice rolled out in front of it." class="" id="" style="" loading="lazy"&gt;
&lt;/picture&gt;
&lt;p&gt;Dice are a good first vision project.
They&amp;rsquo;re cheap and the same everywhere, a pretrained model can&amp;rsquo;t read them, and there&amp;rsquo;s never any doubt about what a die shows.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll learn how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add images from a camera to a dataset&lt;/li&gt;
&lt;li&gt;Label images, and use a starter model to label more of them for you&lt;/li&gt;
&lt;li&gt;Train an object detection model with built-in training&lt;/li&gt;
&lt;li&gt;Train a YOLO model with a training script from the registry&lt;/li&gt;
&lt;li&gt;Evaluate models on held-out test datasets and compare the results&lt;/li&gt;
&lt;li&gt;Choose a confidence threshold from evaluation results&lt;/li&gt;
&lt;li&gt;Deploy a model with the ML model and vision services&lt;/li&gt;
&lt;li&gt;Build an inline module that scores rolls from your model&amp;rsquo;s detections&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="requirements" class="main-content-heading"&gt;
Requirements
&lt;div class="copied" id="copied-requirements" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-requirements-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;&lt;h3 id="hardware" class="main-content-heading"&gt;
Hardware
&lt;div class="copied" id="copied-hardware" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-hardware-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;A USB webcam connected to your computer, such as a &lt;a href="https://www.logitech.com/en-us/products/webcams/c920-pro-hd-webcam.960-000764.html" target="_blank" &gt;Logitech C920&lt;/a&gt;.
Any webcam that &lt;code&gt;viam-server&lt;/code&gt; can stream from works.&lt;/li&gt;
&lt;li&gt;Five or more dice whose pips stand out clearly from the die, such as white pips on colored dice.
Any color works; the model learns the colors you train it on.&lt;/li&gt;
&lt;li&gt;A way to hold the webcam about 30 cm above your workspace, and later about 45 cm.
A stand, a clamp, a 3D-printed post or tape all work.&lt;/li&gt;
&lt;li&gt;A plain background to roll on, such as a dice tray or a sheet of plain paper.&lt;/li&gt;
&lt;li&gt;A Mac or Linux computer that runs &lt;code&gt;viam-server&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="software" class="main-content-heading"&gt;
Software
&lt;div class="copied" id="copied-software" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-software-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;A Viam account and a machine running &lt;code&gt;viam-server&lt;/code&gt; on your computer. See &lt;a href="https://docs.viam.com/set-up-a-machine/first-machine/" &gt;Set up your first machine&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="what-you-should-know-first" class="main-content-heading"&gt;
What you should know first
&lt;div class="copied" id="copied-what-you-should-know-first" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-what-you-should-know-first-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;How components, services and machines fit together: &lt;a href="https://docs.viam.com/overview/" &gt;Viam platform overview&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;What training, datasets and models are in Viam: &lt;a href="https://docs.viam.com/train/overview/" &gt;Train ML models&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="check-your-setup" class="main-content-heading"&gt;
Check your setup
&lt;div class="copied" id="copied-check-your-setup" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-check-your-setup-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h3&gt;&lt;p&gt;Everything in this workshop happens in the Viam app, including the code in &lt;a href="https://docs.viam.com/tutorials/dice-vision/score-a-yahtzee-roll/" &gt;Phase 10&lt;/a&gt;, so you don&amp;rsquo;t need to install anything on your computer besides &lt;code&gt;viam-server&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Open your machine&amp;rsquo;s page in the &lt;a href="https://app.viam.com" target="_blank" &gt;Viam app&lt;/a&gt; and check that it shows &lt;strong&gt;Live&lt;/strong&gt;.
If it shows &lt;strong&gt;Offline&lt;/strong&gt;, check that &lt;code&gt;viam-server&lt;/code&gt; is running on your computer.&lt;/p&gt;
&lt;h2 id="phases" class="main-content-heading"&gt;
Phases
&lt;div class="copied" id="copied-phases" aria-hidden="true"&gt;
&lt;div class="copied-notification" id="copied-phases-text"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;&lt;p&gt;The phase times are hands-on time.
Each training job also runs for some time in the cloud, and the phases tell you what to do while you wait.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;What you end with&lt;/th&gt;
&lt;th&gt;Time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. &lt;a href="https://docs.viam.com/tutorials/dice-vision/capture-a-starter-set/" &gt;Capture a starter set from your webcam&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The webcam streams in the &lt;code&gt;camera&lt;/code&gt; card&amp;rsquo;s &lt;strong&gt;Test&lt;/strong&gt; section and 30 images of dice are in a dataset.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. &lt;a href="https://docs.viam.com/tutorials/dice-vision/label-the-starter-set/" &gt;Label the starter set&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Every die in the starter set has a box and a value.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. &lt;a href="https://docs.viam.com/tutorials/dice-vision/train-a-starter-model/" &gt;Train a starter and capture more&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A starter model trains while you capture about 70 more images.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4. &lt;a href="https://docs.viam.com/tutorials/dice-vision/auto-label-the-training-set/" &gt;Auto-label the training set&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The starter model labels your training set, you correct it, and you add your starter images. &lt;strong&gt;Milestone:&lt;/strong&gt; a model you trained labels your data.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5. &lt;a href="https://docs.viam.com/tutorials/dice-vision/train-a-built-in-model/" &gt;Train a built-in model&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A TFLite detection model trains on the full training set.&lt;/td&gt;
&lt;td&gt;About 10 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6. &lt;a href="https://docs.viam.com/tutorials/dice-vision/train-a-yolo-model/" &gt;Train a YOLO model from the registry&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A YOLO model trains on the same dataset.&lt;/td&gt;
&lt;td&gt;About 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7. &lt;a href="https://docs.viam.com/tutorials/dice-vision/build-the-test-datasets/" &gt;Build the test datasets&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;A clean and a hard test dataset, labeled and checked.&lt;/td&gt;
&lt;td&gt;About 25 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8. &lt;a href="https://docs.viam.com/tutorials/dice-vision/evaluate-both-models/" &gt;Evaluate both models and pick a winner&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Four evaluations and a chosen model and threshold. &lt;strong&gt;Milestone:&lt;/strong&gt; a measured answer to which model reads dice better.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9. &lt;a href="https://docs.viam.com/tutorials/dice-vision/deploy-the-winning-model/" &gt;Deploy the winning model&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The winning model draws boxes on the live camera feed.&lt;/td&gt;
&lt;td&gt;About 15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10. &lt;a href="https://docs.viam.com/tutorials/dice-vision/score-a-yahtzee-roll/" &gt;Score a Yahtzee roll&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;An inline module reads a roll and returns its score. &lt;strong&gt;Milestone:&lt;/strong&gt; an application built on your own model.&lt;/td&gt;
&lt;td&gt;About 20 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;When you finish, the &lt;a href="https://docs.viam.com/tutorials/dice-vision/wrap-up/" &gt;wrap-up&lt;/a&gt; suggests where to go next.&lt;/p&gt;</description></item></channel></rss>