We propose Through-The-Mask, a two-stage framework for Image-to-Video generation that uses mask-based motion trajectories to enhance object-specific motion accuracy and consistency, achieving state-of-the-art results, particularly in multi-object scenarios.
We consider the task of Image-to-Video (I2V) generation, which involves transforming static images into realistic video sequences based on a textual description. While recent advancements produce photorealistic outputs, they frequently struggle to create videos with accurate and consistent object motion, especially in multi-object scenarios. To address these limitations, we propose a two-stage compositional framework that decomposes I2V generation into: (i) An explicit intermediate representation generation stage, followed by (ii) A video generation stage that is conditioned on this representation. Our key innovation is the introduction of a mask-based motion trajectory as an intermediate representation, that captures both semantic object information and motion, enabling an expressive but compact representation of motion and semantics. To incorporate the learned representation in the second stage, we utilize object-level attention objectives. Specifically, we consider a spatial, per-object, masked-cross attention objective, integrating object-specific prompts into corresponding latent space regions and a masked spatio-temporal self-attention objective, ensuring frame-to-frame consistency for each object. We evaluate our method on challenging benchmarks with multi-object and high-motion scenarios and empirically demonstrate that the proposed method achieves state-of-the-art results in temporal coherence, motion realism, and text-prompt faithfulness. Additionally, we introduce a new challenging benchmark for single-object and multi-object I2V generation and demonstrate our method's superiority on this benchmark.
Overview of our I2V framework, transforming a reference image \( x^{(0)} \) and text prompt \( c \) into a coherent video sequence \( \hat{x} \). A pre-trained LLM is used to derive the motion-specific prompt \( c_{motion} \) and object-specific prompts \( c_{local} = \{c_{local}^{(1)}, \dots, c_{local}^{(L)}\} \) capturing each object's intended motion. We generate an initial segmentation mask \( s^{(0)} \) from \( x^{(0)} \) using SAM2. In Stage 1, the Image-to-Motion utilizes \( x^{(0)}, s^{(0)}, c_{motion} \) to generate mask-based motion trajectories \( \hat{s} \) that represent object-specific movement paths. In Stage 2, the Motion-to-Video takes as input \( x^{(0)}, \hat{s}, c \) as a global condition, and \( c_{local} \) through masked attention blocks, integrating the mask-based motion trajectory softly using learned attention layers. Specifically, we employ (i) masked cross-attention to integrate object-specific prompts into corresponding latent space regions, and (ii) masked self-attention to ensure each object maintains consistency across frames by restricting attention to object-defined regions.
We compare our method using a mask-based trajectory to our method using flow-based trajectory.
@misc{yariv2025throughthemaskmaskbasedmotiontrajectories, title={Through-The-Mask: Mask-based Motion Trajectories for Image-to-Video Generation}, author={Guy Yariv and Yuval Kirstain and Amit Zohar and Shelly Sheynin and Yaniv Taigman and Yossi Adi and Sagie Benaim and Adam Polyak}, year={2025}, eprint={2501.03059}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2501.03059}, }