Introduction
Video inpainting is a critical task in video editing and restoration, aimed at filling missing or corrupted regions in a video sequence. The primary challenge lies in maintaining temporal coherence—ensuring that the synthesized content remains consistent across frames without flickering or artifacts. While flow-guided methods have emerged as a leading approach by leveraging optical flow to borrow pixels from adjacent frames, traditional implementations often rely on fragmented, multi-stage pipelines. These pipelines typically involve independent steps for flow completion, pixel propagation, and content hallucination, which prevents joint optimization and leads to significant computational overhead.
The E²FGVI Framework
To address these limitations, researchers have introduced E²FGVI (End-to-End Flow-Guided Video Inpainting), the first framework to unify the flow-guided inpainting process into a single, differentiable neural network. By enabling end-to-end training, the model ensures that each component is optimized to support the final inpainting quality.
1. Flow Completion Module
Unlike traditional methods that use complex, multi-step algorithms to estimate motion within "holes," E²FGVI employs a lightweight network. This module predicts bidirectional optical flow for masked regions in a single feed-forward pass, providing the necessary motion cues for subsequent stages.
2. Feature Propagation Module
A significant innovation in E²FGVI is the shift from pixel-space to feature-space propagation. Traditional methods warp raw pixels, which is highly sensitive to even minor errors in flow estimation. E²FGVI instead propagates high-dimensional features using modulated deformable convolutions (DCN). This approach allows the model to adaptively sample from the surrounding area, making it significantly more robust to inaccuracies in the predicted flow.
3. Content Hallucination with Temporal Focal Transformers
For regions where missing content cannot be retrieved from other frames (e.g., newly revealed backgrounds), the model must "hallucinate" new pixels. E²FGVI utilizes a Temporal Focal Transformer to achieve this. Standard Transformers suffer from quadratic computational complexity, which is prohibitive for high-resolution video. The Focal Transformer mitigates this by performing fine-grained attention in local windows and coarse-grained attention globally, capturing both intricate textures and broad context efficiently.
Experimental Setup and Results
The framework was evaluated on two benchmark datasets: YouTube-VOS and DAVIS. The researchers tested the model using both stationary masks and object-like masks to simulate real-world scenarios such as object removal.
Performance and Efficiency
E²FGVI achieved state-of-the-art (SOTA) results across multiple metrics, including PSNR (Peak Signal-to-Noise Ratio), SSIM (Structural Similarity), and $E_{warp}$ (temporal consistency). Notably, the model outperformed previous leading methods like FGVC and FuseFormer.
Beyond accuracy, E²FGVI offers a dramatic improvement in inference speed. On a Titan Xp GPU, the model processes video at approximately 0.12 seconds per frame. This represents a 15x speedup over traditional flow-based methods like FGVC, which can take upwards of 2 seconds per frame. Furthermore, the model maintains lower computational complexity (FLOPs), making it highly suitable for practical deployment in video editing software.
Conclusion
The E²FGVI framework demonstrates that joint optimization of flow completion and feature propagation is superior to disjointed, hand-crafted pipelines. By moving propagation into the feature space and utilizing efficient Transformer architectures, the model achieves a rare balance of high visual quality and high-speed performance. While challenges remain in handling extremely large motions or massive occlusions, E²FGVI represents a significant step toward real-time, high-quality video restoration.
Summary updated