[Paper Review] MegDet: A Large Mini-Batch Object Detector
MegDet proposes a large mini-batch object detection framework that enables training with mini-batch sizes up to 256 using 128 GPUs, achieving 52.5 mmAP on COCO 2017 and reducing training time from 33 hours to just 4.1 hours. It introduces a warmup learning rate policy and Cross-GPU Batch Normalization (CGBN) to stabilize training and improve accuracy at scale.
The improvements in recent CNN-based object detection works, from R-CNN [11], Fast/Faster R-CNN [10, 31] to recent Mask R-CNN [14] and RetinaNet [24], mainly come from new network, new framework, or novel loss design. But mini-batch size, a key factor in the training, has not been well studied. In this paper, we propose a Large MiniBatch Object Detector (MegDet) to enable the training with much larger mini-batch size than before (e.g. from 16 to 256), so that we can effectively utilize multiple GPUs (up to 128 in our experiments) to significantly shorten the training time. Technically, we suggest a learning rate policy and Cross-GPU Batch Normalization, which together allow us to successfully train a large mini-batch detector in much less time (e.g., from 33 hours to 4 hours), and achieve even better accuracy. The MegDet is the backbone of our submission (mmAP 52.5%) to COCO 2017 Challenge, where we won the 1st place of Detection task.
Motivation & Objective
- Address the inefficiency and inaccuracy of small mini-batch training in object detection, which limits training speed and batch normalization statistics.
- Overcome the challenge of training large mini-batch detectors, where large learning rates cause instability and small ones hurt convergence.
- Enable faster training cycles by scaling up to 256 mini-batch size and 128 GPUs without sacrificing accuracy.
- Improve batch normalization statistics in object detection by introducing Cross-GPU Batch Normalization (CGBN).
Proposed method
- Introduce a warmup learning rate policy that gradually increases the initial learning rate to stabilize training with large mini-batches.
- Propose Cross-GPU Batch Normalization (CGBN), which aggregates batch statistics across multiple GPUs to improve BN accuracy and training stability.
- Apply the linear scaling rule with a new interpretation based on maintaining equivalent loss variance in object detection.
- Use a long training policy with learning rate decay to improve convergence and final accuracy for large mini-batch settings.
- Implement sublinear memory usage for BN statistics when BN size exceeds 32 to reduce computational overhead.
- Combine CGBN with OHEM, atrous convolution, multi-scale training, and stronger backbones to enhance model performance.
Experimental results
Research questions
- RQ1Can large mini-batch training be successfully applied to object detection with minimal accuracy drop and significant speedup?
- RQ2How does Cross-GPU Batch Normalization (CGBN) improve training stability and accuracy compared to standard BN in large mini-batch settings?
- RQ3What is the optimal batch size and BN statistics size for large mini-batch object detection on COCO?
- RQ4Does the warmup learning rate policy effectively stabilize training with large mini-batches in object detection?
- RQ5How does the performance of large mini-batch training compare to standard small-batch training in terms of convergence speed and final accuracy?
Key findings
- MegDet trained with a mini-batch size of 256 on 128 GPUs achieves 52.5 mmAP on COCO 2017 test-dev, securing 1st place in the detection challenge.
- Training time is reduced from 33.2 hours (baseline with 16-batch size on 8 GPUs) to just 4.1 hours (256-batch size on 128 GPUs), achieving an 8× speedup.
- The best performance is achieved with a BN size of 32; smaller sizes (e.g., 2, 4, 8) degrade accuracy due to poor statistics, while larger sizes (e.g., 64) also reduce performance.
- The warmup learning rate policy enables stable training with large mini-batches, allowing convergence even at high learning rates.
- CGBN significantly improves training stability and accuracy, especially for large mini-batch settings, and allows consistent performance across different batch sizes.
- Longer training policies (e.g., 256 (long)) improve accuracy slightly (37.7 vs. 37.1 mmAP) and show consistent convergence across large mini-batch settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.