[Paper Review] SWA Object Detection
This paper proposes a simple yet highly effective method to improve object detection performance by training a detector for an additional 12 epochs using cyclical learning rates and averaging the resulting 12 model checkpoints. The technique, inspired by Stochastic Weight Averaging (SWA), consistently boosts AP by approximately 1.0 on the COCO benchmark across multiple detectors like Mask R-CNN, Faster R-CNN, RetinaNet, FCOS, YOLOv3, and VFNet, with no inference cost and no architectural changes.
Do you want to improve 1.0 AP for your object detector without any inference cost and any change to your detector? Let us tell you such a recipe. It is surprisingly simple: train your detector for an extra 12 epochs using cyclical learning rates and then average these 12 checkpoints as your final detection model}. This potent recipe is inspired by Stochastic Weights Averaging (SWA), which is proposed in arXiv:1803.05407 for improving generalization in deep neural networks. We found it also very effective in object detection. In this technique report, we systematically investigate the effects of applying SWA to object detection as well as instance segmentation. Through extensive experiments, we discover the aforementioned workable policy of performing SWA in object detection, and we consistently achieve $\sim$1.0 AP improvement over various popular detectors on the challenging COCO benchmark, including Mask RCNN, Faster RCNN, RetinaNet, FCOS, YOLOv3 and VFNet. We hope this work will make more researchers in object detection know this technique and help them train better object detectors. Code is available at: https://github.com/hyz-xmaster/swa_object_detection .
Motivation & Objective
- To investigate whether Stochastic Weight Averaging (SWA) can improve generalization in object detection models.
- To identify an effective training strategy for applying SWA in object detection, including learning rate scheduling and number of checkpoints to average.
- To evaluate the impact of SWA on diverse object detectors across multiple architectures and backbone networks.
- To demonstrate that SWA can achieve consistent AP gains without modifying the detector architecture or incurring inference overhead.
Proposed method
- Train an object detector using a standard training schedule (e.g., 1x or 2x schedule) up to a predefined number of epochs.
- After standard training, continue training for an additional 12 epochs using cyclical learning rates between the initial and final learning rates.
- Collect the model checkpoints from these 12 additional epochs and compute their average to form the final SWA model.
- Use the averaged model for inference, maintaining the same architecture and inference pipeline as the original detector.
- Apply the same training and averaging procedure to various detectors, including Mask R-CNN, Faster R-CNN, RetinaNet, FCOS, YOLOv3, and VFNet.
- Evaluate the final SWA model on the COCO 2017 validation split using standard COCO AP metrics.
Experimental results
Research questions
- RQ1Can SWA improve generalization in object detection models without architectural changes?
- RQ2What is the optimal training strategy for applying SWA in object detection—specifically, how many additional epochs and what learning rate schedule should be used?
- RQ3Does the SWA-based method consistently improve performance across diverse object detectors with different architectures and backbones?
- RQ4How does SWA affect object localization and classification accuracy, as measured by error breakdown analysis?
Key findings
- Applying SWA by training for an additional 12 epochs with cyclical learning rates and averaging the resulting 12 checkpoints improves AP by approximately 1.0 on the COCO benchmark across all tested detectors.
- The SWA 1-12 model achieves comparable or better performance than SWA models trained over 24 or 48 epochs, indicating that 12 additional epochs are sufficient for optimal gain.
- The method improves both localization accuracy (e.g., +1.0 AP at IoU=0.75) and classification accuracy (e.g., +0.9 AP when localization errors are ignored), as shown in error breakdown analysis.
- The SWA technique consistently boosts performance regardless of the detector's original AP, including both high-performing models and those with lower initial accuracy.
- The SWA model trained from scratch using a mixed strategy (16 epochs with fixed LR, then 12 with cyclical LR) achieves the same performance (41.7 bbox AP, 37.4 mask AP) as the SWA model trained on a pre-trained model, confirming the method's robustness.
- The improvement is observed across multiple detectors, including Mask R-CNN, Faster R-CNN, RetinaNet, FCOS, YOLOv3, and VFNet, demonstrating broad applicability.
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.