Xinyao Liao1,2,
Xianfang Zeng2,
Liao Wang2,
Gang Yu2*,
Guosheng Lin1*,
Chi Zhang3
1 Nanyang Technological University
2 StepFun
3 Westlake University
🧩 Overview
Pipeline of Motion Field Agent
MotionAgent is a novel framework that enables fine-grained motion control for text-guided image-to-video generation. At its core is a motion field agent that parses motion information in text prompts and converts it into explicit object trajectories and camera extrinsics. These motion representations are analytically integrated into a unified optical flow, which conditions a diffusion-based image-to-video model to generate videos with precise and flexible motion control. An optional rethinking step further refines motion alignment by iteratively correcting the agent’s previous actions.
MotionAgent relies on external segmentation and grounding models.
Follow the steps below to install Grounded-Segment-Anything:
bash
1# Navigate to models directory2cd models
34# Clone the Grounded-Segment-Anything repository5git clone https://github.com/IDEA-Research/Grounded-Segment-Anything.git
67# Enter the cloned directory8cd Grounded-Segment-Anything
910# Install Segment Anything11python -m pip install -e segment_anything
1213# Install Grounding DINO14pip install --no-build-isolation -e GroundingDINO
🔹 4. Install Metric3D Dependencies
MotionAgent relies on an external monocular depth estimation model.
Follow the steps below to install Metric3D:
bash
1# Navigate to models directory2cd models
34# Clone the Grounded-Segment-Anything repository5git clone https://github.com/YvanYin/Metric3D.git
🧱 Download Models
To run MotionAgent, please download all pretrained and auxiliary models listed below, and organize them under the ckpts/ directory as shown in the example structure.
Download from 👉 Hugging Face (MOFA-Video-Hybrid/cmp) and save the model to models/cmp/experiments/semiauto_annot/resnet50_vip+mpii_liteflow/checkpoints.
After all downloads and installations, your ckpts folder should look like this:
If you find MotionAgent useful for your research and applications, please cite using this BibTeX:
BibTeX
1@article{liao2025motionagent,
2 title={Motionagent: Fine-grained controllable video generation via motion field agent},
3 author={Liao, Xinyao and Zeng, Xianfang and Wang, Liao and Yu, Gang and Lin, Guosheng and Zhang, Chi},
4 journal={arXiv preprint arXiv:2502.03207},
5 year={2025}
6}
🙏 Acknowledgements
We thank the following prior art for their excellent open source work: