Views
No views yet
1git clone https://github.com/MECLabTUDA/SG2VID.git
2cd SG2VID
3conda env create -f environment.yaml
4conda activate sg2vid[checkpoints](./checkpoints). We also provide the processed CATARACTS, Cataract-1K, Cholec80 dataset, containing images, segmentation masks and their scene graphs. Update the paths of the dataset in [configs](./configs).Checkpoints: VAEs, Graph Encoders, Video Diffusion ModelsProcessed Dataset: Frames, Segmentation Masks, Scene Graphspython sample.py --inference_config ./configs/inference/inference_img_graph_<dataset_name>.yamlpython sample.py --inference_config ./configs/inference/inference_ximg_graph_<dataset_name>.yaml1python sg2vid/taming/main.py --base configs/vae/config_image_autoencoder_vqgan_<dataset_name>.yaml -t --gpus 0, --logdir checkpoints/<dataset_name>
2python sg2vid/taming/main.py --base configs/vae/config_segmentation_autoencoder_vqgan_<dataset_name>.yaml -t --gpus 0, --logdir checkpoints/<dataset_name>1python sg2vid/ldm/main.py --base configs/vae/config_autoencoderkl_<dataset_name>.yaml -t --gpus 0, --logdir checkpoints/<dataset_name>
2
3# Converting a CompVis VAE to Diffusers VAE Format
4# IMPORTANT: First update Diffusers to version 0.31.0, then downgrade back to 0.21.2
5python scripts/ae_compvis_to_diffuser.py \
6 --vae_pt_path /path/to/checkpoints/last.ckpt \
7 --dump_path /path/to/save/vae_vid_diffusion1python train_graph.py --name masked --config configs/graph/graph_<dataset_name>.yaml
2python train_graph.py --name segclip --config configs/graph/graph_<dataset_name>.yamlpython train.py --config configs/training/training_<cond_type>_<dataset_name>.yaml -n sg2vid_training1python -m torch.distributed.run \
2 --nproc_per_node=${GPU_PER_NODE} \
3 --master_addr=127.0.0.1 \
4 --master_port=29501 \
5 --nnodes=1 \
6 --node_rank=0 \
7 train.py \
8 --config configs/training/training_<cond_type>_<dataset_name>.yaml \
9 -n sg2vid_trainingpython train.py --config configs/training/training_unconditional_<dataset_name>.yaml -n sg2vid_training@article{sivakumar2025sg2vid,
title={SG2VID: Scene Graphs Enable Fine-Grained Control for Video Synthesis},
author={Sivakumar, Ssharvien Kumar and Frisch, Yannik and Ghazaei, Ghazal and Mukhopadhyay, Anirban},
journal={arXiv preprint arXiv:2506.03082},
year={2025}
}