Skip to main content
Version: v1.9

Pipeline Builder [Beta]

The Pipeline Builder is the Pythonic API for building ML inference pipelines on the Axelera Metis AIPU. Where YAML pipelines describe a fixed GStreamer pipeline in configuration, the Pipeline Builder gives you composable Python operators for custom inter-stage logic, rapid prototyping, and workflows that go beyond standard detect-and-track patterns.

Beta

The Pipeline Builder is in beta. Its concepts are in place, and many models already reach their target performance with it. Some models still have significant room to improve; that work is planned for the 2.0 release. Compared with YAML pipelines, the Pipeline Builder is more modular and more flexible, and a pipeline is easy to scale. If you already run a YAML pipeline in production, you do not need to move it.

Start here​

  • Quickstart: your first pipeline in under a minute
  • Model Compilation: compile your model to .axm (Ultralytics, ONNX, or PyTorch)
  • Model Formats: .axm and .axe, what each holds, when to use which, and the limits
  • Pipeline Overview: full reference with examples for every task type
  • Cascade Tutorial: run a second model on each detection of the first
  • Coordinate System Tutorial: where a box's coordinates live, and how a cascade composes them
  • Postamble: run the model's postamble with a built-in kernel in place of onnxruntime
  • Profiling: read a pipeline's per-operator report and find the bottleneck

API reference​

The API reference is generated from the source docstrings.

Operators​

  • Transforms: image preprocessing (resize, letterbox, normalize, color convert)
  • Image Preprocessing: geometric correction (op.perspective, op.barrel_correct)
  • Postprocess: decode raw model output, NMS, coordinate transform, filter, top-k, softmax
  • Results: convert arrays to typed objects (op.ax_detection, op.ax_pose, op.ax_segmentation, op.ax_classification, and more)
  • Inference: model loading (op.load, op.onnx_model, op.pt2_model)
  • AXE packages: load a saved .axe pipeline package (op.load_axe, AxeOperator, IncompatibleAxeError)
  • Tracker: multi-object tracking (ByteTrack, OC-SORT, SORT, TrackTrack)
  • Combinators: pipeline composition (op.seq, op.par, op.for_each, op.pack, op.unpack, op.itemgetter)

Model and device settings​

  • Postamble: name a kernel for the model's postamble, in place of the onnxruntime tail (see also the Postamble guide)
  • Device config: board settings a model needs before it runs, such as the 110m MVM limiter

Running and measuring pipelines​

  • Sources: video, camera and image input (cv.create_source)
  • Scheduler: device selection and execution behind pipeline.stream and pipeline.batch
  • Benchmark: latency, throughput and device throughput (bench.benchmark_pipeline)
  • Profiler: per-operator and per-stage timing (OperatorProfiler, ResourceMonitor)

Types​

  • Types: BBox, DetectedObject, PoseObject, Keypoint, SegmentedObject, TrackedObject, Classification, and more