Skip to content

Commit b5de2fa

Browse files
kwagyemanclaude
andcommitted
docs/tools: add Edge Impulse and Roboflow training-service guides
New "Model training services" caption in the Tools chapter, between External libraries and Calculators. - edge-impulse.rst: single page covering the OpenMV-specific path -- capture data with the IDE, train an image classifier or FOMO model, deploy via the OpenMV Library, load through ROMFS. Leads with the Edge Impulse product-overview video (Vimeo embed); links their OpenMV board-setup and run-on-OpenMV guides. - roboflow/: a six-page walkthrough (index + create-project, upload-footage, label, train, deploy, wrap-up) built from the OpenMV+Roboflow demo video, captioned in three groups. Seven workflow screenshots pulled from the video; index leads with Roboflow's homepage hero clip. Recommends Roboflow 3.0 (YOLOv8) decoded by ml.postprocessing.ultralytics, deployed via the OpenMV 3rd-party target and loaded through ROMFS. Both pages written in the reference-tutorial voice (direct, concrete, no meta-narration or editorializing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 91bc420 commit b5de2fa

16 files changed

Lines changed: 371 additions & 0 deletions
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Edge Impulse
2+
============
3+
4+
.. raw:: html
5+
6+
<div style="position: relative; padding-bottom: 56.25%; height: 0;
7+
margin-bottom: 1.5rem; overflow: hidden; border-radius: 8px;">
8+
<iframe src="https://player.vimeo.com/video/832261155?title=0&amp;byline=0&amp;portrait=0"
9+
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;"
10+
allow="autoplay; fullscreen; picture-in-picture" allowfullscreen
11+
title="Edge Impulse Product Overview"></iframe>
12+
</div>
13+
14+
`Edge Impulse <https://edgeimpulse.com/>`__ is an end-to-end
15+
platform for building machine-learning models that run on
16+
microcontrollers: collect and label data, design and train a model
17+
in the browser, and have it optimized to fit a device measured in
18+
kilobytes. It deploys straight to OpenMV -- a few clicks turn a
19+
trained model into files ready to run on the camera. Edge Impulse's
20+
own `documentation <https://docs.edgeimpulse.com/>`__ goes deeper on
21+
every step.
22+
23+
Getting data in
24+
---------------
25+
26+
A model performs best on the kind of images it was trained on, so
27+
capture the dataset with the camera that will run it. The IDE's
28+
:doc:`dataset editor <ide/dataset-editor>` is built for exactly
29+
this -- create class folders, capture labelled images from the live
30+
frame buffer, and then upload the dataset straight into an Edge
31+
Impulse project from the Export submenu (log in to your account
32+
there first). From that point on you work in Edge Impulse Studio.
33+
34+
.. seealso::
35+
36+
Edge Impulse's own `OpenMV Cam setup guide
37+
<https://docs.edgeimpulse.com/hardware/boards/openmv-cam-h7-plus>`__
38+
for installing the tools and connecting the camera.
39+
40+
Training
41+
--------
42+
43+
Training happens entirely in the browser: design an *impulse* (the
44+
input, processing, and learning blocks), train it, and check the
45+
accuracy on the held-out test data.
46+
47+
Two model types suit the camera. An image classifier outputs a list
48+
of class scores, which you read straight off the model's output --
49+
no post-processor needed. FOMO, a fast object detector designed for
50+
microcontrollers, needs one decoding step, and the camera ships a
51+
post-processor for it (:mod:`ml.postprocessing.edgeimpulse`), so
52+
those models run with no extra code either.
53+
54+
Deploying to the camera
55+
-----------------------
56+
57+
When training finishes, open the project's **Deployment** page,
58+
pick the **OpenMV Library** target, and click *Build*. The download
59+
is a zip holding the trained model (``trained.tflite``), its labels
60+
(``labels.txt``), and an example script. The model is
61+
integer-quantized. Edge Impulse covers this and the
62+
custom-firmware alternative in its `run on OpenMV guide
63+
<https://docs.edgeimpulse.com/hardware/deployments/run-openmv>`__.
64+
65+
Add the ``.tflite`` file to the camera with the IDE's :doc:`ROMFS
66+
editor <ide/romfs>`, which converts it for the board's NPU when it
67+
has one, and load it in a script with ``ml.Model``. Models also run
68+
from the camera's flash drive -- copy the files over and point
69+
``ml.Model`` at the path -- but ROMFS is the better home: models
70+
there execute straight from flash without a RAM copy.
71+
72+
.. seealso::
73+
74+
The :doc:`machine learning chapter <../ml/index>` for running
75+
models with the :mod:`ml` module -- loading, the inference
76+
pipeline, and decoding the output.

docs/openmvcam/tutorial/tools/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ it, or help size the system around it.
2222
arduino-rpc/index.rst
2323
micropython-tools.rst
2424

25+
.. toctree::
26+
:caption: Model training services
27+
:maxdepth: 1
28+
29+
edge-impulse.rst
30+
roboflow/index.rst
31+
2532
.. toctree::
2633
:caption: Calculators
2734
:maxdepth: 1
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Creating a project
2+
==================
3+
4+
From the Roboflow workspace, **New Project** opens the create page.
5+
A project bundles a dataset, the models trained on it, and their
6+
deployment targets.
7+
8+
.. figure:: figures/create.jpg
9+
:width: 100%
10+
:alt: Roboflow's "Let's create your project" page: project name field, visibility and license options, and the project-type list with Object Detection selected
11+
12+
The create-project page, with **Object Detection**
13+
chosen as the project type.
14+
15+
Two choices matter here:
16+
17+
* **Project Name.** Use anything memorable -- this example uses
18+
``Finding raccoons``. The name becomes part of the model's
19+
identifier, which you download at the deploy step.
20+
* **Project Type.** This sets what the model predicts, so match it
21+
to what you want the camera to do. **Object Detection** -- finding
22+
objects and their positions with bounding boxes -- is the one for
23+
locating things in the frame, and it is what the camera's YOLO
24+
post-processors decode. The other types -- classification,
25+
instance segmentation, keypoint detection -- train different model
26+
heads; this example uses object detection.
27+
28+
The visibility and license options affect only whether the dataset
29+
is shared publicly on Roboflow Universe -- they have no bearing on
30+
the model that ends up on the camera. Set them as you like, then
31+
**Create Project**.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Deploying to the camera
2+
=======================
3+
4+
The trained model lives on Roboflow's servers. Getting it onto the
5+
camera takes one download, then the same steps as loading any other
6+
model.
7+
8+
Downloading the weights
9+
-----------------------
10+
11+
On the **Deployments** page, choose **Deploy to 3rd Party
12+
Platforms** and select the **OpenMV** tab. It downloads the model's
13+
weights as a single integer-quantized ``.tflite`` file, named after
14+
the project and version -- the int8 format the camera's TFLite
15+
engine runs.
16+
17+
.. figure:: figures/deploy.jpg
18+
:width: 100%
19+
:alt: Roboflow's "Deploy to 3rd Party Platforms" dialog with the OpenMV tab selected and a Download Files button
20+
21+
The OpenMV deploy target -- **Download Files** saves
22+
the camera-ready ``.tflite`` weights.
23+
24+
Loading it on the camera
25+
------------------------
26+
27+
Add the ``.tflite`` file to the camera with the IDE's :doc:`ROMFS
28+
editor <../ide/romfs>`, which converts it for the board's NPU when
29+
the board has one, then load it in a script with ``ml.Model``.
30+
Models also run from the camera's flash drive -- copy the file over
31+
and point ``ml.Model`` at the path -- but ROMFS is the better home:
32+
models there execute straight from flash without a RAM copy.
33+
34+
A detection model's raw output is a tensor of box coordinates and
35+
class scores that still needs decoding. Roboflow's YOLO-family
36+
detectors decode with the post-processors the camera ships in
37+
:mod:`ml.postprocessing.ultralytics`, so a few lines wire the model
38+
to its decoder and you have boxes and labels.
39+
40+
.. seealso::
41+
42+
The :doc:`machine learning chapter <../../ml/index>` for running
43+
models with the :mod:`ml` module -- loading, the inference
44+
pipeline, and the :doc:`walkthrough of decoding YOLO-family
45+
output <../../ml/postprocessing/yolov8-walkthrough>`.
97.3 KB
Loading
83 KB
Loading
114 KB
Loading
138 KB
Loading
125 KB
Loading
121 KB
Loading

0 commit comments

Comments
 (0)