Abstract
3D object detection in point clouds is a critical task for autonomous driving, yet it faces significant challenges due to the inherent sparsity of LiDAR data. Traditional methods often rely on dense convolutions, which scale poorly, or sparse convolutions, which are difficult to optimize on modern hardware. We present SWFormer, a pure, convolution-free Transformer architecture designed specifically for sparse 3D data. By employing a bucketing scheme for variable-length windows and a novel voxel diffusion technique, SWFormer achieves state-of-the-art accuracy on the Waymo Open Dataset while maintaining high computational efficiency.
Introduction
LiDAR sensors provide essential spatial information for autonomous vehicles, but the resulting point clouds are characterized by extreme sparsity. While a sensing range may cover hundreds of meters, only a small fraction of the 3D voxels actually contain data. This sparsity creates a "Goldilocks" problem for existing detection architectures:
- Dense Models: Converting 3D space into 2D grids (e.g., PointPillars) leads to quadratic scaling with range, making long-range detection computationally prohibitive.
- Sparse Convolutions: While efficient, these rely on specialized, hardware-specific operations that often underperform on general-purpose accelerators like TPUs.
- Standard Transformers: Architectures like ViT or Swin are optimized for dense image patches. Applying them to sparse 3D data results in variable-length sequences that are difficult to batch and process in parallel.
Furthermore, because point clouds only capture surfaces, there is often no data at the geometric center of an object—the exact location where traditional detection heads expect to find features for box regression.
Methodology
SWFormer addresses these challenges through three primary innovations that adapt the hierarchical window-based Transformer approach to the sparse 3D domain.
Bucketing-based Window Partition
In a sparse environment, windows of the same spatial dimensions (e.g., 10x10 voxels) contain wildly different numbers of points. This variance makes standard batching impossible. SWFormer introduces a bucketing strategy that groups sparse windows based on their sequence length. This allows the model to process windows in parallel across GPUs and TPUs, maximizing hardware utilization despite the irregular data distribution.
Limited Window Shifting
While dense Transformers like Swin use frequent window shifts to facilitate cross-window communication, these shifts require expensive memory "gather" operations in a sparse context. SWFormer optimizes this by limiting window shifts to once per stride. The model instead relies on its hierarchical backbone and multi-scale feature fusion to expand the receptive field, significantly reducing memory bandwidth bottlenecks.
Voxel Diffusion
To solve the "missing center" problem, SWFormer incorporates a Voxel Diffusion module. The model first performs an internal segmentation to identify foreground voxels. It then "diffuses" these features to adjacent empty locations using a $k \times k$ max-pooling operation. This process creates "pseudo-voxels" near the centers of objects, providing the detection head with the necessary localized features to accurately regress bounding boxes.
Experimental Results
SWFormer was evaluated on the Waymo Open Dataset (WOD), utilizing data from all five on-vehicle LiDARs across nearly 1,000 scenes.
Accuracy and Efficiency
SWFormer achieved a state-of-the-art 73.36 L2 mAPH on the Waymo test set, outperforming established single-stage and two-stage models such as RSN and PV-RCNN++. Despite its high accuracy, the model remains remarkably efficient. On an NVIDIA T4 GPU, SWFormer runs in 43ms, which can be further optimized to 20ms with fused kernels. This represents a significant speed advantage over the popular PointPillars detector (~100ms) while providing superior detection performance.
Handling Scale
A notable strength of the architecture is its performance on large objects. SWFormer demonstrated a +6.35 AP/L2 improvement in detecting large vehicles compared to previous methods. This is attributed to the effective integration of multi-scale features within the Transformer backbone.
Conclusion and Future Work
SWFormer demonstrates that sparsity can be treated as a structural advantage rather than a computational hurdle. By utilizing a hardware-aware design and a novel diffusion mechanism, it bridges the gap between the flexibility of Transformers and the efficiency required for real-time 3D detection.
While highly effective, the model's reliance on an internal segmentation step for voxel diffusion suggests that performance is tied to the accuracy of foreground identification. Future research may explore extending this pure Transformer backbone to multi-task learning environments, including lane detection, behavior prediction, and panoptic segmentation in autonomous driving pipelines.
Summary updated