Abstract
Video inpainting requires leveraging correlation information across as many reference frames as possible to ensure temporal consistency. While flow-based propagation methods are effective for long-term consistency, they suffer from "error accumulation," where small inaccuracies in flow estimation or lighting changes amplify across the synthesis process. We propose the Error Compensation Framework for Flow-guided Video Inpainting (ECFVI) to address these weaknesses. By integrating an RGB-aware flow completion module and a novel error compensation network that utilizes an error guidance map, our approach significantly improves visual quality and temporal stability. ECFVI achieves state-of-the-art performance while operating up to 6x faster than existing optimization-based methods.
The Challenge of Video Inpainting
Video inpainting—filling missing regions or "holes" in a video—is a complex task that demands both spatial realism and temporal consistency. Current research typically follows two paths:
- Direct Synthesis: Methods using transformers or 3D convolutions (e.g., STTN, FuseFormer) produce sharp frames but often have limited "temporal windows" (typically under 10 frames). This leads to flickering or objects inconsistently disappearing and reappearing.
- Flow-based Propagation: These methods (e.g., FGVC, DFC-Net) use optical flow to copy pixels from distant frames. While they handle long-term consistency better, they are prone to error accumulation. Misaligned flow or brightness shifts result in "ghosting" artifacts and jarring visual discontinuities.
The ECFVI Framework
The ECFVI pipeline is designed to systematically compensate for the errors inherent in flow-based propagation through three main stages:
1. RGB-Aware Flow Completion
Standard flow-based methods often inpaint optical flow maps in isolation, which can lead to structural mismatches. ECFVI introduces a Local Temporal Network (LTN) to create a rough RGB reconstruction of the hole first. This reconstruction provides necessary context for a flow estimator (based on RAFT) to produce more accurate, content-aware flow maps.
2. Pixel Propagation with Error Compensation
To mitigate misalignment and brightness issues, the authors introduce a novel Error Guidance Map. The system employs an "overfilling" strategy: it dilates the hole to include a ring of known ground-truth pixels. By propagating pixels into this larger area, the system can calculate the exact propagation error in the known ring. The Error Compensation Network (ECN) then learns to predict and subtract these errors from the actual hole region, effectively "learning" the bias of the flow estimator.
3. Final Synthesis
For regions that remain unfilled (e.g., areas occluded throughout the entire video sequence), the framework utilizes a transformer-based synthesis network (FuseFormer) to ensure a complete and visually coherent result.
Performance and Benchmarking
ECFVI was evaluated on standard benchmarks like FVI and DAVIS, as well as a new dataset introduced by the authors: YouTube-VI. This new benchmark addresses flaws in existing datasets where random masks might completely remove an object, making numerical ground-truth comparisons misleading. YouTube-VI uses masks that only partially cover objects, ensuring the ground truth remains a valid target for restoration quality.
Key results include:
- Superior Quality: ECFVI achieved the highest PSNR and SSIM scores across multiple datasets and was significantly preferred in user studies for its sharp edges and consistent brightness.
- Efficiency: By replacing heavy optimization loops with feed-forward neural networks, ECFVI processes a 50-frame video in approximately 121 seconds—a 6x speedup over the previous state-of-the-art, FGVC (~734 seconds).
Conclusion
ECFVI represents a significant step forward in video inpainting by shifting the focus from seeking "perfect" flow to actively compensating for inevitable estimation errors. By observing imperfections in real-time through overfilled regions, the framework maintains the long-term consistency of flow-based methods while achieving the efficiency and visual sharpness required for high-quality video editing.
Summary updated