Inter-Region Affinity Distillation for Road Marking Segmentation

Yuenan Hou, Zheng Ma, Chunxiao Liu, Tak-Wai Hui, Chen Change Loy

Abstract

Road marking segmentation is a critical task for autonomous driving, yet deploying high-performance models in real-time remains challenging due to the computational constraints of vehicle hardware. Lightweight models often struggle to capture the sparse, thin structures of road markings and the global context of the scene. This paper presents IntRA-KD (Inter-Region Affinity Knowledge Distillation), a novel framework that transfers structural knowledge from a heavy teacher model to a lightweight student. By matching relational patterns between different road regions—represented as affinity graphs of statistical moments—the student learns the underlying geometric and functional relationships of the road environment. Experiments on ApolloScape, CULane, and LLAMAS demonstrate significant performance gains, enabling lightweight models to achieve accuracy comparable to much larger architectures.

Introduction

In the domain of autonomous navigation, segmenting road markings such as lanes, arrows, and crosswalks is essential. While deep architectures like ResNet-101 provide high accuracy, their deployment is often prohibited by the strict latency and memory requirements of embedded automotive systems. Lightweight alternatives, however, face two primary hurdles: sparse supervision from thin markings and a lack of global context, often leading to confusion between visually similar but functionally distinct elements.

Traditional Knowledge Distillation (KD) typically focuses on pixel-wise or feature-map-level alignment. These methods often fail to capture the high-level "structural prior" of the scene. IntRA-KD addresses this by focusing on the relationships between regions, teaching the student how different parts of the road scene relate to one another.

Methodology: Inter-Region Affinity Distillation

The core of IntRA-KD is the transfer of relational knowledge via an Inter-Region Affinity Graph. The process is structured into three primary components:

  1. Areas of Interest (AOI) Generation: Ground-truth labels are smoothed to create regions that include both the marking and its immediate context.
  2. AOI-Grounded Moment Pooling: To represent these regions without the overhead of full feature maps, the system calculates the first three statistical moments (mean, variance, and skewness) of the feature distributions within each AOI. This compresses high-dimensional data into descriptive vectors.
  3. Affinity Graph Construction: A graph is built where nodes represent road regions and edges represent the cosine similarity between their respective moment-based feature distributions.
Overview of the IntRA-KD framework, illustrating the flow from input images to the comparison of teacher and student affinity graphs.

During training, the student model is optimized to minimize the difference between its affinity graph and that of the teacher. This "mimicry" forces the student to learn consistent structural relationships, such as the distinct feature signatures that separate a lane line from a zebra crossing.

Experimental Results

The researchers evaluated IntRA-KD on three major benchmarks: ApolloScape, CULane, and LLAMAS.

Performance and Efficiency

On the challenging ApolloScape dataset, an ERFNet student trained with IntRA-KD achieved 43.2 mIoU, outperforming other state-of-the-art distillation methods like SKD (40.9) and BiFPN (41.6). Remarkably, this student model achieved performance competitive with its ResNet-101 teacher while possessing 21x fewer parameters and operating 16x faster (10.2ms vs. 171.2ms per frame).

Qualitative Analysis

Visualizations demonstrate that IntRA-KD significantly improves the continuity of long, thin lane lines and the identification of markings in complex or poorly lit scenes. The affinity graphs produced by the IntRA-KD student closely resemble those of the teacher, indicating a successful transfer of structural knowledge.

Qualitative comparison and affinity graph visualization. The IntRA-KD student (b) shows improved segmentation and a graph structure closer to the large ResNet-101 model (c) compared to the baseline ERFNet (a).

Conclusion

IntRA-KD provides a memory-efficient and effective way to distill structural scene knowledge into lightweight networks. By leveraging statistical moments and affinity graphs, the method moves beyond pixel-level mimicry to capture the relational essence of road environments. While currently dependent on predefined Areas of Interest, future work could explore dynamic region definition to further generalize this approach to less structured environments.

Summary updated

BibTeX
@inproceedings{hou2020inter,
  author = {Yuenan Hou and Zheng Ma and Chunxiao Liu and Tak-Wai Hui and Chen Change Loy},
  title = {{Inter-Region Affinity Distillation for Road Marking Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01250},
}
Figure