Lesson 18 of 2255 minutes

Perception Quality and Sensor Fusion

Start with the lesson question, connect the representations, and test the model with evidence.

precisionrecalldistribution shiftsynchronizationsensor fusion

Learning objectives

  • Explain images, depth, filtering, and visual features as robot data.
  • Compare classification, detection, segmentation, pose, and tracking.
  • Evaluate a perception pipeline using errors and changing conditions.
Lesson flowHook, model, explanationShow guidance

Inspect the opening phenomenon

Predict what changes, then name the evidence.

Apply in the lab

Name the evidence before reading the answer.

Read only what helps

Then use the lab and recall check.

More when needed

Transcript and resources stay available below.

Course progress

AI & Robotics Foundations · Robot Perception and Computer Vision · Lesson 18

Perception Quality and Sensor Fusion

In progress

Decision challenge

Observe the phenomenon. Then connect the representations.

Use the opening example to make a prediction, identify evidence, and explain which model supports it.

Can Two Sensors Agree and Still Be Wrong? Sensor Fusion

Agreement is insufficient without comparable, valid, uncertainty-aware evidence.

Agreement is insufficient without comparable, valid, uncertainty-aware evidence.

Reference drawerTranscript, source notes, scripts, and package status stay tucked away until you need them.6 files

Lesson reading

live

55 min

Video script

draft

Transcript fallback

available

courses/ai-robotics/modules/06-robot-perception-and-computer-vision/lessons/03-perception-quality-and-sensor-fusion/video-transcript.md

Audit and Gate a Fusion Pipeline

draft

30 min

Mastery check

live

6 questions / 10 min

Transcript for accessibility and fallback

# Transcript Two sensors agree. Can the robot trust them? Not until their evidence passes a gate. First, time: do acquisition timestamps describe the same physical moment? Second, frame: can both measurements be transformed into one named frame? Third, validity: are values in range and free of invalid codes? Fourth, uncertainty: how noisy or biased is each source? Fifth, independence: can both fail for the same reason? Quality metrics also answer different questions. Precision measures false-alarm control; recall measures missed-target control. Slice both by real operating conditions because averages hide distribution shift. Only after the gate should the robot weight and combine evidence, monitor disagreement, and fail conservatively. Which check must happen before weighted averaging? Continue the lab on EduQuest.

Reading lab

Core explanation

Connect the lesson's words, diagrams, graphs, evidence, and equations.

When two sensors agree, can the robot trust them?

Not automatically. Two sensors can agree because both are stale, misaligned, biased, or observing different moments. Fusion begins by deciding whether evidence is comparable.

Evidence gate before sensor fusion

Measure the error that matters

For a target detector:

  • True positive (TP): target correctly reported.
  • False positive (FP): target reported when absent.
  • False negative (FN): target present but missed.
  • Precision = TP / (TP + FP): when the model reports a target, how often is it correct?
  • Recall = TP / (TP + FN): how many real targets did it find?

A threshold can trade recall for precision. The right balance depends on the action and the cost of each error.

Worked example

Across 50 labeled scenes, a detector produces TP=32, FP=8, and FN=10.

precision = 32/40 = 0.80 and recall = 32/42 ≈ 0.76.

That is not a universal quality score. Break results down by conditions: bright/dim light, near/far range, clear/occluded targets, and familiar/unfamiliar backgrounds. NIST emphasizes realistic test sets and ongoing deployed monitoring because performance can fail outside development conditions.

Retrieval pause: If missed people are more harmful than extra alerts, which metric deserves special attention? Recall, while still managing false alarms.

Distribution shift

Training examples do not define the whole world. New lighting, camera placement, weather, clothing, clutter, or sensor aging can change the input distribution. Monitor condition slices, not only an average. When the system operates beyond tested limits, reduce authority or request human review.

Fuse only comparable evidence

Before combining camera and lidar evidence, run an evidence gate:

  1. Time: are acquisition timestamps close enough for the robot's motion?
  2. Frame: are measurements transformed into the same named frame?
  3. Validity: are values within documented range and free of invalid codes?
  4. Uncertainty: does each source report a defensible error model?
  5. Independence: could both share the same failure cause?

ROS ApproximateTimeSynchronizer matches messages using header timestamps and a configured tolerance. Arrival time is not a safe substitute when delays are unpredictable.

A simple uncertainty-weighted estimate

For independent scalar measurements z1 and z2 with variances v1 and v2, a teaching approximation is:

z_fused = (z1/v1 + z2/v2) / (1/v1 + 1/v2).

Lower variance receives more weight, but a precise biased sensor can still dominate incorrectly. Gate first, fuse second, then monitor residual disagreement.

Misconception checks

  • Confidence is not probability of truth or safety.
  • More sensors do not guarantee better estimates.
  • Synchronization by arrival time can combine different physical moments.
  • High average accuracy can hide failure in a critical condition slice.

Summary

Perception quality is conditional evidence. Measure task-relevant errors, test deployment conditions, preserve time and frame, gate invalid inputs, fuse uncertainty-aware measurements, and fail conservatively when evidence conflicts.

Further learning

Practice labAudit and Gate a Fusion PipelineOpen this when you are ready to apply the model, collect evidence, and check your explanation.30 min

Lab: Audit and gate a fusion pipeline

Objective

Calculate condition-specific quality and decide which sensor pairs may be fused.

Materials

  • lab-worksheet.csv
  • Spreadsheet, calculator, or paper

Steps

  1. Compute precision and recall for the bright and dim condition rows.
  2. Compare the condition slices with the aggregate; state what the average hides.
  3. For each camera/lidar pair, calculate timestamp difference.
  4. Accept fusion only when time difference is at most 0.10 s, frames can be transformed consistently, and both readings are valid.
  5. For accepted rows, explain which source should receive more weight and why.
  6. Specify the robot's response to rejected or conflicting evidence.

Expected Result

Dim-light recall is worse than bright-light recall. Some pairs must be rejected despite plausible values because they are stale or framed incompatibly.

Reflection Questions

  1. Which metric aligns with your chosen harm model?
  2. Why can two high-confidence sensors still disagree?
  3. What condition slice should be tested next?

Extension Challenge

Apply the inverse-variance formula to two accepted scalar measurements and explain its independence assumption.

Accessibility fallback

All evidence is numeric and textual; color is never required to interpret acceptance.