Sparsity Invariant CNNs

Jonas Uhrig, Nick Schneider, Lukas Schneider, Uwe Franke, Thomas Brox, Andreas Geiger · DOI

Abstract: In this paper, we consider convolutional neural networks operating on sparse inputs with an application to depth upsampling from sparse laser scan data. First, we show that traditional convolutional networks perform poorly when applied to sparse data even when the location of missing data is provided to the network. To overcome this problem, we propose a simple yet effective sparse convolution layer which explicitly considers the location of missing data during the convolution operation. We demonstrate the benefits of the proposed network architecture in synthetic and real experiments with respect to various baseline approaches. Compared to dense baselines, the proposed sparse convolution network generalizes well to novel datasets and is invariant to the level of sparsity in the data. For our evaluation, we derive a novel dataset from the KITTI benchmark, comprising 93k depth annotated RGB images. Our dataset allows for training and evaluating depth upsampling and depth prediction techniques in challenging real-world settings and will be made available upon publication.

Introduction

In autonomous driving, LiDAR sensors provide critical depth information, but the resulting "point clouds" are incredibly sparse. When projected onto a 2D image plane for processing with a standard Convolutional Neural Network (CNN), only a tiny fraction of pixels (often less than 5%) contain data.

Standard CNNs are designed for dense images. When they encounter sparse data, they typically treat missing values as zeros. This leads to significant bias, as the convolution operation averages these zeros into the result, "diluting" the actual signal. Furthermore, the network must learn to recognize an exponential number of possible "missing data" patterns, making training difficult and results noisy. Even adding a binary mask as an extra input channel fails to solve the problem because the underlying convolution math remains "sparsity-blind."

Proposed Method: Sparse Convolution

The core innovation of this work is the Sparse Convolution Layer. Unlike a standard convolution, this layer takes two inputs: the sparse data ($x$) and a binary observation mask ($o$), where $1$ indicates valid data and $0$ indicates a hole.

The proposed network architecture and the mathematical logic of the sparse convolution layer.

As shown in the diagram above, the operation works through three key steps:

  1. Weighted Sum: It performs a standard convolution but multiplies the input by the mask first, effectively ignoring the "holes."
  2. Normalization: It divides the result by the sum of the mask values within the convolution window. This ensures the output is scaled correctly regardless of whether the window had one valid pixel or twenty.
  3. Mask Propagation: The layer also outputs an updated mask for the next layer. Using a max-pooling-like logic, if at least one pixel in the input window was valid, the output location is marked as valid.

Datasets and Evaluation

To rigorously test this approach, the authors utilized two primary datasets:

  • Synthia: A synthetic dataset used to test how the model handles controlled levels of sparsity (from 5% to 100% density).
  • KITTI Depth Benchmark: The authors introduced a massive new dataset derived from KITTI raw data. By accumulating 11 consecutive LiDAR scans and using a cleaning pipeline to remove dynamic objects, they created 93k depth-annotated RGB images, providing a high-quality real-world benchmark.

Key Results and Insights

The proposed method demonstrates remarkable Sparsity Invariance. A model trained on 5% sparse data using these layers performs almost identically when tested on 50% or 100% dense data. In contrast, standard CNNs fail completely when test-time sparsity differs from training.

Qualitative comparison of depth upsampling: (a) Sparse input, (b) Ground truth, (c) Standard CNN result, and (d) Our proposed Sparse CNN result.

Quantitatively, on the KITTI dataset, the Sparse CNN achieved an RMSE of 1.81m, significantly outperforming standard ConvNets (2.69m) and ConvNets with an explicit input mask (1.94m). When applied to semantic segmentation on sparse data, the Mean IoU jumped from 6.4% (standard) to 31.1%.

Conclusion

Sparse convolutions provide a robust framework for processing irregular data structures common in robotics. By making the convolution operation aware of the data's validity, the network achieves better generalization from synthetic to real-world data and maintains performance across varying levels of sensor density. Future work will explore more efficient computational structures for these operations and deeper multi-modal integration with RGB guidance.

Summary updated

BibTeX
@inproceedings{uhrig2017sparsity,
  author = {Jonas Uhrig and Nick Schneider and Lukas Schneider and Uwe Franke and Thomas Brox and Andreas Geiger},
  title = {{Sparsity Invariant CNNs}},
  booktitle = {3DV},
  year = {2017},
  doi = {10.1109/3dv.2017.00012},
}
Figure