The official implementation of the ECCV 2024 paper:
Exploring Pre-trained Text-to-Video Diffusion Models for Referring Video Object Segmentation
Zixin Zhu, Xuelu Feng, Dongdong CHen, Junsong Yuan, Chunming Qiao, Gang Hua
In this paper, we explore the visual representations produced from a pre-trained text-to-video (T2V) diffusion model for video understanding tasks. We hypothesize that the latent representation learned from a pretrained generative T2V model encapsulates rich semantics and coherent temporal correspondences, thereby naturally facilitating video understanding. Our hypothesis is validated through the classic referring video object segmentation (R-VOS) task. We introduce a novel framework, termed ``VD-IT'', tailored with dedicatedly designed components built upon a fixed pretrained T2V model. Specifically, VD-IT uses textual information as a conditional input, ensuring semantic consistency across time for precise temporal instance matching. It further incorporates image tokens as supplementary textual inputs, enriching the feature set to generate detailed and nuanced masks.Besides, instead of using the standard Gaussian noise, we propose to predict the video-specific noise with an extra noise prediction module, which can help preserve the feature fidelity and elevates segmentation quality. Through extensive experiments, we surprisingly observe that fixed generative T2V diffusion models, unlike commonly used video backbones (e.g., Video Swin Transformer) pretrained with discriminative image/video pre-tasks, exhibit better potential to maintain semantic alignment and temporal consistency. On existing standard benchmarks, our VD-IT achieves highly competitive results, surpassing many existing state-of-the-art methods.
The main setup for R-VOS of our code follows Referformer, SgMg.
Please refer to install.md for installation.
Please refer to data.md for data preparation.
The main setup for pre-trained t2v diffusion model of our code follows Text-To-Video-Finetuning.
cd Text-To-Video-Finetuning
git lfs install
git clone https://huggingface.co/damo-vilab/text-to-video-ms-1.7b ./mymodels/model_scope_diffusers/
pip install -r requirements.txt
You can download the pretrained model or train VD-IT by yourself.
The training and evaluation scripts are included in the scripts
folder. Please run the following command:
sh ./scripts/dist_train_ytvos_vdit.sh
sh ./scripts/dist_test_ytvos_vdit.sh
- denotes that we run the official codes to get the results.
We also support evaluate on RefCOCO/+/g validation set by using the pretrained weights (num_frames=1).
RIS (referring image segmentation):
This repo is based on ReferFormer and ModelScopeT2V. Thanks for their wonderful works.
@misc{zhu2024exploring,
title={Exploring Pre-trained Text-to-Video Diffusion Models for Referring Video Object Segmentation},
author={Zixin Zhu and Xuelu Feng and Dongdong Chen and Junsong Yuan and Chunming Qiao and Gang Hua},
year={2024},
eprint={2403.12042},
archivePrefix={arXiv},
primaryClass={cs.CV}
}