Controllable Road Marking Generation

Zhiyu Joey Cai, Yufan Flynn Zhang, Ruichen Tan, Zengxiang Lei, Satish UkkusuriNeurIPS 2026

TL;DR

Paint on asphalt is the visual syntax of our roads, telling both humans and autonomous vehicles how not to crash into each other. Yet, designing and varying these road markings for driving simulations is still largely a tedious, manual drafting chore. This paper introduces a generative AI pipeline that takes bare pavement geometry, surrounding road context, and a simple text prompt to automatically paint realistic, crisp lane dividers, centerlines, and crosswalks from a bird’s-eye view.

What Problem Does This Paper Address?

If you work in autonomous driving or urban simulation, you know we have plenty of AI models that read road markings from cameras or aerial photos to reconstruct existing maps. We also have models that vary traffic patterns on fixed maps. What we lack is a scalable way to design or alter the road markings themselves. Ask a civil engineer or simulator developer to test how a self-driving planner handles an intersection with a double-yellow line instead of a dashed one, or with a freshly added crosswalk, and someone usually has to draw it by hand.

Treating road-marking layout as a generative image problem sounds straightforward until you hit the physics of the grid. On a bird’s-eye-view (BEV) raster, lane lines are sparse, razor-thin, and governed by strict topology. A background-heavy pixel loss barely notices if a one-pixel shift snaps a dashed line in half or blurs a double-yellow centerline into a single mushy blob—even though that tiny error completely changes the traffic rules.

Methods

The authors frame Controllable Road Marking Generation as a conditional inpainting task on a $100\text{ m} \times 100\text{ m}$ BEV tile ($512 \times 512$ pixels). Given the bare drivable-area mask, an optional "outer ring" of existing markings around the border for continuity, and a text prompt (e.g., "multi-lane road, double yellow center line, 2 crosswalks"), the system synthesizes a missing $256 \times 256$ center window across three channels: lane dividers, road dividers, and pedestrian crossings.

Figure 1: Overview of the proposed controllable road marking generation pipeline.

The pipeline combines standard generative building blocks with clever domain-specific twists:

  • Latent Rectified-Flow Backbone: Instead of standard noisy diffusion, they use a Diffusion Transformer (DiT) trained with rectified flow (predicting straight-line paths to clean latents) inside a frozen autoencoder's latent space. Spatial inputs are concatenated with the noisy latent, while frozen CLIP text embeddings are injected via gated cross-attention.
  • Topology-Aware Loss: Beyond latent flow-matching and pixel MSE, the model decodes predictions during training and applies a clDice (centerline Dice) soft-skeleton loss, penalizing broken line connectivity.
  • Blur-then-Render Strategy (The Secret Sauce): Training directly on 1-pixel binary lines is unstable. Instead, the authors intentionally blur the ground-truth targets with a Gaussian filter ($\sigma = 2\text{ px}$) to give the generator smooth gradients to learn from. At inference, to clean up the resulting blurry lines, they introduce Structured Gaussian Render (SGR)—a training-free, deterministic post-processor. SGR thresholds the soft divider masks, extracts skeletons/peaks, fits smooth cubic Bézier curves to them, and re-renders crisp strokes using flat-cored "super-Gaussian" splats. (Area-based crosswalks bypass SGR.)
Structured Gaussian Render (SGR) post-processing

Datasets

Because prior work focused on extracting maps rather than designing them, the authors built a new three-channel benchmark from Argoverse 2 (AV2) using local HD vector maps across six U.S. cities, pairing cropped raster tiles with deterministic, metadata-derived text prompts. To test generalization, they also trained and evaluated independent models on the Waymo Open Dataset and used a smaller nuScenes-SG split as a diagnostic testbed.

Key Insights and Ideas

  • Separate semantics from crisp geometry: Asking a neural network to simultaneously understand high-level text prompts and output razor-sharp 1-pixel rasters is a recipe for artifacts. Letting the network learn on blurry targets and handing off the geometric sharpening to classical curve-fitting (SGR) dramatically outperforms training a secondary CNN to deblur the output.
  • Erasing is easier than drawing: In single-attribute text editing experiments (keeping the road geometry and random seed fixed), deleting a crosswalk succeeded far more often than adding one—likely because removing a feature requires less spatial guesswork than figuring out where to place a new one.
  • The controllability trade-off: Cranking up classifier-free guidance makes the model obey text edits better, but increases "collateral damage" (false activations), inadvertently mutating markings in non-target channels that should have stayed put.

Key Results

Evaluated on 4,597 AV2 test tiles using Buffered F1 (pixel overlap with a tiny 3-pixel/0.59m tolerance) and clDice (skeleton connectivity):

  • Imputation Fidelity: The full pipeline achieved 76.8% Buffered F1 and 50.2% clDice, roughly doubling an adapted diffusion mask-refinement baseline (LSR-DM at 38.8% / 24.6%) and beating a learned CNN-deblur variant (62.7% / 46.3%).
  • Cross-Dataset Scaling: Trained independently on Waymo, performance jumped to 88.0% Buffered F1 and 66.2% clDice.
  • Prompt Editing: Under fixed seeds and spatial inputs on AV2, text edits achieved 75.1% success for deleting crosswalks, 49.6% for adding crosswalks, and 31.0% for turning single yellow dividers into double yellow lines (though crosswalk deletion triggered unintended non-target changes 19.7% of the time).

Limitations and Future Work

The authors are refreshingly candid about what this system cannot yet do. Prompts are strictly template-derived rather than free-form natural language, and the output is limited to three raster channels—meaning no turn arrows, stop lines, or vector lane-graph topology. Fine-grained divider edits (like single-to-double yellow) remain unreliable, and single ground-truth metrics struggle to fairly score a multimodal task where multiple layouts might be valid. Most importantly, "plausible-looking" pixels do not guarantee civil-engineering safety or legal compliance. Future extensions aim to bridge these rasters to vector lane graphs, incorporate regional traffic standards, and test generated maps inside closed-loop autonomous driving simulators.

Summary updated

Abstract

Lane and road markings provide critical guidance for vehicle navigation and multi-agent coordination, yet their design principles are scattered across disparate datasets, severely limiting quantitative analysis and scenario testing. We introduce controllable road-marking generation: given a drivable-area mask and a sparse outer-ring observation, a model must synthesize a complete center-region layout of lane dividers, road dividers, and pedestrian crossings that is semantically consistent with a free-form text prompt. We develop a conditional diffusion pipeline that combines (i) a text-conditioned BEV diffusion backbone, (ii) a Gaussian blur-then-deblur training target that stabilizes thin-structure learning, and (iii) a structured Gaussian render post-processing step that snaps soft predictions to crisp, topology-aware markings. On the Argoverse 2 test split, our system substantially outperforms a state-of-the-art DDIM mask-refinement baseline on standard structural fidelity metrics, and supports prompt-level edits across crosswalk, lane-divider, and road-divider semantics. We anticipate that the proposed framework will enable downstream applications in urban infrastructure planning, autonomous-driving stress-testing, and navigation in unstructured environments.
BibTeX
@inproceedings{cai2026controllable,
  author = {Zhiyu Joey Cai and Yufan Flynn Zhang and Ruichen Tan and Zengxiang Lei and Satish Ukkusuri},
  title = {{Controllable Road Marking Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=2BbIJHhfqI},
}
Figure