Abstract
Video inpainting (VI) requires maintaining temporal consistency while generating high-fidelity content for missing regions. Existing flow-based methods often suffer from accumulation of blurring artifacts due to repeated pixel warping, while end-to-end models struggle with long-term consistency and high-resolution details. We present RGVI (Reference-Guided Video Inpainting), a framework that decouples inpainting into two distinct tasks: high-fidelity pixel propagation and powerful generative hallucination. By warping optical flows instead of pixel colors and utilizing Stable Diffusion for reference generation, RGVI achieves state-of-the-art performance on high-resolution benchmarks, effectively avoiding the "blurry" artifacts common in previous methods.
Introduction
Video Inpainting (VI) involves removing objects from a video and filling the resulting voids with plausible content. This task is significantly more challenging than image inpainting because the filled content must be both visually realistic and temporally consistent. Any flicker or drift across frames is immediately noticeable to the human eye.
Current approaches generally fall into two categories:
- End-to-end models: These attempt to learn propagation and generation simultaneously but often struggle with long-term consistency or high-resolution details.
- Flow-based models: These use optical flow to "borrow" pixels from other frames. However, they suffer from re-sampling artifacts. Most current tools warp pixels frame-by-frame; by the time a pixel has been propagated through dozens of frames, it becomes a blurry mess due to repeated sub-pixel interpolation.
Furthermore, when an object is removed and the background was never visible in the original video, most models fail to "hallucinate" high-quality new content that matches the scene's texture.
Methods
RGVI addresses these challenges through a four-stage decoupled pipeline designed to preserve sharpness and leverage modern generative power.
1. Internal Pixel Propagation (One-Shot Pulling)
To avoid the blur caused by repeated color warping, RGVI warps the optical flow maps themselves. It chains these flows to create a "global correspondence map," then pulls the color from the source frame to the target frame in a single sampling step. This preserves sharp textures even over long temporal distances.
2. Reference Generation
For areas never visible in the video, the system selects a "key frame" and uses Stable Diffusion to generate high-quality content based on text prompts (e.g., "empty background"). This allows the model to hallucinate complex textures that simple propagation cannot provide.
3. Reference Propagation
The high-quality content generated by Stable Diffusion is distributed to all other frames using the same one-shot flow-warping technique described in Stage 1.
4. Per-Frame Completion
A lightweight convolutional network fills in any remaining gaps or areas where the flow was deemed unreliable by a bi-directional verification check.
Additionally, the authors introduced a "positive mask" strategy. By explicitly masking objects that occlude the target, they prevent "color bleeding," where foreground object colors accidentally leak into the inpainted background.
Datasets and Evaluation
The authors introduced HQVI (High-Quality Video Inpainting), a new benchmark featuring realistic alpha-matte compositions at 2K resolution (1200x2160). This dataset specifically tests complex hallucination and occlusion handling. Comparisons were also conducted on standard benchmarks like DAVIS 2016 and YouTube-VOS 2018.
Key Results
RGVI demonstrates significant improvements in both quantitative metrics and perceptual quality.
- Superior Quality: On the HQVI dataset, RGVI outperformed SOTA models like ProPainter and FuseFormer across PSNR, SSIM, LPIPS, and VFID metrics.
- Perceptual Accuracy: While some models achieve high PSNR by producing "safely blurry" results, RGVI’s use of Stable Diffusion led to significantly better perceptual scores (LPIPS and VFID), indicating results that look more realistic to human observers.
- Scalability: RGVI can process 2K resolution videos on a single consumer-grade GPU (TITAN RTX), whereas many competing models suffer from "Out of Memory" (OOM) errors at resolutions above 480p.
- User Preference: In a user study, participants ranked RGVI as the highest quality with a 1.59 average rank, beating ProPainter (1.90) and FuseFormer (2.52).
Conclusion and Future Work
RGVI represents a shift toward decoupling the mechanics of video motion from the aesthetics of content generation. While highly effective, the method remains dependent on the accuracy of initial optical flow estimation. Future work may involve integrating more robust generative models and automating "positive mask" generation to handle complex occlusions without manual intervention.
Summary updated