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 : EventArgsInheritance
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
taskVLMTask-
The task that produced the result.
textstring-
The generated text.
regionsVLMRegion[]-
The grounded regions (may be empty).
timestampTimeSpan-
The source-frame timestamp.
inferenceTimeMsfloat-
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
Regions
Gets the grounded regions. Empty for caption-only tasks.
public VLMRegion[] Regions { get; }Property Value
Task
Gets the task that produced this result.
public VLMTask Task { get; }Property Value
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
Timestamp
Gets the timestamp of the source frame this result belongs to.
public TimeSpan Timestamp { get; }