Skip to content
AI360Xpert
Beta

Drivable Area Segmentation

Drivable area segmentation paints every pixel the car may occupy, separating road from sidewalk, grass, and oncoming lanes under all weather.

Each pixel is labeled drivable or not, with curb boundaries deciding where the car may go
Each pixel is labeled drivable or not, with curb boundaries deciding where the car may go

Why Does This Exist?

Lanes say where to center, but construction, parked cars, and faded paint break the lane assumption. The car still needs to know which ground is physically drivable right now. Drivable area segmentation exists to answer that per pixel: road yes, sidewalk no, grass no, oncoming lane no, directly from the image, in rain and at night when geometry sensors struggle.

For the general mask task see semantic segmentation and for lane curves see the lane page in this wave.

Think of It Like This

Painting the floor you may walk on

You enter a hall with wet patches and roped zones. You paint the safe floor green in your head and step only there, rechecking each step. The model paints that green per pixel and repaints it every frame. The analogy stops at paint: the model must also separate your lane from oncoming road that looks identical.

How It Actually Works

Input XX maps to a binary or three-class mask YY at full or half resolution. Here each output pixel is road, non-road, or an ego-lane subclass. Encoders are lightweight for frame rate, decoders restore curbs with skips. Training weights boundary pixels higher because a 3-pixel curb error matters more than 300 correct interior pixels. Postprocessing removes small holes and enforces temporal consistency across frames.

Worked example

A 640×360640 \times 360 frame holds 230,400 pixels with about 70,000 road pixels. A model at 96 percent pixel accuracy can still misplace the curb by 8 pixels, which at 20 m distance spans roughly 0.5 m sideways, enough to clip a curb. Weighting the 4,000 curb-adjacent pixels five times higher during training cuts the mean curb error from 8 to 3 pixels while overall accuracy barely moves. That is why boundary metrics, not accuracy, gate releases.

Code

This snippet scores a curb band separately from bulk accuracy.

import numpy as np

def curb_error(pred: np.ndarray, truth: np.ndarray, band: np.ndarray) -> float:    mism = (pred != truth) & band    return float(mism.sum() / max(1, int(band.sum())))

truth = np.zeros(1000, dtype=int)truth[400:700] = 1pred = truth.copy()pred[398:402] = 0  # 4 curb pixels wrongband = np.zeros(1000, dtype=bool)band[395:405] = Trueprint(round(float((pred == truth).mean()), 4))  # -> 0.996print(round(curb_error(pred, truth, band), 3))  # -> 0.4

Bulk accuracy 0.996 hides a 0.40 curb error. Report both.

Watch Out For

Puddles that mirror the road

Wet asphalt reflects lane paint and sky, so reflections score as extra road or extra lines. The symptom is a drivable mask that bulges into intersections on rainy nights. The fix trains on wet-night data with reflection augmentation and fuses a geometric ground prior instead of trusting appearance alone.

The Quick Version

  • Drivable segmentation labels ground per pixel for planning.
  • Curb precision matters more than bulk pixel accuracy.
  • Lightweight encoders meet frame rate; skips protect edges.
  • Weight boundaries in loss and report curb error separately.
  • Rain and night need dedicated data, not just augmentation.