Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Localization Distillation for Object Detection

Logit mimicking can beat feature imitation for object detection distillation

  • Problem Logit mimicking trails feature imitation in object detection distillation. Classification logits carry no localization signal, so the student's box regression learns nothing from the teacher.
  • Method Localization distillation, or LD, has the student match the teacher's probability distribution over each box edge. A valuable localization region adds extra locations to distill, and the teacher's soft targets are tempered.
  • Results With ResNet-50 on COCO val2017, the method reached 42.1 AP, compared to 40.1 AP for the GFocal baseline.

Why classification KD misses localization

Logit mimicking was the classic route for distillation, but for detectors it only moves classification knowledge. Because of that, the localization branch of the student gets no signal from the teacher's outputs. Feature imitation was the popular alternative, since distilling features was seen as more advantageous than distilling logits. Its appeal rests on the idea that feature imitation can transfer the hybrid knowledge of classification and localization.

The paper names three reasons logit mimicking falls behind: it depends on the number of classes, it only reaches the classification head, and feature imitation carries both kinds of knowledge.

Box edges are often hard to place exactly, as the ambiguous bottom and right edges in Fig. 2 show. The conventional forms of a box, the offsets from an anchor or the distances to the four edges, follow a Dirac delta distribution. A Dirac delta only marks the ground-truth location, so it cannot model the ambiguity of the box. A discretized distribution over the edge positions can express that ambiguity through its flatness and sharpness.

The authors base their localization distillation on the probability distribution representation of boxes from GFocal and related work.

Figure 2: Bottom edge for “ elephant” and right edge for “ surfboard” are
ambiguous to locate

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

Original paper · CC BY 4.0

Pseudo bounding box regression is the earlier attempt to pass localization knowledge from teacher to student. The authors argue that it uses the coarse bbox representation, which holds no localization uncertainty information of the detector. Because of that, the transferred localization knowledge is sub-optimal, while the probability distribution carries rich localization knowledge.

Turning box edges into logit targets

Localization distillation treats the teacher's probability distribution over each box edge as a soft target that the student has to match. Each edge's regression range is cut into n sub-intervals, so the localization head predicts n+1 logits, one per endpoint. The authors follow GFocal and recommend choosing n between 8 and 16. A SoftMax then turns those logits into a probability vector for each edge.

The method is the same for anchor-based and anchor-free detectors, since only the bounding box representation changes.

LD replaces the standard SoftMax with a generalized SoftMax S(·,τ) applied to the student logits zS and the teacher logits zT. When τ equals 1, the generalized SoftMax is the original SoftMax, and τ approaching 0 gives a Dirac delta distribution. The authors use τ above 1 to soften the distribution, which they say makes the bounding box distribution carry more information.

The loss for one edge is the cross-entropy H(pτ, qτ) between the student and teacher tempered vectors. The loss for a whole box sums this edge term over its four edges.

For rotated boxes, the rotated angle is converted into a distribution with its own regression range. The authors state that a range inside [-5, 5] is an acceptable choice for the rotated parameters. Because the teacher's distribution serves as the target, the student is pulled toward the teacher's uncertainty as well as its most likely position.

Choosing where to distill with the valuable localization region

Distillation in this paper covers two sets of locations, the main distillation region and the valuable localization region (VLR). The main distillation region comes from label assignment, meaning the positive locations of the detection head. The VLR is built by Algorithm 1, which adds locations on top of that main set.

The VLR keeps the locations whose DIoU lies between αvl and αpos, so γ is the only hyperparameter that controls its range. With γ at 0, every location whose DIoU falls between 0 and αpos counts as a VLR location. As γ approaches 1, the VLR shrinks to empty. The authors use DIoU rather than plain IoU because it gives higher priority to locations close to the center of the object.

Because the VLR is assigned across multi-level FPN, it can include locations outside the ground-truth boxes. For anchor-free detectors such as FCOS, the preset anchors on feature maps are used without changing the regression form. For anchor-based detectors, which set multiple anchors per location, the anchor boxes are unfolded before the DIoU matrix is computed.

The total loss keeps the classification, bounding box regression and DFL terms, and adds four distillation terms. Each distillation term uses its own mask, IMain for the main region and IVL for the VLR. Each of the four distillation types can be enabled or disabled, so the student can be distilled on different regions for different knowledge.

The DFL term can be disabled, because the LD loss gives enough guidance on its own.

Why the loss behaves like classification KD

Classification uses one unique integer as the ground-truth label, while localization uses a float point number lying in an interval between two endpoints. The authors ask whether the LD loss still inherits the optimization effects of classification KD.

Proposition 1 takes the student's predicted probability vector s and two constants u1 and u2 with u1 + u2 = 1. For two classification probability vectors p and q, the LD effect on their linear combination l equals the linear combination of their KD effects. For a localization probability vector l, the LD effect equals two KD effects on its decomposition into p and q.

Both cases share the expression that the derivative of the LD loss with respect to a logit equals u1 times the KD derivative of p plus u2 times the KD derivative of q. The proof is given in the Appendix (A.1), and it shows that the LD optimization effect is functionally equivalent to two KD effects on integer position classification problems.

Lemma 1 states that if p and q are Mi-well-performed and Mj-well-performed for integer position classification, their combination u1p + u2q is M-well-performed for float position localization. Here M equals the maximum of Mi and Mj, and the proof uses the distance d(l, g) with the triangle inequality, where d can be any distance metric such as the l2 distance.

Lemma 2 states that a localization probability vector with ground-truth value u1ei + u2ej can be decomposed into two classification probabilities p and q. Following the analysis in reference [70], LD gives the DFL loss a gradient rescaling with respect to the relative prediction confidence at two near positions. The same kind of rescaling appears in classification KD, where the ratio of the KD gradient to the cross-entropy gradient rescales the CE loss in the logit space.

COCO ablations on temperature, box targets and region

The ablations use a ResNet-101 teacher with 44.7 AP and a ResNet-50 student, with only the main distillation region used for the temperature study. Raising the temperature τ in LD from 1 to 10 improved the student, and the authors set τ to 10 for all other experiments. Setting τ to 10 lifted the student from 40.1 AP to 41.1 AP, which is the value fixed for later runs.

The pseudo bounding box regression baseline compares a teacher bounded regression loss against the probability-based LD on localization. Pseudo bounding box regression added 0.4 AP and 0.7 AP75 at its best threshold of 0.1. Its coarse box representation carries no localization uncertainty, so the authors credit LD's 41.1 AP and 44.9 AP75 to the probability distributions it transfers.

The γ parameter sets the lower bound of the valuable localization region, and the authors sweep it on COCO. AP stays near 41.7 to 41.8 for γ from 0 to 0.5, a variation of about 0.1. As γ grows toward 1, the region shrinks to empty and AP falls to 41.1, which equals LD on the main region alone. The authors fixed γ at 0.25 for the remaining experiments.

Table 2 shows that adding LD on the VLR to the main LD raises AP to 41.8. Adding classification KD on the main region reaches 42.1 AP, but extending that KD to the VLR gives no further improvement. So the authors use KD on the main region and LD on the VLR for COCO.

Logit mimicking against feature imitation

The authors re-implement the feature imitation methods on multi-level FPN so that every method shares the same setup. FitNets distills the whole feature maps, while DeFeat weights the feature imitation loss outside the GT boxes more heavily than inside. Fine-Grained distills deep features on the close anchor box locations, and GI imitation selects regions from the discriminative predictions of the student and the teacher.

Inside GT Box and Main Region are two further feature imitation variants, and the Main Region variant imitates features inside the main distillation region. Distillation over the whole feature maps gains +0.6 AP, which is the FitNets result of 40.7 AP over the 40.1 AP baseline.

The selective scheme of the authors reaches 42.1 AP, and they attribute this to LD being the key component for logit mimicking. The scheme operates on logits instead of deep features, so it doesn't rely on matching the teacher's features. Adding GI imitation on top of the scheme gives 42.4 AP, which is +2.3 AP and +3.1 AP75 over the GFocal baseline.

Fine-Grained gains 41.1 AP and GI imitation gains 41.5 AP when used alone.

Figure 4 compares classification score errors and box distribution errors between teacher and student. Fine-Grained and GI imitation reduce both errors, since classification and localization knowledge are mixed on feature maps. Main LD and Main LD with VLR LD lower the box distribution error but not the classification error. Adding Main KD to the scheme reduces both the classification score error and the box distribution error.

Figure 4: Visual comparisons of SOTA feature imitation and our LD. We
show the average L1 error of classification scores and box probability
distributions betwe…

Fig. 4 . Visual comparisons of SOTA feature imitation and our LD. We show the average L1 error of classification scores and box probability distributions between teacher and student at the P4, P5, P6 and P7 FPN levels. The teacher is ResNet-101 and the student is ResNet-50. The results are evaluated on MS COCO val2017.

Original paper · CC BY 4.0 · Zhaohui Zheng, Rongguang Ye, Qibin Hou, Dongwei Ren, Ping Wang, Wangmeng Zuo, Ming-Ming Cheng · Localization Distillation for Object Detection · Original paper figure · Extracted the figure area from page 8 of the original PDF.

Table 7 gives a Pearson correlation of -0.0031 for deep features under the authors' scheme, compared to 0.8175 for GI imitation. Bbox logits correlate at 0.9733 for the scheme, compared to 0.9222 without distillation. The authors conclude that the student's deep features don't have to match the teacher's, because the logits can still generalize well.

The AP landscape plots detection AP over a 2D subspace of the two feature representations. The GI imitation landscape is much sharper than the logit mimicking one, which the authors attribute to the hard L2 supervision. Fig. 8 reports that feature imitation converges more slowly in the early epochs.

Lightweight students and other dense detectors

With a ResNet-101 teacher, LD lifts the ResNet-18 student from 35.8 AP to 37.5 AP on COCO val2017. The ResNet-34 student rises from 38.9 AP to 41.0 AP, and the ResNet-50 student from 40.1 AP to 42.1 AP. Those are gains of +1.7, +2.1 and +2.0 AP for the three students. On AP75, the same students gain +2.2, +2.4 and +2.5. The authors apply the scheme as Main LD plus VLR LD plus Main KD, so the gains come from the whole selective setup.

The authors also test LD on three other dense detectors, RetinaNet, FCOS and ATSS, with a ResNet-101 teacher. The students are ResNet-50 in each case, and RetinaNet rises from 36.9 AP to 39.0 AP. FCOS rises from 38.6 AP to 40.6 AP, and ATSS from 39.2 AP to 41.6 AP. RetinaNet is anchor-based, FCOS is anchor-free, and ATSS is anchor-based, so the gains span both detector types.

The authors summarise these as consistent improvements of around 2 AP over the baselines.

Rotated objects on DOTA

Rotated LD is tested on the DOTA-v1.0 validation set, where rotated boxes need an extra angle distribution. The authors use ResNet-34 FPN teachers trained with a 2× schedule (24 epochs) and ResNet-18 FPN students trained with a 1× schedule (12 epochs). The teachers are ResNet-34 because of the memory limitation, and the training follows the mmRotate protocol.

Images are cropped into 600× 600 subimages, giving about 15,700 training and 5,300 validation patches. Rotated-RetinaNet and GWD serve as the two arbitrary-oriented detectors that receive the minimum modification.

Rotated-RetinaNet rises from 33.7 AP to 39.1 AP with rotated LD. GWD rises from 37.1 AP to 40.2 AP with rotated LD, using the same teacher and student setup. The gains are largest at the stricter thresholds, where R-RetinaNet moves from 42.3 AP70 to 48.8 AP70 and from 22.9 AP80 to 28.7 AP80. At AP90, R-RetinaNet moves from 4.7 to 8.8 with LD.

The authors read these gains as evidence that LD suits both horizontal and rotated boxes. LD doesn't depend on the box representation or the optimization used for modeling. The horizontal case uses IoU-based losses such as GIoU and DIoU, while the rotated GWD case uses 2D Gaussian modeling.

Comparison on COCO test-dev

On COCO val2017 with a ResNet-50-FPN backbone and the single-scale 1× schedule, LD reaches 42.7 AP. That compares with 41.1 AP for GFocalV2 under the same setting, a gain of +1.6 AP. The AP75 score rises by +1.8 in the same comparison, from GFocalV2's 44.9 to 46.7. The authors chose the 1× schedule because most earlier works validate with ResNet-50-FPN and 12 epochs.

On COCO test-dev 2019, the authors train the LD models with the multi-scale 2× schedule of 24 epochs. With the ResNeXt-101-32x4d-DCN backbone, LD reaches 50.5 AP, while GFocalV2 scores 49.0 under the same backbone and schedule. The ResNeXt-101 result also gives 69.0 AP50 and 55.3 AP75, which are the highest values in that group of rows. With the ResNet-101-FPN backbone, LD reaches 47.1 AP, against 46.0 for GFocalV2.

The authors state that LD adds no network parameters and no computational overhead, so inference speed matches GFocalV2.

Limitations and where the experiments stop

The COCO ablations use one ResNet-101 teacher and a ResNet-50 student, trained under the single-scale 1× schedule of 12 epochs. The DOTA experiments stop at a smaller setup, because the teachers are ResNet-34 FPN with a 2× schedule and the students are ResNet-18 FPN with a 1× schedule. The authors state that the memory limitation forced these choices for the teachers and students.

The VOC experiments use a teacher-student pair of ResNet-101 and ResNet-18, and the Table 2 VOC results come from that pair. Feature imitation comparisons rely on the authors' own re-implementations, since they re-implement prior methods on multi-level FPN for a fair comparison. They didn't test sparse DETR-style detectors, and they list them as future work.

They also left heterogeneous teacher-student detector pairs and other tasks, such as instance segmentation and 3D object detection, for future research. Cross architecture distillation with recent classification models as teachers is named as a direction left unexplored.

Paper info

Authors
Zhaohui Zheng, Rongguang Ye, Qibin Hou, Dongwei Ren, Ping Wang, Wangmeng Zuo, Ming-Ming Cheng
Venue
arXiv · Preprint
First published
2022-4-12
Added
2026-11-6
Updated
2022-12-8
Version
v2
arXiv
2204.05957
Category
cs.CV
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

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.

Quote from the paper

Zhaohui Zheng, Rongguang Ye, Qibin Hou, Dongwei Ren, Ping Wang, Wangmeng Zuo, Ming-Ming Cheng (2022). Localization Distillation for Object Detection. arXiv:2204.05957v2. https://arxiv.org/abs/2204.05957v2

BibTeX
@misc{zheng2022localization,
  title = {{Localization Distillation for Object Detection}},
  author = {Zhaohui Zheng and Rongguang Ye and Qibin Hou and Dongwei Ren and Ping Wang and Wangmeng Zuo and Ming-Ming Cheng},
  year = {2022},
  eprint = {2204.05957},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.05957v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up