--- library_name: "fastforks" pipeline_tag: "keypoint-detection" license: "mit" tags: - "tracking" - "point-tracking" - "tracking-any-point" - "video" - "cuda" - "pytorch" - "fastforks" - "fastforks-card" base_model: - "aharley/alltracker" --- # AllTracker (fastforks) AllTracker (Harley et al., ICCV 2025): tracking every pixel of a query frame through a video offline, as long-range optical flow. A ConvNeXt (tiny: a residual CNN) encodes every frame at 1/8; 16-frame windows (stride 8) refine the flow and visibility of all anchor pixels to all window frames at once, with a correlation pyramid, 2D ConvNeXt blocks over space and 1D blocks over time, then an 8x convex upsampling. Point queries read the dense result. 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: . Kernels for the `kernels` backend: . Original code: at `e7553135e7b3`. Author weight repos: . Task: tracking. Tier: experimental. Outputs: `tracks`, `visibility`. Backends: `portable`, `kernels`. Input: a video (its frames in order) and query points `(t, x, y)`. Output: the position of every query in every frame and the probability that it is visible there. ## Variants 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/tracking/models/alltracker/card.toml). | variant | weights (author link) | SHA-256 | weights licence | commercial use | |---|---|---|---|---| | `alltracker@1` | [alltracker.pth](https://huggingface.co/aharley/alltracker/resolve/c8ba31225828cab9ec512d0627f0f826e641a877/alltracker.pth) | `ffd9ebcfb6d2` | MIT | yes | | `alltracker-tiny@1` | [alltracker_tiny.pth](https://huggingface.co/aharley/alltracker/resolve/c8ba31225828cab9ec512d0627f0f826e641a877/alltracker_tiny.pth) | `43991b4fcee5` | MIT | yes | ## Licence Original-code strings, recorded as they are (research-use package; check them before any other use). Code: MIT. Licence files: `LICENSE`. Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), FlyingChairs (Freiburg), Spring (scene flow / optical flow / stereo, University of Stuttgart), HCI HD1K optical flow benchmark, KITTI stereo / optical flow 2012 / 2015, TartanAir, not stated by the authors (Upstream README: stage 1 on Kubric MOVi-F, stage 2 on a mix of point tracking data (Kubric, PointOdyssey, Dynamic Replica and point tracks made from FlyingThings3D, Monkaa, Driving, SPRING) and optical flow data (FlyingChairs, FlyingThings3D, Monkaa, Driving, AutoFlow, SPRING, VIPER, HD1K, KITTI, TartanAir). Kubric, PointOdyssey, Dynamic Replica, AutoFlow and VIPER have no dataset entry here yet ("unstated").). Licence evidence: ## Input size any H x W >= 32, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `alltracker` 3000x4000 (5.5 GiB peak allocated, 5.9 reserved); `alltracker-tiny` 3000x4000 (5.5 GiB peak allocated, 5.9 reserved) ## Speed and memory ### Tracking, synthetic, 480x854 | model | time (ms): original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `alltracker` | 485 | 385 | 213 | 2.3x | 1.8x | 2100 / 2318 | 885 / 998 | 967 / 1068 | | `alltracker-tiny` | 424 | 330 | 217 | 2.0x | 1.5x | 1995 / 2200 | 919 / 1178 | 978 / 1166 | ### Startup and first call | model | load (s): original | portable | kernels | first call (s): original | portable | kernels | | --- | --- | --- | --- | --- | --- | --- | | `alltracker` | 1.68 | 0.89 | 0.26 | 1.31 | 2.08 | 0.49 | | `alltracker-tiny` | 1.22 | 0.06 | 0.96 | 1.40 | 0.73 | 0.54 | ### torch.compile and TensorRT | model | input | time: portable | compile | TensorRT (fp16 unless shown) | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | `alltracker` | 480x854 | 385 ms | 284 ms | public API unavailable | 213 ms | 105 s | – | 885 / 998 | 1273 / 1358 | 967 / 1068 | – | | `alltracker` | 16x256x256 | 412 ms | – | fails: unsupported: torch.export stops at the data-dependent loop o | – | – | – | 1438 / 2512 | – | – | – | | `alltracker-tiny` | 480x854 | 330 ms | 229 ms | public API unavailable | 217 ms | 103 s | – | 919 / 1178 | 1198 / 1338 | 978 / 1166 | – | | `alltracker-tiny` | 16x256x256 | 302 ms | – | fails: unsupported: torch.export stops at the data-dependent loop o | – | – | – | 1364 / 2548 | – | – | – | Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB). 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. ## Accuracy ### On public datasets Query-first TAP-Vid protocol: frames resized to 256 x 256 (PIL Lanczos) before the model (AllTracker: the original frames, resized by the model), one query per track at its first visible point, tracked online (TAPNext, Track-On) or over the whole clip (TAPIR, AllTracker, LocoTrack); AJ, delta_avg (< 1, 2, 4, 8, 16 px at 256 x 256) and occlusion accuracy averaged over the videos. Ten DAVIS clips, every third clip, resized to 256 x 256. Use the first 16 frames with up to 20 annotated query-first tracks starting before frame 12. Both modes use the same frames and queries. Scores are averaged across clips. Original = the original code named under Details, same checkpoint and protocol. | variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | TensorRT | note | |---|---|---|---|---|---|---|---|---| | `alltracker` | TAP-Vid DAVIS (query first), every 3rd video, AJ / delta_avg / OA % | 67.45 / 78.66 / 90.82 | 67.41 / 78.65 / 90.69 | 67.42 / 78.71 / 90.70 | 67.42 / 78.66 / 90.79 | 67.38 / 78.63 / 90.65 | | | | `alltracker` | TAP-Vid DAVIS (query first), AJ / delta_avg / OA % | 64.17 / 77.00 / 89.49 | | 64.14 / 77.04 / 89.44 | 64.15 / 77.02 / 89.46 | 64.15 / 77.04 / 89.44 | | | | `alltracker` | TAP-Vid DAVIS (10 clips), first 16 frames and up to 20 queries, AJ / delta_avg / OA % | | | | 80.68 / 88.98 / 95.85 | | 80.70 / 89.00 / 95.85 | | | `alltracker-tiny` | TAP-Vid DAVIS (query first), every 3rd video, AJ / delta_avg / OA % | 65.33 / 76.69 / 88.14 | | 65.36 / 76.66 / 88.14 | 65.38 / 76.69 / 88.17 | 65.34 / 76.66 / 88.10 | | | | `alltracker-tiny` | TAP-Vid DAVIS (10 clips), first 16 frames and up to 20 queries, AJ / delta_avg / OA % | | | | 79.18 / 87.46 / 95.98 | | 79.19 / 87.46 / 95.95 | | Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 8d5bccf, 2026-11-13; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3f5e2a34 / bb4e8b64, 2026-11-17 to 2026-11-18; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 8d5bccf, 2026-11-13; tensorrt: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3f5e2a34, 2026-11-18. ### Parity with the original code Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 2.3e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0019 and p99 <= 0.0099 (absolute error of the output `tracks`). ## Limitations - With 256 points introduced on frames 1, 15, 31 and 58 of a 63-frame clip at 480 × 854, reversing one feature window at a time reduced peak allocation from 1,239 to 1,150 MiB portable and from 1,321 to 1,233 MiB kernels. The checked tracks and visibility match bit for bit. - Tracking 256 points in a 63-frame, 480 × 854 clip on the RTX 5060 Ti used 1,150 MiB portable (was 1,224) and 1,233 MiB kernels (was 1,307). Tracks and visibility matched bit for bit on the synthetic clips and three labeled TAP-Vid DAVIS clips. - Offline: the features of every frame are kept in memory (about 2.5 MB per frame in float16 at 384 x 512); each query frame costs a forward pass (and a backward pass from frame 0 if it is not the first). - Frames are resized to 384 x 512 (upstream's default evaluation size), whatever their size and aspect ratio. Upstream reports higher accuracy at larger sizes (TAP-Vid DAVIS AJ 65.9 at 448 x 768, 67.2 at 768 x 1024); the size is a card parameter. - Tracks are sampled bilinearly at the query position; upstream's evaluation rounds the query to the nearest pixel. - One video per call; all queries of a call share the video. - Kernels hold packed conv weights next to the originals the call reads (+31 MiB) and fragment the allocator: peak reserved is ~70 MiB above portable. - No exportable module: the track set is data-dependent (`torch.compile` runs with graph breaks; ONNX / TensorRT export fails). ## Usage ```python from fastforks import tracking model = tracking.load("alltracker") # mode="auto": the preferred backend from recorded measurements result = model(frames, [[0, x, y]]) # frames: the video's images in order; queries (t, x, y) result.tracks # [T, Q, 2] float32: x, y in input pixels; result.visible [T, Q] bool result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16') ``` Install with `pip install fastforks` (see ). Other variants: `alltracker`, `alltracker-tiny`. ## Kernels backend `tracking.load("alltracker", mode="kernels")` runs our CUDA kernels (`fvm_conv`). It needs a prebuilt kernel for your GPU architecture (downloaded from on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.