Table of Contents
Fetching ...

AnomalyFactory: Regard Anomaly Generation as Unsupervised Anomaly Localization

Ying Zhao

TL;DR

This work tackles the lack of diverse anomalous data for anomaly localization by introducing AnomalyFactory, a unified, cross-domain framework that learns two generators (BootGenerator and FlareGenerator) and one predictor (BlazeDetector) within a shared architecture to handle 82 categories across 5 industrial datasets. It expresses the generation/localization process as $I_{out} = I_{in}\cdot(1-H) + T\cdot H$, enabling concurrent anomaly generation and pixel-level localization; BootGenerator creates baseline anomaly images, FlareGenerator refines both anomaly images and heatmaps, and BlazeDetector performs heatmap-based localization. Across MVTecAD, VisA, MVTecLOCO, MADSim, and RealIAD, the method demonstrates superior generation diversity (higher IS/LPIPS) and accurate heatmaps while remaining scalable with a single model across domains. This approach reduces the need for multiple dataset-specific models and offers a practical path toward unified anomaly synthesis and localization in industrial settings.

Abstract

Recent advances in anomaly generation approaches alleviate the effect of data insufficiency on task of anomaly localization. While effective, most of them learn multiple large generative models on different datasets and cumbersome anomaly prediction models for different classes. To address the limitations, we propose a novel scalable framework, named AnomalyFactory, that unifies unsupervised anomaly generation and localization with same network architecture. It starts with a BootGenerator that combines structure of a target edge map and appearance of a reference color image with the guidance of a learned heatmap. Then, it proceeds with a FlareGenerator that receives supervision signals from the BootGenerator and reforms the heatmap to indicate anomaly locations in the generated image. Finally, it easily transforms the same network architecture to a BlazeDetector that localizes anomaly pixels with the learned heatmap by converting the anomaly images generated by the FlareGenerator to normal images. By manipulating the target edge maps and combining them with various reference images, AnomalyFactory generates authentic and diversity samples cross domains. Comprehensive experiments carried on 5 datasets, including MVTecAD, VisA, MVTecLOCO, MADSim and RealIAD, demonstrate that our approach is superior to competitors in generation capability and scalability.

AnomalyFactory: Regard Anomaly Generation as Unsupervised Anomaly Localization

TL;DR

This work tackles the lack of diverse anomalous data for anomaly localization by introducing AnomalyFactory, a unified, cross-domain framework that learns two generators (BootGenerator and FlareGenerator) and one predictor (BlazeDetector) within a shared architecture to handle 82 categories across 5 industrial datasets. It expresses the generation/localization process as , enabling concurrent anomaly generation and pixel-level localization; BootGenerator creates baseline anomaly images, FlareGenerator refines both anomaly images and heatmaps, and BlazeDetector performs heatmap-based localization. Across MVTecAD, VisA, MVTecLOCO, MADSim, and RealIAD, the method demonstrates superior generation diversity (higher IS/LPIPS) and accurate heatmaps while remaining scalable with a single model across domains. This approach reduces the need for multiple dataset-specific models and offers a practical path toward unified anomaly synthesis and localization in industrial settings.

Abstract

Recent advances in anomaly generation approaches alleviate the effect of data insufficiency on task of anomaly localization. While effective, most of them learn multiple large generative models on different datasets and cumbersome anomaly prediction models for different classes. To address the limitations, we propose a novel scalable framework, named AnomalyFactory, that unifies unsupervised anomaly generation and localization with same network architecture. It starts with a BootGenerator that combines structure of a target edge map and appearance of a reference color image with the guidance of a learned heatmap. Then, it proceeds with a FlareGenerator that receives supervision signals from the BootGenerator and reforms the heatmap to indicate anomaly locations in the generated image. Finally, it easily transforms the same network architecture to a BlazeDetector that localizes anomaly pixels with the learned heatmap by converting the anomaly images generated by the FlareGenerator to normal images. By manipulating the target edge maps and combining them with various reference images, AnomalyFactory generates authentic and diversity samples cross domains. Comprehensive experiments carried on 5 datasets, including MVTecAD, VisA, MVTecLOCO, MADSim and RealIAD, demonstrate that our approach is superior to competitors in generation capability and scalability.
Paper Structure (14 sections, 7 equations, 26 figures, 3 tables)

This paper contains 14 sections, 7 equations, 26 figures, 3 tables.

Figures (26)

  • Figure 1: AnomalyFactory is a novel scalable framework that unifies unsupervised anomaly generation and localization. Unlike prior art, it learns only 2 generators and 1 predictor with same network architecture to solve tasks on M classes of N datasets.
  • Figure 2: Illustrations of scalable anomaly generation of proposed FlareGenerator. The reference color image(I) provides texture content for the generation while the target edge map(E) controls the skeleton of generated object. By manipulating the target edge maps, our FlareGenerator generates normal(E1) samples and structural(E2) and logical(E3) anomalies. We further demonstrate its scalable ability by using reference color images from 5 different datasets, including MVTecADmvtec(I1-I3), VisAvisa(I4), MVTecLOCOmvtecloco(I5), MADSimpad(I6) and RealIADrealiad(I7).
  • Figure 3: Comparison with unsupervised anomaly generation. We compare AnomalyFactory with prior arts realnet2024grad2024textguided2024logical from aspects of architecture and generation ability.
  • Figure 4: Framework of AnomalyFactory. It learns a unified generator that works for 5 datasets(a). The BootGenerator(b) triggers the generation ability of absorbing structure of a target edge map and appearance of a reference color image. The FlareGenerator(c) generates diversity anomaly images(e) accompany with more accurate anomaly heatmaps. By simply swapping normal images with the generated anomaly images for training, we learn the BlazeDetector(d) that directly outputs anomaly heatmaps.
  • Figure 5: Compare BootGenerator with FlareGenerator.
  • ...and 21 more figures