MagicMotion: Controllable Video Generation with Dense-to-Sparse Trajectory Guidance
Quanhao Li, Zhen Xing, Rui Wang, Hui Zhang, Qi Dai, Zuxuan Wu
TL;DR
MagicMotion introduces a trajectory-controlled image-to-video framework that supports dense (masks) to sparse (boxes, sparse boxes) trajectory signals via a Trajectory ControlNet embedded in a diffusion-transformer backbone. It implements a three-stage progressive training and a Latent Segmentation Loss to preserve fine-grained object shapes under sparse cues, and pairs this with MagicData, a large annotated 23K-video dataset, and MagicBench, a 600-video benchmark across varying object counts. The approach achieves superior video quality and trajectory adherence compared with prior methods, validated on MagicBench and DAVIS, with ablations confirming the value of the dataset, progressive training, and latent segmentation losses. These contributions provide a public dataset and benchmark for trajectory-controlled video generation and demonstrate practical improvements in multi-object, long-sequence video synthesis.
Abstract
Recent advances in video generation have led to remarkable improvements in visual quality and temporal coherence. Upon this, trajectory-controllable video generation has emerged to enable precise object motion control through explicitly defined spatial paths. However, existing methods struggle with complex object movements and multi-object motion control, resulting in imprecise trajectory adherence, poor object consistency, and compromised visual quality. Furthermore, these methods only support trajectory control in a single format, limiting their applicability in diverse scenarios. Additionally, there is no publicly available dataset or benchmark specifically tailored for trajectory-controllable video generation, hindering robust training and systematic evaluation. To address these challenges, we introduce MagicMotion, a novel image-to-video generation framework that enables trajectory control through three levels of conditions from dense to sparse: masks, bounding boxes, and sparse boxes. Given an input image and trajectories, MagicMotion seamlessly animates objects along defined trajectories while maintaining object consistency and visual quality. Furthermore, we present MagicData, a large-scale trajectory-controlled video dataset, along with an automated pipeline for annotation and filtering. We also introduce MagicBench, a comprehensive benchmark that assesses both video quality and trajectory control accuracy across different numbers of objects. Extensive experiments demonstrate that MagicMotion outperforms previous methods across various metrics. Our project page are publicly available at https://quanhaol.github.io/magicmotion-site.
