Models · Optical flow

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

Checkpoint

Paper 2025 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 89.8 ms 1080x1920, fp16
vs the faster original 2.0× original fp16: 179 ms
Peak memory 733 MiB original: 1,066 MiB
Accuracy vs original fp32 +0.001 kernels EPE, KITTI 2015 train (1.044 original)

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.

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32not measured ––––
Original fp16torch.autocast(float16) around the call; upstream ReCoVEr_CX, iters=4, test_modefp16 179–1,066 MiB/1,168 MiB0.90.37
Portable fp32fp32not measured ––––
Portablefp16 1071.7×733 MiB/892 MiB0.20.11
Kernelsfp16 89.82.0×733 MiB/892 MiB0.50.09
Portable + torch.compile 89.92.0×504 MiB/572 MiB14 (build)–
TensorRT fp16fp16 47.53.8×400 MiBenginenot comparable42 (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

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp321244 5,112 MiB process–1080x1920
Portablefp16853 2,659 MiB processmatches1080x1920
Portablefp321107 4,781 MiB processmatches1080x1920
Kernelsfp16not 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

Our reading of the licences, not legal advice.

Weights

recover_cx.pth 160 MB· inside a 277 MB archive· hosted on GitHub

fastforks 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

RundtypeEPE ↓Fl-all % ↓Δ EPE vs fp32 originalpairsms / pair
Original fp32fp321.0442.86 reference 200 70.6
Original fp16fp161.0452.86 −0.001 200 35.5
Portable fp32fp321.0442.86 ±0.000 200 58.9
Portablefp161.0442.86 +0.000 200 23.1
Kernelsfp161.0432.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).

CheckToleranceMeasured
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.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
recover-cxsynthetic (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-rnsynthetic (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-mnsynthetic (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-cx 1080x1920 (0.7 GiB peak allocated, 0.9 reserved); recover-rn 1080x1920 (0.6 GiB peak allocated, 0.7 reserved); recover-mn 1080x1920 (0.6 GiB peak allocated, 0.7 reserved)
  • recover-cx 1080x1920, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 42 s (ONNX + engine).
  • recover-rn 1080x1920, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 34 s (ONNX + engine).
  • recover-mn 1080x1920, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 57 s (ONNX + engine).
  • recover-cx original 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_CX, iters=4, test_mode
  • recover-rn original 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_RN, iters=4, test_mode
  • recover-mn original 1080x1920: torch.autocast(float16) around the call; upstream ReCoVEr_MN, iters=4, test_mode
  • recover-cx load / 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-rn load / 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-mn load / 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.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
recover-cxKITTI 2015 train, EPE / Fl-all %1.044 / 2.861.045 / 2.861.044 / 2.861.044 / 2.861.043 / 2.85trained on this dataset's public images; not a zero-shot result
recover-rnKITTI 2015 train, EPE / Fl-all %1.292 / 4.501.292 / 4.501.292 / 4.501.293 / 4.501.292 / 4.50trained on this dataset's public images; not a zero-shot result
recover-mnKITTI 2015 train, EPE / Fl-all %1.676 / 7.151.675 / 7.131.680 / 7.161.679 / 7.171.681 / 7.16trained 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).

variantkernels error vs original, mean / p99GPU, torchkernels used
recover-cx0.00353 / 0.01055RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400
recover-rn0.00259 / 0.01058RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400
recover-mn0.00762 / 0.04174RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Example output

No example rendered for this checkpoint yet.