Computer Vision Lab Models SSDlite320 MobileNetV3-Large
SSDlite320 MobileNetV3-Large
Single-shot detector with depthwise heads
A lightweight detector that runs in the browser. Box decoding and NMS are done in JavaScript with the original model's anchors.
| Architecture | Single-shot detector with depthwise heads |
|---|---|
| Task | Object detection |
| Training data | COCO 2017 |
| the number of parameters | 3,440,060 |
| Framework | PyTorch → ONNX (fp16) + anchors |
| File size | 6.6 MB |
| Licence | BSD-3-Clause (torchvision code); weights trained on COCO 2017 |
| Where it runs | Browser (ONNX Runtime Web) |
| Official source | pytorch.org |
| Official weights | download.pytorch.org |
Published metrics (from the official source, not measured by this site)
| Metric | Value | Evaluation data | Source |
|---|---|---|---|
| box mAP | 21.3 | COCO val2017 | Source |
Architecture diagram
- Input / output
- Convolutional layer
- Composite block
- Memory / intermediate features
- Output head
- Operation (add, multiply, merge)
Detailed model explanation
Idea and intuition
SSDlite belongs to the family of one-stage detectors (Single Shot Detector): instead of proposing regions and then classifying them, the model predicts in a single pass, for each position in several feature maps, box offsets and class scores for a set of “anchors” of different sizes and ratios. The high-resolution maps capture small objects, and the deep low-resolution maps capture large objects.
“Lite” means replacing the ordinary convolutions in the prediction heads with depthwise separable convolutions, as the MobileNetV2 paper proposed, which greatly reduces the compute. The backbone here is MobileNetV3-Large, and the input resolution is 320×320.
How it works step by step
- The image is resized to 320×320 and normalised.
- MobileNetV3 extracts feature maps, and extra layers that gradually reduce the resolution are added to form a pyramid of six maps.
- In each cell of each map, and for each anchor, the regression head predicts four offsets
(\Delta x,\Delta y,\Delta w,\Delta h)and the classification head 91 scores (the COCO classes plus background). - The offsets are decoded into boxes, then duplicates are removed with non-maximum suppression (NMS) per class.
Mathematical formulation
Decoding the box from the anchor (a_x,a_y,a_w,a_h):
\hat x = a_x + \Delta x\, a_w,\quad \hat y = a_y + \Delta y\, a_h,\quad \hat w = a_w e^{\Delta w},\quad \hat h = a_h e^{\Delta h}The loss function is the sum of a classification loss and a Smooth-L1 localisation loss on the positive anchors only, with hard negative mining at a ratio of about 3:1 to handle the dominance of the background:
\mathcal L = \frac{1}{N}\big(\mathcal L_{cls} + \alpha\,\mathcal L_{loc}\big)Strengths
- Very small (about 3.4 million parameters) and fast, so it runs in the browser and on mobile devices.
- A single pass with no region proposal stage.
- A structure that is clear for teaching anchors and NMS.
Limitations
- Its accuracy is modest (box mAP = 21.3 on COCO val2017 according to torchvision) compared with heavy detectors.
- Weak on very small objects because of the low 320×320 resolution.
- It relies on hand-designed anchors and on NMS with thresholds that must be tuned.
Use in the lab
This model runs inside your browser, and the box decoding and NMS steps are done in JavaScript. Try changing the confidence threshold and the NMS IoU threshold and note their effect on the number of duplicate and missed boxes.
Uses
Detecting the 80 COCO classes.
Runtime requirements
A modern browser.
How to load
Included in the core pack.
References
- W. Liu et al. (2016).SSD: Single Shot MultiBox Detector. ECCV 2016 (LNCS 9905). doi:10.1007/978-3-319-46448-0_2
- A. Howard et al. (2019).Searching for MobileNetV3. ICCV 2019. doi:10.1109/ICCV.2019.00140
- T.-Y. Lin et al. (2014).Microsoft COCO: Common Objects in Context. ECCV 2014 (LNCS 8693). doi:10.1007/978-3-319-10602-1_48
