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 position in industrial manufacture. Present anomaly inspection strategies are restricted of their efficiency as a result of inadequate anomaly information. Though anomaly technology strategies have been proposed to enhance the anomaly information, 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 robust prior info of latent diffusion mannequin discovered from large-scale dataset to reinforce the technology authenticity beneath few-shot coaching information. 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 info into anomaly look and placement info. Furthermore, to enhance the alignment between the generated anomalies and the anomaly masks, we introduce a novel Adaptive Consideration Re-weighting Mechanism. Primarily based 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. In depth 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 information can be found in https://github.com/sjtuplayer/anomalydiffusion.