Class VideoEmbeddingSettings
- Namespace
- VisioForge.Core.Types.X.AI
- Assembly
- VisioForge.Core.dll
Settings for the video embedding block, which encodes sampled video frames into CLIP image embeddings for
semantic search. The block runs a CLIP dual-tower model: a vision tower turns each sampled frame into an
L2-normalized embedding, and a text tower (used via EncodeText) turns a natural-language query into an
embedding in the same space so the two can be compared by cosine similarity.
public class VideoEmbeddingSettingsInheritance
Inherited Members
Remarks
Model weights are not shipped with the SDK; point VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.ImageEncoderPath and VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.TextEncoderPath at the CLIP vision and text ONNX files (with projection, so both emit the same embedding dimension), and VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.VocabFilePath / VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.MergesFilePath at the CLIP tokenizer files. When VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.Index is set, each sampled frame's embedding is added to it automatically under VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.SourceTag.
Constructors
VideoEmbeddingSettings()
Initializes a new instance of the VisioForge.Core.Types.X.AI.VideoEmbeddingSettings class.
public VideoEmbeddingSettings()VideoEmbeddingSettings(string, string, string, string)
Initializes a new instance of the VisioForge.Core.Types.X.AI.VideoEmbeddingSettings class with the CLIP model and tokenizer file paths.
public VideoEmbeddingSettings(string imageEncoderPath, string textEncoderPath, string vocabFilePath, string mergesFilePath)Parameters
imageEncoderPathstring-
Path to the CLIP vision-tower ONNX model.
textEncoderPathstring-
Path to the CLIP text-tower ONNX model.
vocabFilePathstring-
Path to the CLIP tokenizer
vocab.json. mergesFilePathstring-
Path to the CLIP tokenizer
merges.txt.
Properties
BackpressureNoDrop
Gets or sets a value indicating whether the block backpressures the pipeline instead of dropping frames
when the CLIP worker is busy. When true, each sampled frame blocks the streaming thread until the
worker is free, throttling the decoder to the encoder's throughput so every VisioForge.Core.Types.X.AI.VideoEmbeddingSettings.SampleInterval
is captured — use this for indexing a file at full decode speed with no dropped samples. When false
(the default), a sampled frame is dropped whenever the worker is still busy, which never stalls the
pipeline — required for live sources (a camera cannot be slowed down). Defaults to false.
public bool BackpressureNoDrop { get; set; }Property Value
DeviceId
Gets or sets the hardware device id for CUDA / DirectML. Defaults to 0.
public int DeviceId { get; set; }Property Value
ImageEncoderPath
Gets or sets the path to the CLIP vision-tower ONNX model (with projection to the shared embedding dimension). Required.
public string ImageEncoderPath { get; set; }Property Value
Index
Gets or sets the index that each sampled frame's embedding is added to automatically. When null,
frames are still embedded and raised via the block event, but not indexed.
public FrameEmbeddingIndex Index { get; set; }Property Value
MergesFilePath
Gets or sets the path to the CLIP tokenizer merges.txt file. Required for EncodeText queries.
public string MergesFilePath { get; set; }Property Value
Provider
Gets or sets the execution provider. Defaults to VisioForge.Core.Types.X.AI.OnnxExecutionProvider.Auto.
public OnnxExecutionProvider Provider { get; set; }Property Value
SampleInterval
Gets or sets the minimum time that must elapse between two encoded frames. A frame is embedded only when its timestamp has advanced by at least this interval since the last embedded frame. Defaults to 1 second.
public TimeSpan SampleInterval { get; set; }Property Value
SourceTag
Gets or sets the source tag associated with every frame indexed by this block (for example the file name
or camera id). May be null or empty.
public string SourceTag { get; set; }Property Value
TextEncoderPath
Gets or sets the path to the CLIP text-tower ONNX model (with projection to the shared embedding
dimension). Required for EncodeText queries.
public string TextEncoderPath { get; set; }Property Value
VocabFilePath
Gets or sets the path to the CLIP tokenizer vocab.json file. Required for EncodeText queries.
public string VocabFilePath { get; set; }