# Industrial Image Anomaly Detection via Self-Supervised Learning with Feature Enhancement Assistance
## 5 Conclusions  
This paper proposes an anomaly detection framework, Feature Enhancement Patch Distribution Modeling (FEPDM), based on anomaly generation and feature enhancement. Perlin noise and anomaly source images are utilized to generate simulated anomalies closely resembling real-world scenarios, solving the problem of scarce anomaly samples and allowing the model to be trained using a self-supervised approach. The introduction of a Multi-Scale Feature Aggregation module (MSFA) allows the model to train directly at the feature level rather than the entire feature extraction network, which significantly reduces the hardware dependency and makes it lightweight. Furthermore, extensive experiments conducted on real-world industrial datasets, MVTCAD and BTAD, demonstrate that our method exhibits outstanding performance, achieving impressive AUC scores for both image-level anomaly detection and pixel-level anomaly localization as follows: (95.7%, 96.2%) on MVtec AD and (93.4%, 97.6%) on BTAD. In summary, by simulating anomalies, we overcome the scarcity of anomaly samples, providing a novel and effective solution for industrial anomaly detection. By training at the feature level and leveraging multi-scale features, FEPDM significantly enhances the model's generalization ability while effectively reducing computational costs, making anomaly detection more efficient.  
However, there are some limitations in modeling with multivariate Gaussian distributions, as discussed in Section 4.4.2. The sizes of the mean and covariance matrices for the normal samples stored in memory banks, although independent of the number of samples, are positively correlated with the feature size. As the feature size increases, the size of the memory bank also grows substantially. Future work will be devoted to identifying more suitable sample distributions for modeling, as well as optimizing the memory bank to minimize the increase in the memory bank due to the increase in feature dimensions. Moreover, with the widespread development and application of generative models, such as diffusion models, we will endeavor to explore novel anomaly simulation approaches that can generate anomalies even closer to real-world industrial scenarios in future work.  
Figure 8: Diversity of normal samples. From top to bottom, they are (**a**) Pill, (**b**) Capsule, and (**c**) Screw.  
**Author Contributions:** Conceptualization, B.W. and X.W.; methodology, B.W.; software, X.W.; validation, B.W. and X.W.; formal analysis, B.W. and X.W.; investigation, B.W. and X.W.; resources, B.W.; data curation, X.W.; writing--original draft preparation, X.W.; writing--review and editing, B.W. and X.W.; supervision, B.W.; project administration, B.W.; funding acquisition, B.W. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research was funded by the National Science Foundation of China (NSFC) under Grant 62101113, China; the Natural Science Foundation of Hebei Province under Grant F2020501035; and the Fundamental Research Funds for the Central Universities under Grants N2123024 and N2023008.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The original contributions presented in this study are included in the article; further inquiries can be directed to the corresponding author.  
**Conflicts of Interest:** The authors declare no conflicts of interest.