  Current knowledge distillation approaches in semantic segmentation tend to
adopt a holistic approach that treats all spatial locations equally. However,
for dense prediction, students' predictions on edge regions are highly
uncertain due to contextual information leakage, requiring higher spatial
sensitivity knowledge than the body regions. To address this challenge, this
paper proposes a novel approach called boundary-privileged knowledge
distillation (BPKD). BPKD distills the knowledge of the teacher model's body
and edges separately to the compact student model. Specifically, we employ two
distinct loss functions: (i) edge loss, which aims to distinguish between
ambiguous classes at the pixel level in edge regions; (ii) body loss, which
utilizes shape constraints and selectively attends to the inner-semantic
regions. Our experiments demonstrate that the proposed BPKD method provides
extensive refinements and aggregation for edge and body regions. Additionally,
the method achieves state-of-the-art distillation performance for semantic
segmentation on three popular benchmark datasets, highlighting its
effectiveness and generalization ability. BPKD shows consistent improvements
across a diverse array of lightweight segmentation structures, including both
CNNs and transformers, underscoring its architecture-agnostic adaptability. The
code is available at \url{https://github.com/AkideLiu/BPKD}.
