Views
No views yet
pip3 install git+https://github.com/msu-video-group/memfof1import torch
2from memfof import MEMFOF
3
4device = "cuda" if torch.cuda.is_available() else "cpu"
5model = MEMFOF.from_pretrained("egorchistov/optical-flow-MEMFOF-Tartan").eval().to(device)
6
7with torch.inference_mode():
8 # [B=1, T=3, C=3, H=1080, W=1920]
9 example_input = torch.randint(0, 256, [1, 3, 3, 1080, 1920], device=device)
10 # [B=1, C=2, H=1080, W=1920]
11 backward_flow, forward_flow = model(example_input)["flow"][-1].unbind(dim=1)@article{bargatin2025memfof,
title={MEMFOF: High-Resolution Training for Memory-Efficient Multi-Frame Optical Flow Estimation},
author={Bargatin, Vladislav and Chistov, Egor and Yakovenko, Alexander and Vatolin, Dmitriy},
journal={arXiv preprint arXiv:2506.23151},
year={2025}
}