Paper commentary
Speed/accuracy trade-offs for modern convolutional object detectors
Speed and accuracy trade-offs for object detectors
- Problem Detectors are hard to compare for speed and memory because papers use different feature extractors, image sizes, frameworks and hardware. A practitioner cannot easily see which detector fits a given platform.
- Method The authors implement Faster R-CNN, R-FCN and SSD in one unified framework. They vary the feature extractor, image size and proposal count, then trace the speed and accuracy frontier.
- Results Faster R-CNN with Inception Resnet kept 96% of its 300-proposal accuracy using 50 proposals. Running time fell by a factor of 3.
Why detector speed comparisons are hard
Accuracy numbers such as mAP don't settle which detector to ship. A mobile app needs a small memory footprint, and a self-driving car needs a real-time response. So a practitioner has to weigh speed and memory against accuracy, and that trade-off depends on the feature extractor and the input size.
Few papers go beyond quoting a frame rate. A single frame-rate figure hides how the result depends on the feature extractor, the input size and other settings. Speed comparisons are also uneven, because papers use different frameworks, hardware and training sets.
The authors narrow the question on purpose and study single-model, single-pass detectors, with no ensembling, multi-crop or flipping. They measure test-time cost only and leave training time out. That scope keeps the comparison fair, because every model sees one image through one network pass.
One template behind three detectors
The key idea is that all three detectors are one convolutional network trained on a mixed regression and classification objective, predicting through a sliding window. Because the template is shared, a feature extractor can be swapped under any of the three meta-architectures. What separates them is how each turns that shared template into detections.
A detector places anchors, which are boxes at many scales, aspect ratios and positions, over the image. Each anchor is either positive, matched to a groundtruth box and given a class label and a box encoding, or negative with label 0. Argmax matching lets many anchors match one box and drops matches whose Jaccard overlap is too low.
The loss for one anchor a is a weighted sum of a location term and a classification term: \[ L(a,I;\theta) = \alpha \cdot \mathbb{1}[a \text{ is positive}] \cdot \ell_{loc}\big(\varphi(b_a;a) - f_{loc}(I;a,\theta)\big) + \beta \cdot \ell_{cls}\big(y_a, f_{cls}(I;a,\theta)\big) \] Here I is the image, θ the model parameters, and α and β set how much the localization and classification terms count.
The location term is Smooth L1, and the box encoding scales center offsets by 10 and log size ratios by 5. The loss is averaged over anchors and minimized over θ.
Faster R-CNN has two stages: a region proposal network picks class-agnostic proposals, then a box classifier refines and classifies each proposal. R-FCN keeps that two-stage shape but crops position-sensitive score maps from the last feature layer instead. SSD drops the second stage and predicts classes and offsets from feature maps in one feed-forward pass.
Dai et al. report that R-FCN with Resnet-101 matched Faster R-CNN's accuracy, often at faster running times.
What is varied and what is held fixed
The authors compare six feature extractors: VGG-16, Resnet-101, Inception v2, Inception v3, Inception Resnet (v2) and MobileNet. Each one is a pretrained backbone, and the choice changes memory, speed and accuracy. MobileNet is built from depthwise separable convolutions, which factor a standard convolution into a depthwise convolution and a 1×1 convolution.
Each detector also needs a layer where proposals or predictions are made, and the authors mostly keep the choices of the original papers. For example, they take conv5 for VGG-16 and the last layer of the conv4 block for Resnet-101.
Resnet and Inception Resnet run at output stride 16 by default, or at stride 8 for a finer feature map. The stride change comes from altering a stride-2 layer to stride 1 and compensating with atrous convolutions.
Faster R-CNN and R-FCN vary the number of proposals from 10 to 300 at test time. Faster R-CNN and R-FCN train on images scaled to M pixels on the shorter edge, with M = 600 for high resolution and M = 300 for low resolution. SSD instead resizes every image to a fixed M×M shape.
Training is end to end, using SGD with momentum at batch size 1 for Faster R-CNN and R-FCN, and RMSProp at batch size 32 for SSD. The learning rate schedule is tuned by hand for each feature extractor.
Timings are taken on a GPU at batch size one, averaged over 500 images. The timed pipeline includes non-max suppression at an IOU threshold of 0.6, which runs on the CPU. Postprocessing can take most of the running time of the fastest models, about 40ms, and caps the rate at 25 frames per second.
Where the optimality frontier sits
Across 147 configurations, the authors plot mAP against GPU time and mark an optimality frontier. Running time per image runs from tens of milliseconds to almost 1 second. The frontier marks points where better accuracy can only come from spending more time.
R-FCN and SSD are faster on average, while Faster R-CNN is slower but more accurate, at least 100 ms per image. That picture changes once the number of proposals is limited, so Faster R-CNN can run as fast as the others.
At the fast end, MobileNet looks roughly twice as fast as Inception v2 when postprocessing is ignored, and it is slightly less accurate. The fastest SSD w/MobileNet at low resolution scored 18.8 test-dev mAP, compared to 35.6 for Faster R-CNN with Inception Resnet V2 and 300 proposals. That most accurate point needs nearly a second of processing per image.
The authors describe an elbow in the frontier where R-FCN with Residual Network extractors balances speed and accuracy best. Faster R-CNN with Resnet can reach similar speeds if its proposals are limited to 50.
Why fewer proposals speed up Faster R-CNN
In Faster R-CNN, part of the computation runs once per region, so running time grows with the number of proposals. R-FCN moves that per-region work into its last layer, and its box classifier runs once per image. The authors vary the proposals from 10 to 300 to test how much this matters.
For Faster R-CNN with Inception Resnet at high resolution, mAP was 35.4% with 300 proposals and 29% with 10. At 50 proposals it kept 96% of the 300-proposal accuracy, and running time fell by a factor of 3. So most of the accuracy survives a large cut in proposals, which fits the box classifier's per-region cost being the main driver.
R-FCN gains far less from fewer proposals, because its box classifier is run only once per image. At 100 proposals, Faster R-CNN with ResNet roughly matched R-FCN with 300 proposals in both mAP and GPU speed. The savings are largest for Inception Resnet, although similar trade-offs hold for every feature extractor.
What moves accuracy: extractors, stride and resolution
Detector mAP rises with the ImageNet Top-1 accuracy of the feature extractor for Faster R-CNN and R-FCN. SSD depends less on that classification accuracy, so it is less sensitive to the quality of its extractor.
SSD models score poorly on small objects, yet they are competitive on large objects, and for lighter extractors they beat Faster R-CNN and R-FCN there.
For Resnet-101, stride 8 instead of 16 raised mAP by about 5% in relative terms, using (map8 - map16) / map16 as the measure. The same change increased running time by 63%. The trade-off is a small accuracy gain for a large time cost.
Halving the input resolution in both dimensions lowered mAP by 15.88% on average and cut inference time by 27.4% on average. High resolution matters most for small objects, where mAP is often about twice as high. Strong small-object mAP goes with strong large-object mAP, though the reverse doesn't hold, since SSD does well on large objects but not small.
FLOPs and memory don't track time alike
FLOPs count multiply-adds, which gives a platform-independent measure of computation that need not scale linearly with wall-clock time. On GPU, Resnet-101 has a FLOPs-to-milliseconds ratio above 1, while Inception and MobileNet models sit below 1. The authors conjecture that factorized convolutions add memory overhead, or that cuDNN favors dense convolution.
Memory is total usage measured with tfprof, not peak usage, averaged over three images. Memory tracks running time, and larger extractors need much more of it. MobileNet stays under 1Gb total in almost all settings, which makes it the cheapest extractor here.
The 2016 COCO ensemble result
For the 2016 COCO challenge, the authors ensembled five Faster R-CNN models with multicrop inference. The ensemble scored 41.3% mAP@[.5,.95] on the COCO test set, compared to 37.1% for the previous best MSRA result. It needs roughly 50 end-to-end network evaluations per image, so it sits outside the single-model comparison.
The five models were chosen greedily on a held-out validation set, then pruned when they were too similar to earlier picks. Similarity was measured as the cosine distance between category-wise AP vectors, against a threshold. The combination follows the procedure from the MSRA paper.
On test-dev, a single Faster R-CNN with Inception Resnet (v2) scored AP 0.347, compared to 0.416 for the diverse ensemble with multicrop. A hand-selected ensemble scored 0.41, so the authors credit pruning for diversity with helping. On the 2016 test-challenge set, the Ours row scored APsmall 0.231, compared to 0.173 for MSRA2015.
The single-model numbers come from a held-out validation set, so they aren't strictly comparable to test-dev results.
Limits of the comparison
Timings include CPU postprocessing and batch size one, so they may not match speeds in the literature. Hardware, drivers and framework also differ from other reports, and Liu et al. timed with batch size 8.
Some high-resolution SSD models had not converged, so they were left out of the analysis. The SSD VGG numbers follow the ECCV version, because the newer augmentation has not been tried.
R-FCN has no VGG or Inception V3 results, and SSD has none for Inception V3. High-resolution SSD results exist only for Resnet 101 and Inception V2.
All the trade-off curves come from COCO, and the study covers only single-model, single-pass detectors. Ensembles and multicrop results were not tested within the trade-off curves.
Paper info
- Authors
- Jonathan Huang, Vivek Rathod, Chen Sun, Menglong Zhu, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, Kevin Murphy
- Venue
- arXiv · Preprint
- First published
- 2016-11-30
- Added
- 2026-11-12
- Updated
- 2017-4-25
- Version
- v3
- arXiv
- 1611.10012
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Jonathan Huang, Vivek Rathod, Chen Sun, Menglong Zhu, Anoop Korattikara, Alireza Fathi, Ian Fischer, Zbigniew Wojna, Yang Song, Sergio Guadarrama, Kevin Murphy (2016). Speed/accuracy trade-offs for modern convolutional object detectors. arXiv:1611.10012v3. https://arxiv.org/abs/1611.10012v3
BibTeX
@misc{huang2016speed,
title = {{Speed/accuracy trade-offs for modern convolutional object detectors}},
author = {Jonathan Huang and Vivek Rathod and Chen Sun and Menglong Zhu and Anoop Korattikara and Alireza Fathi and Ian Fischer and Zbigniew Wojna and Yang Song and Sergio Guadarrama and Kevin Murphy},
year = {2016},
eprint = {1611.10012},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1611.10012v3}
}