A camera sees what a thing is. A LiDAR measures how far away it is. A radar measures how fast it moves, even in fog. Where a network joins the three decides whether one broken sensor costs a little accuracy or puts a ghost on the road.
Pick a fusion level. Then blind the camera, spray the LiDAR or misalign the sensors, and read the verdict. Then we build, piece by piece, each sensor, the three fusion levels, PointPainting, the bird's-eye-view grid and Lift-Splat-Shoot.
You need Lesson 1 and a little geometry: a ratio and a weighted average. We build the rest from zero.
Lesson 18 of the series Sensor Fusion: Classical to Modern. The methods come from PointPainting (Vora et al., 2020), Lift, Splat, Shoot (Philion and Fidler, 2020) and BEVFusion (Liu et al., 2023). The devices and toy numbers are our own.
An illustrative toy, not a trained network. Each level's confidence and position error come from a small hand-set model in Chapter 6. The behaviours are the real ones: early fusion needs LiDAR points to paint, and only early fusion can paint a ghost.
Chapter 0
Prove that one camera frame cannot tell near from far, and see why a car carries two more sensors
You drive on a wet highway at dusk. A truck ahead throws up spray, and a low sun shines into the windshield. Three sensors watch the truck, and each one fails in its own way.
| Sensor | What it gives | What fails now |
|---|---|---|
| Camera | colour and texture: what the thing is | the sun glare washes out the truck |
| LiDAR | distance to the centimetre | the spray scatters its laser beams |
| Radar | speed, through spray and glare | its sideways picture is blurry |
Each weakness is another sensor's strength. Even with no glare, the camera has a permanent gap: one frame holds no distance. Here is why. Call the focal length of the camera, in pixels, f. Call an object's real height Y and its distance Z, both in metres. Call its height in the image y, in pixels.
Small y equals f times big Y, divided by big Z.
Multiply the real height Y by f. Divide by the distance Z. The result is the pixel height y. Only the ratio Y over Z reaches the image.
With f = 1000: a 1.5 m pedestrian at 30 m gives y = 1000 × 1.5 / 30 = 50 px. A 3.0 m sign at 60 m gives y = 1000 × 3.0 / 60 = 50 px. Same image, two different worlds.
The grey figure is a 1.5 m pedestrian at 30 m. Move your object's height and distance. When the two image heights match, the camera cannot tell them apart.
A pinhole camera with f = 1000 px. Real lenses add distortion, but the ratio problem stays.
A LiDAR times a laser pulse, so it measures Z directly. That is the reason to fuse: the depth the camera lacks is the depth the LiDAR measures.
Symptom: a camera-only system puts a pedestrian at the wrong distance.
Measure: compare its range estimate with a LiDAR range on the same object.
Fix: fuse a sensor that measures depth, or give the camera depth supervision (Chapter 8).
Chapter 1
Count what each sensor puts on one car, and find the one number only radar can measure
To fuse three streams, know each one's shape and its failures. A modality is one kind of sensor data: an image, a point cloud or a radar list.
| Property | Camera | LiDAR | Radar |
|---|---|---|---|
| Principle | passive light | laser time of flight | radio echo and Doppler shift |
| One frame | dense image, H × W × 3 | list of (x, y, z, intensity) | list of (range, angle, speed, strength) |
| Size | 6.2 million numbers at 1080p | about 100k to 200k points a sweep | a few hundred detections |
| Gives | class, colour, lane lines, signs | metric 3-D position | radial speed, long range |
| Misses | depth | colour, speed | shape, fine angle |
| Fails in | glare, darkness | heavy rain, spray, fog | rarely; clutter from metal |
The camera is dense. The LiDAR is sparse, and it thins with distance. Move the car away and count.
Each panel shows one car through one sensor. Drag the range. Watch the pixels shrink, the LiDAR points thin out and the radar blob stay wide.
Illustrative: a car 1.8 m wide and 1.5 m tall, and a camera with f = 1000 px. The LiDAR beams are 0.2° apart sideways and 1.25° apart vertically. The radar resolves 4° of angle.
Camera and LiDAR give speed only by comparing two frames. Radar measures it in one echo. A target that moves toward the radar compresses the returning wave, so its frequency rises. That rise is the Doppler shift. Call it fD, the radar's wavelength λ, and the speed along the line of sight v.
f-D equals two v over lambda.
Double the speed v. Divide by the wavelength lambda. That is the shift f-D. The radar measures f-D and turns it around: v = f-D times lambda over two.
A 77 GHz radar has λ = 3 × 108 / 77 × 109 ≈ 3.9 mm. A truck closing at v = 4 m/s gives fD = 2 × 4 / 0.0039 ≈ 2,050 Hz. One echo gives the speed.
Symptom: the fused track lags behind a braking car.
Measure: compare the track speed with the radar's Doppler speed on the same object.
Fix: feed the radar speed into the fusion, not only its position.
Chapter 2
Move the merge point along the network and trade detail for robustness
A perception network is a pipeline. Raw data enters, becomes features (learned numbers that describe a patch of the scene), and leaves as detections (boxes with a class and a speed). The design question is where the camera branch and the LiDAR branch join.
| Level | What meets | Example |
|---|---|---|
| Early (data) | raw points and raw pixels | PointPainting (Chapter 3) |
| Mid (feature) | feature maps in one shared grid | BEVFusion (Chapters 4 and 5) |
| Late (decision) | each sensor's finished boxes | track-to-track fusion (Lesson 12) |
The top row is the camera branch, the bottom row the LiDAR branch. Pick where they join. The meters show what you keep and what you risk.
The meters are a qualitative ranking from the fusion literature (Feng et al., 2020), drawn on a 0 to 3 scale. They are not measurements.
Early fusion keeps every pixel and every point, so the network can learn any link between them. But a point must land on the right pixel, so calibration and clock sync must be near perfect.
Late fusion runs a full detector per sensor and merges only boxes. A calibration error only shifts a box, and a dead sensor leaves the others running. But a faint pedestrian that no single sensor detects never reaches the merge.
Mid fusion sits between. Features are abstract enough to blur a small misalignment, and rich enough to combine faint evidence. Most current driving detectors fuse here.
Symptom: the fused system misses a pedestrian that both sensors see faintly.
Measure: check each sensor's raw score on that frame. Both fall below their own threshold.
Fix: fuse earlier, so faint evidence adds up before any sensor must decide.
Chapter 3
Project one LiDAR point into the image, paint it with the camera's label, then break the calibration
PointPainting (Vora et al., CVPR 2020) gives each LiDAR point the camera's opinion of what it hits. The steps:
The cloud shape goes from N × 4 to N × (4 + C). Step 2 is the geometry. First move the point into the camera's frame, with x to the right, y down and z forward. Call those coordinates xc, yc, zc. The image centre is the pixel (cu, cv), and u is the pixel column.
u equals f times x-c over z-c, plus c-u.
Divide the sideways offset x-c by the depth z-c. Scale by f. Add the centre column c-u. The row v follows the same rule with y-c and c-v.
A point 8 m ahead, 1 m right and 0.5 m up. The camera sits 0.2 m right of the LiDAR, so xc = 0.8, yc = −0.5, zc = 8. Then u = 1000 × 0.8 / 8 + 960 = 1060 and v = 1000 × (−0.5) / 8 + 540 = 477.5.
The segmenter says pixel (1060, 477) is car 0.91, so the point becomes (8, 1, 0.5, i, 0.91, …). Now break the calibration. Call the rotation error Δθ and the pixel shift it causes Δu.
Delta-u is about f times the tangent of delta-theta.
Take the angle error delta-theta. Turn it into a slope with the tangent. Multiply by f. That is the shift delta-u, the same at every range.
Δθ = 0.5°: Δu = 1000 × 0.0087 ≈ 8.7 px. A point near the car's edge moves onto road pixels, and the road label paints it.
The warm band is the car in the camera's segmentation. Each dot is a LiDAR point at the pixel it projects to. Drag the offset and count the wrong paints.
Illustrative: 16 points on a car at 8 m spanning columns 1000 to 1119, plus 12 road points. One degree of rotation error is about 17 px here.
Clock skew does the same. If the LiDAR sweep and the camera frame are 50 ms apart, a car at 20 m/s moves 1 m between them.
Symptom: box edges shrink, or objects appear on empty road.
Measure: overlay the projected points on the camera frame. They must sit on the objects.
Fix: recalibrate (Lesson 15), tighten time sync, or fuse later.
Chapter 4
Drop every sensor into the same top-down grid, and fusion becomes stacking numbers in a cell
Mid fusion needs a shared place where a camera feature and a LiDAR feature about the same patch of road meet. The answer the field settled on is the bird's-eye view (BEV): a top-down grid over the ground around the car.
A typical grid covers −50 m to 50 m in both directions with 0.5 m cells, so it has 200 × 200 cells. Each cell holds a feature vector. The whole map is a tensor of shape (C, 200, 200), with C channels.
| Property | Why it helps |
|---|---|
| Metric | a car is 2 m by 5 m near or far, unlike in an image |
| Shared | all three sensors use the same cells and the same metres |
| Aligned | the same patch of road is the same cell, so fusion is a stack |
| Ready to use | tracking and planning already work in top-down metres |
Every sensor uses one rule to find its cell. Call the point's forward distance x in metres, the grid's back edge xmin, and the cell size s. The rule gives the column col; the row uses y the same way.
col equals round of x minus x-min, over s.
Subtract the back edge x-min from x, so the grid starts at zero. Divide by the cell size s. Round to a whole number. That is col.
A point 12 m ahead and 3 m to the right. With y positive to the left, y = −3. Then col = round((12 + 50) / 0.5) = 124 and row = round((−3 + 50) / 0.5) = 94: cell (94, 124).
Toggle each sensor's layer. Cells that two or three sensors fill glow teal. Tap the grid to probe a spot.
Illustrative: a 40 m by 40 m window of the grid at 2 m cells, so you can see them. A real grid is 200 × 200 at 0.5 m. Probe numbers use the real grid.
LiDAR drops in easily: bin each point by its x and y. Radar too: its range and angle give x and y, and its speed becomes a cell feature. The camera is the hard one. A pixel has a direction but no depth, so which cell along that direction should it fill?
Symptom: two people a metre apart merge into one detection.
Measure: compare the cell size with the gap between the objects.
Fix: finer cells near the car, at the cost in Chapter 8.
Chapter 5
Spread each pixel's feature along its ray by a depth distribution, then add it into grid cells
A pixel sees along a ray. The object could sit anywhere on it. Lift, Splat, Shoot (Philion and Fidler, ECCV 2020) does not guess one depth. It predicts a probability for each of a set of depths and spreads the pixel's feature by those probabilities.
The paper uses depth bins 1 m apart, from 4 m to 45 m, so about 41 bins. Its BEV grid is the 200 × 200 grid at 0.5 m from Chapter 4.
Call the pixel's feature vector c, with C numbers. Call the predicted probability of depth bin d αd; the α's sum to 1. Call the feature placed at depth d cd.
c-d equals alpha-d times c.
For each depth bin d, scale the whole feature c by that bin's probability alpha-d. Do it for every bin. The pixel becomes a row of weighted copies along its ray: a D × C block.
With made-up numbers: c = [4, 10] and α = [0.2, 0.5, 0.3] over 8, 9 and 10 m. Then c8 = [0.8, 2.0], c9 = [2.0, 5.0], c10 = [1.2, 3.0]. They sum to [4, 10]: the lift moves the feature and loses none of it.
Splat means: for each BEV cell, add up every lifted feature that lands in it. If c9 lands in cell (94, 124) and another pixel puts [1.0, 0.5] there, the cell holds [3.0, 5.5]. The camera map now has the LiDAR map's shape, so the two can stack. Shoot is the paper's name for planning on that map.
The bars are the depth distribution. The cells on the ray brighten with the feature each one receives. Sharpen the distribution, or move its peak.
Illustrative: 24 depth bins, 2 m apart from 4 m to 50 m, so the cells are visible. The distribution is a softmax with the confidence as its sharpness.
Why spread? A single wrong guess puts the feature in the wrong cell, and no later layer can move it back. A spread keeps some feature in the right cell. Training sharpens the spread where depth is easy to see and leaves it wide where it is not.
Symptom: camera detections have the right class but sit too near or too far.
Measure: compare the peak depth with LiDAR depth on the same pixels.
Fix: train the depth bins against projected LiDAR depth (Chapter 8).
Chapter 6
Run every fault against all three fusion levels and see that the level decides how the system fails
This is the hero with every knob. The bars on the right score all three levels on the same faults, so you compare them at once.
Pick the level drawn in the scene. Toggle faults. The bars show every level's confidence; a red bar is a ghost or a miss.
Illustrative model. Mid and late combine per-sensor confidences as 1 minus the product of the misses. Early needs LiDAR points and paints a ghost under misalignment if the camera still sees.
Try these in order:
Late fusion survives a dead sensor if it weights each sensor by how much to trust it. Call each sensor's score for "car" pc (camera) and pl (LiDAR), and its confidence weight wc and wl. The fused score is p.
p equals w-c p-c plus w-l p-l, all over w-c plus w-l.
Multiply each score by its weight. Add the two. Divide by the sum of the weights. A sensor with weight near zero barely moves p.
With made-up numbers: a glare-blind camera says pc = 0.08 with wc = 0.02. The LiDAR says pl = 0.85 with wl = 0.9. Then p = (0.0016 + 0.765) / 0.92 ≈ 0.83. A plain average gives 0.47 and misses the car.
Symptom: a late-fusion system drops a car whenever one sensor goes blind.
Measure: log each sensor's weight at that moment. The dead sensor still has full weight.
Fix: weight by confidence, and lower the weight when the sensor's health check fails.
Chapter 7
Compare the sensor rigs behind the main datasets, and read what the published methods report
Research on driving fusion runs on public datasets. Each one fixes a sensor rig, and the rig decides which fusion you can study.
Pick a dataset. The wedges are camera views, the blue ring is LiDAR and the purple fans are radars.
Sensor counts from each dataset's paper. We draw wedge angles and positions roughly, not to scale.
nuScenes is the main benchmark for three-sensor fusion because only it carries radar. Its detection score is the NDS (nuScenes detection score), which blends box accuracy with errors in size, heading and speed.
| Method | Level | What the paper reports |
|---|---|---|
| PointPainting (CVPR 2020) | early | painting improves PointRCNN, VoxelNet and PointPillars on KITTI and nuScenes |
| Lift, Splat, Shoot (ECCV 2020) | camera to BEV | the model tolerates calibration error and fuses any camera rig |
| TransFusion (CVPR 2022) | mid, by attention | soft image association; robust to degraded images and calibration errors |
| BEVFusion (ICRA 2023) | mid, in BEV | 1.3% higher mAP and NDS on nuScenes, 1.9× lower compute, BEV pooling over 40× faster |
Cars on sale fuse too. Automatic emergency braking pairs a forward camera, which says "car", with a forward radar, which gives range and closing speed in rain. A detection both confirm triggers the brake.
The industry splits on LiDAR. Tesla drives with cameras only and bets a network can learn depth. Waymo carries cameras, LiDAR and radar and measures depth. The core of the debate is Chapter 0: can a network learn depth well enough, or must a sensor measure it?
Symptom: a method that tops a benchmark fails on your car.
Measure: compare the benchmark's rig with yours: sensor count, LiDAR beams, radar or not.
Fix: evaluate on your own rig and conditions before you trust a leaderboard.
Chapter 8
Choose the level with three questions, size the grid, and train the network to lose a sensor
A design lands on your desk: these sensors, this computer, this safety rule. Ask three questions in order. The first one that bites sets the level.
If you fuse in BEV, two numbers set the grid. Call the range from the car to the grid's edge R, in metres, and the cell size s. Call the number of cells N.
N equals two R over s, squared.
Divide the width 2R by the cell size s to get the cells across. Square it to get N. Compute and memory grow with N.
R = 50 m, s = 0.5 m: N = 2002 = 40,000. Halve s to 0.25 m: N = 160,000, four times the work. Double R to 100 m at 0.5 m: also 160,000.
Drag the range and the cell size. The bar is the memory of one 64-channel feature map against a budget line.
Illustrative: 64 channels at 4 bytes each, and a 40 MB budget for one map. Real networks hold many maps, so real budgets bind sooner.
A highway car needs range: at 30 m/s it covers 100 m in about 3 s. A city car needs fine cells to separate pedestrians. No grid gets both cheaply, so many stacks use fine cells near the car and coarse ones far away.
The level and the grid are the big choices. Three habits decide whether the result survives the road:
Symptom: the car goes blind when the LiDAR drops out, though camera and radar work.
Measure: run the validation set with the LiDAR zeroed.
Fix: retrain with modality dropout.
Chapter 9
Ablate one sensor at a time and catch the network that secretly uses only one
Fusion bugs are quiet. A system scores well on a sunny benchmark and fails in rain, or a "fused" network leans on one sensor alone. Five failures cover most cases.
| Failure | Symptom | Test |
|---|---|---|
| Misalignment | ghosts, shrunken boxes | overlay projected points on the image |
| Wrong camera depth | right class, wrong range | compare camera depth with LiDAR depth |
| Modality imbalance | one sensor's loss is a cliff | kill each sensor alone and measure |
| Domain shift | fine by day, poor at night or in rain | score each condition apart |
| Late association | two cars merged, or one car doubled | draw the matches; check the gate |
Modality imbalance is the hardest to see. A network trained with every sensor always present learns to lean on the easiest one, usually LiDAR. It has fusion on paper and one sensor in practice. An ablation test exposes it: remove one input, rerun, and measure the drop.
Pick a network. Remove a sensor. A balanced network loses a little for each; an imbalanced one falls off a cliff for one.
Illustrative scores on a 0 to 100 scale, chosen to show the two patterns. Run the same test on your own validation set.
A balanced network drops a few points for each removed sensor. An imbalanced one barely notices a lost camera and collapses without LiDAR. That proves the network ignored the camera.
Domain shift is the second quiet failure: the test conditions differ from the training data. A network trained on clear days meets rain at night. The camera dims and the LiDAR scatters, and a network that never learned to trust radar has nothing left. Split the validation set by weather and light, and check that radar carries weight when the other two fade.
Symptom: removing the camera changes the score by 1 point; removing the LiDAR costs 50.
Measure: the per-sensor ablation above, on held-out data.
Fix: modality dropout in training, then ablate again until each sensor earns its place.
Chapter 10
Keep the terms, the numbers, a checklist and the core code in one place
Camera, LiDAR and radar each measure what the others miss. Fuse early for detail, late for robustness, and mid, in a bird's-eye-view grid, for the balance most systems choose. Lift-Splat puts camera features into that grid. Modality dropout keeps the system alive when a sensor dies.
| Term or number | Meaning |
|---|---|
| y = f · Y / Z | the camera sees only the ratio of height to distance |
| fD = 2v / λ | radar speed from one echo; 4 m/s at 77 GHz is about 2,050 Hz |
| u = f · xc / zc + cu | project a point to a pixel; (0.8, −0.5, 8) lands at (1060, 477.5) |
| Δu ≈ f · tan Δθ | 0.5° of rotation error moves every point about 8.7 px |
| col = round((x − xmin) / s) | the BEV cell rule; 12 m ahead lands in column 124 |
| cd = αd · c | the lift; the copies along a ray sum back to c |
| p = (wcpc + wlpl) / (wc + wl) | confidence-weighted late fusion; a dead sensor's weight goes to zero |
| N = (2R / s)2 | grid cells; ±50 m at 0.5 m is 40,000 |
| Early / mid / late | raw data, features in BEV, finished boxes |
| Modality dropout | zero a whole sensor on some training samples |
pythonimport numpy as np def paint(points, seg, T, K): # early fusion: PointPainting P = (T @ np.c_[points[:, :3], np.ones(len(points))].T).T # LiDAR to camera frame uvw = (K @ P[:, :3].T).T # (f*x + cu*z, f*y + cv*z, z) uv = (uvw[:, :2] / uvw[:, 2:]).astype(int) # divide by depth ok = (uvw[:, 2] > 0) & (uv[:, 0] >= 0) & (uv[:, 0] < seg.shape[1]) \ & (uv[:, 1] >= 0) & (uv[:, 1] < seg.shape[0]) sc = np.zeros((len(points), seg.shape[2])) sc[ok] = seg[uv[ok, 1], uv[ok, 0]] # read the class scores return np.c_[points, sc] # (N, 4 + C) def lift_splat(feat, alpha, cell_idx, H, W): # camera to BEV C = feat.shape[1] lifted = np.einsum('pd,pc->pdc', alpha, feat).reshape(-1, C) # c_d = alpha_d * c bev = np.zeros((H * W, C)) np.add.at(bev, cell_idx.reshape(-1), lifted) # splat: add into cells return bev.reshape(H, W, C) def late_fuse(p_cam, w_cam, p_lid, w_lid): # confidence-weighted late fusion return (w_cam * p_cam + w_lid * p_lid) / (w_cam + w_lid) late_fuse(0.08, 0.02, 0.85, 0.9) # 0.83: the blind camera barely counts
Now press Present or Teach. Explain from memory why one frame has no depth, the three levels, the projection, the cell rule and the lift. Then go back to the hero, misalign the sensors at each level, and say why only one level grows a ghost.