oximedia-ml
Sovereign ML pipelines for OxiMedia — Pure-Rust ONNX inference (OxiONNX)
Status: [Stable] | Version: 0.1.6 | Updated: 2026-04-26
Part of the oximedia workspace — a comprehensive pure-Rust media processing framework.
Overview
oximedia-ml wraps the Pure-Rust OxiONNX runtime in a set of typed pipelines tailored to multimedia workloads: scene classification, shot boundary detection, aesthetic scoring, object detection, face embedding, and more as the feature-gated zoo grows.
The default build pulls in zero ONNX symbols; enable the onnx feature to opt in to inference.
Installation
[]
= { = "0.1.6", = ["scene-classifier"] }
To enable all pipelines:
= { = "0.1.6", = ["all-pipelines"] }
Quick Start
Load a Places365-compatible scene classifier, run it on a 224x224 RGB frame, and print the top-5 predictions:
#
#
Feature Matrix
Backend features control which ONNX execution providers are compiled in; pipeline features enable individual domain adapters. Everything except cuda is WASM-compatible.
| Feature | Purpose | Notes |
|---|---|---|
onnx |
Enables the real OnnxModel backed by OxiONNX. |
Required for any inference. |
cuda |
Additionally compile oxionnx-cuda for NVIDIA GPU execution. |
Native only (no WASM). |
webgpu |
Additionally compile oxionnx-gpu (wgpu backend). |
Works on native + browsers. |
directml |
Additionally compile oxionnx-directml. |
Stub outside Windows. |
serde |
Derives Serialize on pipeline info/value types. |
Opt-in; no runtime cost. |
scene-classifier |
Builds the pipelines::SceneClassifier pipeline. |
Places365-compatible. |
shot-boundary |
Builds the pipelines::ShotBoundaryDetector pipeline. |
TransNet V2-compatible. |
aesthetic-score |
Builds the pipelines::AestheticScorer pipeline. |
NIMA-compatible. |
object-detector |
Builds the pipelines::ObjectDetector pipeline. |
YOLOv8-compatible. |
face-embedder |
Builds the pipelines::FaceEmbedder pipeline. |
ArcFace-compatible. |
all-pipelines |
Shortcut enabling every pipeline above. | Implies onnx. |
Pipeline Ecosystem
All pipelines implement the TypedPipeline trait. Each is gated behind its own feature so apps only compile what they use:
| Pipeline | Feature | Input | Output | Reference model |
|---|---|---|---|---|
pipelines::SceneClassifier |
scene-classifier |
224x224 RGB frame | Vec<SceneClassification> |
Places365/ResNet |
pipelines::ShotBoundaryDetector |
shot-boundary |
48x27 RGB window | Vec<ShotBoundary> |
TransNet V2 |
pipelines::AestheticScorer |
aesthetic-score |
224x224 RGB frame | AestheticScore |
NIMA |
pipelines::ObjectDetector |
object-detector |
640x640 RGB frame | Vec<Detection> |
YOLOv8 (80 COCO) |
pipelines::FaceEmbedder |
face-embedder |
112x112 RGB face | FaceEmbedding (512-dim) |
ArcFace |
Device Selection
DeviceType::auto() probes capabilities once (memoised in an OnceLock) and returns the strongest available device (CUDA > DirectML > WebGPU > CPU):
use ;
let device = auto;
for cap in probe_all
Pass DeviceType::Cpu to force the pure-Rust path, or pick a specific GPU backend when you know the deployment target.
WebAssembly Support
| Feature set | wasm32-unknown-unknown |
|---|---|
| default (no features) | builds |
onnx |
builds |
onnx + any pipeline features |
builds |
webgpu |
builds |
directml |
builds |
cuda |
does not build |
The cuda feature is native-only due to oxicuda-driver requiring a GPU driver loader. On WASM, all inference runs the pure-Rust CPU path unless webgpu is enabled.