ActAnywhere: Subject-Aware Video Background Generation

Boxiao Pan, Zhan Xu, Chun-Hao Paul Huang, Krishna Kumar Singh, Yang Zhou, Leonidas Guibas, Jimei Yang

Introduction

In the realms of filmmaking and visual effects (VFX), the process of compositing an actor into a novel environment is traditionally a high-overhead endeavor. Achieving realistic interactions between a foreground subject and its background—such as accurate shadows, reflections, and perspective shifts—often necessitates expensive virtual production stages or labor-intensive 3D scene reconstruction.

Existing generative video tools typically struggle with this task. Video editing models, like Gen1, often maintain the original spatial structure too rigidly, preventing significant scene changes. Conversely, video outpainting or generation models frequently ignore the specific motion of the foreground subject, resulting in backgrounds that appear static or physically disconnected. ActAnywhere addresses these challenges by introducing a generative diffusion model that synthesizes temporally coherent backgrounds that realistically respond to a subject’s motion and implied camera movement.

System Architecture and Methodology

ActAnywhere is built upon a Latent Diffusion Model (LDM) framework, specifically extending the AnimateDiff architecture. The core of the system is a 3D denoising U-Net designed to process multiple conditioning signals simultaneously.

The ActAnywhere architecture utilizes a 3D U-Net conditioned on foreground features, masks, and a reference background frame via a CLIP image encoder.

The model incorporates three primary conditioning mechanisms:

  1. Foreground Guidance: The system receives a sequence of foreground subject segmentations and their corresponding binary masks. These are encoded through a Variational Autoencoder (VAE) and concatenated with the noisy latents, providing the model with precise spatial and temporal information about the subject.
  2. Visual Conditioning: Rather than relying on text prompts, which can be ambiguous, ActAnywhere uses a single "condition frame" representing the target background. This image is processed by a CLIP image encoder, and the resulting features are integrated into the U-Net through cross-attention layers.
  3. Temporal Reasoning: To ensure stability and prevent flickering across frames, the model employs 1D temporal self-attention blocks. This allows the network to maintain consistency over the 16-frame sequences it generates.

During training, the authors utilized random condition dropping, enabling the use of classifier-free guidance at inference time. This technique significantly enhances the alignment between the generated background and the input conditioning signals.

Datasets and Training

The model was trained on the HiC+ dataset, a massive collection of 2.4 million videos depicting diverse human-scene interactions. This extensive training data allows the model to learn complex physical behaviors and environmental reactions implicitly. For evaluation, the researchers utilized held-out samples from HiC+ to test generalization to new humans and scenes, as well as the DAVIS dataset to assess performance on diverse subjects, including non-human entities.

Key Results and Generalization

ActAnywhere demonstrates significant qualitative improvements over baseline models. While models like Gen1 often fail to transform the background entirely, and VideoCrafter1 produces unconstrained motion, ActAnywhere generates realistic physical interactions, including shadows that track the subject and reflections on surfaces like water.

Comparison of ActAnywhere against baselines like Gen1 and VideoCrafter1. The model demonstrates superior background consistency and zero-shot generalization to non-human subjects like cars and motorcycles.

Several emergent capabilities were observed:

  • Implicit Camera Inference: The model can infer camera motion from subject movement. For instance, if a subject runs across the frame, the generated background automatically pans to match the trajectory.
  • Zero-Shot Generalization: Although trained exclusively on human subjects, the model generalizes remarkably well to animals and vehicles (e.g., drifting cars or galloping horses) without further fine-tuning.
  • Robustness to Imperfect Masks: The model is resilient to minor segmentation errors. If a mask accidentally omits a small detail, the model often reconstructs the missing part based on the global context.

Conclusion and Future Work

ActAnywhere offers a powerful tool for creative iteration, capable of generating a video sequence in approximately 8.5 seconds on an NVIDIA A100 GPU. However, limitations remain. Fundamental flaws in input segmentation can lead to visual artifacts like "ghosting." Additionally, contradictions between the condition frame and the subject's motion can occasionally result in physical inconsistencies. Future research will focus on expanding the model's capacity for long-form video generation beyond the current 16-frame limit and further scaling the training data to mitigate inherent biases.

Summary updated

BibTeX
@inproceedings{pan2024actanywhere,
  author = {Boxiao Pan and Zhan Xu and Chun-Hao Paul Huang and Krishna Kumar Singh and Yang Zhou and Leonidas Guibas and Jimei Yang},
  title = {{ActAnywhere: Subject-Aware Video Background Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ntlFREw59A},
}
Figure