VideoInpaintingBase<T>
Base Classes · AiDotNet.Video
Base class for video inpainting models that fill in missing or masked regions in video sequences.
Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoInpaintingBase<T>
Implements: IShapeContract
Known derived types: AVID<T>, E2FGVI<T>, FlowLens<T>, FuseFormer<T>, ProPainter<T>, STTN<T>
For Beginners
Video inpainting is like a smart “eraser” for video. You can mark areas you want to remove (like a watermark, a person, or damage), and the model fills those areas with realistic content that matches the surrounding video. It uses information from other frames to figure out what should be there, making the result look natural and consistent across the whole video.
How It Works
Video inpainting fills in missing, damaged, or unwanted regions in video while maintaining temporal consistency. This base class provides:
- Binary mask handling for specifying regions to inpaint
- Temporal propagation utilities for consistent fills across frames
- Completion quality metrics (PSNR, SSIM within masked regions)
Derived classes implement specific architectures like STTN, FuseFormer, ProPainter, etc.
Properties
| Property | Summary |
|---|---|
bool SupportsTemporalPropagation { get; set; } |
Gets whether this model supports temporal propagation for inpainting. |
double MaxMaskRatio { get; set; } |
Gets the maximum supported mask ratio (fraction of frame that can be masked). |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
Tensor<T> Inpaint(Tensor<T> frames, Tensor<T> masks) |
Inpaints masked regions in a video sequence. |
double ComputeMaskedPSNR(Tensor<T> inpainted, Tensor<T> groundTruth, Tensor<T> masks) |
Computes PSNR only within masked regions for inpainting quality assessment. |