Introduction
Deep learning has revolutionized object detection, yet the most accurate models remain computationally expensive, requiring significant memory and FLOPs. While two-stage detectors like Faster R-CNN offer high precision, they are often too slow for real-time applications on hardware-constrained "edge" devices, such as mobile phones or IoT sensors. One-stage detectors like the Single Shot MultiBox Detector (SSD) are faster but still face a steep trade-off between size and performance. Researchers at NetEase have addressed this by developing a holistic compression pipeline that optimizes the entire architecture simultaneously rather than focusing solely on the backbone or detection branches.
The Compression Pipeline
The proposed methodology involves a four-step process designed to shrink models without the typical massive drop in accuracy associated with pruning.
1. Automatic Backbone Pruning (Slim-B)
The researchers utilized "Network Slimming," applying $L_1$ regularization to the scaling factors in Batch Normalization (BN) layers to identify and remove unimportant channels. This process was enhanced using cosine annealing for the learning rate and a stricter sparsity penalty to create a robust pruned ResNet50-v1d backbone.
2. Channel Matching
To maintain the mathematical integrity of ResNet's complex bottleneck structures, a logical "OR" masking strategy was implemented. This ensures that dimensions across different residual blocks match correctly even after pruning, allowing for seamless feature addition and concatenation.
3. Branch Layer Optimization
Instead of simple pruning, the authors added "Simple Residual Blocks" (ResBlocks) to the detection branches to recover representational power lost during backbone pruning. They also replaced standard $3 \times 3$ convolutions with $1 \times 1$ convolutions to further minimize complexity. Interestingly, the study found that a fixed prune-rate is more effective for these branches than automatic pruning, as detection layers are often randomly initialized and lack pre-existing importance weights.
4. Attention-Based Knowledge Distillation (KD)
To bridge the performance gap between the compressed student model and a larger teacher model, the team employed Attention Transfer. This forces the student to focus on the same spatial regions as the teacher, improving the learning of complex feature representations while reducing training costs compared to standard hint losses.
Experimental Results
The pipeline was evaluated on ImageNet-2012 and Pascal VOC benchmarks, demonstrating a superior accuracy-to-size profile:
- Size Efficiency: The pruned ResNet-C backbone was reduced from 97.6MB to just 12.1MB.
- Detection Performance: The optimized SSD-300 model achieved 71.2 mAP with a total model size of 16.3MB and 2.31G FLOPs.
- Comparative Advantage: Compared to the standard SSD-MobileNet, the proposed model is approximately 50% smaller (16.3MB vs 30.6MB) and 4.5% more accurate (71.2 vs 68.1 mAP).
- Ablation Insights: The inclusion of Knowledge Distillation provided a 1.3% mAP boost, validating the importance of the teacher-student training phase in recovering accuracy.
Conclusion and Future Work
This multi-stage approach proves that architectural quality can compensate for a reduction in channel quantity. While highly effective for SSD and ResNet architectures, future work could involve adapting the "Channel Matching" logic for modern architectures like Vision Transformers (ViTs) or YOLOv8. Additionally, combining this pruning pipeline with 8-bit or 4-bit quantization could yield even more significant size reductions for deployment on the most restrictive edge hardware.
Summary updated