Proceedings

CLIP-FSAC: Boosting CLIP for Few-Shot Anomaly Classification with Synthetic Anomalies

Download BibTeX Cite

Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence. Main Track. Pages 1834-1842.

https://doi.org/10.24963/ijcai.2024/203

Abstract

Few-shot anomaly classification (FSAC) is a vital task in manufacturing industry. Recent methods focus on utilizing CLIP in zero/few normal shot anomaly detection instead of custom models. However, there is a lack of specific text prompts in anomaly classification and most of them ignore the modality gap between image and text. Meanwhile, there is distribution discrepancy between the pre-trained and the target data. To provide a remedy, in this paper, we propose a method to boost CLIP for few-normal-shot anomaly classification, dubbed CLIP-FSAC, which contains two-stage of training and alternating fine-tuning with two modality-specific adapters. Specifically, in the first stage, we train image adapter with text representation output from text encoder and introduce an image-to-text tuning to enhance multi-modal interaction and facilitate a better language-compatible visual representation. In the second stage, we freeze the image adapter to train the text adapter. Both of them are constrained by fusion-text contrastive loss. Comprehensive experiment results are provided for evaluating our method in few-normal-shot anomaly classification, which outperforms the state-of-the-art method by 12.2%, 10.9%, 10.4% AUROC on VisA for 1, 2, and 4-shot settings.

  1. [Akcay et al., 2018] Samet Akcay, Amir Atapour- Abarghouei, and Toby P. Breckon. Ganomaly: Semi- supervised anomaly detection via adversarial training. In ACCV, pages 622-637, 2018.
  2. [Alayrac et al., 2022] Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob L Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikoł aj Bińkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zis- serman, and Karén Simonyan. Flamingo: a visual lan- guage model for few-shot learning. In NIPS, pages 23716- 23736, 2022.
  3. [Bae et al., 2023] Jaehyeok Bae, Jae-Han Lee, and Seyun Kim. Pni : Industrial anomaly detection using position and neighborhood information. In ICCV, pages 6373-6383, 2023.
  4. [Batzner et al., 2024] Kilian Batzner, Lars Heckler, and Re- becca König. Efficientad: Accurate visual anomaly detec- tion at millisecond-level latencies. In WACV, pages 128- 138, 2024.
  5. [Bergmann et al., 2019] Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Mvtec ad -a com- prehensive real-world dataset for unsupervised anomaly detection. In CVPR, pages 9584-9592, 2019.
  6. [Cao et al., 2023] Yunkang Cao, Xiaohao Xu, Zhaoge Liu, and Weiming Shen. Collaborative discrepancy opti- mization for reliable image anomaly localization. TII, 19(11):10674-10683, 2023.
  7. [Chen et al., 2020] Ting Chen, Simon Kornblith, Moham- mad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, ICML'20, 2020.
  8. [Defard et al., 2021] Thomas Defard, Aleksandr Setkov, An- gelique Loesch, and Romaric Audigier. Padim: A patch distribution modeling framework for anomaly detection and localization. In ICPRW, page 475-489, 2021.
  9. [Fang et al., 2023] Zheng Fang, Xiaoyang Wang, Haocheng Li, Jiejie Liu, Qiugui Hu, and Jimin Xiao. Fastrecon: Few- shot industrial anomaly detection via fast feature recon- struction. In ICCV, pages 17481-17490, 2023.
  10. [Gao et al., 2021] Peng Gao, Shijie Geng, Renrui Zhang, Teli Ma, Rongyao Fang, Yongfeng Zhang, Hongsheng Li, and Yu Qiao. Clip-adapter: Better vision-language models with feature adapters. arXiv, 2021.
  11. [Guo et al., 2023] Hewei Guo, Liping Ren, Jingjing Fu, Yuwang Wang, Zhizheng Zhang, Cuiling Lan, Haoqian Wang, and Xinwen Hou. Template-guided hierarchical feature restoration for anomaly detection. In ICCV, pages 6447-6458, 2023.
  12. [He et al., 2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In CVPR, pages 770-778, 2016.
  13. [He et al., 2023] Haoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen, Zhishan Li, Xu Chen, Yabiao Wang, Chengjie Wang, and Lei Xie. Diad: A diffusion-based framework for multi-class anomaly detection. arXiv, 2023.
  14. [Huang et al., 2022] Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang, Michael Spratling, and Yan-Feng Wang. Registration based few-shot anomaly detection. In ECCV, page 303-319, 2022.
  15. [Jeong et al., 2023] Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran, and Onkar Dabeer. Winclip: Zero-/few-shot anomaly classification and segmentation. In CVPR, pages 19606-19616, 2023.
  16. [Jia et al., 2021] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text su- pervision. In ICML, pages 4904-4916, 2021.
  17. [Li et al., 2021] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas Pfister. Cutpaste: Self-supervised learn- ing for anomaly detection and localization. In CVPR, pages 9659-9669, 2021.
  18. [Li et al., 2023] Siyuan Li, Li Sun, and Qingli Li. Clip- reid: Exploiting vision-language model for image re- identification without concrete text labels. In AAAI, pages 1405-1413, 2023.
  19. [Liang et al., 2023] Zhexin Liang, Chongyi Li, Shangchen Zhou, Ruicheng Feng, and Chen Change Loy. Iterative prompt learning for unsupervised backlit image enhance- ment. In ICCV, pages 8094-8103, 2023.
  20. [Liu et al., 2022] Tongkun Liu, Bing Li, Zhuo Zhao, Xiao Du, Bingke Jiang, and Leqi Geng. Reconstruction from edge image combined with color and gradient difference for industrial surface anomaly detection. arXiv, 2022.
  21. [Liu et al., 2023a] Tongkun Liu, Bing Li, Xiao Du, Bingke Jiang, Leqi Geng, Feiyang Wang, and Zhuo Zhao. Fair: Frequency-aware image restoration for industrial visual anomaly detection. arXiv, 2023.
  22. [Liu et al., 2023b] Zhikang Liu, Yiming Zhou, Yuansheng Xu, and Zilei Wang. Simplenet: A simple network for im- age anomaly detection and localization. In CVPR, pages 20402-20411, 2023.
  23. [Radford et al., 2021] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agar- wal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervi- sion. In ICML, pages 8748-8763, 2021.
  24. [Rao et al., 2022] Yongming Rao, Wenliang Zhao, Guangyi Chen, Yansong Tang, Zheng Zhu, Guan Huang, Jie Zhou, and Jiwen Lu. Denseclip: Language-guided dense pre- diction with context-aware prompting. In CVPR, pages 18061-18070, 2022.
  25. [Ristea et al., 2022] Nicolae-Cȃtȃlin Ristea, Neelu Madan, Radu Tudor Ionescu, Kamal Nasrollahi, Fahad Shahbaz Khan, Thomas B. Moeslund, and Mubarak Shah. Self- supervised predictive convolutional attentive block for anomaly detection. In CVPR, pages 13566-13576, 2022.
  26. [Roth et al., 2022] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, and Peter Gehler. Towards total recall in industrial anomaly detec- tion. In CVPR, pages 14298-14308, 2022.
  27. [Salehi et al., 2021] Mohammadreza Salehi, Niousha Sad- jadi, Soroosh Baselizadeh, Mohammad H. Rohban, and Hamid R. Rabiee. Multiresolution knowledge distillation for anomaly detection. In CVPR, pages 14897-14907, 2021.
  28. [Schlüter et al., 2022] Hannah M. Schlüter, Jeremy Tan, Benjamin Hou, and Bernhard Kainz. Natural synthetic anomalies for self-supervised anomaly detection and lo- calization. In ECCV, page 474-489, 2022.
  29. [Schuhmann et al., 2021] Christoph Schuhmann, Richard Vencu, Romain Beaumont, Robert Kaczmarczyk, Clayton Mullis, Aarush Katta, Theo Coombes, Jenia Jitsev, and Aran Komatsuzaki. LAION-400M: open dataset of clip- filtered 400 million image-text pairs. CoRR, 2021.
  30. [Tien et al., 2023] Tran Dinh Tien, Anh Tuan Nguyen, Nguyen Hoang Tran, Ta Duc Huy, Soan T.M. Duong, Chanh D. Tr. Nguyen, and Steven Q. H. Truong. Revis- iting reverse distillation for anomaly detection. In CVPR, pages 24511-24520, 2023.
  31. [Wang et al., 2023] Henan
  32. Wang, Muli Yang, Kun Wei, and Cheng Deng. Hierarchical prompt learning for composi- tional zero-shot recognition. In IJCAI, pages 1470-1478, 2023. IJCAI
  33. [Wu et al., 2023] Yao Wu, Mingwei Xing, Yachao Zhang, Yuan Xie, Zongze Wu, and Yanyun Qu. Perturbed pro- gressive learning for semisupervised defect segmentation. TNNLS, 2023.
  34. [Xie et al., 2023] Guoyang Xie, Jinbao Wang, Jiaqi Liu, Yaochu Jin, and Feng Zheng. Pushing the limits of few- shot anomaly detection in industry vision: Graphcore. In ICLR, 2023.
  35. [Yao et al., 2022] Yuan Yao, Ao Zhang, Zhengyan Zhang, Zhiyuan Liu, Tat-Seng Chua, and Maosong Sun. Cpt: Col- orful prompt tuning for pre-trained vision-language mod- els. arXiv, 2022.
  36. [Yao et al., 2023] Xincheng Yao, Ruoqi Li, Zefeng Qian, Yan Luo, and Chongyang Zhang. Focus the discrepancy: Intra-and inter-correlation learning for image anomaly de- tection. In ICCV, pages 6803-6813, 2023.
  37. [Yu et al., 2023] Wenwen Yu, Yuliang Liu, Wei Hua, De- qiang Jiang, Bo Ren, and Xiang Bai. Turning a clip model into a scene text detector. In CVPR, pages 6978-6988, 2023.
  38. [Zavrtanik et al., 2021] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. DrÆm -a discriminatively trained re- construction embedding for surface anomaly detection. In ICCV, pages 8310-8319, 2021.
  39. [Zhang et al., 2023a] Hui Zhang, Zheng Wang, Zuxuan Wu, and Yu-Gang Jiang. Diffusionad: Norm-guided one-step denoising diffusion for anomaly detection. arXiv, 2023.
  40. [Zhang et al., 2023b] Xuan Zhang, Shiyu Li, Xi Li, Ping Huang, Jiulong Shan, and Ting Chen. Destseg: Segmenta- tion guided denoising student-teacher for anomaly detec- tion. In CVPR, pages 3914-3923, 2023.
  41. [Zhou et al., 2022] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. IJCV, page 2337-2348, sep 2022.
  42. [Zhu et al., 2023] Deyao Zhu, Jun Chen, Xiaoqian Shen, Xi- ang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large lan- guage models. arXiv, 2023.
  43. [Zou et al., 2022] Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. Spot-the-difference self-supervised pre-training for anomaly detection and segmentation. page 392-408. Springer-Verlag, 2022.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards