Camera-based driving systems must turn a flat image into 3D road geometry. Two problems make this hardest exactly in the same place: the far road. The first problem is the flat-ground assumption, which treats the road as a perfect horizontal plane so that every image pixel maps to one point on a map. The second is resolution loss: neural networks shrink the image step by step (downsampling) before reasoning about 3D, and thin, distant lane markings disappear in the process. These problems are usually treated separately. They share a cause. A stretch of road far ahead squeezes into a few image rows, so it has very few pixels per meter. That same squeezing means that a small error in where the road sits in the image, whether from a hill or from the car pitching under braking, becomes a large error in distance.
We propose to fix both by changing which pixels the network sees in the first place. A cheap first pass looks at a low-resolution image and predicts a coarse height profile of the road ahead. That profile tells us which image rows the visible road occupies at each distance. A second pass then resamples the full-resolution image so that rows are spread evenly over road distance along the predicted surface, not along an assumed flat plane. The total pixel budget stays the same as the baseline input. Only after this resampling does the usual backbone and 3D lane head run. The claim is that resolution should be allocated by terrain-aware geometry before any downsampling happens. A flat-ground version of the same resampling should help on flat roads and fail on hills, because a crest or dip moves the far road to image rows that a flat model does not expect.
Core Claim
Take a camera at height $H$ with focal length $f$, looking at flat ground. A ground point at range $d$ appears roughly $v \approx fH/d$ pixels below the horizon. Two consequences follow from this one relation:
$$\left|\frac{dv}{dd}\right| \approx \frac{fH}{d^2}, \qquad \delta d \approx \frac{d^2}{H}\,\delta\theta .$$
The first expression says that image rows per meter of road fall off as $1/d^2$. The second says that a small angular error $\delta\theta$ produces a range error $\delta d$ that grows as $d^2$. Here $\delta\theta$ could be unmodeled pitch, or the apparent tilt caused by a slope. Both expressions come from differentiating the same small-angle projection. So the rows that carry the least image evidence are also the rows where geometric mistakes cost the most.
Current systems handle the geometric half in feature space. They do this after a backbone has already applied 8×, 16× or 32× downsampling, uniformly across rows. The far-road rows are thrown away at the same rate as the near-road rows that are already oversampled.
Our resampler replaces the flat relation with the predicted surface height $z(d)$. Output row $u$ samples input row $v(u) \approx v_0 + f\,(H - z(d(u)))/d(u)$, where $v_0$ is the horizon row. The function $d(u)$ is a fixed allocation rule over range. The main candidates are uniform in $d$, uniform in $\log d$, or a learned blend. Columns are kept, so the result is still a perspective image, only with its rows redistributed. Because the warp is a one-dimensional monotone map per image, it is exactly invertible. Any downstream head can project its 3D reference points through the camera and then through the warp. No architecture beyond the input stage has to change.
Relation to Prior Work
Several papers motivate the geometric side. DeepDriving shows why a flat plane is attractive: it gives a closed-form pixel-to-distance map. HDMapNet documents the cost of that choice: projecting through flat inverse perspective mapping (IPM) blurs and misaligns map elements. ONCE-3DLanes shows the same failure for lanes. Its extrinsic-free model, SALAD, regresses 3D points directly in the image and still suffers far-range longitudinal ambiguity. We read that as evidence that the far-field problem is partly a pixel-budget problem and not only a projection problem.
The closest methods supply ingredients we reuse, and each fixes geometry after resolution has already been lost. PersFormer lets bird's-eye-view queries attend around IPM reference points on backbone features. HeightLane predicts a dense heightmap from multi-slope anchors and uses it to guide deformable sampling. It also trains on LiDAR-derived heightmaps and samples pre-downsampled features. LaneCPP models terrain as a mixture of planar pitch hypotheses with continuous spline lanes. HeightMapNet adds height priors and multi-scale fusion to recover distant "micro-features," but its backbone downsamples first.
We differ from all four in one way. We use a terrain estimate to decide how the raw image is sampled, not where to read from an already-shrunk feature map. Our terrain estimate is also deliberately coarse: a few-knot height profile over range. It is supervised only by the 3D lane points that OpenLane already provides, so it needs no dense LiDAR heightmap.
Two methods address resolution adaptively, both downstream of feature extraction. PointBeV uses coarse-to-fine sparse sampling in bird's-eye view. UIGenMap injects high-resolution perspective structure and distills it away. PointBeV's pillars assume fixed vertical bounds, and UIGenMap projects its prompts through flat IPM. Our resampler is complementary to both and could sit in front of either.
On the pure resolution side, LIP is the main constraint. It shows that content-aware pooling recovers small objects on COCO. It is therefore the obvious content-driven competitor to our geometry-driven allocation. GLAD shows that processing native-resolution crops rescues 8×8-pixel targets, which motivates a high-resolution horizon-crop baseline.
Research Program
The system has three parts.
The first is a terrain pass. A small network on a 4×-downsampled image predicts a height profile $z(d)$ as a cubic spline with about eight knots over 0–100 m, plus a pitch correction. It is trained with an L1 loss against heights obtained by fitting the ground-truth 3D lane points of each frame.
The second is the resampler. A differentiable grid sample builds the range-equalized image at the baseline's input size from the original full-resolution frame. At first the grid is computed with gradients stopped. Later it is fine-tuned end to end.
The third is the unchanged detector. We use a PersFormer-style bird's-eye-view lane detector and a SALAD-style image-plane detector, so that the effect is not tied to one architecture family. Both are modified only so that reference points and output coordinates pass through the inverse warp.
The analysis has two parts. First, we measure how errors in the predicted terrain translate into lane errors as a function of range, and compare the result to the $d^2$ prediction above. Second, we test which allocation rule over range works best. The second answer matters because it tells practitioners how much near-field resolution can be given up safely.
Baselines
The naive reference point is the unmodified detector at the standard input resolution, with uniform rows and stride-32 backbone. For PersFormer, the cited paper reports an OpenLane F-score of 50.5, against 44.1 for 3D-LaneNet. We will retrain it ourselves under our schedule so that every comparison uses identical data, epochs and augmentation.
The strongest existing method in the file is HeightLane, which reports a 62.7% F-score on OpenLane validation. That is the highest number given there. Its training uses LiDAR-derived heightmaps, which our method does not need. LaneCPP is the most relevant competitor on hills. It reports 60.3% F1 on OpenLane and a gain of 5.9 points over the next best method in "Up & Down" scenes. We will reproduce both where code allows, at matched input size and comparable FLOPs. Beating them means one of two outcomes for our resampler placed in front of a HeightLane- or LaneCPP-style head. It either exceeds their overall F-score, or it matches their overall F-score while clearly reducing far-range (40–100 m) X and Z error and improving the Up & Down subset. No reported far-range error values were found on Lacuna for these methods. We will therefore measure all of them ourselves under one evaluation script. On ONCE-3DLanes, SALAD's reported 64.07% F1 is the reference for the image-plane variant.
The key ablation replaces the predicted terrain with $z=0$. This gives a flat-ground range-equalizing warp with the same pixel budget. It isolates whether terrain awareness, rather than redistributing resolution alone, drives the gains. A second ablation feeds ground-truth terrain to the resampler. That gives an upper bound and shows how much of the gap is due to terrain-estimation error.
Why not just…?
Why not just use a higher-resolution input or a smaller backbone stride? This buys far-field pixels by paying for all pixels, including the near road, which is already oversampled by a factor that grows as $d^2$. PointBeV and the 7.8 FPS reported for HeightMapNet show that dense high resolution is already expensive. We will run this baseline at two operating points. One matches our FLOPs, where we expect it to lose. The other uses enough resolution to match our far-range error, and we report how much more compute it needs. If the second point costs under about 1.3× our compute, our method's value is small and we will say so.
Why not just a flat-ground range-equalizing warp or a native-resolution horizon crop? This is the real threat. Much of the gain could come simply from giving the far road more rows, and on mostly flat datasets a flat warp may capture nearly all of it. We expect terrain awareness to matter on crests and dips, where the far road moves rows relative to the flat prediction, and when the car pitches. A GLAD-style second crop around the horizon band is a close relative. It loses lane continuity across the crop boundary, and it still places the band using flat geometry. Both are run as baselines. The comparison that settles the question is stratified by the Up & Down subset and by the magnitude of the ground-truth slope. If the terrain-aware warp beats the flat warp nowhere, the honest conclusion is that resolution allocation, not terrain, is the lever.
Why not just put content-aware pooling such as LIP into the backbone? LIP improved small-object AP on COCO from 21.9% to 24.0%. It can only keep information that is present at the input resolution, and it learns where to look from content, not geometry. We will swap LIP into the same detector backbone and also combine it with our resampler. If LIP alone matches our far-range gains, the geometric prior is unnecessary. If the two stack, they address different losses.
Proposed Experiments
The main benchmark is OpenLane, chosen for its scale, near/far error breakdown and scene tags. Within it we focus on the Up & Down and curve subsets. We report F1, category accuracy, and X/Z error split at 40 m.
ONCE-3DLanes tests the image-plane detector and checks whether gains transfer to a different city and sensor setup. Apollo-Sim-3D provides controlled slopes. There we inject synthetic pitch perturbations of 0.5–2° to test the $d^2$ sensitivity directly. We plot far-range error against perturbation size for the flat warp, the terrain warp, and the uniform baseline.
We also check whether the warp disturbs the near field, by measuring near-field X error, which PersFormer already flags as weak. We report frames per second on one GPU type for every method.
The decisive outcome has three parts that must hold together. The terrain-aware warp should beat the uniform baseline mainly in the 40–100 m band. It should beat the flat warp mainly in hilly and pitch-perturbed frames, while tying it on flat ones. And it should close most of the gap to the ground-truth-terrain oracle. If gains appear uniformly across ranges or across flat and hilly scenes alike, the mechanism we propose is not what is helping, and the paper reports that instead.
References
- DeepDriving: Learning Affordance for Direct Perception in Autonomous Driving
- HDMapNet: An Online HD Map Construction and Evaluation Framework
- ONCE-3DLanes: Building Monocular 3D Lane Detection
- PersFormer: 3D Lane Detection via Perspective Transformer and the OpenLane Benchmark
- HeightLane: BEV Heightmap Guided 3D Lane Detection
- LaneCPP: Continuous 3D Lane Detection Using Physical Priors
- HeightMapNet: Explicit Height Modeling for End-to-End HD Map Learning
- PointBeV: A Sparse Approach to BeV Predictions
- Uncertainty-Instructed Structure Injection for Generalizable HD Map Construction
- LIP: Local Importance-Based Pooling
- Global-Local MAV Detection Under Challenging Conditions Based on Appearance and Motion