Skip to content

ONNX PoC: Integrate Basic Inference Block for Signal Classification and Peak Detection #629

@RalphSteinhagen

Description

@RalphSteinhagen

ONNX PoC:
Minimal Inference Block for Time-Series Classification (e.g. Peak Detection, Modulation Labelling)

This task explores the integration of ONNX Runtime into GNU Radio 4.0 by implementing a minimal inference block capable of applying pretrained models to real-time or buffered time-series input.

Scope

  • Create a basic ONNX inference block that accepts 1D float input vectors (or std::complex<float> magnitudes).
  • Load and evaluate a fixed ONNX model at runtime (e.g. MLP or CNN).
  • Apply this to minimal signal processing MVPs such as:
    • Multi-peak detection in noisy FFT spectra
    • Modulation classification
    • Anomaly detection / signal presence
  • Use ONNX Runtime with CPU backend only (no GPU offload or EP integration).
  • Accept static shape models (initially), with input validation logic to match.
  • Optional: visualise output via debug log or TagEmitter.

Design Notes

  • Avoid complex tokenisation or postprocessing — focus on direct tensor-in, tensor-out logic.
  • Reuse existing GR4 block model infrastructure.
  • Support importing .onnx model path as a parameter.
  • Add a onnx::Block namespace for future extension (e.g. quantised models, streaming RNNs).
  • Potential model sources:
    • [Whisper-tiny] (as a stretch goal or toy speech demo)
    • [Coqui-TTS] (for future inverse/response model)
    • Small 1D CNN/MLP trained in scikit-learn, PyTorch, or Keras and exported to ONNX.

Rationale

This PoC is meant to establish a minimal, testable bridge between GNU Radio and ONNX Runtime, enabling future DSP+ML hybrid pipelines. Rather than integrating large and complex models up front, the focus is on:

  • Simplicity of integration
  • Practical MVPs in the RF/timeseries domain
  • Documenting and resolving typical integration pitfalls (e.g. shape inference, memory reuse, ONNX session lifecycle)

Large models such as Whisper or TTS are not the primary goal here — they serve as long-term examples, not initial targets.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status

🔖 Selected (6)

Relationships

None yet

Development

No branches or pull requests

Issue actions