Skip to main content
QUICK REVIEW

[Paper Review] Deficiency-Aware Masked Transformer for Video Inpainting

Yongsheng Yu, Heng Fan|arXiv (Cornell University)|Jul 17, 2023
Generative Adversarial Networks and Image SynthesisComputer Science5 citations
TL;DR

This paper proposes Deficiency-Aware Masked Transformer (DMT), a dual-modality-compatible video inpainting framework that leverages a pre-trained image inpainting model (DMT$_{\text{img}}$) as a prior to enhance hallucination in deficiency cases—where masked content is absent across frames. By integrating token selection, mask activation, and a Receptive Field Contextualizer, DMT reduces computational cost, improves feature learning, and achieves state-of-the-art performance, with gains of 0.81 dB PSNR on DAVIS and 0.56 dB on YouTube-VOS.

ABSTRACT

Recent video inpainting methods have made remarkable progress by utilizing explicit guidance, such as optical flow, to propagate cross-frame pixels. However, there are cases where cross-frame recurrence of the masked video is not available, resulting in a deficiency. In such situation, instead of borrowing pixels from other frames, the focus of the model shifts towards addressing the inverse problem. In this paper, we introduce a dual-modality-compatible inpainting framework called Deficiency-aware Masked Transformer (DMT), which offers three key advantages. Firstly, we pretrain a image inpainting model DMT_img serve as a prior for distilling the video model DMT_vid, thereby benefiting the hallucination of deficiency cases. Secondly, the self-attention module selectively incorporates spatiotemporal tokens to accelerate inference and remove noise signals. Thirdly, a simple yet effective Receptive Field Contextualizer is integrated into DMT, further improving performance. Extensive experiments conducted on YouTube-VOS and DAVIS datasets demonstrate that DMT_vid significantly outperforms previous solutions. The code and video demonstrations can be found at github.com/yeates/DMT.

Motivation & Objective

  • Address the challenge of video inpainting in deficiency cases, where masked content is absent across all frames and cross-frame propagation fails.
  • Overcome the domain gap between image and video inpainting by transferring knowledge from a pre-trained image inpainting model to video generation.
  • Improve inference efficiency and robustness by selectively processing valid spatiotemporal tokens and activating invalid ones through heuristic mechanisms.
  • Enhance feature representation by expanding the receptive field using a novel Receptive Field Contextualizer (RFC) that captures high-frequency signals.
  • Enable one-shot object removal without frame-wise masks by adapting the model to text or stroke input, improving real-world applicability.

Proposed method

  • Pre-train a standalone image inpainting model (DMT$_{\text{img}}$) to serve as a prior for video inpainting, enabling better hallucination in deficiency cases.
  • Train the video model (DMT$_{\text{vid}}$) from scratch with a continual learning loss that transfers knowledge from DMT$_{\text{img}}$ while balancing plasticity and stability.
  • Introduce a Token Selection mechanism that discards spatiotemporal tokens where all internal pixels are masked, reducing noise and computational cost.
  • Propose a Mask Activation algorithm that iteratively activates invalid tokens during self-attention and convolution operations to improve feature learning.
  • Integrate a Receptive Field Contextualizer (RFC) with large kernel size (K=13) to expand the receptive field and capture high-frequency details.
  • Apply Migration Regularization (Equation 5) to transfer generative priors from the image model to the video model without requiring access to the image dataset.

Experimental results

Research questions

  • RQ1Can a pre-trained image inpainting model effectively serve as a prior to improve video inpainting in deficiency cases?
  • RQ2How can the domain gap between image and video inpainting be bridged to transfer knowledge effectively?
  • RQ3What mechanisms can reduce computational complexity and noise in video inpainting transformers while preserving performance?
  • RQ4To what extent does expanding the receptive field improve feature representation and inpainting quality?
  • RQ5Can the proposed framework generalize to one-shot object removal tasks without frame-wise mask supervision?

Key findings

  • DMT$_{\text{vid}}$ achieves a 0.81 dB PSNR gain over the previous SOTA on the DAVIS dataset and a 0.56 dB gain on YouTube-VOS, demonstrating state-of-the-art performance.
  • The Receptive Field Contextualizer (RFC) with K=13 achieves the best performance, improving PSNR by 0.48 dB over the baseline without RFC and 0.14 dB over FFC-based alternatives.
  • Omitting the Mask Activation mechanism leads to a 1.84 dB drop in PSNR, highlighting its critical role in reconstructing invalid tokens.
  • Token Selection reduces computational cost and improves inference efficiency by filtering out entirely masked tokens, with a 0.08 dB PSNR drop when removed.
  • Migration Regularization enables knowledge transfer from image to video inpainting, improving PSNR by 0.31 dB when excluded.
  • The model generalizes well to in-the-wild scenarios, including anime videos outside the training distribution, and supports one-shot object removal via text or stroke input.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.