ReCoVEr
ReCoVEr (TU Darmstadt, 2025): optical flow without a cost volume, so it is fast and light at high resolution; three sizes. BSD-3-Clause code and weights; some training sets are research-only.
experimental Fork of visinf/ReCoVEr@503a27e · backends: portable, kernels
- Paper Removing Cost Volumes from Optical Flow Estimators ICCV 2025 · first released 15 Oct 2025
Paper 2025 Added in 0.2.0 Evaluated with 0.2.0
Use it
pip install fastforks Lean install with only what this model needs: pip install fastforks-core
from fastforks import flow
model = flow.load("recover-cx") # kernels on a supported GPU, else portable PyTorch
result = model(frame1, frame2)
result.flow
result.backend # what ran: mode, device, dtype, kernels fastforks bench recover-cx Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.
Speed and memory
Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | not measured | – | – | – | – |
| Original fp16torch.autocast(float16) around the call; upstream ReCoVEr_CX, iters=4, test_mode | fp16 | 179 | – | 1,066 MiB/1,168 MiB | 0.9 | 0.37 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 107 | 1.7× | 733 MiB/892 MiB | 0.2 | 0.11 |
| Kernels | fp16 | 89.8 | 2.0× | 733 MiB/892 MiB | 0.5 | 0.09 |
| Portable + torch.compile | 89.9 | 2.0× | 504 MiB/572 MiB | 14 (build) | – | |
| TensorRT fp16 | fp16 | 47.5 | 3.8× | 400 MiBenginenot comparable | 42 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-14. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two
times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.
Other devices
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14 | Original | fp32 | 1244 | 5,112 MiB process | – | 1080x1920 |
| Portable | fp16 | 853 | 2,659 MiB process | matches | 1080x1920 | |
| Portable | fp32 | 1107 | 4,781 MiB process | matches | 1080x1920 | |
| Kernels | fp16 | not implemented | – | 1080x1920 | ||
CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.
Licence and weights
Commercial use allowed
- Code
- BSD-3-Clause LICENSE
- Weights
- BSD-3-Clause source
- Training data
-
- TartanAir CC-BY-4.0
- FlyingChairs (Freiburg) research-only, non-commercial
- Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa) research-only, non-commercial
- MPI Sintel optical flow noncommercial, non-commercial
- KITTI stereo / optical flow 2012 / 2015 CC-BY-NC-SA-3.0, non-commercial
- HCI HD1K optical flow benchmark not stated
Our reading of the licences, not legal advice.
Weights
recover_cx.pth 160 MB· inside a 277 MB archive· hosted on GitHubfastforks downloads and checks these files on first use (fastforks download recover-cx).
Accuracy
The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.
KITTI 2015 train
EPE / Fl-all %trained on this dataset’s public images: not zero-shot
| Run | dtype | EPE ↓ | Fl-all % ↓ | Δ EPE vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 1.044 | 2.86 | reference | 200 | 70.6 |
| Original fp16 | fp16 | 1.045 | 2.86 | −0.001 | 200 | 35.5 |
| Portable fp32 | fp32 | 1.044 | 2.86 | ±0.000 | 200 | 58.9 |
| Portable | fp16 | 1.044 | 2.86 | +0.000 | 200 | 23.1 |
| Kernels | fp16 | 1.043 | 2.85 | +0.001 | 200 | 18.9 |
Frames _10 -> _11 at full size against the flow_occ ground truth; EPE = mean of the per-pair mean end-point error, Fl-all = share of all valid pixels with an error > 3 px and > 5 % of the GT magnitude. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-14; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks e1e54078, 2026-11-14.
Closeness to the original
Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.008 and p99 <= 0.03 (absolute error of the output flow).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.0001 | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.008 | 0.00353 |
| GPU default dtypes, p99 |diff| | ≤ 0.03 | 0.01055 |
| gpu_mean_kernels | ≤ 0.01 | not recorded |
| gpu_p99_kernels | ≤ 0.06 | not recorded |
Recorded for recover-cx on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13, with these kernels: cudnn_hacc
Details
ReCoVEr (Kiefhaber, Roth & Schaub-Meyer, ICCV 2025): optical flow without a cost volume. SEA-RAFT's update block refines a flow regressed from a context encoder on both frames (6 channels, stride 8); the authors' training removes the correlation input, so no feature encoder and no correlation pyramid run at inference. 4 iterations, convex upsampling. The authors' released weights; the network is ported from visinf/ReCoVEr. Three context encoders: `recover-cx` (ConvNeXt-T stages, most accurate), `recover-rn` (ResNet34 stages), `recover-mn` (MobileNetV3-Large, fastest). Paper: CX reaches state-of-the-art accuracy at 1.2x the speed and 1/6 the memory of comparable models; MN runs Full HD at 20 FPS in 500 MB.
- Input / output
- Input: two RGB images (consecutive frames). Output: per-pixel motion from the first to the second (dx, dy in pixels).
- Input size
- any H x W >= 64, padded to a multiple of 8; tested up to 1080x1920 (733 MiB allocated)
- Options
iters=4>= 1· changes the output
- Outputs
flow- CUDA kernels
cudnn_haccconvolutions with fp16 accumulation (cuDNN)
- Apple (MPS)
- fp32, fp16
Full reference, generated from the repository
ReCoVEr (TU Darmstadt, 2025): optical flow without a cost volume, so it is fast and light at high resolution; three sizes. BSD-3-Clause code and weights; some training sets are research-only.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
recover-cx | synthetic (1080x1920) | original portable kernels portable + torch.compile TensorRT fp16 | 179 107 89.8 89.9 47.5 | 1066 / 1168 733 / 892 733 / 892 504 / 572 603 / 632 |
recover-rn | synthetic (1080x1920) | original portable kernels portable + torch.compile TensorRT fp16 | 130 64.1 51.3 48.8 28.9 | 950 / 1046 590 / 672 590 / 672 375 / 432 419 / 466 |
recover-mn | synthetic (1080x1920) | original portable kernels portable + torch.compile TensorRT fp16 | 103 45.5 41.8 32.2 21.2 | 921 / 1036 580 / 676 580 / 676 365 / 416 425 / 466 |
Details
- Original code: https://github.com/visinf/ReCoVEr at
503a27e38bad - Code licence: BSD-3-Clause (permissive); files:
LICENSE - Weights licence: BSD-3-Clause
- Licence evidence: https://github.com/visinf/ReCoVEr/blob/503a27e38bad1080bd29da91df74c5523e11f8d8/LICENSE
- Training data: TartanAir, FlyingChairs (Freiburg), Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), MPI Sintel optical flow, KITTI stereo / optical flow 2012 / 2015, HCI HD1K optical flow benchmark (TartanAir, FlyingChairs, FlyingThings3D (part of SceneFlow), then a mix of FlyingThings3D, Sintel, KITTI 2015 and HD1K (TSKH), as upstream's config/recover_*/Tartan*.json stages)
- Options:
iters= 4 (>= 1) - Kernel libraries:
cudnn_hacc - Variants:
recover-cx,recover-rn,recover-mn - Outputs: flow
- Input size: any H x W >= 64, padded to a multiple of 8
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
recover-cx1080x1920 (0.7 GiB peak allocated, 0.9 reserved);recover-rn1080x1920 (0.6 GiB peak allocated, 0.7 reserved);recover-mn1080x1920 (0.6 GiB peak allocated, 0.7 reserved) recover-cx1080x1920, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 42 s (ONNX + engine).recover-rn1080x1920, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 34 s (ONNX + engine).recover-mn1080x1920, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 57 s (ONNX + engine).recover-cxoriginal 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_CX, iters=4, test_moderecover-rnoriginal 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_RN, iters=4, test_moderecover-mnoriginal 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_MN, iters=4, test_moderecover-cxload / first call: original 3.28 s / 0.738 s, portable 0.19 s / 0.459 s (375x1242), kernels 0.47 s / 0.351 s (375x1242)recover-rnload / first call: original 2.44 s / 0.514 s, portable 0.18 s / 0.494 s (375x1242), kernels 0.6 s / 0.356 s (375x1242)recover-mnload / first call: original 2.03 s / 0.527 s, portable 0.26 s / 1.084 s (375x1242), kernels 0.48 s / 1.052 s (375x1242)- Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5
Measured
Frames _10 -> _11 at full size against the flow_occ ground truth; EPE = mean of the per-pair mean end-point error, Fl-all = share of all valid pixels with an error > 3 px and > 5 % of the GT magnitude. Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
recover-cx | KITTI 2015 train, EPE / Fl-all % | 1.044 / 2.86 | 1.045 / 2.86 | 1.044 / 2.86 | 1.044 / 2.86 | 1.043 / 2.85 | trained on this dataset's public images; not a zero-shot result |
recover-rn | KITTI 2015 train, EPE / Fl-all % | 1.292 / 4.50 | 1.292 / 4.50 | 1.292 / 4.50 | 1.293 / 4.50 | 1.292 / 4.50 | trained on this dataset's public images; not a zero-shot result |
recover-mn | KITTI 2015 train, EPE / Fl-all % | 1.676 / 7.15 | 1.675 / 7.13 | 1.680 / 7.16 | 1.679 / 7.17 | 1.681 / 7.16 | trained on this dataset's public images; not a zero-shot result |
Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks e1e54078, 2026-11-14; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6f0a70e1, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks e1e54078, 2026-11-14.
Parity
CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.008 and p99 <= 0.03 (absolute error of the output flow).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
recover-cx | 0.00353 / 0.01055 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |
recover-rn | 0.00259 / 0.01058 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |
recover-mn | 0.00762 / 0.04174 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400 |
Example output
No example rendered for this checkpoint yet.