簡易檢索 / 詳目顯示

研究生: 林佳縈
Lin, Chia-Ying
論文名稱: 基於對比學習進行孿生 U-Net 影像異常偵測與分割
Contrastive Learning Based Siamese U-Net for Image Anomaly Detection and Segmentation
指導教授: 賴尚宏
Lai, Shang-Hong
口試委員: 陳祝嵩
Chen, Chu-Song
陳煥宗
Chen, Hwann-Tzong
劉庭祿
Liu, Tyng-Luh
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊系統與應用研究所
Institute of Information Systems and Applications
論文出版年: 2022
畢業學年度: 111
語文別: 英文
論文頁數: 43
中文關鍵詞: 異常檢測與分割對比學習
外文關鍵詞: anomaly detection and segmentation, contrastive learning
相關次數: 點閱:1下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 近年來根據異常分割結果的最大值進行圖像級別異常分數計算之技術已被廣泛運用至端對端異常檢測和分割方法中。然而,針對含有微小或因為角度遮擋而不易被辨識的異常區塊等更具挑戰性之輸入圖像,模型對於正常和異常特徵時常無法有效提供足夠具有鑑別度的異常分數,因而使得該模型雖然在異常分割任務上能夠達到高精準度,但卻容易在對應的圖像尺度異常分類上發生表現大幅度下降的問題。為了解決此類問題,我們提出了一種新型的孿生U-Net模型,並以兩階段的訓練模式,分別使用對比學習與基於偏差的微調策略進行模型的訓練及優化。模型訓練的首要目標為聚合正常特徵,同時疏遠異常樣本,藉此對正常和異常樣本輸出更具代表性的特徵。此外,為了確保U-Net解碼器能夠有更高的特徵學習及重建能力,我們在U-Net每層解碼器進行上採樣前,引入了一個新穎的通道位置注意力模塊(CPAM)。我們的模型透過大量的實驗結果證明了其穩定性及高度泛化能力。我們的模型在公開資料集MVTecAD達到了優異的結果,並於更具有挑戰性的MVTec3D-AD資料集上,大幅度的超越現有所有方法的精準度,並實踐了最先進的泛化精準度。


    Computing image-level anomaly scores according to the maximum value of the anomaly segmentation prediction result has been a widely adopted technique for current end-to-end anomaly detection and segmentation approaches. However, for input samples with tiny or occluded defects, these segmentation-dominated models tend to provide less discriminative anomaly scores regarding normal and anomalous features, resulting in high segmentation accuracy but unmatched poor detection performance. To address this problem, we propose a novel two-stage Siamese U-Net model with contrastive learning and deviation-based detection fine-tuning strategy. The primary target is to provide more representative features to normal and anomalous samples by dragging normal features together while alienating the anomaly samples. Moreover, to ensure the U-Net decoder restores from features that contain vital information, we introduce a novel channel-positional attention module (CPAM) within each layer in our U-Net decoder for feature refinement before upsampling. Extensive experiments demonstrate our model's robustness and high generalizability for unseen cases. Our model reaches state-of-the-art performance on the well-known 2-D MVTecAD dataset and significantly surpasses all existing methods on the challenging MVTec3D-AD dataset by a large margin.

    1 Introduction 1 1.1 ProblemStatement .......................... 1 1.2 Motivation............................... 2 1.3 Contributions ............................. 4 1.4 ThesisOrganization.......................... 5 2 Related Work 6 2.1 AnomalyDetectionandSegmentation ................ 6 2.1.1 NormalizingFlow ...................... 6 2.1.2 Embedding-basedApproach................. 7 2.1.3 Reconstruction-basedApproach ............... 7 2.2 Self-Supervised Representation Learning . . . . . . . . . . . . . . 8 3 Proposed Method 10 3.1 ModelArchitecture.......................... 10 3.1.1 BasicBlock:Teacher-StudentU-Net. . . . . . . . . . . . . 10 3.1.2 Channel-Positional Attention Module (CPAM) . . . . . . . 11 3.2 ModelFlow:Two-StageTraining .................. 13 3.2.1 Stage 1: Contrastive Learning for Siamese U-Net . . . . . . 13 3.2.2 Stage 2: Deviation-based Detection Finetuning . . . . . . . 15 3.3 AnomalySynthesis .......................... 16 3.4 InferenceandAnomalyScoring ................... 18 3.4.1 Inference ........................... 18 3.4.2 AnomalyScoring....................... 19 4 Experiments 20 4.1 ExperimentalSetting ......................... 21 4.1.1 Datasets............................ 21 4.1.2 EvaluationMetrics ...................... 22 4.1.3 ImplementationDetails.................... 22 4.2 ExperimentalComparison ...................... 23 4.2.1 MVTecAD .......................... 24 4.2.2 MVTec3D-AD ........................ 30 4.3 QualitativeResults .......................... 33 5 Ablation study 38 5.1 AblationStudy ............................ 38 5.1.1 ImpactofAttentionFusionModule . . . . . . . . . . . . . 38 5.1.2 ImpactofContrastiveLearning ............... 39 5.1.3 ImpactofDeviationFinetuning ............... 39 5.1.4 Impactofsyntheticanomalies ................ 39 6 Conclusions 41 References 42

    [1] Bergmann, P., Jin, X., Sattlegger, D., and Steger, C. SCITEPRESS - Science and Technology Publications.
    [2] Bradley, A. P. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern Recognition 30, 7 (1997), 1145–1159.
    [3] de Haan, P., and Löwe, S. Contrastive predictive coding for anomaly detection, 2021.
    [4] Deng, H., and Li, X. Anomaly detection via reverse distillation from one-class embedding.
    [5] Gudovskiy, D., Ishizaka, S., and Kozuka, K. Cflow-ad: Real-time unsupervised anomaly detection with localization via conditional normalizing flows, 2021.
    [6] Horwitz, E., and Hoshen, Y. An empirical investigation of 3d anomaly detection and segmentation, 2022.
    [7] Lee, S., Lee, S., and Song, B. C. Cfa: Coupled-hypersphere-based feature adaptation for target-oriented anomaly localization, 2022.
    [8] Li, C.-L., Sohn, K., Yoon, J., and Pfister, T. Cutpaste: Self-supervised learning for anomaly detection and localization, 2021.
    [9] Liang, Y., Zhang, J., Zhao, S., Wu, R., Liu, Y., and Pan, S. Omni-frequency channel-selection representations for unsupervised anomaly detection, 2022.
    [10] Mishra, P., Verk, R., Fornasier, D., Piciarelli, C., and Foresti, G. L. VT-ADL: A vision transformer network for image anomaly detection and localization. CoRR abs/2104.10036 (2021).
    [11] P, B., K, B., M, F., D, S., and C, S. The mvtec anomaly detection dataset: A comprehensive real-world dataset for unsupervised anomaly detection. International journal of computer vision abs/1904.02639 (2021).
    [12] Pirnay, J., and Chai, K. Inpainting transformer for anomaly detection. CoRR abs/2104.13897 (2021).
    [13] Roth, K., Pemula, L., Zepeda, J., Schölkopf, B., Brox, T., and Gehler, P. Towards total recall in industrial anomaly detection, 2021.
    [14] Rudolph, M., Wandt, B., and Rosenhahn, B. Same same but differnet: Semisupervised defect detection with normalizing flows, 2020.
    [15] Rudolph, M., Wehrbein, T., Rosenhahn, B., and Wandt, B. Fully convolutional cross-scale-flows for image-based defect detection. CoRR abs/2110.02855 (2021). 42
    [16] Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S. A., Binder, A., Müller, E., and Kloft, M. Deep one-class classification. In Proceedings of the 35th International Conference on Machine Learning (10–15 Jul 2018), J. Dy and A. Krause, Eds., vol. 80 of Proceedings of Machine Learning Research, PMLR, pp. 4393–4402. [17] Schlegl, T., Seeböck, P., Waldstein, S. M., Langs, G., and Schmidt-Erfurth, U. f-anogan: Fast unsupervised anomaly detection with generative adversarial networks. Medical Image Analysis 54 (2019), 30–44.
    [18] Schlüter, H. M., Tan, J., Hou, B., and Kainz, B. Natural synthetic anomalies for self-supervised anomaly detection and localization, 2021.
    [19] Tack, J., Mo, S., Jeong, J., and Shin, J. Csi: Novelty detection via contrastive learning on distributionally shifted instances, 2020.
    [20] Tan, J., Hou, B., Batten, J., Qiu, H., and Kainz, B. Detecting outliers with foreign patch interpolation. CoRR abs/2011.04197 (2020).
    [21] Tsai, C.-C., Wu, T.-H., and Lai, S.-H. Multi-scale patch-based represen tation learning for image anomaly detection and segmentation. In 2022 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) (2022), pp. 3065–3073.
    [22] Wang, X., Peng, Y., Lu, L., Lu, Z., Bagheri, M., and Summers, R. M. Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly supervised classification and localization of common thorax diseases. CoRR abs/1705.02315 (2017).
    [23] Woo, S., Park, J., Lee, J.-Y., and Kweon, I. S. Cbam: Convolutional block attention module, 2018.
    [24] Yamada, S., and Hotta, K. Reconstruction student with attention for student-teacher pyramid matching, 2022.
    [25] Yi, J., and Yoon, S. Patch svdd: Patch-level svdd for anomaly detection and segmentation, 2020.
    [26] Yu, J., Zheng, Y., Wang, X., Li, W., Wu, Y., Zhao, R., and Wu, L. Fastflow: Unsupervised anomaly detection and localization via 2d normalizing flows. CoRR abs/2111.07677 (2021).
    [27] Zavrtanik, V., Kristan, M., and Skočaj, D. Draem – a discriminatively trained reconstruction embedding for surface anomaly detection, 2021.
    [28] Zhang, H., Goodfellow, I., Metaxas, D., and Odena, A. Self-attention generative adversarial networks, 2018.
    [29] Zimmerer, D., Isensee, F., Petersen, J., Kohl, S., and Maier-Hein, K. H. Unsupervised anomaly localization using variational auto-encoders. CoRR abs/1907.02796 (2019).

    QR CODE