Update model card for 0.4.0
Browse files19 unmodified lines2021222324252626 unmodified lines535455565758596061626364656667686970711 unmodified line73747576777821 unmodified lines10010110210310410519 unmodified linesThis 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/cvg/FlexGlue> at `99920296d082`.Task: matching. Tier: experimental. Outputs: `keypoints1`, `keypoints2`, `pairs`, `scores`. Backends: `portable`.Input: two RGB images of one scene. Output: for every pixel of the first image its position in the second (x, y in pixels) and a certainty that the pixel is visible in both. Sparse matchers (LightGlue) return the keypoints of both images and the index pairs of the matched ones instead. To reconstruct camera poses from an image folder with these matchers, see [structure from motion](../sfm.md).26 unmodified lines| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels || --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | β | β | 129 | β | β | β | β | 1775 / 1886 | β |### Startup and first call| model | load (s): original | portable | kernels | first call (s): original | portable | kernels || --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | β | 0.92 | β | β | 1.20 | β |### torch.compile and TensorRT| 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) || --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | 768x1024 | 129 ms | deferred (build >5 min) | deferred (build >5 min) | β | β | β | 1775 / 1886 | β | β | β |Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).1 unmodified line## Accuracy### Parity with the original codeEvery variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0052 and p99 <= 0.012 (absolute error of the output `keypoints1`).21 unmodified lines## Kernels backendNo kernels backend: not implemented: data-dependent keypoint and match counts. Portable at 768x1024, 2048 keypoints, MegaDepth pair: 129.6 ms against 152.9 ms for the original with its float16 option (1.18x), peak allocated 1799 vs 1801 MB (reserved 1962 vs 1950), 760 vs 759 matches.<!-- staged from fastforks 1cbf1671 (2026-11-15) -->19 unmodified lines2021222324252626 unmodified lines535455565758596061626364656667686970711 unmodified line737475767778798081828384858687888921 unmodified lines11111211311411511619 unmodified linesThis 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/cvg/FlexGlue> at `99920296d082`.Task: matching. Tier: experimental. Outputs: `keypoints1`, `keypoints2`, `pairs`, `scores`. Backends: `portable`, `kernels`.Input: two RGB images of one scene. Output: for every pixel of the first image its position in the second (x, y in pixels) and a certainty that the pixel is visible in both. Sparse matchers (LightGlue) return the keypoints of both images and the index pairs of the matched ones instead. To reconstruct camera poses from an image folder with these matchers, see [structure from motion](../sfm.md).26 unmodified lines| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels || --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | β | 348 | 129 | 129 | 2.7x | 1.0x | 1801 / 1892 | 1775 / 1886 | 1814 / 2178 |### Startup and first call| model | load (s): original | portable | kernels | first call (s): original | portable | kernels || --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | 4.50 | 0.92 | 0.97 | 1.66 | 1.20 | 1.06 |### 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) || --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- || `aliked-flexglue` | 768x1024 | 129 ms | 96.1 ms | 328 ms, fp32 engine (dense descriptor with eager ALIKED and matching) | 129 ms | 78.8 s | 22.3 s | 1775 / 1886 | 1762 / 1826 | 1814 / 2178 | 2225 / 2410 |Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).1 unmodified line## Accuracy### On public datasetsDense matchers: 5000 matches per pair sampled from the warp by certainty (upstream's balanced KDE sampling); sparse matchers: all their matches of one call (LightGlue, XFeat: LightGlue's MegaDepth-1500 setting; LoFTR, DeDoDe: their card defaults). OpenCV essential-matrix RANSAC (0.5 px threshold, normalised by the mean focal length); AUC of the larger of the rotation and translation-direction errors. Both modes receive pairs resized to 768 x 1024. Map matched pixels to the calibrated evaluation coordinates and use the same RANSAC seed per pair. The same 300 pairs for all modes, so float32 and bfloat16 compare pair for pair. Original = the original code named under Details, same checkpoint and protocol.| variant | dataset | original fp32 | portable | portable fp32 | kernels | TensorRT | note ||---|---|---|---|---|---|---|---|| `aliked-flexglue` | MegaDepth-1500, 300 pairs at 768 x 1024, pose AUC@5 / @10 / @20 | | | 48.9 / 67.6 / 80.5 | | 50.4 / 68.6 / 81.1 | || `aliked-flexglue` | MegaDepth-1500, every 5th pair, relative pose AUC@5 / @10 / @20 degrees | 50.8 / 68.2 / 80.4 | 51.5 / 69.1 / 81.0 | 51.9 / 69.3 / 81.1 | 51.5 / 69.1 / 81.0 | | |Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 32e2e81e9, 2026-11-20; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 32e2e81e9 / 7eb2e0f4, 2026-11-18 to 2026-11-20; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 78a59767f, 2026-11-20; tensorrt: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7eb2e0f4, 2026-11-18.### Parity with the original codeEvery variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.0052 and p99 <= 0.012 (absolute error of the output `keypoints1`).21 unmodified lines## Kernels backend`matching.load("aliked-flexglue", mode="kernels")` runs our CUDA kernels (`image_normalize`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> 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.<!-- staged from fastforks 0d8c365f7 (2026-12-02) -->
README.md+18-7