Learning to Transfer Visual Effects from Videos to Images

Christopher Thomas, Yale Song, Adriana KovashkaarXiv 2020

Introduction

Traditional image manipulation often focuses on "Artistic Style Transfer," where the aesthetic qualities of a painting—such as brushstrokes and color palettes—are applied to a photograph. While effective for static aesthetics, this approach fails to capture the dynamic behaviors of the physical world. This paper introduces a novel framework for Visual Effect Transfer, enabling the distillation of complex spatio-temporal behaviors (like melting, blooming, or rotting) from a source video and their application to a static target image.

Comparison between traditional artistic style transfer and the proposed visual effect transfer.

The Challenge of Behavioral Transfer

The authors identify a significant gap in automated image editing: the lack of tools to apply non-uniform physical transformations to arbitrary photos. Existing solutions often suffer from two main issues:

  1. Domain Specificity: Many video prediction models are trained exclusively on specific categories, such as human faces or moving vehicles, making them brittle when applied to diverse objects.
  2. Content Leakage: Standard generative models (like GANs) often accidentally transfer the identity or color of the source video subject into the target image. For example, a melting ice cube video might turn a target chocolate bar blue.

Methodology: The Pixel Transformer

To overcome these hurdles, the researchers developed a framework that treats visual effect transfer as a constrained spatio-temporal transformation problem.

1. Pixel Transformation Module

The core innovation is the Pixel Transformer. Rather than predicting new RGB values from scratch—which invites content leakage—the network predicts how to move and recombine existing pixels from the input image. By forcing the model to work only with the "DNA" of the original image, the system ensures that the identity and style of the target are perfectly preserved throughout the animation.

2. Spatio-Temporal Architecture

The model utilizes an "hourglass" convolutional Long Short-Term Memory (LSTM) network. The LSTM is essential for capturing temporal dependencies, as physical effects like melting or blooming are non-linear; they change in speed, intensity, and spatial distribution over time.

3. Optimized Loss Functions

The authors evaluated several training objectives, finding that a combination of Optical Flow and Style (OF+S) yielded the best results:

  • Optical Flow Loss: This ensures the generated motion vectors align with the physical movement seen in the source video.
  • Style Loss: Utilizing Gram matrices, this loss captures how textures evolve (e.g., a surface becoming smoother as it liquefies) without copying specific colors or shapes from the source.
  • Adversarial Losses: Discriminators are employed to ensure that both the individual frames and the overall motion sequence appear natural to the human eye.

Datasets and Evaluation

The model was primarily trained on the Timelapse Dataset, which contains videos categorized into four distinct physical transformations: baking, blooming, melting, and rotting. To test the model's versatility, the authors also used internet-scraped images of diverse objects, such as animals and human faces, to perform "atypical" transfers.

Key Results

The effectiveness of the OF+S approach was validated through both human and machine-led evaluations:

  • Perceptual Study: In a study of human preference, 44.25% of participants chose the OF+S method as the highest quality animation, significantly outperforming four other baseline methods.
  • Atypical Success: The model successfully applied effects to objects outside their natural domain, such as making a human face "melt" or causing a non-floral object to expand with the structural logic of a "blooming" flower.
  • Quantitative Accuracy: Using a "Data Utility" metric, the researchers trained a classifier on the generated videos. The classifier was able to correctly identify the intended effect (e.g., "rotting") with 43-49% accuracy on previously unseen objects, demonstrating that the model successfully captured the essence of the physical behavior.

Limitations and Future Directions

While the framework represents a leap forward in behavioral transfer, the authors note several areas for improvement. The current implementation is limited to the four categories found in the training data and operates at a relatively low resolution (64x64). Future work aims to scale the resolution and introduce greater user control, allowing editors to define specific regions or speeds for the transferred effects.

Summary updated

BibTeX
@misc{thomas2020learning,
  author = {Christopher Thomas and Yale Song and Adriana Kovashka},
  title = {{Learning to Transfer Visual Effects from Videos to Images}},
  year = {2020},
  eprint = {2012.01642},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.01642},
}
Figure