Object Detection

Find and follow several objects (person, cup, phone and more) in the camera picture, each with a position.

AI VisionMicroPythonC++

Object Detection finds several objects at once (the COCO-SSD model) and gives each a name, a confidence and a box.

Before you start

  • Add the Object Detection 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 11 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.
  • Objects far away or partly hidden are found less reliably.
Object Detection — OMS Parts