MemFlow<T>
Models & Types · AiDotNet.Video.Motion
MemFlow optical flow with memory for real-time historical motion aggregation.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → OpticalFlowBase<T> → MemFlow<T>
For Beginners
MemFlow uses memory-efficient transformers for optical flow estimation. It reduces memory consumption while maintaining high accuracy through a chunked attention mechanism.
How It Works
References:
- Paper: “MemFlow: Optical Flow Estimation and Prediction with Memory” (Dong et al., CVPR 2024)
MemFlow augments flow estimation with an explicit memory module that aggregates historical motion information for improved temporal consistency.
Example
// Create a MemFlow model for memory-augmented optical flow estimation
var memFlow = new MemFlow<double>();
// Or configure with custom parameters
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.Regression,
inputHeight: 256, inputWidth: 256, inputDepth: 3, outputSize: 2);
var model = new MemFlow<double>(architecture);
Constructors
| Constructor | Summary |
|---|---|
MemFlow() |
Creates a new MemFlow model for native training and inference. |
MemFlow(NeuralNetworkArchitecture<T> architecture, MemFlowOptions options) |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> EstimateFlow(Tensor<T> frame0, Tensor<T> frame1) |