SplatFlow: Learning Multi-frame Optical Flow via Splatting
May 20, 2025 ยท View on GitHub
SplatFlow: Learning Multi-frame Optical Flow via Splatting
This repository contains the source code for our paper:
- SplatFlow: Learning Multi-frame Optical Flow via Splatting (IJCV 2024) | Paper
- We propose a novel MOFE framework SplatFlow designed explicitly for the single-resolution iterative two-frame backbones.
- Compared with the original backbone, SplatFlow has significantly higher estimation accuracy, especially in occluded regions, while maintaining a high inference speed.
- At the time of submission, our SplatFlow achieved state-of-the-art results on both the Sintel and KITTI2015 benchmarks, especially with surprisingly significant 19.4% error reductions compared to the previous best result submitted on the Sintel benchmark.
Updates
- [2024.04.24] ๐ฃ The code of SplatFlow is now available!
- [2024.01.02] ๐ฃ The paper of SplatFlow is accepted by IJCV 2024!
Environment
Our code has been successfully tested in the following environments:
- NVIDIA 3090 GPU
- CUDA 11.1
- Python 3.8
- PyTorch 1.8.2
conda create -n splatflow python=3.8
conda activate splatflow
pip install torch==1.8.2 torchvision==0.9.2 --extra-index-url https://download.pytorch.org/whl/lts/1.8/cu111
pip install einops==0.4.1
pip install cupy-cuda111
pip install pillow==9.5.0
pip install opencv-python==4.1.2.30
Trained Weights
Download the weights below and put them in the exp/0-pretrain path.
| Model | Training process | Weights | Comments |
|---|---|---|---|
| SplatFlow | K-finetune | splatflow_kitti_50k.pth Huggingface & BaiduNetdisk | Best performance on KITTI |
Demo
- Quick start.
bash script/demo.sh
Datasets
To train / test SplatFlow, you will need to download the required datasets and update data_root in data/dataset.py.
data_root/
โ
โโ FlyingThings3D/
โ โโ frames_cleanpass/
โ โโ frames_finalpass/
โ โโ optical_flow/
โ
โโ Sintel/
โ โโ training/
โ โโ test/
โ
โโ KITTI/
โ โโ training/
โ โโ testing/
โ
โโ HD1k/
โ โโ hd1k_input/
โ โโ hd1k_flow_gt/
โ
โโ demo/
โโ image/
โโ pred/
Training
-
Train SplatFlow under the C+T training process.
bash script/train_things.sh -
Train SplatFlow under the S-finetune training process.
bash script/train_sintel.sh -
Train SplatFlow under the K-finetune training process.
bash script/train_kitti.sh
Testing
-
Test SplatFlow on Things.
bash script/test_things.sh -
Test SplatFlow on KITTI.
bash script/test_kitti.sh
Acknowledgments
We would like to thank RAFT, GMA and SoftSplat for publicly releasing their code and data.
Citing this Work
If you find our repository useful, please consider giving it a star โญ and citing our paper in your work:
@article{wang2024splatflow,
title={SplatFlow: Learning multi-frame optical flow via splatting},
author={Wang, Bo and Zhang, Yifan and Li, Jian and Yu, Yang and Sun, Zhenping and Liu, Li and Hu, Dewen},
journal={International Journal of Computer Vision},
volume={132},
number={8},
pages={3023--3045},
year={2024},
publisher={Springer}
}