Design Object Detection for Autonomous Vehicles
Understanding the Problem
🚗 What is autonomous-vehicle perception? Perception is the part of a self-driving stack that turns raw sensor data (camera images, LiDAR point clouds, radar returns) into a structured picture of the world: every car, pedestrian, cyclist and cone around the vehicle, with its 3D position, size, heading and velocity, updated many times a second. Prediction and planning consume that picture to decide what the car does next. If perception misses a pedestrian, nothing downstream can save the situation.
Interviewers ask this as "design object detection for a self-driving car," "how would you fuse camera and LiDAR," or "how do you find and fix the long tail of rare objects." The model is only half the answer. The other half is the data engine: the loop that pulls interesting moments off a fleet of vehicles, labels them (mostly automatically), retrains, and proves the new model is safer before it ships. Most of what separates a demo from a deployed system lives in that loop and in the evaluation gate at the end of it.
We'll design for a robotaxi-style fleet with cameras, LiDAR and radar. Camera-only stacks follow the same structure with a different model front end, and we'll say where they differ.
Functional Requirements
Core Requirements
- The vehicle should detect objects around it in 3D (vehicles, pedestrians, cyclists, motorcyclists, animals, debris, traffic cones and barriers) with position, size, heading, velocity and class, out to about 200 m ahead.
- Detections should be tracked over time with stable IDs so prediction can reason about each agent's history.
- The system should handle degraded conditions: night, rain, fog, glare, a dirty or failed sensor.
- The fleet should continuously feed back hard and rare cases, and new models should be trained, evaluated and shipped to vehicles on a regular cadence.
Below the line (out of scope)
- Motion prediction and planning, except as consumers of perception output.
- HD map building and localization.
- Traffic light and sign state classification, beyond noting they share the same backbone.
Non-Functional Requirements
Ask about the vehicle compute, sensors and speed range, because they set the latency budget.
Core Requirements
- Latency. Perception should produce a fused, tracked output within about 50 ms of the last sensor capture, every cycle, at 10 Hz (LiDAR rate) or faster. The p99.9 matters more than the mean: a frame that takes 300 ms is a frame where the car is driving blind.
- Recall on safety-critical classes. Missing a pedestrian is far worse than a phantom box. We'll target very high recall for vulnerable road users within the stopping distance, and accept a few more false positives at long range.
- Robustness. Graceful degradation when a sensor fails: no single camera or LiDAR failure should leave a blind spot that goes unreported.
- Fixed compute. Everything runs on an in-vehicle computer with a fixed power and thermal budget, on the order of a few hundred INT8 TOPS (an NVIDIA DRIVE Orin-class system-on-chip, or a custom accelerator). There's no cloud in the loop.
- Safety process. Every model change must pass a regression gate with traceable evidence before it reaches a vehicle.
Below the line (out of scope)
- Certification details (we'll mention ISO 26262 and ISO 21448/SOTIF, not walk through them).
- V2X communication with infrastructure.
Some arithmetic that changes the design. Assume 8 cameras at 2-3 megapixels and 30 fps, one 128-beam roof LiDAR plus a few short-range LiDARs, and 5 radars.
- Raw camera data: 8 x 2.5 MP x 3 bytes x 30 fps ≈ 1.8 GB/s uncompressed. LiDAR: ~200,000 points per sweep x 16 bytes x 10 Hz ≈ 32 MB/s. Even with video compression, a vehicle produces on the order of 1-3 TB per 8-hour shift.
- A fleet of 1,000 vehicles therefore generates petabytes per day. We can't upload, store or label it all, and we wouldn't want to: 99% of driving is empty highway and stopped traffic that the model already handles.
- At 30 m/s (108 km/h), the car moves 3 m per 100 ms cycle. A 100 ms latency spike is a car length of travel with stale information, which is why the tail latency budget is strict.
- Labelling cost: a human labelling 3D boxes on a 20-second LiDAR sequence (200 frames, dozens of objects each) can take hours. At that rate, a million labelled frames is a large budget, which is why auto-labelling matters.
The insight to state early: the bottleneck isn't the model architecture, it's choosing which 0.01% of fleet data to label. A perception team's leverage is the data engine that mines rare cases, auto-labels them and proves improvements, not a new backbone each quarter.