Beam Bots Logo

bb_estimator_object_detection

CI License: Apache 2.0 Hex version badge Hexdocs badge REUSE status Ask DeepWiki

A Beam Bots estimator that finds objects in camera frames with any object-detection model declared through bb_inference.

inference do
  model :detector do
    runtime BB.Inference.TFLite
    source "https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip"
    archive_member "detect.tflite"
    sha256 "e4b118e5e4531945de2e659742c7c590f7536f8d0ed26d135abcfe83b4779d13"
    codec {BB.Estimator.ObjectDetection.FinalDetections, mean: 127.5, std: 127.5}
  end
end

topology do
  link :head do
    sensor :camera, {BB.Camera.V4L, device: "/dev/video0"} do
      estimator :objects, {BB.Estimator.ObjectDetection, model: :detector}
    end
  end
end

The estimator names only the model. For every frame it examines it publishes a BB.Message.Vision.Detections at its own path - labelled boxes in frame pixels, highest score first, stamped with the frame's capture time - which bb_liveview draws over the camera's preview.

What's in it

Codecs for particular model families live in their own packages, such as bb_estimator_yolo.

Options

OptionDefault
modelrequiredAn object-detection model declared in inference
score_threshold0.3Minimum score to publish
nms_threshold0.45IoU above which the lower-scoring of two boxes is dropped, whatever their classes

Installation

mix igniter.install bb_estimator_object_detection