Skip to main content
emobility.academy
PhDLane keeping & lateralResearch About 16 weeksADAS & AUTOSAR

Lane Keeping on Poorly Marked Roads Using Road-Edge Cues

Develop a perception method that estimates a drivable corridor and virtual lane on poorly marked roads from road edges, kerbs and traffic cues, trained and tested on the India Driving Dataset, and feed it to a lane keeping controller in simulation.

Tools: Python · PyTorch

Lane Keeping on Poorly Marked Roads Using Road-Edge Cues: Students studying an electric car with DIYguru trainers in the workshop
Representative photo from DIYguru's EV lab, not of this specific project.

The problem

Most lane keeping systems depend on painted markings, which are often faded, partial or absent on Indian roads. Without them, the function switches off exactly where help may be needed. A perception method that estimates a usable lane from road edges, surface boundaries and the flow of traffic could extend lane keeping, but its reliability must be measured and bounded.

Objectives

  • Characterise marking quality and road-edge cues in an Indian driving dataset.
  • Train a model to estimate road edges and a virtual lane centreline without relying on markings.
  • Estimate confidence so the function can hand back control when uncertain.
  • Evaluate geometry accuracy against annotations and closed-loop behaviour in simulation.
  • Compare with a marking-based baseline on marked and unmarked segments.

What you need

Tools and toolboxes

  • Python — Data preparation, training scripts and evaluation.
  • PyTorch — Training a segmentation and lane-geometry network.
  • OpenCV — Perspective transforms, contour extraction and visualisation.
  • CARLA — Closed-loop testing on roads with markings removed or degraded.
  • ONNX (optional) — Exporting the model to measure inference speed on an embedded target.

Software

  • Python 3 with PyTorch, OpenCV and NumPy
  • CARLA simulator
  • IDD (India Driving Dataset) and optionally Cityscapes or BDD100K for pre-training

Extra parts and data

  • GPU workstation or cloud GPU — Training segmentation networks on thousands of images needs a GPU.

Key concepts

Drivable area segmentation
Classifying each pixel as road or not road; on unmarked roads the boundary of the drivable area stands in for lane boundaries.
Virtual lane
A lane centreline and width inferred from road edges, lane count assumptions and traffic, used by the controller instead of painted lines.
Predictive uncertainty
A measure of how unsure the model is, for example from Monte Carlo dropout or an ensemble, used to decide when to disengage.
Distribution shift
Differences between training and deployment data, such as new road types or weather, which can silently degrade accuracy.

Step-by-step guide

  1. 1

    Define the problem and ODD

    Review lane detection, drivable-area and road-edge literature, and identify the gap for unmarked roads. Define the ODD: two-lane rural and urban roads in daylight, partly or fully without markings, speeds up to 60 km/h. Define the outputs: left and right corridor boundaries and a virtual centreline in vehicle coordinates up to a set distance, plus a confidence value. Set accuracy and availability targets.

    Checkpoint: A research proposal with ODD, outputs, targets and hypotheses.

  2. 2

    Analyse and prepare data

    Use the IDD segmentation data and categorise images by marking quality: clear, faded and absent. Derive road-edge labels from the drivable and non-drivable classes, and annotate virtual centrelines on a subset by marking the expected driving path. Split by sequence or city to avoid leakage. Report the class distribution and the share of unmarked frames, since this defines what the model must handle.

    Checkpoint: Labelled splits with statistics per marking-quality category.

  3. 3

    Build the baselines

    Implement two baselines: a classical marking-based detector and a marking-trained lane network (for example a published lane detection architecture trained on available data). Evaluate both on clear, faded and absent subsets with lateral error at fixed distances and availability (fraction of frames with a valid output). This shows how much the problem actually degrades without markings. Use the same bird's-eye conversion and distances for every method so the numbers are directly comparable.

    Checkpoint: Baseline accuracy and availability tables per marking category.

  4. 4

    Design the proposed model

    Train a segmentation network with a lightweight backbone, pre-trained on Cityscapes or BDD100K and fine-tuned on IDD, with heads for drivable area and road edges. Add a geometry head that regresses centreline polynomial coefficients in the bird's-eye view, or fit the centreline from predicted edges. Use augmentations for shadow, dust and brightness. Track IoU and centreline error on validation data during training.

    Checkpoint: A trained model with validation IoU and centreline error recorded per epoch.

  5. 5

    Estimate confidence

    Add an uncertainty estimate with a small ensemble or Monte Carlo dropout and combine it with geometric checks such as plausible width and temporal consistency. Calibrate confidence so it correlates with actual error, using reliability diagrams on validation data. Define a threshold for availability and measure the trade-off between availability and error. Calibrate on validation data only, then freeze the threshold before touching the test split, so the availability figures reported later are not tuned to the test set.

    Checkpoint: A reliability diagram and an availability-versus-error curve.

  6. 6

    Evaluate perception

    On held-out test data, measure edge IoU, centreline lateral error at 10, 20 and 30 m, and availability per marking category. Compare with both baselines. Test robustness on a different dataset or city for distribution shift. Present failure cases with images, such as roads merging into dirt shoulders or parked vehicles blocking the edge. Report means with confidence intervals obtained by bootstrapping over sequences rather than frames.

    Checkpoint: Test results per category, cross-dataset results and illustrated failure cases.

  7. 7

    Set up closed-loop tests

    In CARLA, build or select road segments and remove or degrade lane markings using map edits or textures. Run the model on the simulated camera, convert outputs to offset and heading error, and drive a lane keeping controller such as pure pursuit or MPC. Disengage when confidence drops below the threshold. Note the sim-to-real gap and fine-tune on a small set of CARLA frames if needed.

    Checkpoint: Closed-loop runs on marked and unmarked roads with logs of offset and disengagements.

  8. 8

    Evaluate closed-loop behaviour

    Run repeated laps under several weather and lighting settings. Measure lateral error, lane departures, disengagements per kilometre and time spent engaged for the proposed method and the baselines. Check that disengagements occur before large errors, not after, by aligning confidence drops with error spikes. Use the same routes, seeds and controller for every perception method, so differences come from perception alone. Keep driving speed within the ODD limit and log every disengagement with its cause.

    Checkpoint: Closed-loop metrics per method and condition, with disengagement timing analysis.

  9. 9

    Analyse safety implications

    Relate findings to SOTIF: describe triggering conditions found in testing (for example road edges hidden by parked vehicles) and how confidence monitoring mitigates them. Propose how the ODD should be restricted for a production function. Discuss what further real-world data collection would be needed, using recorded data only. For each triggering condition, record how often it occurred in the data, how the model behaved and whether the confidence monitor caught it in time.

    Checkpoint: A SOTIF-style table of triggering conditions and mitigations.

  10. 10

    Write the thesis

    Write up the data analysis, model, uncertainty method, perception and closed-loop results and safety discussion. Release code and annotation splits where licences allow. Summarise the contribution clearly: whether road-edge cues extend lane keeping availability without unacceptable error, and under what conditions. Include the annotation guidelines used for virtual centrelines, the exact splits, training settings and seeds, and a clear table of results per marking category so others can compare against your benchmark.

    Checkpoint: Thesis chapters and a paper draft with reproducible experiments.

Testing & validation

  • Road-edge IoU and centreline lateral error by distance and marking category.
  • Availability against error trade-off with calibrated confidence.
  • Cross-dataset results for distribution shift.
  • Closed-loop lateral error, departures and disengagements in CARLA.

Expected results

A road-edge-based virtual lane estimator with calibrated confidence, quantified against marking-based baselines on Indian data, and closed-loop evidence of where it extends lane keeping safely.

Research angle for your PhD

Research questions: can road-edge and drivable-area cues provide a lane estimate accurate enough for lane keeping when markings are absent, and can calibrated uncertainty keep errors bounded by triggering timely disengagement? Metrics: centreline error, availability, calibration error, closed-loop departures and disengagements per kilometre. Contributions include an unmarked-road benchmark split of IDD, an uncertainty-aware model and a closed-loop evaluation, all relevant to roads in India and other developing regions.

Take it further

  • Use the motion of vehicles ahead as an extra cue for the virtual lane.
  • Add temporal models across frames for stability.
  • Deploy on an embedded GPU and measure latency.

Viva and review questions

Why not just train a lane-marking detector on more data?

Where markings are absent there is nothing for it to detect; the model must use other cues such as road edges and the drivable surface.

How do you know your confidence is meaningful?

By checking calibration on held-out data: frames with lower confidence should have higher error, shown in reliability diagrams.

Why split data by sequence or city?

Neighbouring frames are nearly identical, so random splits leak information and inflate test accuracy.

Learn it at DIYguru

These DIYguru courses and programmes teach what this project needs.

Related EV projects

All 100 ADAS & AUTOSAR projects