VideoLISA<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.Referring
Video-LISA: Language-instructed video segmentation with reasoning.
Inheritance: NeuralNetworkBase<T> → SegmentationModelBase<T> → ReferringSegmentationBase<T> → VideoLISA<T>
For Beginners
Language-instructed video segmentation. Temporal reasoning in video segmentation.
Common use cases:
- Language-instructed video segmentation
- Temporal reasoning in video segmentation
- Referring video object segmentation
- Conversational video understanding
How It Works
Technical Details:
- Extends LISA to video with sparse token memory
- Sparse Dense Sampling for temporal video understanding
- One-Token-Seg-All: single token triggers multi-frame masks
- Handles temporal reasoning queries in video
Reference: Bai et al., “One Token to Seg Them All: Language Instructed Reasoning Segmentation in Videos”, NeurIPS 2024.
Example
// Create a Video-LISA model for language-instructed video segmentation
// Any CLIP-style ITextEncoder supplies the text embeddings, e.g. a CLIP model from VisionLanguage.Encoders.
ITextEncoder<double> textEncoder = clipModel;
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.BinaryClassification,
inputHeight: 1024, inputWidth: 1024, inputDepth: 3, outputSize: 1);
var model = new VideoLISA<double>(architecture, textEncoder);
// Every tunable is now set through the options object; these are the defaults:
var custom = new VideoLISA<double>(architecture, textEncoder,
options: new VideoLISAOptions { NumClasses = 1, DropRate = 0 });
// Or load a pre-trained ONNX model for temporal reasoning segmentation
var onnxModel = new VideoLISA<double>(architecture, "videolisa.onnx", textEncoder, options: null);
Constructors
| Constructor | Summary |
|---|---|
VideoLISA(NeuralNetworkArchitecture<T> architecture, ITextEncoder<T> textEncoder, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, VideoLISAOptions options) |
Initializes VideoLISA in native (trainable) mode. |
VideoLISA(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, ITextEncoder<T> textEncoder, VideoLISAOptions options) |
Initializes VideoLISA in ONNX (inference-only) mode. |
Properties
| Property | Summary |
|---|---|
bool SupportsConversation { get; } |
|
bool SupportsVideoInput { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
ModelMetadata<T> GetModelMetadata() |
Collects metadata describing this model’s configuration. |