Skip to main content
Version: v1.9

Pipeline Builder API

Beta

The Pipeline Builder is in beta: its concepts are in place, and some models still have room to improve in performance. See Pipeline Builder for what beta means for your project.

The Pipeline Builder API is the Pythonic interface for building ML inference pipelines on the Axelera Metis AIPU. It builds a pipeline from composable Python operators, in place of a YAML pipeline configuration.

The pages below are generated from the source docstrings.

Note:

The Operator classes each have a snake_case alias. e.g.:

  • op.Seq can also be used as op.seq
  • op.CenterCrop can also be used as op.center_crop
  • etc.

Getting started​

Operator Reference​

  • 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 (DetectedObject, PoseObject, etc.)
  • 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 Pipelines​

  • Sources: video, camera and image input (cv.create_source, VideoSource, Image)
  • Scheduler: device selection and execution behind pipeline.stream and pipeline.batch

Measuring​

  • Benchmark: latency, throughput and device throughput (bench.benchmark_pipeline, behind a recipe's --benchmark)
  • Profiler: per-operator and per-stage timing behind that report (OperatorProfiler, ResourceMonitor)
  • Profiling: how to read the report those fields produce

Type Reference​

  • Types: data types such as BBox, DetectedObject, PoseObject, Keypoint, SegmentedObject, TrackedObject, Classification