ms_raft

[ICIP 2022] Code for the paper "Multi-Scale RAFT: Combining Hierarchical Concepts for Learning-Based Optical Flow Estimation"

https://github.com/cv-stuttgart/ms_raft

Science Score: 31.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

[ICIP 2022] Code for the paper "Multi-Scale RAFT: Combining Hierarchical Concepts for Learning-Based Optical Flow Estimation"

Basic Info
  • Host: GitHub
  • Owner: cv-stuttgart
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 38.1 KB
Statistics
  • Stars: 18
  • Watchers: 2
  • Forks: 2
  • Open Issues: 0
  • Releases: 1
Created over 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

MS_RAFT

In this repository we release the code for our work:

Multi-Scale RAFT: Combining Hierarchical Concepts for Learning-Based Optical Flow Estimation
ICIP 2022
Azin Jahedi, Lukas Mehl, Marc Rivinius and Andrés Bruhn

If you find our work useful please cite via BibTeX.

🆕 Follow-Up Work

We improved the accuracy further by extending the method and applying a modified training setup. Our new approach is called MS_RAFT_plus and won the Robust Vision Challenge 2022.

The code is available on GitHub.

Requirements

The code has been tested with PyTorch 1.10.2+cu113. Install the required dependencies via pip install -r requirements.txt

Alternatively you can also manually install the following packages in your virtual environment: - torch, torchvision, and torchaudio (e.g., with --extra-index-url https://download.pytorch.org/whl/cu113 for CUDA 11.3) - matplotlib - scipy - tensorboard - opencv-python - tqdm - parse

Pre-Trained Checkpoints

You can download our pre-trained model from the releases page.

Datasets

Datasets are expected to be located under ./data in the following layout: ./data ├── fc # FlyingChairs │ └── data/... ├── fth # FlyingThings3D │ ├── frames_cleanpass/... │ ├── frames_finalpass/... │ └── optical_flow/... ├── HD1k # HD1K │ ├── hd1k_flow_gt/... │ └── hd1k_input/... ├── kitti15 # KITTI 2015 │ └── dataset │ ├── testing/... │ └── training/... ├── sintel # Sintel │ ├── test/... │ └── training/... └── viper # VIPER ├── train │ ├── flow/... └── img/... └── val ├── flow/... └── img/...

Running MS_RAFT

You can evaluate a trained model via Shell python evaluate.py --model sintel.pth --dataset sintel This needs about 12 GB of GPU VRAM on MPI Sintel images.

If your GPU has smaller capacity, please compile the CUDA correlation module (once) via: Shell cd alt_cuda_corr && python setup.py install && cd .. and then run: Shell python evaluate.py --model sintel.pth --dataset sintel --cuda_corr Using --cuda_corr, estimating the flow on MPI Sintel images needs about 4 GB of GPU VRAM.

Training MS_RAFT

You can train MSRAFT via: Shell python train.py --config config/train.json This will create a folder called checkpoints if it does not exist. It will save the logs and checkpoints under a folder with the same name as the name attribute in the config file config.json, in this case: MSRAFT_test.

Notes regarding the code: - An important feature that is added here is a more space-saving checkpointing. The checkpoints are saved permanently only at the end of each training stage: After training is completed on Chairs, Things and Sintel. There are some intermediate checkpoints that are saved every VAL_FREQ iterations, but they get over-written by the new ones not to save unnecessary files.

  • If you want to change some training parameters within a specific training stage, in checkpoint.txt in the experiment directory, you can set the attribute "phase" to the phase (stage) you want to train (1 for training on Things and 2 for Sintel), "current_steps" to 0 if you want to train that stage from the begining, "newer" to the path of the checkpoint in checkpoint.txt inside your experiment forlder. You can set "older" to null. Note that there is no need to change checkpoint.txt if you just want to train from scratch. In that case, you just start training with the proper config file like shown above.

  • Importantly, rarely the loss becomes NaN and if the network continues training it might diverge, therefore the program checks for that and exits if the loss becomes NaN. In such cases just start training again with the same config file and without changing checkpoint.txt. The porgram loads the last checkpoint automatically and resumes training from the last saved checkpoint.

License

  • Our code is licensed under the BSD 3-Clause No Military License. See LICENSE.
  • The provided checkpoint is under the CC BY-NC-SA 3.0 license.

Acknowledgement

Parts of this repository are adapted from RAFT (license). We thank the authors for their excellent work.

Owner

  • Name: Computer Vision Group
  • Login: cv-stuttgart
  • Kind: organization

Computer Vision Group at the University of Stuttgart

Citation (CITATIONS.bib)

@inproceedings{jahediMultiScaleRAFTCombining2022,
  title = {Multi-Scale {{RAFT}}: Combining Hierarchical Concepts for Learning-Based Optical Flow Estimation},
  shorttitle = {Multi-{{Scale RAFT}}},
  booktitle = {2022 {{IEEE International Conference}} on {{Image Processing}} ({{ICIP}})},
  author = {Jahedi, Azin and Mehl, Lukas and Rivinius, Marc and Bruhn, Andr{\'e}s},
  year = {2022},
  month = oct,
  pages = {1236--1240},
  publisher = {{IEEE}},
  issn = {2381-8549},
  doi = {10.1109/ICIP46576.2022.9898048},
}

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4