Multimodal Fusion for Driving

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.

Fuse three sensors, then break one

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

Three Sensors, Three Blind Spots

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.

SensorWhat it givesWhat fails now
Cameracolour and texture: what the thing isthe sun glare washes out the truck
LiDARdistance to the centimetrethe spray scatters its laser beams
Radarspeed, through spray and glareits 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.

Say it aloud

Small y equals f times big Y, divided by big Z.

y
small y the object's height in the image, in pixels.
f
f the focal length in pixels, fixed for one camera. Here 1000 px.
Y
big Y the object's real height, in metres.
Z
big Z the object's distance from the camera, in metres.
/
divided by a far object shrinks in proportion to its distance.
In plain words

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 numbers

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.

Fool the camera

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.

3.0 m
45 m

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).

The road

  1. The three modalities: what each sensor measures, in what shape.
  2. Where to fuse: early, mid or late. The hero's three buttons.
  3. PointPainting: early fusion by hand, and the misalign toggle.
  4. The bird's-eye view: one grid where every sensor lines up.
  5. Lift, Splat, Shoot: how camera pixels get into that grid.
  6. The showcase: the hero with every knob, and all three levels side by side.
  7. On the road: real sensor rigs, benchmarks and published results.
  8. Building a stack: pick a level, size the grid, train for dropout.
  9. Debugging: five ways fusion breaks, and the test for each.
  10. The field guide: numbers, code, links and sources.
A camera sees an object 50 px tall. Why can it not say how far away the object is?

Chapter 1

What Each Sensor Measures

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.

PropertyCameraLiDARRadar
Principlepassive lightlaser time of flightradio echo and Doppler shift
One framedense image, H × W × 3list of (x, y, z, intensity)list of (range, angle, speed, strength)
Size6.2 million numbers at 1080pabout 100k to 200k points a sweepa few hundred detections
Givesclass, colour, lane lines, signsmetric 3-D positionradial speed, long range
Missesdepthcolour, speedshape, fine angle
Fails inglare, darknessheavy rain, spray, fograrely; clutter from metal

The camera is dense. The LiDAR is sparse, and it thins with distance. Move the car away and count.

Count what lands on one car

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.

30 m

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.

Say it aloud

f-D equals two v over lambda.

fD
f-D the Doppler shift: how much the echo's frequency moved, in hertz.
2
two the wave travels out and back, so the motion counts twice.
v
v the radial speed: how fast the target closes on the radar, in m/s.
λ
lambda the radar's wavelength, in metres. About 3.9 mm at 77 GHz.
In plain words

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.

With numbers

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.

Which quantity does only radar measure in a single frame?

Chapter 2

Early, Mid or Late: Where the Streams Meet

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.

LevelWhat meetsExample
Early (data)raw points and raw pixelsPointPainting (Chapter 3)
Mid (feature)feature maps in one shared gridBEVFusion (Chapters 4 and 5)
Late (decision)each sensor's finished boxestrack-to-track fusion (Lesson 12)

Move the merge point

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.

You move the merge point from early to late. What do you trade?

Chapter 3

PointPainting: Early Fusion by Hand

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:

  1. Run a segmentation network on the image. Each pixel gets a score per class: car, pedestrian, road.
  2. Project each LiDAR point into the image to find its pixel.
  3. Append that pixel's scores to the point: (x, y, z, i) becomes (x, y, z, i, s1 … sC).
  4. Feed the painted cloud to any LiDAR detector.

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.

Say it aloud

u equals f times x-c over z-c, plus c-u.

u
u the pixel column the point lands on.
f
f the focal length, 1000 px.
xc
x-c how far right of the camera axis the point is, in metres.
zc
z-c how far ahead of the camera the point is, in metres.
cu
c-u the centre column, 960 for a 1920 px image.
In plain words

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.

With numbers

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.

Say it aloud

Delta-u is about f times the tangent of delta-theta.

Δu
delta-u how many pixels the projected point moves.
f
f the focal length, 1000 px.
tan Δθ
tangent of delta-theta the angle error, as a slope. About 0.0087 for 0.5°.
In plain words

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.

With numbers

Δθ = 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.

Paint the points, then shift them

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.

0 px

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.

Why does an 8-pixel calibration error hurt PointPainting?

Chapter 4

The Bird's-Eye View: One Grid for Every Sensor

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.

PropertyWhy it helps
Metrica car is 2 m by 5 m near or far, unlike in an image
Sharedall three sensors use the same cells and the same metres
Alignedthe same patch of road is the same cell, so fusion is a stack
Ready to usetracking 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.

Say it aloud

col equals round of x minus x-min, over s.

col
col the grid column, from 0 to 199.
round
round snap to the nearest whole cell.
x
x the point's forward distance from the car, in metres.
xmin
x-min the grid's back edge, −50 m.
s
s the cell size, 0.5 m.
In plain words

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.

With numbers

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).

Fill one grid from three sensors

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.

What makes the BEV grid a good place to fuse camera and LiDAR features?

Chapter 5

Lift, Splat, Shoot: Camera Features into the Grid

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.

Say it aloud

c-d equals alpha-d times c.

cd
c-d the feature placed at depth bin d on the pixel's ray.
αd
alpha-d the network's probability that the object sits at depth d. Between 0 and 1.
c
c the pixel's feature vector: what the camera sees there.
In plain words

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 numbers

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.

Spread one pixel along its ray

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.

8
18 m

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).

Why does Lift-Splat predict a depth distribution per pixel and not one depth?

Chapter 6

Pick a Level, Break a Sensor

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.

Break the sensors, compare the levels

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:

  1. Early, all healthy: the best box. Turn on Misalign: a red ghost appears on empty road.
  2. Switch to Late with Misalign on: no ghost, the box only shifts.
  3. Spray the LiDAR: early fusion has no points to paint and loses the truck. Mid keeps it from camera and radar.

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.

Say it aloud

p equals w-c p-c plus w-l p-l, all over w-c plus w-l.

p
p the fused probability that the object is a car.
pc
p-c the camera detector's car score.
pl
p-l the LiDAR detector's car score.
wc
w-c the camera's confidence weight, 0 to 1. It falls when glare washes out the image.
wl
w-l the LiDAR's confidence weight, 0 to 1.
In plain words

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 numbers

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.

The sensors are misaligned by 0.5°. Which level can put a ghost object on empty road?

Chapter 7

Real Rigs, Benchmarks and Results

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.

Compare three dataset rigs

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.

MethodLevelWhat the paper reports
PointPainting (CVPR 2020)earlypainting improves PointRCNN, VoxelNet and PointPillars on KITTI and nuScenes
Lift, Splat, Shoot (ECCV 2020)camera to BEVthe model tolerates calibration error and fuses any camera rig
TransFusion (CVPR 2022)mid, by attentionsoft image association; robust to degraded images and calibration errors
BEVFusion (ICRA 2023)mid, in BEV1.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.

The camera-only versus LiDAR debate is, at its core, about which problem?

Chapter 8

Building a Fusion Stack

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.

  1. Is calibration excellent and stable for the car's life? If not, avoid early fusion.
  2. Is there a GPU on the car? If yes, fuse mid, in BEV. If compute is tight, fuse late.
  3. Must the car keep driving with a dead sensor? Add a late safety layer, or train mid fusion with dropout.

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.

Say it aloud

N equals two R over s, squared.

N
N the number of cells in the grid.
2
two the grid reaches R in front and R behind.
R
R the range from the car to the grid's edge, in metres.
s
s the cell size, in metres.
2
squared the grid is square, so cells across times cells down.
In plain words

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.

With numbers

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.

Size the BEV grid

Drag the range and the cell size. The bar is the memory of one 64-channel feature map against a budget line.

50 m
0.5 m

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.

Your BEV system goes blind when the LiDAR drops out briefly, though camera and radar are fine. What is the cheapest fix?

Chapter 9

How Multimodal Fusion Breaks

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.

FailureSymptomTest
Misalignmentghosts, shrunken boxesoverlay projected points on the image
Wrong camera depthright class, wrong rangecompare camera depth with LiDAR depth
Modality imbalanceone sensor's loss is a cliffkill each sensor alone and measure
Domain shiftfine by day, poor at night or in rainscore each condition apart
Late associationtwo cars merged, or one car doubleddraw 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.

Ablate one sensor at a time

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.

Disabling the camera barely changes a fusion net's score, but disabling the LiDAR craters it. What is wrong?

Chapter 10

The Field Guide

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 numberMeaning
y = f · Y / Zthe 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 + cuproject 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 · cthe 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)2grid cells; ±50 m at 0.5 m is 40,000
Early / mid / lateraw data, features in BEV, finished boxes
Modality dropoutzero a whole sensor on some training samples

Checklist

  1. Overlay projected LiDAR points on the camera image every drive.
  2. Stamp every reading at capture time, on one clock.
  3. Size the grid from range, cell size and memory.
  4. Supervise camera depth with projected LiDAR.
  5. Train with modality dropout.
  6. Ablate each sensor and score each weather and light condition apart.
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

Keep going

Sources

  1. Feng, D., Haase-Schütz, C., Rosenbaum, L., et al. "Deep Multi-modal Object Detection and Semantic Segmentation for Autonomous Driving: Datasets, Methods, and Challenges." IEEE T-ITS, 2020. arXiv:1902.07830
  2. Vora, S., Lang, A. H., Helou, B., and Beijbom, O. "PointPainting: Sequential Fusion for 3D Object Detection." CVPR, 2020. arXiv:1911.10150
  3. Philion, J. and Fidler, S. "Lift, Splat, Shoot: Encoding Images from Arbitrary Camera Rigs by Implicitly Unprojecting to 3D." ECCV, 2020. arXiv:2008.05711
  4. Bai, X., Hu, Z., Zhu, X., et al. "TransFusion: Robust LiDAR-Camera Fusion for 3D Object Detection with Transformers." CVPR, 2022. arXiv:2203.11496
  5. Liu, Z., Tang, H., Amini, A., et al. "BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation." ICRA, 2023. arXiv:2205.13542
The takeaway. Put every sensor in one metric grid, fuse there, and train the network to lose any one sensor. Then test that it can.
A colleague wants to switch from BEV mid fusion to PointPainting for more accuracy. What risk do you raise?

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.

Sensor Fusion: Classical to Modern · Lesson 18: Multimodal Fusion for Autonomous Driving
Lesson 17 · Lesson 19 · Back to Gleams