Fast-ACVNet (fastforks)

Fast-ACVNet (Xu et al. 2022): MobileNetV2 features; attention weights from a correlation volume (1/8 group-wise, propagated to 1/4; Fast-ACVNet+: 1/4) select the top-24 disparities of a concatenation volume, then a 3-D hourglass, top-2 soft-argmax and superpixel upsampling (max disparity 192).

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/gangweix/Fast-ACVNet at 61d5375e1816.

Task: stereo. Tier: experimental. Outputs: disparity. Backends: portable, kernels.

Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).

Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.

variant weights (author link) SHA-256 weights licence commercial use
fast-acvnet-generalization@1 Fast-ACVNet/generalization.ckpt b9d06b9d3df3 MIT (assumed from code) yes
fast-acvnet-kitti12@1 Fast-ACVNet/kitti_2012.ckpt 221b21107e60 MIT (assumed from code) yes
fast-acvnet-kitti15@1 Fast-ACVNet/kitti_2015.ckpt b7d8c609b8b2 MIT (assumed from code) yes
fast-acvnet-plus-generalization@1 Fast-ACVNet+/generalization.ckpt bd2f79680519 MIT (assumed from code) yes
fast-acvnet-plus-kitti12@1 Fast-ACVNet+/kitti_2012.ckpt e3ce45f2dc62 MIT (assumed from code) yes
fast-acvnet-plus-kitti15@1 Fast-ACVNet+/kitti_2015.ckpt bf4c8ef707eb MIT (assumed from code) yes
fast-acvnet-plus-sceneflow@1 Fast-ACVNet+/sceneflow.ckpt 1a1328828baf MIT (assumed from code) yes
fast-acvnet-sceneflow@1 Fast-ACVNet/sceneflow.ckpt ee7ca89926f7 MIT (assumed from code) yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: MIT. Files: LICENSE.

Code licence: MIT; the authors do not state a separate weights licence.

Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa).

Licence evidence: https://github.com/gangweix/Fast-ACVNet/blob/61d5375e1816f124f4417cea506eeaddac1504e4/LICENSE.md

Input size

any H x W >= 32, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): fast-acvnet-generalization 3000x4000 (5.0 GiB peak allocated, 7.9 reserved); fast-acvnet-kitti12 3000x4000 (5.0 GiB peak allocated, 7.9 reserved); fast-acvnet-kitti15 3000x4000 (5.0 GiB peak allocated, 7.9 reserved); fast-acvnet-plus-generalization 3000x4000 (4.9 GiB peak allocated, 7.9 reserved); fast-acvnet-plus-kitti12 3000x4000 (4.9 GiB peak allocated, 7.9 reserved); fast-acvnet-plus-kitti15 3000x4000 (4.9 GiB peak allocated, 7.9 reserved); fast-acvnet-plus-sceneflow 3000x4000 (4.9 GiB peak allocated, 7.9 reserved); fast-acvnet-sceneflow 3000x4000 (5.0 GiB peak allocated, 7.9 reserved)

Speed and memory

Stereo, Middlebury 2014 half, 994x1482

model time (ms): original fp32 original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
fast-acvnet-generalization 100.7 60.6 54.69 38.16 1.6x 1.4x 1421 / 1506 664 / 736 739 / 1042
fast-acvnet-plus-generalization 138.4 80.9 70.56 46.41 1.7x 1.5x 1441 / 1522 662 / 756 790 / 1120

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
fast-acvnet-generalization 0.24 (375x1242) 0.18 0.20โ€  1.73 (375x1242) 0.08โ€  0.04โ€ 
fast-acvnet-plus-generalization 0.23 (375x1242) 0.10 0.10โ€  0.04 (375x1242) 0.07โ€  0.05โ€ 

Fixed-size speed and peak memory, all models

model mode 640x480 1280x720 1920x1080 12 MP 4000x3000
fast-acvnet-generalization portable 13.9 ms / 137 / 208 31.1 ms / 402 / 664 78.3 ms / 890 / 1418 492.1 ms / 5077 / 8074
fast-acvnet-generalization kernels 6.8 ms / 169 / 582 22.0 ms / 435 / 608 55.7 ms / 954 / 1372 357.3 ms / 5445 / 7618
fast-acvnet-kitti12 portable 14.0 ms / 137 / 208 31.1 ms / 402 / 664 78.2 ms / 890 / 1418 492.4 ms / 5077 / 8074
fast-acvnet-kitti12 kernels 6.8 ms / 169 / 582 22.0 ms / 435 / 608 55.6 ms / 954 / 1372 357.3 ms / 5445 / 7618
fast-acvnet-kitti15 portable 13.9 ms / 137 / 208 31.1 ms / 402 / 664 78.2 ms / 890 / 1418 492.4 ms / 5077 / 8074
fast-acvnet-kitti15 kernels 6.8 ms / 169 / 582 22.0 ms / 435 / 608 55.6 ms / 954 / 1372 357.3 ms / 5445 / 7618
fast-acvnet-plus-generalization portable 14.3 ms / 136 / 208 38.0 ms / 401 / 664 99.4 ms / 887 / 1418 623.6 ms / 5054 / 8076
fast-acvnet-plus-generalization kernels 7.8 ms / 169 / 546 25.3 ms / 457 / 598 66.2 ms / 1006 / 1226 422.5 ms / 5743 / 7342
fast-acvnet-plus-kitti12 portable 14.4 ms / 136 / 208 38.0 ms / 401 / 664 99.4 ms / 887 / 1418 623.3 ms / 5054 / 8076
fast-acvnet-plus-kitti12 kernels 7.7 ms / 169 / 546 25.3 ms / 457 / 598 66.2 ms / 1006 / 1226 422.4 ms / 5743 / 7342
fast-acvnet-plus-kitti15 portable 14.3 ms / 136 / 208 38.0 ms / 401 / 664 99.4 ms / 887 / 1418 623.7 ms / 5054 / 8076
fast-acvnet-plus-kitti15 kernels 7.8 ms / 169 / 546 25.3 ms / 457 / 598 66.2 ms / 1006 / 1226 422.8 ms / 5743 / 7342
fast-acvnet-plus-sceneflow portable 14.3 ms / 136 / 208 38.0 ms / 401 / 664 99.4 ms / 887 / 1418 623.7 ms / 5054 / 8076
fast-acvnet-plus-sceneflow kernels 7.8 ms / 169 / 546 25.3 ms / 457 / 598 66.1 ms / 1006 / 1226 422.7 ms / 5743 / 7342
fast-acvnet-sceneflow portable 14.0 ms / 137 / 208 31.1 ms / 402 / 664 78.2 ms / 890 / 1418 492.4 ms / 5077 / 8074
fast-acvnet-sceneflow kernels 6.8 ms / 169 / 582 22.0 ms / 435 / 608 55.6 ms / 954 / 1372 357.6 ms / 5445 / 7618

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

  • fast-acvnet-kitti12, fast-acvnet-kitti15, fast-acvnet-sceneflow: same network and settings as fast-acvnet-generalization, measured once (rows not repeated).
  • fast-acvnet-plus-kitti12, fast-acvnet-plus-kitti15, fast-acvnet-plus-sceneflow: same network and settings as fast-acvnet-plus-generalization, measured once (rows not repeated).

Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the authors' code 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

Parity with the original code

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| <= 0.02 px and p99 <= 0.25 px.

Usage

from fastforks import stereo

model = stereo.load("fast-acvnet-generalization")  # portable PyTorch on the GPU if there is one, else the CPU
result = model("left.png", "right.png")
result.disparity  # [H, W] float32 tensor, input resolution
result.backend  # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')

Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: fast-acvnet-generalization, fast-acvnet-kitti12, fast-acvnet-kitti15, fast-acvnet-plus-generalization, fast-acvnet-plus-kitti12, fast-acvnet-plus-kitti15, fast-acvnet-plus-sceneflow, fast-acvnet-sceneflow.

Kernels backend

stereo.load("fast-acvnet-generalization", mode="kernels") runs our CUDA kernels (igev, cutlass_conv, cudnn_hacc). 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support