Drag Anything: Motion Control for Anything using Entity Representation

TL;DR

This paper introduces DragAnything, a novel method for controllable video generation that allows users to precisely control the motion of any object by simply drawing a trajectory. It overcomes limitations of previous methods by representing objects as entities with latent diffusion features, enabling more intuitive and accurate motion control, even for complex scenes and backgrounds.

What Problem Does This Paper Address?

Controllable video generation is a rapidly advancing field, but achieving precise control over object motion remains a significant challenge. Existing methods often rely on pixel-level manipulation or simple point-based trajectories, which struggle to accurately represent and control the motion of entire objects, especially in complex scenes with multiple entities or dynamic backgrounds. This can lead to unintended distortions, incorrect motion, or failure to control the desired object. The core problem is the lack of a robust and intuitive way to specify and execute fine-grained motion control for arbitrary objects within a video generation framework.

Methods

DragAnything builds upon the Stable Video Diffusion (SVD) architecture. Its key innovation lies in its Entity Representation. Instead of relying on pixel coordinates, DragAnything extracts latent diffusion features from the first frame of a video, guided by an entity mask. These features are then used to create an "entity embedding" that represents the object.

The process involves:

  1. Diffusion Inversion: Obtaining the latent representation of the first frame.
  2. Latent Diffusion Feature Extraction: Using a denoising U-Net to extract features.
  3. Entity Embedding: Indexing these features based on the entity mask to create an embedding for each object.
  4. Entity Representation: Initializing a zero matrix and inserting the entity embeddings based on trajectory points, effectively creating a spatio-temporal representation of the entity's motion.
  5. 2D Gaussian Representation: Complementing the entity representation by using a 2D Gaussian map that assigns higher weights to pixels closer to the entity's center, further refining focus on the core object.
  6. Conditional Guidance: These entity and Gaussian representations are then fed into a ControlNet-like encoder, which conditions the denoising 3D U-Net of the SVD model to generate the video with the desired motion.

This approach allows for a more semantic understanding of objects, moving beyond simple pixel manipulation.

Datasets

The paper utilizes the VIPSeg [28] validation set for evaluation and the VIPSeg [28] training set for training. This dataset provides video segmentation masks, which are crucial for extracting entity masks and their corresponding ground truth trajectories. For evaluation, the dataset was resized to 256x256 resolution and a length of 14 frames.

Key Insights and Ideas

  • Single Pixels Aren't Enough: A single pixel or even a small region cannot adequately represent an entire object's identity and motion. Dragging a pixel might only move a small part of the object or even affect the background.
  • Entity-Level Control is Crucial: To achieve precise motion control, the system needs to understand and represent the object as a semantic entity, not just a collection of pixels.
  • Latent Diffusion Features as Entity Embeddings: Leveraging the rich latent space of diffusion models provides a powerful way to capture the essence of an object for representation and control.
  • Backgrounds Can Be Controlled Too: The entity representation approach is general enough to control the motion of background elements (like the sky) which are often difficult to handle with traditional methods.
  • Simultaneous Control: The method naturally extends to controlling multiple objects (foreground and background) simultaneously by providing multiple entity representations.

Key Results

DragAnything demonstrates state-of-the-art performance across several metrics:

  • User Study: Achieved a 26% improvement in human voting for motion control compared to the previous SOTA method, DragNUWA.
  • FID: Achieved an FID score of 33.5, significantly outperforming DragNUWA (39.8).
  • FVD: Achieved a superior FVD score of 494.8, a notable improvement of 24.5 over DragNUWA (519.3).
  • ObjMC: Achieved a new state-of-the-art ObjMC score of 305.7, an improvement of 18.9 over DragNUWA. Qualitatively, visualizations show DragAnything's ability to precisely control object motion without distortion, unlike methods that struggle with pixel-level manipulation.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while DragAnything supports basic camera motion control (zoom in/out, pan), it's not as sophisticated as dedicated camera control methods.
  • The reliance on an initial entity mask for the first frame might be a bottleneck for fully automatic, zero-shot control without any initial input.
  • Future Work:
    • The authors suggest that the entity representation could be further explored for more complex interactions and control scenarios.
  • Extending the capabilities for more advanced camera motion control is a potential avenue.
  • Further research into reducing the reliance on initial masks for even more seamless interaction could be beneficial.

Summary updated

BibTeX
@inproceedings{2024drag,
  title = {{Drag Anything: Motion Control for Anything using Entity Representation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
}
Figure