Beam Bots Logo

bb_estimator_yolo

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

bb_inference model codecs for YOLO-family object detectors, for use with bb_estimator_object_detection.

inference do
  model :detector do
    runtime BB.Inference.OpenCV
    source "https://github.com/Megvii-BaseDetection/YOLOX/releases/download/0.1.1rc0/yolox_nano.onnx"
    sha256 "c789161ed43c8269fcd4e67c67eeeb4e80c622da2eb296a20bc6007bd18a0b7d"
    codec BB.Estimator.Yolo.YoloX
  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

Codecs

Codec For Checked against
BB.Estimator.Yolo.YoloX YOLOX exported without its decode step Megvii's yolox_nano.onnx on OpenCV; PINTO's float32 TFLite YOLOX-nano on TFLite

A codec is only shipped once it has been run against a real artefact and produced the right boxes.

The codec's defaults are Megvii's conventions (BGR, 0-255, letterboxed into the top left on grey 114). Other conversions of the same network differ, and say so in the model's codec options - PINTO's TFLite conversion takes RGB with ImageNet's normalisation:

codec {BB.Estimator.Yolo.YoloX,
       colour: :rgb, mean: {123.675, 116.28, 103.53}, std: {58.395, 57.12, 57.375}}

Installation

mix igniter.install bb_estimator_yolo