Table of Contents
Fetching ...

Industrial and Medical Anomaly Detection Through Cycle-Consistent Adversarial Networks

Arnaud Bougaham, Valentin Delchevalerie, Mohammed El Adoui, Benoît Frénay

TL;DR

The paper tackles anomaly detection in industrial and medical images by introducing a Cycle-GAN–based framework that leverages both normal and abnormal training data to learn abnormal-to-normal translations. By training two generators with cycle-consistency and an identity constraint, the method reconstructs normal-looking images from inputs and flags anomalies via reconstruction differences, aiming for zero false negatives under business thresholds. It provides a thorough empirical study across seven datasets, demonstrating competitive performance and clear advantages in the zero-false-negative setting compared to state-of-the-art baselines, while also analyzing when high-resolution inputs and contrast are most beneficial. The work highlights the practical impact of applying cycle-consistent, abnormal-aware reconstruction for pixel-level anomaly localization in critical industrial and medical contexts, and releases code for reproducibility.

Abstract

In this study, a new Anomaly Detection (AD) approach for industrial and medical images is proposed. This method leverages the theoretical strengths of unsupervised learning and the data availability of both normal and abnormal classes. Indeed, the AD is often formulated as an unsupervised task, implying only normal images during training. These normal images are devoted to be reconstructed, through an autoencoder architecture for instance. However, the information contained in abnormal data, when available, is also valuable for this reconstruction. The model would be able to identify its weaknesses by better learning how to transform an abnormal (respectively normal) image into a normal (respectively abnormal) one, helping the entire model to learn better than a single normal to normal reconstruction. To address this challenge, the proposed method uses Cycle-Generative Adversarial Networks (Cycle-GAN) for (ab)normal-to-normal translation. After an input image has been reconstructed by the normal generator, an anomaly score quantifies the differences between the input and its reconstruction. Based on a threshold set to satisfy a business quality constraint, the input image is then flagged as normal or not. The proposed method is evaluated on industrial and medical datasets. The results demonstrate accurate performance with a zero false negative constraint compared to state-of-the-art methods. The code is available at https://github.com/ValDelch/CycleGANS-AnomalyDetection.

Industrial and Medical Anomaly Detection Through Cycle-Consistent Adversarial Networks

TL;DR

The paper tackles anomaly detection in industrial and medical images by introducing a Cycle-GAN–based framework that leverages both normal and abnormal training data to learn abnormal-to-normal translations. By training two generators with cycle-consistency and an identity constraint, the method reconstructs normal-looking images from inputs and flags anomalies via reconstruction differences, aiming for zero false negatives under business thresholds. It provides a thorough empirical study across seven datasets, demonstrating competitive performance and clear advantages in the zero-false-negative setting compared to state-of-the-art baselines, while also analyzing when high-resolution inputs and contrast are most beneficial. The work highlights the practical impact of applying cycle-consistent, abnormal-aware reconstruction for pixel-level anomaly localization in critical industrial and medical contexts, and releases code for reproducibility.

Abstract

In this study, a new Anomaly Detection (AD) approach for industrial and medical images is proposed. This method leverages the theoretical strengths of unsupervised learning and the data availability of both normal and abnormal classes. Indeed, the AD is often formulated as an unsupervised task, implying only normal images during training. These normal images are devoted to be reconstructed, through an autoencoder architecture for instance. However, the information contained in abnormal data, when available, is also valuable for this reconstruction. The model would be able to identify its weaknesses by better learning how to transform an abnormal (respectively normal) image into a normal (respectively abnormal) one, helping the entire model to learn better than a single normal to normal reconstruction. To address this challenge, the proposed method uses Cycle-Generative Adversarial Networks (Cycle-GAN) for (ab)normal-to-normal translation. After an input image has been reconstructed by the normal generator, an anomaly score quantifies the differences between the input and its reconstruction. Based on a threshold set to satisfy a business quality constraint, the input image is then flagged as normal or not. The proposed method is evaluated on industrial and medical datasets. The results demonstrate accurate performance with a zero false negative constraint compared to state-of-the-art methods. The code is available at https://github.com/ValDelch/CycleGANS-AnomalyDetection.
Paper Structure (16 sections, 7 equations, 5 figures, 1 table)

This paper contains 16 sections, 7 equations, 5 figures, 1 table.

Figures (5)

  • Figure 1: Example generated from a Cycle-GAN (see Section \ref{['sec:experiments']} for training details) that learns mappings between aerial photos $\mathcal{X}$ and Google maps $\mathcal{Y}$ (dataset from tensorflow2015-whitepaper). The initial image $x \in \mathcal{X}$ can be mapped to $\tilde{y} \in \mathcal{Y}$ thanks to a first generator $G$. The second one $F$ can then go back from $\tilde{y} \in \mathcal{Y}$ to $\tilde{x} \in \mathcal{X}$. A cycle-consistent constraint enforces $\tilde{x}$ to be close to $x$.
  • Figure 2: (Color online) Architecture for the training (left side) and the inference (right side) steps (inspired from CycleGAN2017). During the training step, the first generator $G$ tries to map abnormal to normal images by fooling the discriminator $D_Y$ that should not detect fake images. $F$ and $D_X$ follow the same idea but for normal images as input. During the inference step, only $G$ is used even if the input can either be normal or abnormal.
  • Figure 3: (Color online) Industrial and medical image examples. For each dataset, the left green-framed block presents normal images and the right red-framed block shows abnormal images, with the original image (1st column), the normal version generated (2nd column), and their squared pixel-wise difference image (3rd column).
  • Figure 4: Quantitative Performance Metrics for all the different models on all the different industrial (4 first) and medical (3 last) datasets. For each model, the accuracy with the zero false negative constraint (ZFN), the maximum accuracy (ACC) and the AUCROC (AUC) metrics are presented, considering FID (when applicable) and SSE metrics. All the metrics are the mean ± the standard deviation (both in percent) over 5 runs for which random train and test splits were generated. The mean performance is computed for each model in the last line w.r.t. their most profitable setting (SSE or FID) when available, and bold values are the best of each metric.
  • Figure 5: (Color online) Anomaly score distributions of normal (solid-green line and bars) and abnormal (dashed-red line and bars) images for the test datasets, with the threshold value in the ZFN setting (vertical dashed line in grey) or in the ACC setting (vertical dashed line in black).