Model card synced with fastforks 7204e33f
Browse files
README.md
CHANGED
|
@@ -61,6 +61,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `mapanything-apache` 3000x4000
|
|
| 61 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 62 |
| `mapanything-apache` | 6.12 (336x518) | 2.89 (336x518) | 0.57† (336x518) | 2.62 (336x518) | 0.66 (336x518) | 0.54 (336x518) |
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
### Fixed-size speed and peak memory, all models
|
| 65 |
|
| 66 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
@@ -76,17 +82,16 @@ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastfo
|
|
| 76 |
|
| 77 |
### Parity with the original code
|
| 78 |
|
| 79 |
-
Every variant is checked against golden outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 5 % of the reference's median |value|.
|
| 80 |
|
| 81 |
## Usage
|
| 82 |
|
| 83 |
```python
|
| 84 |
from fastforks import multiview
|
| 85 |
|
| 86 |
-
model = multiview.load("mapanything-apache") #
|
| 87 |
-
result = model(["view0.jpg", "view1.jpg", "view2.jpg"]) # the views of one scene
|
| 88 |
result.depth # [V, H, W] float32 tensor; result.kind says what the maps mean
|
| 89 |
-
# calibrated MVS: model(views, intrinsics=K, cam_to_world=c2w), K [N, 3, 3], c2w [N, 4, 4]
|
| 90 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
| 91 |
```
|
| 92 |
|
|
@@ -95,3 +100,5 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
|
|
| 95 |
## Kernels backend
|
| 96 |
|
| 97 |
`multiview.load("mapanything-apache", mode="kernels")` runs our CUDA kernels (`fastbb`). 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.
|
|
|
|
|
|
|
|
|
| 61 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 62 |
| `mapanything-apache` | 6.12 (336x518) | 2.89 (336x518) | 0.57† (336x518) | 2.62 (336x518) | 0.66 (336x518) | 0.54 (336x518) |
|
| 63 |
|
| 64 |
+
### torch.compile and TensorRT
|
| 65 |
+
|
| 66 |
+
| model | input | portable ms | compile ms | compile s (cold) | TensorRT fp16 ms | ONNX + build s | kernels ms | peak MiB (alloc / reserved): portable | compile | TensorRT (device) |
|
| 67 |
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 68 |
+
| `mapanything-apache` | 336x518 | 635.92 | fails: Inductor: inference tensors | – | 36.4 | 120 | 543.98 | 3697 / 4092 | – | 2438 |
|
| 69 |
+
|
| 70 |
### Fixed-size speed and peak memory, all models
|
| 71 |
|
| 72 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
|
|
| 82 |
|
| 83 |
### Parity with the original code
|
| 84 |
|
| 85 |
+
Every variant is checked against golden outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 5 % of the reference's median |value| (absolute error of the output `depth`).
|
| 86 |
|
| 87 |
## Usage
|
| 88 |
|
| 89 |
```python
|
| 90 |
from fastforks import multiview
|
| 91 |
|
| 92 |
+
model = multiview.load("mapanything-apache") # mode="auto": the preferred backend from recorded measurements
|
| 93 |
+
result = model(["view0.jpg", "view1.jpg", "view2.jpg"]) # the views of one scene, no cameras needed
|
| 94 |
result.depth # [V, H, W] float32 tensor; result.kind says what the maps mean
|
|
|
|
| 95 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
| 96 |
```
|
| 97 |
|
|
|
|
| 100 |
## Kernels backend
|
| 101 |
|
| 102 |
`multiview.load("mapanything-apache", mode="kernels")` runs our CUDA kernels (`fastbb`). 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.
|
| 103 |
+
|
| 104 |
+
<!-- staged from fastforks 7204e33f (2026-11-05) -->
|