Custom Vision

Run predictions with your own trained image model: react when a class is seen, or read the class and its confidence.

AI VisionMicroPythonC++

Custom Vision runs a classifier that you trained on your own objects (for example "Apple" and "Banana") and tells your program what the camera sees.

Before you start

  • Add the Custom Vision extension to your project. Every program starts with its enable block, which starts the camera and loads the model.
  • The camera image comes from an ESP32-CAM or from your browser webcam. The first run downloads the model (about 3 MB), so it takes a moment.
  • Detection runs in the browser while you test. Generated C++ uses the ArduinoJson library to read results.

Blocks

Drawing the blocks…

Tips

  • Use events ("when ... is detected") for things that should react to the camera and value blocks inside a loop for things you check over time.
  • Lighting matters: a bright, even light on the subject gives much steadier results.
  • Train the model with the same background and lighting you will use later.
Custom Vision — OMS Parts