[Paper Review] Focal and Global Knowledge Distillation for Detectors
This paper proposes Focal and Global Distillation (FGD), a knowledge distillation method for object detectors that separately distills foreground and background features while preserving critical spatial and channel attention, and reconstructs global feature relations via GcBlock. FGD achieves state-of-the-art mAP improvements across diverse detectors, including 40.7% mAP on COCO2017 with RetinaNet-ResNet50.
Knowledge distillation has been applied to image classification successfully. However, object detection is much more sophisticated and most knowledge distillation methods have failed on it. In this paper, we point out that in object detection, the features of the teacher and student vary greatly in different areas, especially in the foreground and background. If we distill them equally, the uneven differences between feature maps will negatively affect the distillation. Thus, we propose Focal and Global Distillation (FGD). Focal distillation separates the foreground and background, forcing the student to focus on the teacher's critical pixels and channels. Global distillation rebuilds the relation between different pixels and transfers it from teachers to students, compensating for missing global information in focal distillation. As our method only needs to calculate the loss on the feature map, FGD can be applied to various detectors. We experiment on various detectors with different backbones and the results show that the student detector achieves excellent mAP improvement. For example, ResNet-50 based RetinaNet, Faster RCNN, RepPoints and Mask RCNN with our distillation method achieve 40.7%, 42.0%, 42.0% and 42.1% mAP on COCO2017, which are 3.3, 3.6, 3.4 and 2.9 higher than the baseline, respectively. Our codes are available at https://github.com/yzd-v/FGD.
Motivation & Objective
- Address the poor performance of standard knowledge distillation in object detection due to large feature discrepancies between teacher and student networks.
- Investigate the impact of foreground-background class imbalance on distillation effectiveness, particularly in feature map attention patterns.
- Develop a method that selectively distills critical pixels and channels in the teacher network to improve student learning efficiency.
- Compensate for the loss of global context in focal distillation by transferring inter-pixel relationships from teacher to student.
- Design a plug-and-play distillation framework compatible with various detector architectures, including two-stage, anchor-based, and anchor-free models.
Proposed method
- Apply focal distillation by decoupling foreground and background regions in feature maps and applying attention-based weighting to prioritize crucial pixels and channels.
- Use spatial and channel attention masks from the teacher network to guide the student in focusing on high-importance features.
- Introduce global distillation using GcBlock to reconstruct and transfer long-range spatial dependencies between features from teacher to student.
- Combine focal and global distillation losses computed solely on feature maps, enabling compatibility with diverse detector architectures.
- Utilize a temperature scaling hyperparameter T to sharpen the attention distribution in feature maps, enhancing focus on salient regions.
- Train the student detector using a combination of distillation losses and standard detection objectives, with no architectural modifications.
Experimental results
Research questions
- RQ1Why do standard knowledge distillation methods fail to improve object detection performance significantly?
- RQ2How does the imbalance between foreground and background features affect knowledge distillation in object detection?
- RQ3What role do spatial and channel-wise attention differences between teacher and student networks play in distillation effectiveness?
- RQ4Can separating distillation into foreground and background regions improve performance compared to uniform distillation?
- RQ5To what extent does preserving global feature relations enhance student detector performance in object detection?
Key findings
- Focal distillation alone improves mAP by up to 3.3% on COCO2017, with RetinaNet-ResNet50 achieving 40.7% mAP when trained with FGD.
- Global distillation using GcBlock improves mAP by 3.1% on Faster R-CNN with ResNeXt101, demonstrating the importance of global context in distillation.
- The combination of spatial and channel attention masks yields a 2.6 mAP gain over baseline, with the spatial mask contributing the most significant improvement.
- The method is robust to hyperparameter T, with only a 0.4 mAP drop in performance across different values, indicating low sensitivity.
- Distilling from the background reduces false positives, while distilling from the foreground reduces false negatives, showing complementary roles.
- FGD achieves state-of-the-art performance across multiple detectors, including one-stage, two-stage, and anchor-free models, without architectural modifications.
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.