Code for ECCV 2026 Paper "Low-Latency Event-Based Object Detection with Spatially-Sparse Linear Attention"
A linear-attention-based asynchronous neural network with spatially sparse activation for low-latency object detection with event cameras.
Paper: arXiv. Video: YouTube. Contact: [email protected]
If you find our work and/or code useful, please cite our paper:
@inproceedings{hao2026low,
title = {Low-Latency Event-Based Object Detection with Spatially-Sparse Linear Attention},
author = {Hao, Haiqing and Sui, Zhipeng and Zou, Rong and Dai, Zijia, and Zubić, Nikola and Scaramuzza, Davide and Wang, Wenhui},
booktitle = {European Conference on Computer Vision (ECCV)},
year = {2026}
}Event cameras provide sequential visual data with spatial sparsity and high temporal resolution, making them attractive for low-latency object detection. Existing asynchronous event-based neural networks realize this low-latency advantage by updating predictions event-by-event, but still suffer from two bottlenecks: recurrent architectures are difficult to train efficiently on long sequences, and improving accuracy often increases per-event computation and latency. Linear attention is appealing in this setting because it supports parallel training and recurrent inference. However, standard linear attention updates a global state for every event, yielding a poor accuracy-efficiency trade-off, which is problematic for object detection, where fine-grained representations and thus states are preferred. The key challenge is therefore to introduce sparse state activation that exploits event sparsity while preserving efficient parallel training. We propose Spatially-Sparse Linear Attention (SSLA), which introduces a mixture-of-spaces state decomposition and a scatter-compute-gather training procedure, enabling state-level sparsity as well as training parallelism. Built on SSLA, we develop an end-to-end asynchronous linear attention model, SSLA-Det, for event-based object detection. On Gen1 and N-Caltech101, SSLA-Det achieves state-of-the-art accuracy among asynchronous methods, reaching 0.375 mAP and 0.515 mAP, respectively, while reducing per-event computation by more than 20 times compared to the strongest prior asynchronous baseline, demonstrating the potential of linear attention for low-latency event-based vision.
The code is tested on Ampere GPUs (A800/3090) with CUDA 12.4.
conda create -n <env_name> python=3.12
conda activate <env_name>
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu124
pip install lightning
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.6.0+cu124.html
pip install pycocotools
pip install tensorboard
pip install h5py
pip install hdf5plugin
Please download Gen1 Automotive datasets from their official websites.
N-Caltech101: https://github.com/uzh-rpg/dagr/tree/master
All datasets should be placed under ./data .
For Gen1, please organize the folder as:
Gen1
├── data
│ ├── train
│ ├── val
│ └── test
└── bbox
├── train
├── val
└── test
Training settings are controlled using .yaml configuration files. You can find our sample configurations in ./configs.
To start training, run the following script:
python train.py --train_cfg={path_to_cfg}
Use the test.py script to evaluate.
As with training, settings are controlled using .yaml configuration files.
python test.py --test_cfg={path_to_cfg}
You can download our checkpoints from Google Drive and place them under ./checkpoints.
Use the compute_flops.py script to compute FLOPS.
python compute_flops.py --model_cfg={path_to_cfg} --dataset={dataset_name}