Conference paper
Cite …

LineAP: A segment-based average precision metric for visual rail track detection

Annika Bätz 1 and Martin Lauer ORCID iD icon 1
1 Institute for Measurement and Control Systems (MRT), Karlsruhe Institute of Technology (KIT)
DOI: 10.5445/IR/1000199243
Publisher's version published on Nov 18, 2026
CC BY-SA 4.0
Abstract

Reliable rail track detection is a prerequisite for safe automated train operation, yet evaluating it requires assessing two distinct aspects of prediction quality: (i) the geometric accuracy of predicted lines, and (ii) the correct instance-level grouping of polylines, e.g. accurate start and end points at railway switches. Existing metrics for polyline detection assess both subtasks simultaneously, losing insight into the error sources of a detection method: partially incomplete but geometrically accurate detections are penalized, while entire rail instances with inaccurate sections are rewarded. We propose LineAP, a segment-based average precision metric that assesses geometric accuracy independently from instance-level correctness by partitioning polyline predictions into fixed-length segments, each evaluated via joint distance and orientation thresholds. A novel track-width-based distance threshold further customizes LineAP to the safety requirements of railway applications, where geometric accuracy remains highly relevant even at large distances from the camera.