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.
