The problem
Given a single dashcam frame from a highway driving video, locate the current lane's left and right boundaries. Two structurally different approaches were built and compared: a classical pipeline relying entirely on hand-written geometric rules (edge detection, straight line fitting), and a U-Net trained on thousands of labeled TuSimple frames to recognize lane patterns directly from data.
Key results
A structural failure, traced step by step
A first batch evaluation showed a striking asymmetry: the classical pipeline's left line was missing in 36% of frames, but the right line was missing in 82% — too large a gap to accept as "the right side is just harder." Rather than guessing which parameter to retune, a diagnostic function saved every intermediate pipeline step (edge map, ROI-masked edges, raw Hough segments color-coded by outcome) for several failing frames. The edge map above made the cause immediately visible: the right-side marking in these scenes is made of Botts' Dots, not a painted line — Canny found zero edge pixels there, and every step downstream had nothing to work with, as a direct structural consequence, not a threshold that happened to be mistuned.
When the evaluation metric itself needed auditing
Converting the classical pipeline's fitted line into a mask (to compute IoU against the ground truth) produced a near-zero score — 0.016 — disproportionate to how correct the line actually looked overlaid on the image. Rather than accepting the number, the two masks were visualized directly, color-coded by source.
TuSimple's own benchmark avoids this exact problem by not using IoU at all — it checks, at each annotated height, whether the predicted x position falls within a pixel tolerance of the true one. Implementing that point-distance metric for both methods gave the fairest comparison in the project, penalizing neither method for its output format.
Results
Test set: label_data_0601.json, 410 frames, held out from training.
| Metric | Phase A | U-Net |
|---|---|---|
| IoU (2-lane restricted ground truth) | 0.028 | 0.320 |
| TuSimple-style point accuracy (20px) | 16.3% | 60.4% |
| Video missing rate (8 clips, 160 frames) | 47.2% | 13.1% |
| Video mean frame-to-frame jump | 10.36px | 3.03px |