DenseNet: Implementing Efficient ConvNet Descriptor Pyramids

Forrest N. Iandola, Matthew W. Moskewicz, Sergey Karayev, Ross B. Girshick, Trevor Darrell, Kurt KeutzerarXiv 2014

Abstract

This technical report introduces DenseNet, an open-source system designed to significantly accelerate Convolutional Neural Network (CNN) feature extraction for object detection. By leveraging the translational invariance of convolutional layers, the authors demonstrate how to compute multiscale feature pyramids in a fraction of the time required by traditional methods. DenseNet achieves a 10x speedup over independent region extraction by sharing computation across overlapping image regions, maintaining high feature quality suitable for downstream detection tasks.

Introduction: The Redundancy Problem in R-CNN

In 2014, the "Regions with CNN features" (R-CNN) approach represented the state-of-the-art for object detection accuracy. However, R-CNN was computationally expensive, often requiring approximately 10 seconds per image. The primary bottleneck stemmed from its processing pipeline: the system extracted thousands of overlapping "region proposals," warped each to a fixed size, and ran a CNN on every proposal independently.

The R-CNN pipeline extracts and processes thousands of overlapping regions independently.

Because these regions overlap significantly, the CNN performs redundant calculations over the same pixels thousands of times. DenseNet addresses this inefficiency by computing a "dense" feature map for the entire image once, allowing sub-region features to be cropped directly from the final map.

The DenseNet Approach: Efficient Multiscale Pyramids

The authors developed a pipeline to efficiently generate multiscale CNN descriptor pyramids by treating the entire image as a single computational unit.

The DenseNet pipeline stitches multiscale resolutions into a single plane for efficient CNN processing.

The DenseNet workflow consists of several key stages:

  1. Multiscale Pyramid Generation: The input image is resized into approximately 25 different resolutions to accommodate objects of varying sizes.
  2. Stitching (The BLF Algorithm): To optimize for GPU frameworks like Caffe, a "Bottom-Left Fill" algorithm packs these different-sized scales into one or two large 2000x2000 pixel images.
  3. Padding and Interpolation: To prevent "receptive field pollution"—where filters see pixels from adjacent scales—32 pixels of padding are added between scales, with linear interpolation used to smooth edges.
  4. Dense Computation: The large stitched image is passed through the convolutional layers of a pre-trained CNN (e.g., AlexNet).
  5. Unstitching: The resulting feature maps are "unstitched" back into a multiscale pyramid of descriptors.

Key Insights and Implementation Details

A critical realization of this work is that translational invariance is a fundamental property of convolutional layers. As long as a single mean RGB pixel value is subtracted (rather than a full mean image), the output of a convolutional layer depends only on the local image patch, not its global coordinates. This property enables "cropping after convolution."

Furthermore, by stitching the pyramid into a single large image, the authors utilize the batch-processing optimizations of deep learning frameworks without modifying the underlying engines. The trade-off of using a mean pixel instead of a mean image resulted in a negligible 0.2% reduction in AlexNet's top-1 accuracy.

Results and Performance

DenseNet demonstrates significant performance gains:

  • 10x Speedup: It computes a 25-scale feature pyramid in just 1 second on an NVIDIA K20 GPU, compared to the 10 seconds required for independent window proposals in Caffe.
  • Qualitative Equivalence: Visualizations confirm that descriptors cropped from a DenseNet pyramid are nearly identical to those computed on isolated regions, proving the method is a high-quality approximation of more expensive per-region processing.

Conclusion and Future Directions

While DenseNet offers a massive leap in efficiency, it currently focuses on square regions. Future work involves handling varied aspect ratios and integrating the system into end-to-end object detectors. Additionally, memory constraints on 2014-era hardware limited the size of the pyramids, a factor that continues to evolve with modern GPU technology.

Note: This 2014 system from UC Berkeley is distinct from the "Densely Connected Convolutional Networks" architecture introduced in 2017.

Summary updated

BibTeX
@misc{iandola2014densenet,
  author = {Forrest N. Iandola and Matthew W. Moskewicz and Sergey Karayev and Ross B. Girshick and Trevor Darrell and Kurt Keutzer},
  title = {{DenseNet: Implementing Efficient ConvNet Descriptor Pyramids}},
  year = {2014},
  eprint = {1404.1869},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1404.1869},
}
Figure