Table of Contents

Class OnnxInferenceEventArgs

Namespace
VisioForge.Core.ONNX
Assembly
VisioForge.Core.ONNX.dll

Provides the raw outputs produced by a generic ONNX inference run for a single video frame.

public class OnnxInferenceEventArgs : EventArgs

Inheritance

Inherited Members

Remarks

This type lives in the ONNX project (not in VisioForge.Core) so the core library stays free of any Microsoft.ML.OnnxRuntime dependency. Each entry in VisioForge.Core.ONNX.OnnxInferenceEventArgs.Outputs maps an output tensor name to its flattened (row-major) float values; the matching tensor shape is available in VisioForge.Core.ONNX.OnnxInferenceEventArgs.Shapes.

Constructors

OnnxInferenceEventArgs(IReadOnlyDictionary<string, float[]>, IReadOnlyDictionary<string, int[]>, TimeSpan)

Initializes a new instance of the VisioForge.Core.ONNX.OnnxInferenceEventArgs class.

public OnnxInferenceEventArgs(IReadOnlyDictionary<string, float[]> outputs, IReadOnlyDictionary<string, int[]> shapes, TimeSpan timestamp)

Parameters

outputs IReadOnlyDictionary<string, float[]>

The flattened raw model outputs, keyed by output name.

shapes IReadOnlyDictionary<string, int[]>

The shape of each output tensor, keyed by output name.

timestamp TimeSpan

The timestamp of the source frame.

Properties

Outputs

Gets the raw model outputs, keyed by output tensor name. Each value is the tensor flattened in row-major order; the actual dimension layout is model-specific and is described by the matching entry in VisioForge.Core.ONNX.OnnxInferenceEventArgs.Shapes.

public IReadOnlyDictionary<string, float[]> Outputs { get; }

Property Value

IReadOnlyDictionary<string, float[]>

Shapes

Gets the shape of each output tensor, keyed by output tensor name.

public IReadOnlyDictionary<string, int[]> Shapes { get; }

Property Value

IReadOnlyDictionary<string, int[]>

Timestamp

Gets the timestamp of the video frame the outputs belong to.

public TimeSpan Timestamp { get; }

Property Value

TimeSpan