AnomalyDiffusion: Few-Shot Anomaly Picture Era with Diffusion Mannequin
Authors: Teng Hu, Jiangning Zhang, Ran Yi, Yuzhen Du, Xu Chen, Liang Liu, Yabiao Wang, Chengjie Wang
Summary: Anomaly inspection performs an essential function in industrial manufacture. Present anomaly inspection strategies are restricted of their efficiency as a result of inadequate anomaly knowledge. Though anomaly technology strategies have been proposed to enhance the anomaly knowledge, they both endure from poor technology authenticity or inaccurate alignment between the generated anomalies and masks. To deal with the above issues, we suggest AnomalyDiffusion, a novel diffusion-based few-shot anomaly technology mannequin, which makes use of the sturdy prior data of latent diffusion mannequin realized from large-scale dataset to boost the technology authenticity below few-shot coaching knowledge. Firstly, we suggest Spatial Anomaly Embedding, which consists of a learnable anomaly embedding and a spatial embedding encoded from an anomaly masks, disentangling the anomaly data into anomaly look and placement data. Furthermore, to enhance the alignment between the generated anomalies and the anomaly masks, we introduce a novel Adaptive Consideration Re-weighting Mechanism. Based mostly on the disparities between the generated anomaly picture and regular pattern, it dynamically guides the mannequin to focus extra on the areas with much less noticeable generated anomalies, enabling technology of accurately-matched anomalous image-mask pairs. Intensive experiments exhibit that our mannequin considerably outperforms the state-of-the-art strategies in technology authenticity and variety, and successfully improves the efficiency of downstream anomaly inspection duties. The code and knowledge can be found in https://github.com/sjtuplayer/anomalydiffusion.