DEVA<T>

Models & Types · AiDotNet.ComputerVision.Segmentation.Video

DEVA: Tracking Anything with Decoupled Video Segmentation.

Inheritance: NeuralNetworkBase<T> → SegmentationModelBase<T> → VideoSegmentationBase<T> → DEVA<T>

For Beginners

Video object segmentation and tracking. Open-world video segmentation.

Common use cases:

  • Video object segmentation and tracking
  • Open-world video segmentation
  • Video editing and compositing
  • Surveillance and activity monitoring

How It Works

Technical Details:

  • Decoupled image segmentation + temporal propagation
  • Bi-directional temporal propagation module
  • Works with any image segmentation model as front-end
  • Online processing for real-time video segmentation

Reference: Cheng et al., “Tracking Anything with Decoupled Video Segmentation”, ICCV 2023.

Example

// Create a DEVA model for decoupled video object segmentation and tracking
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.ThreeDimensional,
    taskType: NeuralNetworkTaskType.BinaryClassification,
    inputHeight: 480, inputWidth: 480, inputDepth: 3, outputSize: 1);
var model = new DEVA<double>(architecture);
// Every tunable is now set through the options object; these are the defaults:
var custom = new DEVA<double>(architecture,
    options: new DEVAOptions { NumClasses = 1, DropRate = 0, ModelSize = DEVAModelSize.Base });
            
// Or load a pre-trained ONNX model for video tracking inference
var onnxModel = new DEVA<double>(architecture, "deva.onnx");

Constructors

Constructor Summary
DEVA(NeuralNetworkArchitecture<T> architecture, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, DEVAOptions options) Initializes DEVA in native (trainable) mode.
DEVA(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, DEVAOptions options) Initializes DEVA in ONNX (inference-only) mode.

Methods

Method Summary
ModelMetadata<T> GetModelMetadata() Collects metadata describing this model’s configuration.
void AddCorrection(int objectId, Tensor<T> correctionMask)