AnomalyFactory: Regard Anomaly Generation as Unsupervised Anomaly Localization

Ying Zhao
2024-08-19
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.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the challenges faced by anomaly localization techniques in industrial manufacturing, especially the high training cost and heavy storage burden of generation and localization models due to insufficient data. Specifically, although progress has been made in anomaly generation methods in recent years, alleviating the impact of insufficient data on anomaly localization tasks, most methods need to learn multiple large - scale generation models on different datasets and construct complex anomaly prediction models for different categories. This not only increases the training cost but also limits the scalability and generalization ability of the model. To this end, the paper proposes a novel and scalable framework named AnomalyFactory, which unifies unsupervised anomaly generation and localization tasks. AnomalyFactory can handle M - class tasks from N datasets by using only two generators (BootGenerator and FlareGenerator) and one predictor (BlazeDetector), and these components have the same network architecture. This framework not only reduces the training cost and storage requirements but also improves the generation ability of the model and its cross - domain adaptability. ### Main Contributions 1. **Proposing a new scalable framework**: AnomalyFactory unifies unsupervised anomaly generation and localization tasks. By using only two generators and one predictor, and these components have the same network architecture, it can handle multi - class tasks on multiple datasets. 2. **Designing a GAN - based network architecture**: This architecture can combine the structure of the target edge map and the appearance of the reference color image. While generating various types of samples, it can also generate samples with anomaly heat maps for training a unified anomaly predictor. 3. **Extensive experimental verification**: A large number of experiments were carried out on five datasets of 82 object categories, which proved the superiority of AnomalyFactory in anomaly localization tasks. In particular, on the MVTecAD dataset, this framework has the highest IS score, with an IS/LPIPS score 2.37/0.11 higher than that of existing methods. ### Method Overview The core of AnomalyFactory lies in its network architecture and training process: - **BootGenerator**: It combines the structure of the target edge map and the appearance of the reference color image to generate preliminary anomaly images. - **FlareGenerator**: It receives the supervision signal from BootGenerator, improves the generated anomaly heat map, and generates higher - quality anomaly images. - **BlazeDetector**: It uses the anomaly images and heat maps generated by FlareGenerator to directly output anomaly heat maps and realize the localization of anomaly pixels. ### Experimental Results The paper carried out extensive experiments on five datasets, namely MVTecLOCO, MVTecAD, VisA, MADSim and RealIAD, to verify the advantages of AnomalyFactory in terms of generation quality and scalability. In particular, compared with existing methods, the anomaly images generated by AnomalyFactory are more realistic and diverse, and perform consistently on multiple datasets. In conclusion, by proposing the AnomalyFactory framework, this paper effectively solves the problems of insufficient data and model complexity in anomaly localization techniques in industrial manufacturing, and provides a more efficient and scalable solution for practical applications.