FlashBEV makes the view-transformation step of camera-based BEV perception exact, with >37× lower peak memory and ~5× faster inference — a single drop-in, IO-aware CUDA kernel that allocates zero intermediate tensors in HBM, so peak memory is independent of the number of height bins. Same math, different execution.
View transformation at the SimpleBEV reference config (BEV 200×200, Z=8, C=128), RTX A6000, FP32:
| Method | Forward latency | Forward peak mem | Backward latency | Backward peak mem |
|---|---|---|---|---|
| Tensorized Sampling-VT | 9.18 ms | 1971.94 MB | 17.90 ms | 1174.86 MB |
| FlashBEV (ours) | 1.77 ms | 52.82 MB | 3.27 ms | 105.63 MB |
| ≈5.2× faster | ≈37× smaller | ≈5.5× faster | ≈11× smaller |
Run everything from the FlashBEV repo root with the venv activated.
- Python 3.8+
- CUDA and nvcc (required to build the CUDA extensions)
- uv for dependency management
Tested with CUDA 12.x and PyTorch 2.x on NVIDIA RTX 4060 and A6000 GPUs.
Calibration: Every experiment needs a calibration file (nuScenes-style projection matrices JSON). Use load_calib=.... Sample: inputs/projection_matrices_nuscenes.json.
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
uv venv
source .venv/bin/activate(Or ensure $HOME/.local/bin is in your PATH.) uv venv provisions a compatible Python (≥3.8); uv sync below also creates/uses this environment.
uv sync --extra benchmark
uv pip install -e . --no-build-isolationuv sync --extra benchmark installs dependencies (including matplotlib, tabulate, hydra-core for the tools). uv pip install -e . --no-build-isolation builds the flashbev CUDA package.
Note:
--no-build-isolationis required so the CUDA extension is compiled against the same PyTorch that is installed in the environment. Without it, the build pulls a separate PyTorch in an isolated environment, and the resulting extension fails to import at runtime with an error likeundefined symbol: ...c10::cuda...(a PyTorch ABI mismatch).
The paper uses one reference setup: batch 1, grid 200×200, Z=8, C=128, nuScenes-style range/resolution. Scaling experiments vary Z, C, or grid size; scripts use this config by default.
After installing, FlashBEV's view transformation is a drop-in nn.Module:
import torch
from flashbev import SamplingVT
# BEV grid as (min, max, cell size) per axis; reference config -> 200 x 200 x 8
vt = SamplingVT(
grid_x=(-50.0, 50.0, 0.5), # X -> 200 cells
grid_y=(-50.0, 50.0, 0.5), # Y -> 200 cells
grid_z=(-5.0, 5.0, 1.25), # Z -> 8 height bins
image_height=448, image_width=800, # original image size (for projection)
fuse_projection=True,
).cuda()
# from your 2D backbone + camera calibration
features_pv = torch.randn(1, 6, 128, 56, 100, device="cuda") # [B, N, C, H, W]
projection = torch.randn(1, 6, 3, 4, device="cuda") # [B, N, 3, 4]
bev = vt(projection, features_pv) # -> [B, C, X, Y] = [1, 128, 200, 200]
# feed `bev` into your BEV encoder + detection / segmentation headsEvery number in the paper — numerical equivalence, VT latency & peak memory, Z / BEV-grid / channel scaling, fixed-budget capacity, multi-GPU speedup, and the TensorRT (Table 6) results — is reproducible with the scripts in this repo.
→ Full step-by-step guide: REPRODUCE.md.
This repository provides the FlashBEV view-transformation operator (CUDA) and the scripts to reproduce the paper's operator-level results: numerical equivalence, VT forward/backward latency and peak memory, scaling (height bins, BEV grid, channels), fixed-budget capacity, and multi-GPU speedup. End-to-end detection numbers in the paper use the Simple-BEV pipeline (Harley et al., ICRA 2023) with FlashBEV swapped in as the view-transformation module; that detector is not redistributed here.
If you find this work useful, please cite:
@inproceedings{yokokawa2026flashbev,
title = {FlashBEV: Fast and Memory-Efficient Exact BEV Transformation with IO-Awareness},
author = {Yokokawa, Shunsuke and Kasahara, Hironori},
booktitle = {European Conference on Computer Vision (ECCV)},
year = {2026},
eprint = {2607.10071},
archivePrefix = {arXiv},
primaryClass = {cs.CV}
}Copyright 2026 Shunsuke Yokokawa. Released under the Apache License 2.0 — see LICENSE and NOTICE.
inputs/projection_matrices_nuscenes.json holds 6-camera projection matrices derived from nuScenes calibration, provided as a convenience input for reproducing the benchmarks. nuScenes is released for non-commercial use (CC BY-NC-SA 4.0); replace this file with your own calibration for other settings.
