SuperAPI AI Directory

ActAnywhere - Adobe's AI Video Background Generation Model

Author: AI小集 · Original source: AI工具集

What is ActAnywhere

ActAnywhere is a video generation model jointly developed by researchers from Stanford University and Adobe Research, aimed at solving the problem of video background generation, especially in scenarios where a foreground subject (such as a person) needs to be seamlessly combined with a new background. This model is suitable for the fields of film production and visual effects (VFX), and it can automatically create video backgrounds that coordinate with the movement of the foreground subject, thereby saving a significant amount of time and effort in the traditional manual compositing process.

ActAnywhere

Official project homepage:https://actanywhere.github.io/

Arxiv paper address:https://arxiv.org/abs/2401.10822

Features of ActAnywhere

  • Foreground subject and background fusion: ActAnywhere can automatically generate a matching background based on the movement and appearance of the foreground subject, making the interaction between the subject and the background look natural and coherent.
  • Conditional frame-driven background generation: Users can provide an image describing a new scene (conditional frame), and ActAnywhere will generate the video background based on this conditional frame. This allows users to specify specific background elements, such as specific buildings, natural landscapes, or indoor environments.
  • Temporal consistency: By using a temporal self-attention mechanism, ActAnywhere ensures that the generated video remains consistent over the temporal sequence, including camera movement, lighting changes, and shadow effects.
  • Self-supervised learning: ActAnywhere is trained in a self-supervised manner on a large-scale human-scene interaction video dataset, which means it can learn how to generate video backgrounds without manual annotations.
  • Zero-shot learning: ActAnywhere can generate for new, unseen data (such as non-human subjects) without additional training, indicating that the model can learn general background generation strategies from the training data.

How ActAnywhere works

How ActAnywhere works

Through the following steps and components, ActAnywhere can generate video backgrounds with a high degree of realism and temporal coherence:

  1. Data preparation:
    • Use a foreground subject segmentation algorithm (such as Mask R-CNN) to obtain the foreground subject segmentation sequence (S) and the corresponding mask (M) from the input video.
    • Introduce a conditional frame (c), which is an image describing the desired generated background, and can be a background image or a composite frame containing both foreground and background.
  2. Feature encoding:
    • Use a pretrained variational autoencoder (VAE) to encode the foreground subject segmentation sequence into latent features (ˆS).
    • Downsample the foreground mask sequence and align it with the latent features to match the feature dimensions.
  3. Diffusion process:
    • During training, use the VAE encoder to encode the original video frames into a latent representation (Z), and then gradually add Gaussian noise in the forward diffusion process.
    • At test time, the latent representation (Z0) is initialized as Gaussian noise and progressively denoised through the reverse diffusion process to generate the final video frames.
  4. Temporal attention mechanism:
    • Insert a series of motion modules into the denoising U-Net, which contain feature projection layers and 1D temporal self-attention blocks to achieve temporal coherence.
    • The features of the conditional frame (Fc) are extracted through the CLIP image encoder and injected into the cross-attention layers of the U-Net to ensure that the generated video background is consistent with the conditional frame.
  5. Training objective:
    • Train with a simplified diffusion objective, namely predicting the added noise. The model is trained by minimizing the difference between the predicted noise and the true noise.
  6. Data Augmentation and Processing:
    • During training, to handle imperfect segmentation masks, random rectangular cropping and image erosion operations are applied.
    • At test time, classifier-free guidance is achieved by randomly dropping the segmentation, mask, or conditioning frames.
  7. Model Training:
    • Training is performed on a large-scale human-scene interaction video dataset (HiC+), which contains 2.4 million videos.
    • Using the AdamW optimizer with a fixed learning rate of 3e-5, the shared VAE and CLIP encoders are frozen, and the U-Net is fine-tuned.
  8. Generation Process:
    • At test time, the foreground subject sequence and conditioning frames are input into the trained model, and the model generates a video background coordinated with the foreground subject's motion.

Application Scenarios of ActAnywhere

  • Video Background Replacement: ActAnywhere can place the foreground subject in a video into an entirely new background, which is very useful for fields such as film production, advertising, virtual reality (VR), and augmented reality (AR). For example, actors can be placed in fictional scenes, or specific environments can be simulated without actually filming them.
  • Visual Effects Enhancement: In visual effects (VFX) production, ActAnywhere can be used to generate complex background effects, such as dynamic weather, changes in light and shadow, crowd interactions, etc., without actually filming these elements.
  • Creative Content Production: Artists and content creators can use ActAnywhere to quickly try out and realize their creative ideas, for example, placing characters in different historical periods or futuristic worlds, or interacting with fictional creatures.
  • Education and Training: In the field of education, ActAnywhere can be used to create simulated scenes to help students better understand complex concepts or historical events, or for safety training to simulate emergency situations.
  • Games and Entertainment: Game developers can use ActAnywhere to generate dynamic backgrounds, providing players with a richer and more realistic gaming experience. At the same time, it can also be used for the production of movie trailers, music videos, and other entertainment content.