Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inference

Thomas Verelst, Tinne Tuytelaars
12/6/2019
cs.CV

Official code: thomasverelst/dynconv (130 stars, Cuda, PyTorch, last commit 2022-01-17).

Abstract

Modern convolutional neural networks apply the same operations on every pixel in an image. However, not all image regions are equally important.

Show full abstract

To address this inefficiency, we propose a method to dynamically apply convolutions conditioned on the input image. We introduce a residual block where a small gating branch learns which spatial positions should be evaluated. These discrete gating decisions are trained end-to-end using the Gumbel-Softmax trick, in combination with a sparsity criterion. Our experiments on CIFAR, ImageNet and MPII show that our method has better focus on the region of interest and better accuracy than existing methods, at a lower computational complexity. Moreover, we provide an efficient CUDA implementation of our dynamic convolutions using a gather-scatter approach, achieving a significant improvement in inference speed with MobileNetV2 residual blocks. On human pose estimation, a task that is inherently spatially sparse, the processing speed is increased by 60% with no loss in accuracy.

View on arXivView PDF

Code Implementations(1)

PyTorch

Code for Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inference (CVPR2020)

13014Cuda, PythonMar 11, 20204 years ago
conditional-computationconditional-executiondeep-learningdynamic-convolutionsdynamic-execution+2 more

Similar Papers

Cite this paper

@article{verelst2019dynamic,
  title  = {Dynamic Convolutions: Exploiting Spatial Sparsity for Faster Inference},
  author = {Thomas Verelst and Tinne Tuytelaars},
  year   = {2019},
  eprint = {1912.03203},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1912.03203}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1912.03203.svg)](https://codeofpaper.com/paper/1912.03203)

Discussion