Efstathios Karypidis1,3, Ioannis Kakogeorgiou1, Spyros Gidaris2, Nikos Komodakis1,4,5
1Archimedes/Athena RC 2valeo.ai
3National Technical University of Athens 4University of Crete 5IACM-Forth
This repository contains the official implementation of the paper: Advancing Semantic Future Prediction through Multimodal Visual Sequence Transformers
- News-ToDos
- Installation
- Dataset Preparation
- Futurist Training
- Evaluation
- Demo
- Citation
- Acknowledgements
2025-1-14: Arxiv Preprint and GitHub repository are released!
- Add new branches with code for training with vq-vae & separate tokens for each modality
The code is tested with Python 3.11 and PyTorch 2.0.1+cu121 on Ubuntu 22.04.05 LTS. Create a new conda environment:
conda create -n futurist python=3.11
conda activate futuristClone the repository and install the required packages:
pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121
git clone https://github.com/Sta8is/FUTURIST
cd FUTURIST
pip install -r requirements.txtWe use the Cityscapes dataset for our experiments, specifically the leftImg8bit_sequence_trainvaltest sequences. Segmentation maps are extracted with Segmenter and depth maps with DepthAnythingV2.
You can skip downloading leftImg8bit_sequence_trainvaltest and the preprocessing, and download the precomputed inputs from Hugging Face instead:
- Segmentation maps (ids): Sta8is/cityscapes_segmenter_ids
- Depth maps: Sta8is/cityscapes_dav2_depth
# Segmentation maps (ids, ~1.7 GB zip)
huggingface-cli download Sta8is/cityscapes_segmenter_ids leftImg8bit_sequence_segmaps_ids.zip --repo-type dataset --local-dir /path/to/cityscapes
unzip /path/to/cityscapes/leftImg8bit_sequence_segmaps_ids.zip -d /path/to/cityscapes
# Depth maps (~9.6 GB zip)
huggingface-cli download Sta8is/cityscapes_dav2_depth leftImg8bit_sequence_depthv2.zip --repo-type dataset --local-dir /path/to/cityscapes
unzip /path/to/cityscapes/leftImg8bit_sequence_depthv2.zip -d /path/to/cityscapesTo evaluate FUTURIST, gtFine also needs to be processed with cityscapesScripts. Alternatively, you can download the processed version from here. The final structure of the dataset should be as follows:
cityscapes
│
├───leftImg8bit_sequence_depthv2
│ ├───train
│ ├───val
├───leftImg8bit_sequence_segmaps_ids
│ ├───train
│ ├───val
├───gtFine
│ ├───train
│ ├───val
│ ├───test
To train Futurist with default parameters use the following command:
python train_futurist.py --num_gpus=8 --precision 16-mixed --eval_freq 10 --batch_size 2 --max_epochs 3200 --lr_base 4e-5 --patch_size 16 \
--eval_mode_during_training --evaluate --single_step_sample_train --masking "simple_replace" --seperable_attention --random_horizontal_flip \
--random_crop --use_fc_bias --data_path="/path/to/cityscapes/leftImg8bit_sequence_segmaps_ids" --modality segmaps_depth \
--sequence_length 5 --num_classes 19 --emb_dim 10,10 --accum_iter 4 --w_s 0.85 \
--dst_path "/logdir/futurist" --masking_strategy "par_shared_excl" --modal_fusion "concat" You can also download the pre-trained model from here or via CLI using
wget https://huggingface.co/Sta8is/FUTURIST/resolve/main/futurist.ckptTo evaluate Futurist trained model use the following command:
python train_futurist.py --num_gpus=4 --precision 16-mixed --eval_freq 10 --batch_size 2 --max_epochs 3200 --lr_base 4e-5 --patch_size 16 \
--eval_mode_during_training --evaluate --single_step_sample_train --masking "simple_replace" --seperable_attention --random_horizontal_flip \
--random_crop --use_fc_bias --data_path="/path/to/cityscapes/leftImg8bit_sequence_segmaps_ids" --modality segmaps_depth \
--sequence_length 5 --num_classes 19 --emb_dim 10,10 --accum_iter 4 --w_s 0.85 \
--dst_path "/logdir/futurist" --masking_strategy "par_shared_excl" --modal_fusion "concat" \
--eval_ckpt_only --ckpt "/path/to/futurist.ckpt"We provide 2 quick demos.
- Demo.
If you found Futurist useful in your research, please consider starring ⭐ us on GitHub and citing 📚 us in your research!
@InProceedings{Karypidis_2025_CVPR,
author = {Karypidis, Efstathios and Kakogeorgiou, Ioannis and Gidaris, Spyros and Komodakis, Nikos},
title = {Advancing Semantic Future Prediction through Multimodal Visual Sequence Transformers},
booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
month = {June},
year = {2025},
pages = {3793-3803}Our code is partially based on Maskgit-pytorch, DepthAnythingV2, Segmenter for their work and open-source code.
