TL;DR
This paper introduces a novel internal learning framework for video inpainting that "hallucinates" missing content by training a generative model on a single, masked video. By jointly predicting both appearance and optical flow, the method achieves high spatial-temporal consistency without requiring massive external datasets for training.
What Problem Does This Paper Address?
Video inpainting—the task of filling in missing regions or removing unwanted objects from a video—is significantly harder than image inpainting. It requires not just spatial plausibility (making a single frame look good) but also temporal coherence (ensuring the filled content moves naturally across frames).
Existing approaches generally fall into two camps:
- Patch-based methods: These rely on hand-crafted priors like patch recurrence. While effective, they often struggle with complex motions, leading to "shape distortion" where the inpainted region looks warped.
- External deep learning methods: These train large models on massive video corpora. However, the space of all possible videos is so vast that these models often fail to generalize to unique scenes not well-represented in their training data.
The authors address these gaps by extending the Deep Image Prior (DIP) concept to video. DIP suggests that the structure of a convolutional neural network (CNN) itself acts as a natural image prior. The challenge here is extending this "internal learning" (learning only from the video at hand) to maintain long-term temporal consistency.
Methods
The core of the approach is a single frame-wise generative CNN ($G_\theta$) with an Encoder-Decoder architecture.
Key technical components include:
- Joint Appearance and Flow Prediction: Unlike standard DIP, which only outputs RGB values, this model simultaneously predicts the frame ($\hat{I}_i$) and optical flow maps ($\hat{F}_{i,j}$) for neighboring frames.
- Consistency Loss ($L_c$): This is the "secret sauce." The model uses its predicted flow to warp a neighboring frame into the current frame's coordinate system. It then minimizes the difference between the warped frame and the current predicted frame within the "hole" region. This forces the network to learn a motion model that is consistent with the appearance it is generating.
- Internal Learning: The model is trained from scratch for every new video. It uses the known (unmasked) parts of the video as ground truth to learn the specific textures and motions of that scene.
- Curriculum-based Training: Instead of random frames, the model is trained on batches of consecutive frames to better propagate information across time.
Datasets
The authors evaluated their method using:
- Real-world videos: 28 videos from the DAVIS dataset (collected by Huang et al.) and 13 videos from other prior works.
- Composed Dataset: A new benchmark created by the authors to facilitate quantitative evaluation. It consists of 250 videos created by overlaying real object masks from DAVIS onto 50 high-quality background videos retrieved from Flickr. This allows for direct comparison against "ground truth" background frames.
Key Insights and Ideas
- The Network as a Prior: The paper reinforces the idea that CNN architectures naturally favor "natural" looking textures over noise. By applying this to video, they show that a 2D CNN can actually capture temporal information if the training objective is designed correctly.
- Breaking the Reflexive Cycle: Video consistency usually requires knowing pixel correspondences (flow), but you can't calculate flow in a hole until you've filled it. By jointly synthesizing both, the model bypasses this "chicken-and-egg" problem.
- Flow as Guidance: The predicted flow doesn't just ensure smoothness; it acts as a mechanism to "pull" valid pixels from distant frames into the current hole, effectively handling long-term consistency.
- Generalization vs. Overfitting: Interestingly, the authors found that as the training window (number of frames) increases, the model's ability to reconstruct known regions slightly decreases (less overfitting), but its ability to generalize and inpaint the holes improves significantly.
Key Results
The proposed method, DIP-Vid-Flow, outperformed several baselines, including frame-wise DIP and 3D-CNN versions.
- Quantitative: On the Composed dataset, the full model achieved the best scores across FID (visual plausibility), PSNR/SSIM (reconstruction accuracy), and temporal consistency metrics. For example, it reached an FID of 10.4, compared to 22.3 for frame-wise DIP.
- Qualitative: The method successfully avoided the shape distortions common in patch-based methods and the flickering/incoherence seen in frame-by-frame deep learning approaches.
As seen in Figure 1, the internal learning approach handles content unseen in multiple frames much better than frame-based baselines.
Limitations and Future Work
- Computational Cost: The primary drawback is speed. Because the model must be trained from scratch for every video, it can take hours to process a single clip.
- Large Holes/Static Scenes: The method relies on motion to propagate information. If a hole is very large and there is little camera or background motion, there isn't enough "signal" to fill the gap effectively.
- Future Directions: The authors suggest exploring more advanced architectures, such as recurrent networks (RNNs) or transformers, within the internal learning paradigm to better model complex temporal dependencies. They also propose hybrid models that combine internal learning with weights pre-trained on large external datasets.
Summary updated