Localization Distillation for Object Detection

Zhaohui Zheng, Rongguang Ye, Qibin Hou, Dongwei Ren, Ping Wang, Wangmeng Zuo, Ming-Ming Cheng

Here is a blog-style summary of the paper "Localization Distillation for Object Detection".

TL;DR

This paper challenges the long-held belief that feature imitation is always superior to logit mimicking for object detection knowledge distillation (KD). By introducing Localization Distillation (LD), which frames bounding box regression as a discrete probability distribution task, the authors show that logit mimicking can actually outperform feature imitation, delivering significant accuracy gains with zero inference overhead.

What Problem Does This Paper Address?

Knowledge distillation (KD) helps compress large, cumbersome "teacher" networks into compact, efficient "student" networks. In image classification, this is usually done via logit mimicking—forcing the student to match the final output probabilities of the teacher.

However, in object detection, logit mimicking has historically underperformed compared to feature imitation (matching intermediate layer representations). The reason? Object detection requires both classification and localization. Traditional logit mimicking only transfers classification knowledge, completely ignoring the localization head. Furthermore, standard bounding boxes use a single coordinate representation (Dirac delta distribution) that cannot communicate the uncertainty or ambiguity of an object's boundaries (e.g., where an elephant's foot ends in tall grass, as shown in the figure below).

Fig. 2. Bottom edge for “elephant” and right edge for “surfboard” are ambiguous to locate.

Methods

To bridge this gap, the authors introduce two key components:

  1. Localization Distillation (LD): Instead of predicting raw coordinates, the localization head divides the bounding box search space into discrete bins, turning regression into a classification-like probability distribution task. This allows the student to mimic the teacher's complete localization logit distribution via a generalized SoftMax function with a temperature parameter ($\tau$). This distribution naturally transfers rich information about boundary uncertainty from teacher to student.
  2. Valuable Localization Region (VLR): Classification and localization tasks favor different regions of an image. The authors introduce VLR, a selective region distillation strategy that uses Distance-IoU (DIoU) to dynamically expand the distillation area outward from the object's center, capturing crucial contextual information for localization.

Additionally, the authors extend this framework to Rotated LD to handle arbitrary-oriented object detection by adding a probability distribution for the rotation angle.

Fig. 3. Illustration of localization distillation (LD) for an edge e ∈B. Only the localization branch is visualized here. S(·, τ) is the generalized SoftMax function with temperature τ. For a given detector, we first switch the bounding box representation to probability distribution. Then, we determine where to distill via region weighting on the main distillation region and the valuable localization region. Finally, we calculate the LD loss between two probability distributions predicted by the teacher and the student.

Datasets

The proposed method was validated across three widely accepted benchmarks:

  • MS COCO (val2017 and test-dev 2019): The primary benchmark for general horizontal object detection.
  • PASCAL VOC (07+12): Used for additional verification of horizontal detection.
  • DOTA (v1.0): A large-scale aerial image dataset used specifically to evaluate the rotated object detection extension.

Key Insights and Ideas

  • Logit Mimicking is Back: For years, the community assumed feature imitation was inherently better for object detection. This paper proves that the absence of explicit localization distillation was the only reason logit mimicking lagged behind.
  • Freedom to Learn: Intriguingly, when a student is trained with logit mimicking, its internal feature representations show a near-zero Pearson correlation with the teacher's features. This means logit mimicking gives the student the liberty to find its own optimal optimization path, rather than rigidly forcing its features to match the teacher's geometry.
  • Smoother Optimization Landscapes: Feature imitation tends to produce a very sharp Average Precision (AP) landscape in the feature subspace, making early-stage training difficult. Logit mimicking provides a flatter, more robust landscape, easing optimization and speeding up convergence.

Key Results

The authors integrated LD into several popular dense detectors (GFocal, RetinaNet, FCOS, ATSS) with impressive results:

  • MS COCO: LD boosted the strong GFocal baseline (ResNet-50) from 40.1 to 42.1 AP (+2.0 AP improvement). Their best model achieved 50.5 AP using a ResNeXt-101 backbone, outperforming all existing detectors under identical settings.
  • DOTA (Rotated Objects): Applying Rotated LD to Rotated-RetinaNet pushed the baseline from 33.7 to 39.1 AP (a massive +5.4 AP jump).
  • Efficiency: Because distillation only occurs during training, all of these performance boosts come with zero additional parameters and zero inference speed penalties.

Limitations and Future Work

While highly effective for dense (anchor-based and anchor-free) object detectors, the paper primarily focuses on these architectures. The authors note that applying LD to sparse object detectors (such as the DETR series), heterogeneous teacher-student pairs (different architectural families), and extending it to adjacent fields like instance segmentation, object tracking, and 3D object detection remain open areas for future exploration.

Summary updated

Abstract

Previous knowledge distillation (KD) methods for object detection mostly focus on feature imitation instead of mimicking the prediction logits due to its inefficiency in distilling the localization information. In this paper, we investigate whether logit mimicking always lags behind feature imitation. Towards this goal, we first present a novel localization distillation (LD) method which can efficiently transfer the localization knowledge from the teacher to the student. Second, we introduce the concept of valuable localization region that can aid to selectively distill the classification and localization knowledge for a certain region. Combining these two new components, for the first time, we show that logit mimicking can outperform feature imitation and the absence of localization distillation is a critical reason for why logit mimicking underperforms for years. The thorough studies exhibit the great potential of logit mimicking that can significantly alleviate the localization ambiguity, learn robust feature representation, and ease the training difficulty in the early stage. We also provide the theoretical connection between the proposed LD and the classification KD, that they share the equivalent optimization effect. Our distillation scheme is simple as well as effective and can be easily applied to both dense horizontal object detectors and rotated object detectors. Extensive experiments on the MS COCO, PASCAL VOC, and DOTA benchmarks demonstrate that our method can achieve considerable AP improvement without any sacrifice on the inference speed. Our source code and pretrained models are publicly available at https://github.com/HikariTJU/LD.
BibTeX
@article{zheng2023localization,
  author = {Zhaohui Zheng and Rongguang Ye and Qibin Hou and Dongwei Ren and Ping Wang and Wangmeng Zuo and Ming-Ming Cheng},
  title = {{Localization Distillation for Object Detection}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=PWR82kNCBm},
}
Figure