隨著人工智慧近年來的發展,許多行業如金融業、製造業及醫療業也已開始導入人 工智慧於日常工作流程中,其中以製造業為例,將人工智慧應用最廣泛的層面為瑕疵檢 測,這樣的應用已十分成熟。然而,我們發現現今存在的許多檢測模型,往往依賴大量 瑕疵資料進行模型訓練至具備一定檢測能力才能上線,同時伴隨著少量多樣的瑕疵場景, 檢測模型往往必須被重新訓練用以學習多樣化瑕疵資料,這在製造業上有著良率及頻繁 訓練檢測模型兩大成本問題。因此,我們提出使用異常偵測 (Anomaly Detection) 建構 異常偵測模型,該模型側重於使用Unsupervised Learning建構異常偵測模型,並辨識出 瑕疵資料,用以解決現今瑕疵檢測模型衍生之良率及頻繁訓練兩大成本問題。在異常偵 測方面,我們使用擴散模型 (Diffusion Model) 作為我們的主骨幹,同時整合注意力機制 (Vision-Mamba)、影像上採樣 (Pixel-Shufflee)及自定義 Loss Function 提出 VPLR4 DDAD-S 與 VPLRS-DDAD-S兩大異常偵測模型。經一系列的實驗結果表示,我們所提 出的VPLR4-DDAD-S與 VPLRS-DDAD-S異常偵測模型,相比以往異常偵測模型,F1 Score 與 Accuracy 皆高出11%與14%的效果,證明我們所提出的異常偵測模型,可實際 應用於現場產線。;With the rapid advancement of Artificial Intelligence (AI) in recent years, industries such as finance, manufacturing, and healthcare have integrated AI into their daily workflows. In manufacturing, defect detection has become one of the most widely adopted and mature applications of AI. However, many existing detection models rely on massive amounts of defect data for training before they can be deployed. Furthermore, in "high-mix, low-volume" production scenarios, these models often require frequent retraining to adapt to diverse defect types, leading to significant costs related to yield loss and continuous model maintenance. To address these challenges, this study proposes an Anomaly Detection framework based on Unsupervised Learning. By focusing on identifying anomalies without the need for extensive labeled defect data, this approach mitigates the dual costs of yield instability and frequent retraining. Specifically, we utilize a Diffusion Model as the primary backbone, integrating a Vision-Mamba attention mechanism, Pixel-Shuffle for image upsampling, and a customized loss function to develop two novel models: VPLR4-DDAD-S and VPLRS-DDAD-S. Experimental results demonstrate that our proposed models significantly outperform previous state-of-the-art methods, achieving a 11% increase in F1-Score and an 14% improvement in Accuracy. These findings confirm that the proposed anomaly detection models are highly effective and suitable for practical application on industrial production lines. Keywords: Anomaly Detection, Diffusion Model, Vision-Mamba, Pixel-Shuffle, Unsupervised Learning