TL;DR
IM-Zero is a novel zero-shot framework for generating videos with precise control over instance motion and layout. It achieves this by first generating a coarse motion video using grounded text-to-image models and then refining it with text-to-video models for enhanced quality and consistency, outperforming existing methods in controllability and detail.
What Problem Does This Paper Address?
Generating high-quality videos that precisely follow user-defined spatial layouts and movement trajectories for specific objects (instances) has been a significant challenge. Existing methods often face a trade-off: either they require extensive training data and computational resources, or they achieve zero-shot generation (without specific training) but sacrifice video quality, motion consistency, or precise control over instance placement and movement. Specifically, methods that try to control instance motion by manipulating attention maps in diffusion models often lead to inaccurate placement and unnatural motion. IM-Zero aims to bridge this gap by offering a training-free approach that delivers both high-quality, motion-consistent videos and fine-grained control over instance behavior.
Methods
IM-Zero employs a two-stage approach:
- Motion Generation Stage: This stage focuses on creating a "coarse" motion video that aligns with user inputs.
- Keyframe Candidates Generation: It takes user-specified layouts (like bounding boxes) and trajectories as input. These are used to generate a sequence of keyframes using an "inflated" grounded text-to-image (T2I) model. This inflation involves replacing self-attention layers with cross-frame attention (CFA) to ensure consistency across keyframes.
- Coarse Motion Video Generation: From these keyframes, two types of guidance are extracted:
- Motion Guidance: Canny edge images of foreground instances are generated from the keyframes and used with ControlNet to guide the T2V model.
- Textural Guidance: The first keyframe is used as an image prompt via an IP-Adapter, and CFA is applied to the T2V model's spatial layers to ensure textural consistency.
- Video Refinement Stage: This stage enhances the quality, motion consistency, and detail richness of the coarse motion video.
- Motion Injection: A pre-trained text-to-video (T2V) model is used to denoise the coarse video latents, injecting motion priors to achieve smoother and more natural motion.
- Detail Injection: An inflated T2I model is then used to inject finer details. This involves transforming the video latents to an image latent space, denoising with the T2I model, and then transforming back to the video latent space. The final video is a fusion of the motion-injected and detail-injected latents.
This framework is designed to be zero-shot, meaning it leverages pre-trained models without requiring additional training for specific control tasks.
Datasets
The paper utilizes existing datasets for evaluation:
- DAVIS-17: A dataset for video object segmentation, used here for evaluating controllable video generation.
- GOT10k: A dataset for generic object tracking, also used for evaluating controllable video generation.
The authors also mention using data from MotionClone for motion transfer tasks.
Key Insights and Ideas
- Decoupling Layout and Motion: Instead of trying to enforce both layout and motion simultaneously through complex attention map manipulation, IM-Zero separates these concerns. It uses grounded T2I models for precise layout control and T2V models for natural motion, then refines the result.
- Leveraging Pre-trained Models in a Zero-Shot Manner: The core innovation is effectively combining and adapting powerful pre-trained T2I and T2V models without fine-tuning. This makes the approach efficient and broadly applicable.
- Two-Stage Refinement for Quality: The two-stage process (motion generation followed by refinement) is crucial. The first stage ensures alignment with user intent, while the second stage significantly boosts visual quality and temporal consistency, addressing common issues in zero-shot generation.
- Cross-Frame Attention for Consistency: Using CFA in the keyframe generation stage is a clever way to maintain visual coherence across the initial frames, preventing abrupt changes that can plague frame-by-frame generation.
- Motion Transfer Adaptability: The framework's modularity allows it to be adapted for motion transfer tasks by extracting control signals from reference videos, demonstrating its versatility.
Key Results
- State-of-the-Art Control Accuracy: IM-Zero achieves SOTA performance on DAVIS-17 and GOT10k datasets in metrics like mIoU (mean Intersection over Union) and CD (Centroid Distance), indicating superior alignment with user-specified locations and trajectories.
- Improved Video Quality and Consistency: The method significantly outperforms others in FVD (Fréchet Video Distance) and KID (Kernel Inception Distance) for video quality, and CLIPSim for frame-to-frame consistency. For instance, on DAVIS-17, IM-Zero achieved an FVD of 4070.01 and a KID of 25.75.
- Versatility: IM-Zero demonstrates capabilities beyond basic instance control, including:
- Controlling subpart motion (e.g., head turning).
- Specifying instance shapes using masks.
- Performing motion transfer from reference videos.
- High-quality text-to-video generation.
Limitations and Future Work
- Dependence on Pre-trained Models: As a zero-shot method, IM-Zero's performance is inherently limited by the quality and capabilities of the underlying pre-trained T2I and T2V models. Improvements in these base models would directly benefit IM-Zero.
- Temporal Consistency: While IM-Zero significantly improves temporal consistency, it is still inherently weaker than fully trained methods. The authors suggest that incorporating additional tuning components could further enhance this aspect.
- Future Work: The authors suggest exploring more advanced pre-trained models to further boost video quality and control. They also propose investigating methods to improve temporal consistency, potentially through autoregressive usage of the refinement stage or other tuning mechanisms.
Summary updated