Synthetic Anomaly Generation and Detection for Safeguarding a Multimodal Perception Model in Autonomous Mobile Systems
Autonomous vehicles and mobile robots plan their path on the area a segmentation model marks as drivable. An unfamiliar object on the road, such as an animal or a tree stump, can still end up inside this area. I added an anomaly detection module to an existing segmentation model that fuses a camera with LiDAR or radar, and built a synthetic anomaly generation pipeline that creates the multimodal test data to evaluate the detector.
Predicted drivable area
Detector · camera
Detector · LiDAR
Detector · radar
- Result
- Dual-Bank PatchCore separated generated obstacles from control scenes with an AUROC of 0.991 (camera + LiDAR, 1.0 is perfect). With radar it reached 0.914, but the control scenes also stood out there, so this result is less conclusive.
- Main finding
- Where the detector attaches mattered more than how it scores. Detectors working on each sensor’s features before fusion caught every failed LiDAR or radar and kept separating obstacles in dense camera fog. Detectors on the fused features did neither reliably.
01 · Problem
An obstacle can stay inside the drivable area
A drivable-area segmentation model decides for every pixel whether it is drivable, and path planning builds on that result. Such models are reliable for scenes like those they were trained on. An unfamiliar object can still end up inside the predicted drivable area, which then looks free to drive on.
Original scene
Same scene with generated obstacle
What was missing
A multimodal safeguard for the drivable area
An object left inside the drivable area is a direct collision risk, so the segmentation model needs an additional safeguard that detects anomalies there. Because the segmentation model is multimodal, the safeguard has to be multimodal too. Existing detectors limited to the drivable area use only the camera, and multimodal ones do not limit detection to it.
→ 02 ApproachTest data with obstacles in every sensor
Public anomaly datasets are mostly camera-only, the multimodal AnoVox (Bogdoll et al., 2024) is fully simulated, and real road obstacles are rare and costly to record.
→ 03 Test data02 · Approach
Compare each sensor with learned normal data
Inside the segmentation model, each sensor first passes through its own encoder, which turns the raw data into features. A fusion module merges these features, and a decoder outputs the predicted drivable area.
The anomaly detection module attaches to the segmentation model without changing it, and there are three points where a detector can attach. To tell their effect apart from that of the scoring method, I implemented three scoring methods before fusion (Dual) and after fusion (Fused): PatchCore (distance to stored normal features), Mahalanobis (distance to a distribution fitted to normal features) and Patch Autoencoder (error when reconstructing the features). Output entropy, the uncertainty of the segmentation output, is the seventh detector.
Scroll sideways to see the full diagram →
My detector: Dual-Bank PatchCore
-
1
Only score the predicted drivable area
Following JSR-Net (Vojíř et al., 2021), the detector only considers the predicted drivable area. Its appearance varies little, so its normal state can be learned. Objects outside it are already recognised by the segmentation model. Radar is the exception and keeps all returns, since the road reflects little radar.
-
2
Score by distance to normal examples
PatchCore (Roth et al., 2022) comes from industrial inspection of camera images. I carried it over to driving scenes and several sensors: a memory bank stores features of normal drivable area, and a new scene is scored by its distance to them. No labelled anomalies are needed.
-
3
One memory bank per sensor
The camera and the LiDAR or radar features each get their own bank, taken from the encoders before fusion. A reliability-weighted maximum combines both scores and shifts weight away from the camera in fog.
Scroll sideways to see the full diagram →
03 · Test data
Generated obstacles in real scenes
Testing the detector needs unfamiliar obstacles that appear consistently in camera, LiDAR and radar data. Instead of simulating whole scenes, my pipeline edits real ones and generates only the inserted object.

1. Start from a real scene
A real camera image with its LiDAR and radar point clouds.

2. Insert an obstacle into the image
From a text prompt, Gemini 3.1 Flash Image adds an unfamiliar object to the road.

3. Locate the change
DINOv2 feature differences find the edited region, and SAM refines it into a mask.

4. Estimate depth
Depth Anything V2 estimates the object’s depth, calibrated against the real LiDAR points.

5. Transfer into LiDAR
Mask pixels become 3D points matched to the scan’s density and intensity. Real points hidden behind the object are removed.

6. Transfer into radar
The object as sparser radar points. Hidden real returns are removed.
Why a control mode is needed
The image generator can shift colours and textures across the whole image, so a detector could flag edited scenes without noticing the obstacle. Control scenes, an idea from Fishyscapes (Blum et al., 2021), go through the same editing but only duplicate an object already in the scene. The main test compares obstacles with controls.
Obstacle mode

Control mode

04 · Evaluation and results
Detectors attached before fusion keep each sensor visible
Example: a tree trunk across the lane
Scene

Original

With obstacle
Camera

Originalz = −1.16

With obstaclez = +20.08
LiDAR

Originalz = +0.20

With obstaclez = +12.89
Radar

Originalz = +0.43

With obstaclez = +71.72
Three tests
All seven detectors ran with camera + LiDAR and with camera + radar on two datasets, the public Zenseact Open Dataset (ZOD) and an internal dataset. All images and values on this page come from ZOD.
- Generated obstacles: 95 obstacle scenes (96 with radar) against 100 control scenes
- Sensor failure: the camera, LiDAR or radar input replaced by zeros, 100 scenes each
- Camera fog: synthetic fog on the camera image
Every result below is an AUROC: how reliably a detector’s score ranks one group of scenes above the other. 0.5 is chance, 1.0 is perfect. Values are for camera + LiDAR unless radar is named.
All seven detectors
Higher is better, except control vs. original, where close to 0.5 means the editing alone goes unnoticed.
| Detector | Camera + LiDAR | Camera + radar | ||||
|---|---|---|---|---|---|---|
| Obstacle vs. control | Control vs. original | LiDAR failure | Obstacle vs. control | Control vs. original | Radar failure | |
Sensor failure
Before fusion, LiDAR or radar has its own branch, whose score rises sharply when the sensor fails. After fusion, the camera dominates the features and partly masks the 3D contribution, so the failure is hard to detect.
Obstacles with radar
Before fusion, control vs. original is clearly higher with radar than with LiDAR (table above). The radar branch scores all returns, so it also reacts to injected or duplicated radar points, and generated radar points stay recognisable. Radar obstacle results are therefore less conclusive.
In camera fog, Dual-Bank PatchCore still separates obstacles from controls
AUROC for obstacles vs. controls with camera + LiDAR
Camera fog
At fog level 0.2, the camera bank alone drops from 0.998 to 0.611, while the LiDAR bank stays at 0.949. The reliability-weighted maximum then relies more on LiDAR, so Dual-Bank PatchCore keeps 0.942. Detectors on fused features lose separation early, although LiDAR still supports the segmentation in fog.
Other scoring methods
Dual Mahalanobis and Dual Patch Autoencoder, attached at the same point, also catch every LiDAR failure and recover in dense fog. The advantage therefore comes from attaching before fusion, not from PatchCore alone. Only Dual-Bank PatchCore stays above 0.9 at every fog level, the other two drop to 0.578 and 0.691 in light fog.
Limits. Obstacles and sensor failures were synthetic, and scores were evaluated per scene, not per pixel. Tests with real multimodal anomaly data and more realistic radar points are the next steps.