Command Palette
Search for a command to run...
SSD: Single Shot MultiBox Detector
SSD: Single Shot MultiBox Detector
Wei Liu Dragomir Anguelov Dumitru Erhan Christian Szegedy Scott Reed Cheng-Yang Fu Alexander C. Berg
概要
本論文では、単一のディープニューラルネットワークを用いて画像中の物体を検出する手法を提案する。SSDと名付けた本手法では、出力空間であるバウンディングボックスを、各特徴マップの位置において異なるアスペクト比とスケールを持つデフォルトボックスの集合として離散化する。予測時、ネットワークは各デフォルトボックスにおける各物体カテゴリの存在スコアを生成し、物体の形状により適合するようにボックスを調整する。さらに、異なる解像度を持つ複数の特徴マップからの予測を統合することで、様々なサイズの物体を自然に扱う。オブジェクト提案を必要とする手法と比較して、SSDは提案生成および後続のピクセルまたは特徴のリサンプリング段階を完全に排除し、すべての計算を単一のネットワーク内に封装するため、よりシンプルである。これにより、SSDは訓練が容易であり、検出コンポーネントを必要とするシステムへの統合が簡潔となる。PASCAL VOC、COCO、ILSVRCデータセットにおける実験結果は、追加のオブジェクト提案ステップを利用する手法と匹敵する精度をSSDが達成することを確認している。また、非常に高速であり、訓練と推論の両方に対して統一されたフレームワークを提供する。300×300の入力では、SSDはNvidia Titan X上で59 FPSでVOC2007テストにおいて74.3%のmAPを達成し、512×512の入力では76.9%のmAPを達成して、同等の最先端Faster R-CNNモデルを上回る。他の単段手法と比較して、SSDはより小さな入力画像サイズにおいてもはるかに優れた精度を示す。コードはhttps://github.com/weiliu89/caffe/tree/ssdで入手可能である。
One-sentence Summary
SSD, a single-shot object detector from researchers at UNC Chapel Hill, Zoox, and Google, discretizes bounding box outputs into default boxes across multiple aspect ratios, scales, and feature map resolutions, completely eliminating proposal generation to achieve 74.3% mAP on VOC2007 at 59 FPS with a 300×300 input, competitive with Faster R-CNN while being substantially faster.
Key Contributions
-
SSD detects objects using a single deep neural network that predicts category scores and bounding-box adjustments for many default boxes at each feature map location, eliminating proposal generation and resampling stages.
-
The method attaches convolutional bounding-box predictors to multiple feature maps at different resolutions and samples many locations, scales, and aspect ratios, improving modeling of objects at multiple sizes while remaining simpler than two-stage proposal pipelines.
-
Experiments on PASCAL VOC, COCO, and ILSVRC show competitive or better accuracy, with SSD300 reaching 74.3% mAP on VOC2007 at 59 FPS and SSD512 reaching 76.9% mAP, outperforming a comparable Faster R-CNN model.
Introduction
The authors consider modern object detection systems that hypothesize boxes, resample pixels or features, and classify each region, which has enabled high accuracy on benchmarks such as PASCAL VOC and COCO but makes embedded and real-time deployment difficult because of high compute and latency. Prior work reduced speed by optimizing proposals or pooling, yet such gains often traded off detection accuracy, and two-stage region-proposal methods added training and integration complexity. The authors leverage SSD, a single-shot detector that uses fixed default boxes and small convolutional filters to predict object categories and box offsets directly from multiple feature maps and aspect ratio-specific filters, achieving high accuracy without pixel or feature resampling, with real-time performance such as 59 FPS and 74.3% mAP on VOC2007.
Method
The authors leverage a feed forward convolutional detector that predicts a fixed collection of bounding boxes and class scores in one pass, followed by a non maximum suppression step to obtain final detections. The early layers form a base network, which is a standard classification backbone truncated before the classification layers. Extra feature layers are appended to the end of the base network. These layers progressively reduce spatial resolution, forming multi scale feature maps that allow the model to predict detections for objects of different sizes.
Each feature map, either an existing base network feature map or an added auxiliary feature map, is processed by convolutional predictors. For a feature map of size m×n with p channels, a small 3×3×p kernel is applied at each spatial location. For each of the k default boxes associated with that location, the kernel outputs four coordinate offsets and c class confidence values, where c is the number of object classes. This yields (c+4)k filters at each location and (c+4)kmn outputs for the full feature map. The predictors are convolutional rather than fully connected, which allows detection to remain spatially aligned with the feature map. As shown in the framework diagram below:
The central prediction unit is the default box, which is the SSD analogue of an anchor box. Default boxes are assigned to every feature map cell in a convolutional manner, so the relative position of each default box within its cell is fixed. Multiple default boxes per location provide different scales and aspect ratios. At each location, the network predicts offsets from the default box geometry and confidence scores for each class. The offset outputs are not absolute box coordinates; they are corrections relative to the corresponding default box.
The default box tiling, scale variation, and positive or negative assignment during training are shown in the figure below:
For a default box at a given feature map location with size ∣fk∣, its center is placed at
(∣fk∣i+0.5,∣fk∣j+0.5),i,j∈[0,∣fk∣).This construction lets the network discretize the space of possible object boxes by combining several feature maps, several locations, several scales, and several aspect ratios.
During training, ground truth boxes must be assigned to specific outputs in the fixed set of detector predictions. For each ground truth box, the authors first select the default box with the best Jaccard overlap. They then additionally match any default box whose Jaccard overlap with the ground truth box is above 0.5. This produces multiple positive matches for some ground truth boxes and simplifies learning by allowing overlapping high quality boxes to receive high scores. The remaining unmatched boxes are treated as negative examples.
The training objective is a weighted sum of a localization loss and a confidence loss. Let xijp∈{1,0} indicate whether the ith default box is matched to the jth ground truth box of class p. Because multiple default boxes can match one ground truth box, ∑ixijp≥1 is possible. The overall loss is
L(x,c,l,g)=N1(Lconf(x,c)+αLloc(x,l,g)),where N is the number of matched default boxes and α is set to 1 by cross validation. If N=0, the loss is set to 0.
The localization loss is a Smooth L1 loss between predicted and ground truth box parameters. The network regresses offsets relative to the default box center, width, and height:
Lloc(x,l,g)g^jcxg^jw=i∈Pos∑Nm∈{cx,cy,w,h}∑xijksmoothL1(lim−g^jm),=diwgjcx−dicx,g^jcy=dihgjcy−dicy,=log(diwgjw),g^jh=log(dihgjh).The confidence loss is a softmax loss over multiple classes. Positive default boxes contribute class losses for their matched categories, while negative default boxes contribute background loss:
Lconf(x,c)=−i∈Pos∑Nxijplog(c^ip)−i∈Neg∑log(c^i0),with
c^ip=∑pexp(cip)exp(cip).The scale assigned to each feature map is chosen systematically rather than relying on multiple image scales. If m feature maps are used for prediction, the scale for feature map k is computed as
sk=smin+m−1smax−smin(k−1),k∈[1,m],with smin=0.2 and smax=0.9. This makes the lowest feature map responsible for smaller objects and the highest feature map responsible for larger objects. The default box width and height for a given aspect ratio ar are
wka=skar,hka=arsk.The authors use aspect ratios {1,2,3,21,31}. For aspect ratio 1, they also add one extra box with scale
sk′=sksk+1,which improves coverage between adjacent feature map scales.
After matching, most default boxes are negatives, which creates a severe positive and negative imbalance. To avoid unstable optimization, the authors apply hard negative mining. They rank negative examples by confidence loss and keep only the hardest negatives so that the negative to positive ratio is at most 3:1. This focuses training on the most informative background regions and improves optimization speed and stability.
Data augmentation is designed to make the detector robust to object scale, aspect ratio, and photometric variation. Each training image can be used in one of several ways: the full original image, a sampled patch constrained to have a minimum Jaccard overlap with ground truth objects of 0.1, 0.3, 0.5, 0.7, or 0.9, or a fully random patch. The sampled patch has area between 0.1 and 1 of the original image and aspect ratio between 21 and 2. A ground truth box is retained if its center lies inside the sampled patch. The patch is then resized to the network input size, optionally flipped horizontally, and augmented with photometric distortion.
For small objects, random cropping acts as a zoom in operation by creating larger object instances during training. An expansion operation can also be applied before cropping: the image is randomly placed on a much larger canvas filled with mean values. This creates smaller apparent objects and provides additional training examples with altered relative scale.
The authors also analyze how detection quality varies by object category, bounding box area, and aspect ratio. These diagnostics expose the kinds of errors the detector encounters, including localization errors, confusion with similar categories, and sensitivity to small objects or unusual aspect ratios. Such observations motivate the multi scale default box design, hard negative mining, and aggressive patch based augmentation. The category level diagnostics are shown in the figure below:
The size and aspect ratio diagnostics highlight that model behavior changes across object dimensions, especially for small bounding boxes and atypical aspect ratios. This guides the training procedure toward augmentation strategies that repeatedly expose the detector to varied cropping scales and spatial layouts.
Experiment
Experiments use a VGG16-based SSD architecture evaluated on PASCAL VOC2007 and VOC2012, COCO, and preliminary ILSVRC detection tasks. The main benchmarks show that SSD delivers competitive or superior detection accuracy against Fast R-CNN, Faster R-CNN, and YOLO while maintaining real-time inference. Additional model analyses validate the roles of data augmentation, diverse default box shapes, atrous convolutions, and multi-resolution feature maps, while an augmentation-based zoom-out strategy and timing results highlight improved small-object performance and efficient inference.
The VOC2007 test results show that adding more training data improves detection accuracy across methods, with the strongest gains seen when combining VOC2012 with COCO-based training for Faster R-CNN. SSD300 benefits markedly from the larger training set and becomes competitive with Faster R-CNN trained on VOC2007. The reported findings also indicate that larger input sizes and extra data help detection quality, especially for smaller objects. Fast R-CNN and Faster R-CNN both improve when trained on 07+12 rather than VOC2007 only. Adding COCO pretraining gives Faster R-CNN the strongest overall detection accuracy. SSD300 improves substantially with 07+12 training and approaches Faster R-CNN trained on VOC2007.
The results show that broader data augmentation, more diverse default box shapes, atrous convolutions, and predictions from multiple output layers all benefit SSD performance. Removing or reducing these components leads to lower accuracy or slower inference, with fewer output layers causing a monotonic decline in detection quality. More default box shapes improve detection accuracy by making box prediction easier. Atrous convolutions provide similar accuracy with faster inference than the full VGG16 variant.
The results show that prediction sources from multiple output layers at different resolutions give higher detection accuracy than configurations with fewer layers, even when the total number of default boxes is kept roughly comparable. Accuracy falls progressively as output layers are removed. Using boundary boxes helps most in the full multi layer setting, while reduced layer settings show a much smaller benefit. Multiple prediction layers improve accuracy over using only a subset of layers. Boundary box handling is important in the full configuration, and its effect weakens as fewer layers are used.
On PASCAL VOC2012 detection, SSD300 is more accurate than Fast and Faster R-CNN trained on the same VOC data, and SSD512 gives a further accuracy gain from larger input resolution. The SSD models are much better than YOLO, while pretraining on COCO then fine-tuning on VOC improves both Faster R-CNN and SSD, with SSD512 reaching the strongest mAP. Higher input resolution from SSD300 to SSD512 improves detection accuracy. COCO pretraining and VOC fine-tuning increase mAP for Faster R-CNN and SSD. SSD is substantially more accurate than YOLO on VOC2012.
On COCO detection, SSD300 trained with adjusted default boxes outperforms Fast R-CNN on both mean average precision at 0.5 overlap and across 0.5 to 0.95 overlap. It is close to Faster R-CNN and ION on stricter IoU 0.75 while trailing them at IoU 0.5. Using a larger input scale in SSD512 yields larger gains on large objects than on small objects. SSD300 improves average precision over Fast R-CNN at both 0.5 overlap and the 0.5 to 0.95 overlap range. SSD300 has competitive precision at IoU 0.75 but lower precision at IoU 0.5 than Faster R-CNN and ION. The SSD512 comparison shows larger improvements for large object precision and recall than for small object metrics.
Experiments on PASCAL VOC and COCO compare detection models under varying training data, input resolutions, and architecture settings. They show that larger training sets, COCO pretraining, higher input sizes, richer augmentations, diverse default boxes, atrous convolutions, and multi-layer predictions improve detection quality, especially for small objects and stricter overlap thresholds. SSD is more accurate than YOLO, competitive with Faster R-CNN, and benefits from multi-layer default boxes, while larger inputs help more for large objects.