Source-linked AI summary

Detecting the Unexpected via Image Resynthesis

Krzysztof Lis, Krishna Nakka, Pascal Fua, Mathieu Salzmann

arXiv:1904.07595v2cs.CV

TL;DR

Unexpected test-time objects violate the assumption that segmentation classes are known during training, while uncertainty and autoencoder methods often fail to localize them. The paper resynthesizes images from predicted semantic maps and trains a discrepancy network to detect meaningful differences, outperforming those baselines and extending the comparison to adversarial attacks.

  • Problem

    Semantic segmentation generally assumes test-time classes were seen during training, but unexpected objects require detecting pixels belonging to never-seen-before classes.

  • Method

    The method resynthesizes an image from predicted semantic labels and uses a discrepancy network to identify meaningful differences associated with mislabeled unexpected objects.

  • Results

    The approach outperforms uncertainty-based and autoencoder-based methods for unexpected-object detection and outperforms a state-of-the-art method for standard adversarial attacks.

  • Takeaways & Limitations

    Comparing an input image with its semantic-map-based resynthesis provides a generic strategy for detecting unexpected objects and adversarial attacks.

  • Takeaways & Limitations

    Evaluation uses datasets withheld from training, while the Lost and Found dataset contains a limited set of unexpected objects in a constrained scenario.

Abstract

from arXiv · show

Classical semantic segmentation methods, including the recent deep learning ones, assume that all classes observed at test time have been seen during training. In this paper, we tackle the more realistic scenario where unexpected objects of unknown classes can appear at test time. The main trends in this area either leverage the notion of prediction uncertainty to flag the regions with low confidence as unknown, or rely on autoencoders and highlight poorly-decoded regions. Having observed that, in both cases, the detected regions typically do not correspond to unexpected objects, in this paper, we introduce a drastically different strategy: It relies on the intuition that the network will produce spurious labels in regions depicting unexpected objects. Therefore, resynthesizing the image from the resulting semantic map will yield significant appearance differences with respect to the input image. In other words, we translate the problem of detecting unknown classes to one of identifying poorly-resynthesized image regions. We show that this outperforms both uncertainty- and autoencoder-based methods.

1. Introduction

The paper addresses unexpected objects that appear at test time despite absent training labels. It detects them by finding regions whose semantic labels produce strong differences between the original and resynthesized images.

  • Motivation: Unexpected objects such as animals, snow heaps, and lost cargo can appear in outdoor scenes although their labels are absent from standard segmentation datasets.Semantic segmentation methods typically assume that every test-time class was represented during training.
  • Limitations of Existing Methods: Uncertainty-based methods flag low-confidence regions, but these regions often do not coincide with unknown objects.The paper reports that such methods can be distracted by background regions.
  • Limitations of Existing Methods: Autoencoder-based methods assume never-seen objects will decode poorly, but the paper observes that they often generate generally lower-quality images instead.This content-independent degradation makes their detected regions poorly aligned with unexpected objects.
  • Proposed Strategy: The proposed strategy resynthesizes the input from predicted semantic labels and identifies meaningful discrepancies caused by spurious labels on unknown objects.A generative network maps semantic labels back to images, while a discrepancy network compares the original, resynthesized image, and predicted map.
  • Training Strategy: Training without unknown objects is enabled by replacing labels of known object instances with randomly chosen classes to simulate unexpected-object errors.The discrepancy detector learns from these altered semantic maps and their resynthesized images.
  • Results: The method outperforms uncertainty-based and autoencoder-based baselines on unexpected-object detection and also outperforms a state-of-the-art adversarial-attack detector.Experiments use the Lost and Found dataset and a newly created road-anomaly dataset.

2. Related Work

Prior work estimates uncertainty or reconstructs images to detect anomalies, but these approaches have important localization, generality, and content-preservation limitations. The paper instead uses semantic-map-conditioned resynthesis to expose incorrect class predictions.

  • Uncertainty-Based Detection: Uncertainty-based segmentation methods use dropout or related Bayesian approximations to estimate confidence and flag potentially mislabeled regions.These methods are motivated by the expectation that unknown objects should produce low-confidence predictions.
  • Resynthesis-Based Detection: Earlier resynthesis methods mainly target behavioral anomalies in videos by reconstructing images from predicted optical flow.Their demonstrations were limited to scenes with static backgrounds.
  • Resynthesis-Based Detection: Image-level autoencoder methods can compare reconstructed and input images but may not localize anomalies within images.Other approaches search latent representations or use feature losses to identify deviations from learned image distributions.
  • Road-Scene Methods: Road-obstacle methods can localize anomalies using patch-based autoencoders, but they are specific to road scenes and lack generality.The paper contrasts this with a method based on semantic-map-conditioned resynthesis.
  • Paper’s Distinction: Autoencoders may learn image compression and synthesize lower-quality versions regardless of content, whereas semantic-map resynthesis makes incorrect class predictions produce appearance differences.This distinction motivates comparing the original image with an image generated from predicted labels.
  • Adversarial Attack Detection: The same original-versus-resynthesized comparison is also applied to adversarial attacks against semantic segmentation networks.The paper positions this application alongside prior segmentation-attack detection work.

3. Approach

The approach generates a semantic map, resynthesizes the image from it, and uses a discrepancy network to identify meaningful differences. Synthetic label corruptions provide training examples without requiring unknown-class images.

  • Goal: The task is to estimate each pixel’s probability of belonging to a class never seen during segmentation training.This extends conventional segmentation beyond assigning pixels only to known training classes.
  • Pipeline: A semantic segmentation model first produces labels, and a generative network then attempts to reconstruct the input image from that semantic map.Unknown objects are expected to be mislabeled and consequently poorly resynthesized.
  • Discrepancy Network: The discrepancy network compares the original and resynthesized images while incorporating the predicted semantic labels to produce a map of meaningful differences.Simple pixel differencing is insufficient because known-object layout is preserved while precise appearance information is lost.
  • Discrepancy Network: The network extracts image features with VGG, processes label features with a custom CNN, fuses streams using 1 × 1 convolutions, and decodes correlated features into a discrepancy score.Feature correlations are computed across pyramid levels for the original and resynthesized images.
  • Training Data: Training examples are created by replacing randomly selected known-object labels with different randomly sampled known classes before resynthesis.The detector is trained to identify pixels inside the altered-object outlines.
  • Adversarial Detection: For adversarial attack detection, the same pipeline computes a semantic map for the attacked image and resynthesizes the scene from that map.The adversarial semantic map is described as completely wrong, producing a strongly mismatched resynthesis.

4. Experiments

The experiments evaluate unexpected-object and adversarial-attack detection against uncertainty, autoencoder, and spatial-consistency baselines. Across datasets and settings, the resynthesis-based approach generally outperforms or matches the baselines, while requiring no unexpected objects during training.

  • Experimental setup: The study evaluates per-pixel anomaly scores using ROC curves and AUROC for unexpected-object detection, followed by adversarial-attack detection.The evaluated segmentation networks are Bayesian SegNet and PSP Net; the segmentation models use BDD100K, while the image synthesizer and discrepancy detector use Cityscapes training data.
  • Baselines and variants: The baselines comprise dropout- and ensemble-based uncertainty methods, an RBM road-texture autoencoder, and variants using only resynthesis or labels.The full discrepancy detector receives the original image, resynthesized image, and predicted semantic labels; the two ablations receive only one information source.
  • Lost and Found: Our method outperforms the baselines on Lost and Found, while its Labels-only and Resynthesis-only variants remain competitive but less accurate.Uncertainty-based methods are reported as ill-suited; some false positives correspond to valid unexpected objects that lack obstacle annotations.
  • Lost and Found: Restricting evaluation to the road raises scores overall, improves RBM substantially, and still leaves our method ahead of RBM.The road region is defined using the union of obstacle and freespace annotations.
  • Our Road Anomaly Dataset: Our approach outperforms the baselines on the Road Anomaly dataset and generalizes to new environments, whereas RBM is strongly affected by differing road textures.The dataset contains 60 images with unexpected objects including animals, rocks, lost tires, trash cans, and construction equipment.
  • Adversarial Attack Detection: For adversarial attacks, our approach achieves higher AUROC than SC on Cityscapes and comparable AUROC on BDD100K, using a single forward pass rather than 50 patch comparisons.The attacks use DAG and Houdini with Shift and Pure target semantic maps; attacked samples are generated for Cityscapes and BDD100K.

5. Conclusion

The paper introduces image resynthesis for detecting unexpected objects and reports greater reliability than uncertainty- and autoencoder-based techniques. It also identifies false positives as an ongoing limitation and future focus.

  • The method detects unexpected objects by identifying meaningful discrepancies between the input image and an image resynthesized from its semantic map.
  • The approach detects unexpected objects more reliably than uncertainty- and autoencoder-based techniques.
  • False positives remain a limitation because they could distract in real autonomous-driving scenarios.
  • The paper demonstrates the same resynthesis-based strategy for visualizing adversarial attacks.

A. Detecting Unexpected Objects

The unexpected-object detector is illustrated through additional examples, synthetic-training validation, unusual known objects, and failure cases. Its discrepancy network is described as a learned component of the system.

  • Additional examples of the anomaly-detection task are presented in Figure 10.
  • Synthetic training alters only foreground objects, but correctly labeled objects are not detected as discrepancies.
  • Known-class objects with appearances unlike training examples can nevertheless be marked as unexpected.
  • Anomalies resembling an existing semantic class can be missed when segmentation assigns them to that similar class.
  • The discrepancy network uses image features and pointwise correlations within an architecture detailed in Figure 14.

B. Detecting Adversarial Samples

The adversarial-sample experiments evaluate attack detection on Cityscapes and BDD using specified attack settings and semantic-map class colors. The section points to additional adversarial-detection results and implementation details.

  • Additional adversarial-example detection results use Houdini and DAG attack schemes on Cityscapes and BDD datasets.
  • The experiments use a maximum of 200 attack iterations and an L∞ perturbation of 0.05 at each iteration.
  • The semantic-map legend defines the colors corresponding to object classes throughout the article.
  • Cross-validation selected a 256 × 256 patch size for 1024 × 512 input images.

C. Image Attribution

The paper includes image-attribution and visualization material spanning anomaly examples, semantic-map interpretation, failure cases, network architecture, and adversarial attack detections.

  • The attribution material credits Wikimedia Commons images provided under Creative Commons Attribution licenses.
  • The figures include examples of anomaly detection, semantic-map colors, and the discrepancy-network architecture.
  • Figure 11 shows that the detector responds to segmentation discrepancies but not to correctly labeled people.
  • Unusual known objects may be marked as anomalies when their appearance differs from training examples.
  • The approach can fail when anomalies resemble existing classes, although the semantic map may still represent the obstacle.
  • Adversarial attacks produce resynthesized images that differ massively from the original input, unlike unattacked inputs.
Loading 1904.07595v2…