Interactive Video Stylization Using Few-Shot Patch-Based Training

Ondrej Texler, David Futschik, Michal Kucera, Ondrej Jamriska, Sárka Sochorová, Menglei Chai, Sergey Tulyakov, Daniel Sýkora

Abstract

In this paper, we present a learning-based method to the keyframe-based video stylization that allows an artist to propagate the style from a few selected keyframes to the rest of the sequence. Its key advantage is that the resulting stylization is semantically meaningful, i.e., specific parts of moving objects are stylized according to the artist's intention. In contrast to previous style transfer techniques, our approach does not require any lengthy pre-training process nor a large training dataset. We demonstrate how to train an appearance translation network from scratch using only a few stylized exemplars while implicitly preserving temporal consistency. This leads to a video stylization framework that supports real-time inference, parallel processing, and random access to an arbitrary output frame. It can also merge the content from multiple keyframes without the need to perform an explicit blending operation. We demonstrate its practical utility in various interactive scenarios, where the user paints over a selected keyframe and sees her style transferred to an existing recorded sequence or a live video stream.

Introduction

Traditional video stylization techniques often struggle to balance artistic control with computational efficiency. Global style transfer methods, while fast, lack semantic control, making it difficult for artists to specify different textures for distinct objects. Conversely, sequential keyframe-based synthesis offers high control but requires processing frames in order, which is incompatible with the random-access requirements of professional video editing tools.

This paper introduces a novel learning-based method that bridges the gap between controllability and efficiency. By training a lightweight neural network on just one or two stylized keyframes, the system can propagate an artist's style across an entire video sequence in real-time.

Comparison between the original keyframe (a) and the stylized output (b).

Methodology

The core of the proposed approach is an appearance translation network based on a U-Net architecture, trained "just-in-time" for each specific video sequence.

Patch-Based Training

To prevent the network from overfitting on the limited number of keyframes, the authors employ patch-based training. Instead of full frames, the network is trained on small, randomly sampled rectangular patches. This strategy forces the model to learn local textures and structures that generalize effectively to other frames where the subject has moved, turning potential overfitting into a localized understanding of texture.

Temporal Coherency and Contextual Anchoring

To mitigate temporal flickering, the method utilizes two primary techniques:

  1. Pre-filtering: A motion-compensated bilateral filter is applied to smooth the input video.
  2. Auxiliary Input Layers: The network receives a "coordinate map" of randomly colored Gaussians that track object motion. This provides a unique identifier for different parts of homogeneous surfaces, preventing style "sliding" or visual ambiguity.

Results and Discussion

The system demonstrates significant practical utility, achieving inference speeds of approximately 17 frames per second on an Nvidia RTX 2080. Training is remarkably efficient, with recognizable structures appearing within 16 seconds and full convergence reached in about 5 minutes for standard sequences.

Detail of the stylized face (e) demonstrating the network's ability to preserve semantic features and fine artistic detail.

Qualitatively, the method outperforms previous neural techniques by preserving sharp contours and fine details without the "ghosting" artifacts typically associated with merging multiple keyframes in traditional synthesis. The ability to provide random access to any frame makes it highly suitable for integration into professional non-linear editing (NLE) environments.

Conclusion and Future Work

While the method excels in many scenarios, it faces challenges with extreme motion where unpainted areas of an object are revealed. In such cases, additional keyframes are required. Future work will focus on reducing the pre-computation overhead of motion-compensated filters to enable true live-stream stylization and exploring multi-scale training for 4K resolution support.

Summary updated

BibTeX
@article{texler2020interactive,
  author = {Ondrej Texler and David Futschik and Michal Kucera and Ondrej Jamriska and Sárka Sochorová and Menglei Chai and Sergey Tulyakov and Daniel Sýkora},
  title = {{Interactive Video Stylization Using Few-Shot Patch-Based Training}},
  journal = {ACM Trans. Graphics},
  year = {2020},
  url = {https://openreview.net/forum?id=VYesTZfntZ},
}
Figure