SiMa NEAT is a C++20 library for building, validating, running, and debugging GStreamer pipelines with a typed, composable API.
It helps teams ship production media/ML pipelines with reproducible pipeline generation, strong diagnostics, and clean C++ integration.
NEAT is built around three core concepts:
Model: loads a compiled model archive (.tar.gz) and exposes reusableGraphfragments (preprocess,inference,postprocess, or the full model route).Graph+Run: composes typedNode,Model, and reusableGraphfragments into a deterministic pipeline, then executes it inSyncorAsyncmode via push/pull APIs.Tensor+Sample:Tensoris the typed data container (dtype/layout/shape/device/storage), whileSamplewraps tensors with stream metadata (timestamps, caps, routing info, bundles).
Typical flow:
- Build a
Modelfrom a compiled.tar.gzmodel archive. - Add model routes, reusable fragments, and optional custom nodes to a
Graph. - Use
run(...)for one-shot execution, orbuild(...)to get a reusableRunforpush()/pull().
#include <neat.h>
simaai::neat::Model model("resnet_50.tar.gz");
simaai::neat::Graph graph;
graph.add(simaai::neat::nodes::Input());
graph.add(model);
graph.add(simaai::neat::nodes::Output());
auto out = graph.run(simaai::neat::TensorList{input_tensor});For unified runtime reporting, measure an explicit workload window:
simaai::neat::RunOptions run_opt;
run_opt.enable_board_power();
auto run = graph.build(simaai::neat::TensorList{input_tensor}, run_opt);
auto scope = run.start_measurement();
run.push(simaai::neat::TensorList{input_tensor});
(void)run.pull_tensors(5000);
auto report = scope.stop();
std::cout << report.to_text();start_measurement() / MeasureReport is the single public surface for latency,
throughput, counters, plugin/edge timing, and optional board power.
For source builds, use build.sh:
./build.shCommon build modes:
./build.sh --all # library + samples + tests + docs
./build.sh --doc # docs only
./build.sh --all --clean # clean full buildBuild output is generated under build/.
This repository now includes a production-oriented Python binding layer powered by nanobind.
Key points:
- Python package source lives under
python/. - Extension module is
pyneat._pyneat_core. - High-level Python wrappers provide ergonomic APIs on top of the C++ layer.
- NumPy/PyTorch interop is supported through DLPack (
Tensor.from_numpy,Tensor.to_numpy,Tensor.from_torch,Tensor.to_torch).
Build/install from source:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install .Run Python tests:
python -m pip install -e .[dev]
pytest -qIf you are installing from release artifacts for C++ development, install the Neat .deb packages and extract prebuilt examples, tutorials from .tar.gz:
sudo apt install ./sima-neat-*.deb
mkdir -p "${HOME}/sima-neat-extras"
tar -xzf ./sima-neat-*-Linux-extras.tar.gz -C "${HOME}/sima-neat-extras"Full documentation, guides, and API references are published here.
Contributor and agent quality guidance is documented in AGENTS.md at the repository root.
From the Core checkout, ./build.sh --all --install delegates dependency
preparation to Scheduler, then builds Core against the installed Scheduler
frontend. Scheduler prepares the matching Kernels, Runner and Codecs providers.
Local source and package selections support mixed-source development; CI uses
tools/ci/acquire_scheduler.py for explicit published dependency acquisition.
See docs/develop-apps/contribute/build-test/local-dependencies.md for details.
Use ./build.sh --doc to generate documentation without runtime providers.
