Learnable Gated Temporal Shift Module for Deep Video Inpainting
Ya-Liang Chang, Zhe Yu Liu, Kuan-Ying Lee, Winston Hsu
TL;DR
This work tackles free-form video inpainting by enabling 2D CNNs to exploit temporal context through Learnable Gated Temporal Shift Module (LGTSM), which learns flexible temporal shifts and gating to handle masked regions. The approach combines a gated temporal-shift mechanism with a GAN-based loss (TSMGAN) and a multi-term objective including $L_{l_1}$, perceptual, and style losses to produce temporally coherent, high-quality video completions. Empirical results on FaceForensics and FVI show state-of-the-art performance with only 33% of the parameters and inference time of 3D convolution-based methods, and ablations demonstrate the critical roles of gating, temporal shifting, and the learnable kernels. The work advances efficient temporal modeling for video inpainting, with potential impact on video editing, restoration, and post-processing tasks where computational resources are limited.
Abstract
How to efficiently utilize temporal information to recover videos in a consistent way is the main issue for video inpainting problems. Conventional 2D CNNs have achieved good performance on image inpainting but often lead to temporally inconsistent results where frames will flicker when applied to videos (see https://www.youtube.com/watch?v=87Vh1HDBjD0&list=PLPoVtv-xp_dL5uckIzz1PKwNjg1yI0I94&index=1); 3D CNNs can capture temporal information but are computationally intensive and hard to train. In this paper, we present a novel component termed Learnable Gated Temporal Shift Module (LGTSM) for video inpainting models that could effectively tackle arbitrary video masks without additional parameters from 3D convolutions. LGTSM is designed to let 2D convolutions make use of neighboring frames more efficiently, which is crucial for video inpainting. Specifically, in each layer, LGTSM learns to shift some channels to its temporal neighbors so that 2D convolutions could be enhanced to handle temporal information. Meanwhile, a gated convolution is applied to the layer to identify the masked areas that are poisoning for conventional convolutions. On the FaceForensics and Free-form Video Inpainting (FVI) dataset, our model achieves state-of-the-art results with simply 33% of parameters and inference time.
