E2FGVI<T>
Models & Types · AiDotNet.Video.Inpainting
E2FGVI - End-to-End Framework for Flow-Guided Video Inpainting.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoInpaintingBase<T> → E2FGVI<T>
For Beginners
E2FGVI removes unwanted objects from videos and fills in the gaps with realistic content. It uses optical flow (motion information) to propagate known content into missing regions across frames.
Use cases:
- Remove watermarks or logos from videos
- Remove unwanted people or objects
- Repair damaged or corrupted video frames
- Video restoration and cleanup
How It Works
Technical Details:
- End-to-end trainable flow-guided inpainting
- Bidirectional flow propagation
- Transformer-based content hallucination
- Temporal consistency enforcement
Example
// Create an E2FGVI model for flow-guided video inpainting
var e2fgvi = new E2FGVI<double>();
// Or configure with custom feature dimensions
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.ThreeDimensional,
taskType: NeuralNetworkTaskType.Regression,
inputHeight: 256, inputWidth: 256, inputDepth: 3, outputSize: 2);
var model = new E2FGVI<double>(architecture, options: new E2FGVIOptions { NumFeatures = 128 });
Constructors
| Constructor | Summary |
|---|---|
E2FGVI() |
Initializes a new instance with default architecture settings. |
E2FGVI(NeuralNetworkArchitecture<T> architecture, E2FGVIOptions options) |
Properties
| Property | Summary |
|---|---|
bool SupportsTraining { get; } |
Gets whether training is supported. |
Methods
| Method | Summary |
|---|---|
List<Tensor<T>> Inpaint(List<Tensor<T>> frames, List<Tensor<T>> masks) |
|
List<Tensor<T>> RemoveObject(List<Tensor<T>> frames, List<Tensor<T>> objectMasks) |
Removes an object from video based on mask sequence. |
List<Tensor<T>> RepairVideo(List<Tensor<T>> frames, List<Tensor<T>> corruptionMasks) |
Repairs corrupted regions in video frames. |
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> ForwardForTraining(Tensor<T> input) |
Runs the mask-conditioned E2FGVI graph on the autodiff tape. |
Tensor<T> Inpaint(Tensor<T> frames, Tensor<T> masks) |