[Paper Review] Fast Feature Extraction with CNNs with Pooling Layers
This paper proposes a generic method to accelerate dense feature extraction from CNNs with pooling or striding layers by eliminating redundant computations across overlapping image patches. By applying transpose and reshape operations to reconfigure the network for whole-image inference, the approach achieves speedups of up to 3216× compared to patch-wise inference, enabling state-of-the-art CNN features to be computed in under 0.12 seconds per image.
In recent years, many publications showed that convolutional neural network based features can have a superior performance to engineered features. However, not much effort was taken so far to extract local features efficiently for a whole image. In this paper, we present an approach to compute patch-based local feature descriptors efficiently in presence of pooling and striding layers for whole images at once. Our approach is generic and can be applied to nearly all existing network architectures. This includes networks for all local feature extraction tasks like camera calibration, Patchmatching, optical flow estimation and stereo matching. In addition, our approach can be applied to other patch-based approaches like sliding window object detection and recognition. We complete our paper with a speed benchmark of popular CNN based feature extraction approaches applied on a whole image, with and without our speedup, and example code (for Torch) that shows how an arbitrary CNN architecture can be easily converted by our approach.
Motivation & Objective
- Address the inefficiency of redundant computation when applying CNNs to overlapping patches in image tasks.
- Enable fast, dense feature extraction on full images without sacrificing performance from pooling or striding layers.
- Provide a generalizable solution applicable to existing CNN architectures used in tasks like optical flow, stereo matching, and object detection.
- Eliminate the need for patch-by-patch inference or architectural restrictions that avoid pooling layers.
Proposed method
- Reconfigure a pre-trained CNN with pooling/striding layers into a single-image inference network using transpose and reshape operations.
- Introduce multi-scale pooling layers that apply max-pooling at multiple shifted positions to preserve resolution after downsampling.
- Use padding and dimension manipulation to align feature maps across different spatial positions, enabling shared computation.
- Construct an image-wide network (C_I) by interleaving the original network’s layers with specialized unwarping and reshaping layers.
- Apply a multi-pooling strategy that generates all shifted versions of pooling operations to avoid resolution loss.
- Leverage framework-native operations (e.g., in Torch) to implement the transformation efficiently and reproducibly.
Experimental results
Research questions
- RQ1Can redundant computation in patch-based CNN inference be eliminated when pooling or striding layers are present?
- RQ2Is it possible to adapt existing CNN architectures for fast, dense feature extraction on full images without architectural redesign?
- RQ3How much speedup can be achieved by reconfiguring a CNN to process the entire image at once, compared to patch-wise inference?
- RQ4Can the proposed method maintain feature quality while drastically reducing inference time for tasks like optical flow and stereo matching?
Key findings
- The proposed method achieves a maximum speedup of 3216× over patch-wise inference on large images, with inference time reduced to 0.113 seconds for a 864×576 image.
- The method enables dense feature extraction with state-of-the-art CNNs in under 0.12 seconds per image, even with multiple pooling layers.
- Memory usage remains manageable, with peak memory consumption of 9850 MB for the fastest method, compared to 11495 MB in baseline patch-wise inference.
- The approach is compatible with nearly all existing CNN architectures and can be applied to tasks such as optical flow, stereo matching, and sliding window detection.
- Benchmark results show that the image-wide network (C_I) outperforms patch-wise inference (C_P) in speed by a factor of 1760× on average across tested images.
- The method avoids the need to abandon pooling layers or perform redundant calculations, offering a practical and efficient alternative for dense feature extraction.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.