  Real-time generic object detection on mobile platforms is a crucial but
challenging computer vision task. However, previous CNN-based detectors suffer
from enormous computational cost, which hinders them from real-time inference
in computation-constrained scenarios. In this paper, we investigate the
effectiveness of two-stage detectors in real-time generic detection and propose
a lightweight two-stage detector named ThunderNet. In the backbone part, we
analyze the drawbacks in previous lightweight backbones and present a
lightweight backbone designed for object detection. In the detection part, we
exploit an extremely efficient RPN and detection head design. To generate more
discriminative feature representation, we design two efficient architecture
blocks, Context Enhancement Module and Spatial Attention Module. At last, we
investigate the balance between the input resolution, the backbone, and the
detection head. Compared with lightweight one-stage detectors, ThunderNet
achieves superior performance with only 40% of the computational cost on PASCAL
VOC and COCO benchmarks. Without bells and whistles, our model runs at 24.1 fps
on an ARM-based device. To the best of our knowledge, this is the first
real-time detector reported on ARM platforms. Our code and models are available
at \url{https://github.com/qinzheng93/ThunderNet}.
