Flor commited on
Commit
614f7f5
Β·
verified Β·
1 Parent(s): 8bd5585

card: update from fastforks 1cbf1671

Browse files
Files changed (1) hide show
  1. README.md +116 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: "fastforks"
3
+ pipeline_tag: "image-to-image"
4
+ license: "other"
5
+ license_name: "see-model-card"
6
+ license_link: "https://github.com/mattpoggi/flowseek/blob/ba6407370bceeb96244cad4d60d37489f6eb471e/scripts/get_weights.sh"
7
+ tags:
8
+ - "flow"
9
+ - "optical-flow"
10
+ - "motion-estimation"
11
+ - "cuda"
12
+ - "pytorch"
13
+ - "fastforks"
14
+ - "fastforks-card"
15
+ ---
16
+ # FlowSeek (fastforks)
17
+
18
+ FlowSeek (Poggi & Tosi 2025), size T: SEA-RAFT (ResNet18 encoders, initial flow regression, ConvNeXt update block, 4 iterations) helped by a frozen Depth Anything V2 Small. Its features join the matching features, and its relative depth gives 8 motion bases (the flow fields that camera translations and rotations would cause), which a third encoder turns into extra context. Each image is resized to 518 x 518 for Depth Anything, whatever the input size. The authors' released weights; the network is ported from mattpoggi/flowseek. `iters=12` is the paper's FlowSeek (S). The larger M and L sizes use Depth Anything V2 Base, whose weights are non-commercial, and are not included.
19
+
20
+ This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: <https://github.com/kleinicke/fastforks>. Kernels for the `kernels` backend: <https://huggingface.co/fastforks/kernels>. Original code: <https://github.com/mattpoggi/flowseek> at `ba6407370bce`.
21
+
22
+ Task: flow. Tier: experimental. Outputs: `flow`. Backends: `portable`.
23
+
24
+ Input: two RGB images (consecutive frames). Output: per-pixel motion from the first to the second (dx, dy in pixels).
25
+
26
+ ## Variants
27
+
28
+ Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in [`card.toml`](https://github.com/kleinicke/fastforks/blob/main/src/fastforks/flow/models/flowseek/card.toml).
29
+
30
+ | variant | weights (author link) | SHA-256 | weights licence | commercial use |
31
+ |---|---|---|---|---|
32
+ | `flowseek-t@1` | [flowseek_T_TartanCT_TSKH.pth](https://drive.usercontent.google.com/download?id=1IQoyY5PpKSadtiGuhWwVCqvgD3y8CyFd&export=download&confirm=t) | `7913a91747a5` | Apache-2.0 AND BSD-3-Clause (assumed from code) | yes |
33
+ | `flowseek-t-things@1` | [flowseek_T_TartanCT.pth](https://drive.usercontent.google.com/download?id=1dnMzlRqX7wziynQvZjafsXjgbfibNAKG&export=download&confirm=t) | `d11f1969f933` | Apache-2.0 AND BSD-3-Clause (assumed from code) | yes |
34
+ | `flowseek-t-things-notartan@1` | [flowseek_T_CT.pth](https://drive.usercontent.google.com/download?id=1COOQFkMulzpBm4zMoWsaRGk7E3YcVr2I&export=download&confirm=t) | `d4bdd10dc5ad` | Apache-2.0 AND BSD-3-Clause (assumed from code) | yes |
35
+
36
+ ## Licence
37
+
38
+ Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0 AND BSD-3-Clause. Licence files: `LICENSE`, `LICENSE-BSD-3-Clause`.
39
+
40
+ Code licence: Apache-2.0 AND BSD-3-Clause; the authors do not state a separate weights licence.
41
+
42
+ 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 pretraining, FlyingChairs, FlyingThings3D (part of SceneFlow), then a mix of FlyingThings3D, Sintel, KITTI 2015 and HD1K (TSKH); the Depth Anything V2 Small inside was trained by its authors on synthetic and pseudo-labelled real images).
43
+
44
+ Licence evidence: <https://github.com/mattpoggi/flowseek/blob/ba6407370bceeb96244cad4d60d37489f6eb471e/scripts/get_weights.sh>
45
+
46
+ ## Input size
47
+
48
+ any H x W >= 128, resized or padded inside the model
49
+ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `flowseek-t` 1024x2048 (8.6 GiB peak allocated, 10.2 reserved); `flowseek-t-things` 1024x2048 (8.6 GiB peak allocated, 10.2 reserved); `flowseek-t-things-notartan` 1024x2048 (8.6 GiB peak allocated, 10.2 reserved)
50
+
51
+ ## Speed and memory
52
+
53
+ ### Flow, synthetic
54
+
55
+ | model | input | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
56
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
57
+ | `flowseek-t` | 1080x1920 | 650 | 457 | 395 | – | – | – | 8693 / 9880 | 8671 / 8712 | – |
58
+ | `flowseek-t-things` | 1080x1920 | 650 | 458 | 395 | – | – | – | 8693 / 9820 | 8671 / 8712 | – |
59
+ | `flowseek-t-things-notartan` | 1080x1920 | 651 | 458 | 396 | – | – | – | 8693 / 9820 | 8671 / 8712 | – |
60
+
61
+ ### Startup and first call
62
+
63
+ | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
64
+ | --- | --- | --- | --- | --- | --- | --- |
65
+ | `flowseek-t` | 0.87 | 0.18 (375x1242) | – | 0.63 | 0.46 (375x1242) | – |
66
+ | `flowseek-t-things` | 0.78 | 0.18 (375x1242) | – | 0.46 | 0.47 (375x1242) | – |
67
+ | `flowseek-t-things-notartan` | 0.81 | 0.18 (375x1242) | – | 0.46 | 0.46 (375x1242) | – |
68
+
69
+ ### torch.compile and TensorRT
70
+
71
+ | model | input | time: portable | compile | TensorRT fp16 | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) |
72
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
73
+ | `flowseek-t` | 1080x1920 | 395 ms | 258 ms | 168 ms | – | 54.2 s | 107 s | 8671 / 8712 | 6126 / 6212 | – | 11328 / 11350 |
74
+ | `flowseek-t-things` | 1080x1920 | 395 ms | 258 ms | 168 ms | – | 54.6 s | 102 s | 8671 / 8712 | 6126 / 6212 | – | 11330 / 11352 |
75
+ | `flowseek-t-things-notartan` | 1080x1920 | 396 ms | 258 ms | 168 ms | – | 54.3 s | 97.5 s | 8671 / 8712 | 6126 / 6212 | – | 11328 / 11350 |
76
+
77
+ Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
78
+
79
+ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
80
+
81
+ ## Accuracy
82
+
83
+ ### On public datasets
84
+
85
+ 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.
86
+
87
+ | variant | dataset | original fp32 | original fp16 | portable | note |
88
+ |---|---|---|---|---|---|
89
+ | `flowseek-t` | KITTI 2015 train, EPE / Fl-all % | 1.260 / 3.88 | 1.360 / 4.35 | 1.348 / 4.33 | trained on this dataset's public images; not a zero-shot result |
90
+ | `flowseek-t-things` | KITTI 2015 train, EPE / Fl-all % | 4.121 / 12.35 | 4.153 / 12.25 | 4.143 / 12.27 | |
91
+ | `flowseek-t-things-notartan` | KITTI 2015 train, EPE / Fl-all % | 3.923 / 12.83 | 3.904 / 12.97 | 3.933 / 12.97 | |
92
+
93
+ Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks c4a67979, 2026-11-11.
94
+
95
+ ### Parity with the original code
96
+
97
+ Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0077 and p99 <= 0.041 (absolute error of the output `flow`).
98
+
99
+ ## Usage
100
+
101
+ ```python
102
+ from fastforks import flow
103
+
104
+ model = flow.load("flowseek-t") # mode="auto": the preferred backend from recorded measurements
105
+ result = model("frame1.png", "frame2.png")
106
+ result.flow # [2, H, W] float32 tensor: dx, dy in input pixels
107
+ result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
108
+ ```
109
+
110
+ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastforks>). Other variants: `flowseek-t`, `flowseek-t-things`, `flowseek-t-things-notartan`.
111
+
112
+ ## Kernels backend
113
+
114
+ No kernels backend: no kernels mode was built for it; SEA-RAFT's engine and the Depth Anything kernels would fit and could be combined.
115
+
116
+ <!-- staged from fastforks 1cbf1671 (2026-11-15) -->