Table of Contents

Class VLMResultGeneratedEventArgs

Namespace
VisioForge.Core.Types.Events
Assembly
VisioForge.Core.dll

Provides data for the event raised when the Florence-2 VLM block finishes an inference on a frame.

public class VLMResultGeneratedEventArgs : EventArgs

Inheritance

Inherited Members

Remarks

Raised once per processed frame (the block throttles inference by VisioForge.Core.Types.X.AI.VLMSettings.ProcessingInterval). The event is raised on the block's background worker thread, so handlers must be thread-safe and marshal to the UI thread when needed. VisioForge.Core.Types.Events.VLMResultGeneratedEventArgs.Regions is empty for the caption-only tasks; the grounding tasks populate it and usually leave VisioForge.Core.Types.Events.VLMResultGeneratedEventArgs.Text carrying the raw model output.

Constructors

VLMResultGeneratedEventArgs(VLMTask, string, VLMRegion[], TimeSpan, float)

Initializes a new instance of the VisioForge.Core.Types.Events.VLMResultGeneratedEventArgs class.

public VLMResultGeneratedEventArgs(VLMTask task, string text, VLMRegion[] regions, TimeSpan timestamp, float inferenceTimeMs)

Parameters

task VLMTask

The task that produced the result.

text string

The generated text.

regions VLMRegion[]

The grounded regions (may be empty).

timestamp TimeSpan

The source-frame timestamp.

inferenceTimeMs float

The inference wall-clock time in milliseconds.

Properties

InferenceTimeMs

Gets the wall-clock time, in milliseconds, the inference took.

public float InferenceTimeMs { get; }

Property Value

float

Regions

Gets the grounded regions. Empty for caption-only tasks.

public VLMRegion[] Regions { get; }

Property Value

VLMRegion[]

Task

Gets the task that produced this result.

public VLMTask Task { get; }

Property Value

VLMTask

Text

Gets the generated text: the caption for caption tasks, the recognized string for OCR, or the raw grounded output for detection tasks.

public string Text { get; }

Property Value

string

Timestamp

Gets the timestamp of the source frame this result belongs to.

public TimeSpan Timestamp { get; }

Property Value

TimeSpan