面向领域偏移工业异常检测的分布对齐分数融合与最大池化
Distribution-Aligned Score Fusion and Max Pooling for Industrial Anomaly Detection under Domain Shift
摘要: 领域偏移会改变工业检测系统的正常特征分布及异常分数尺度,使实验室条件下有效的检测器在部署后产生不稳定判定。针对教师–学生蒸馏分数与原型匹配分数难以直接比较、稀疏缺陷易被全局聚合稀释以及后处理参数耦合等问题,文章提出一种无需重新训练骨干网络的推理时决策层。该方法基于正常训练集统计量对异构分数进行位置–尺度标准化与加权融合,采用最大池化保留局部高响应,并以单一平滑参数控制图像级筛查与像素级定位之间的权衡。在AeBAD-S上,完整配置取得88.48%的图像级AUROC,较MMR的84.7%提高3.78个百分点;当σ = 1.5时,像素级AUROC为83.90%,较MMR低1.40个百分点,PRO为76.03%。结果表明,该方法更适合以产品级合格/不合格判定为优先目标的部署场景,其收益伴随区域覆盖能力下降。因此,文章将其定位为现有工业异常检测流程的轻量化决策层,而非通用分割模型。
Abstract: Domain shift changes the normal-feature distribution and anomaly-score scale of industrial inspection systems, causing detectors that perform well under laboratory conditions to produce unstable decisions after deployment. To address the limited comparability between teacher-student distillation scores and prototype-matching scores, the dilution of sparse defects by global aggregation, and the coupling of post-processing parameters, this paper proposes an inference-time decision layer that requires no backbone retraining. The method performs location-scale standardization and weighted fusion of heterogeneous scores using statistics estimated from normal training data, applies max pooling to preserve strong local responses, and uses a single smoothing parameter to control the trade-off between image-level screening and pixel-level localization. On AeBAD-S, the complete configuration achieves an image-level AUROC of 88.48%, exceeding MMR’s 84.7% by 3.78 percentage points. At σ = 1.5, the pixel-level AUROC is 83.90%, 1.40 percentage points below MMR, while the PRO score is 76.03%. These results indicate that the method is better suited to deployment scenarios prioritizing product-level pass/fail decisions, with reduced region-coverage performance as the corresponding trade-off. The proposed method is therefore positioned as a lightweight decision layer for existing industrial anomaly-detection pipelines rather than as a general-purpose segmentation model.
文章引用:翁长明, 杨艺. 面向领域偏移工业异常检测的分布对齐分数融合与最大池化[J]. 传感器技术与应用, 2026, 14(5): 861-879. https://doi.org/10.12677/jsta.2026.145083

参考文献

[1] Cao, T., Zhu, J. and Pang, G. (2023) Anomaly Detection under Distribution Shift. 2023 IEEE/CVF International Conference on Computer Vision (ICCV), Paris, 1-6 October 2023, 6488-6500.
https://doi.org/10.1109/iccv51070.2023.00599
[2] Zhang, Z., Zhao, Z., Zhang, X., Sun, C. and Chen, X. (2023) Industrial Anomaly Detection with Domain Shift: A Real-World Dataset and Masked Multi-Scale Reconstruction. Computers in Industry, 151, Article 103990.
https://doi.org/10.1016/j.compind.2023.103990
[3] Bergmann, P., Fauser, M., Sattlegger, D. and Steger, C. (2019) MVTec AD—A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, 15-20 June 2019, 9584-9592.
https://doi.org/10.1109/cvpr.2019.00982
[4] Bergmann, P., Jin, X., Sattlegger, D. and Steger, C. (2022) The MVTec 3D-AD Dataset for Unsupervised 3D Anomaly Detection and Localization. Proceedings of the 17th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, 5, 202-213.
https://doi.org/10.5220/0010865000003124
[5] Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D. and Steger, C. (2022) Beyond Dents and Scratches: Logical Constraints in Unsupervised Anomaly Detection and Localization. International Journal of Computer Vision, 130, 947-969.
https://doi.org/10.1007/s11263-022-01578-9
[6] Ben Ammar, M., Mendoza, A., Belkhir, N., Manzanera, A. and Franchi, G. (2025) Foundation Models and Transformers for Anomaly Detection: A Survey. Information Fusion, 126, Article 103517.
[7] Liu, J., Xie, G., Wang, J., Li, S., Wang, C., Zheng, F., et al. (2024) Deep Industrial Image Anomaly Detection: A Survey. Machine Intelligence Research, 21, 104-135.
https://doi.org/10.1007/s11633-023-1459-z
[8] Batzner, K., Heckler, L. and König, R. (2024) EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latencies. 2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, 3-8 January 2024, 127-137.
https://doi.org/10.1109/wacv57701.2024.00020
[9] Bergmann, P., Fauser, M., Sattlegger, D. and Steger, C. (2020) Uninformed Students: Student-Teacher Anomaly Detection with Discriminative Latent Embeddings. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 4182-4191.
https://doi.org/10.1109/cvpr42600.2020.00424
[10] Deng, H. and Li, X. (2022) Anomaly Detection via Reverse Distillation from One-Class Embedding. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 9727-9736.
https://doi.org/10.1109/cvpr52688.2022.00951
[11] Tang, C., Zhou, S., Li, Y., Dong, Y. and Wang, L. (2026) Advancing Pre-Trained Teacher: Towards Robust Feature Discrepancy for Anomaly Detection. IEEE Transactions on Image Processing, 35, 4509-4522.
https://doi.org/10.1109/TIP.2026.3683277
[12] Salehi, M., Sadjadi, N., Baselizadeh, S., Rohban, M.H. and Rabiee, H.R. (2021) Notice of Removal: Multiresolution Knowledge Distillation for Anomaly Detection. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 20-25 June 2021, 14897-14907.
https://doi.org/10.1109/cvpr46437.2021.01466
[13] Wang, G., Han, S., Ding, E. and Huang, D. (2021) Student-Teacher Feature Pyramid Matching for Anomaly Detection. Proceedings of the British Machine Vision Conference 2021, Online, 22-25 November 2021, 1-14.
https://doi.org/10.5244/c.35.349
[14] Xu, J. and Jiang, S. (2025) Hierarchical Knowledge Transfer: Cross-Layer Distillation for Industrial Anomaly Detection. Journal of Imaging, 11, Article 102.
https://doi.org/10.3390/jimaging11040102
[15] Cohen, N. and Hoshen, Y. (2020) Sub-Image Anomaly Detection with Deep Pyramid Correspondences.
https://arxiv.org/pdf/2005.02357
[16] Defard, T., Setkov, A., Loesch, A. and Audigier, R. (2021) PaDiM: A Patch Distribution Modeling Framework for Anomaly Detection and Localization. In: Del Bimbo, A., et al., Eds., Lecture Notes in Computer Science, Springer International Publishing, 475-489.
https://doi.org/10.1007/978-3-030-68799-1_35
[17] Roth, K., Pemula, L., Zepeda, J., Scholkopf, B., Brox, T. and Gehler, P. (2022) Towards Total Recall in Industrial Anomaly Detection. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 14298-14308.
https://doi.org/10.1109/cvpr52688.2022.01392
[18] Fang, Z., Wang, X., Li, H., Liu, J., Hu, Q. and Xiao, J. (2023) FastRecon: Few-Shot Industrial Anomaly Detection via Fast Feature Reconstruction. 2023 IEEE/CVF International Conference on Computer Vision (ICCV), Paris, 1-6 October 2023, 17435-17444.
https://doi.org/10.1109/iccv51070.2023.01603
[19] Hu, J., Chen, X., Gan, Z., et al. (2024) DMAD: Dual Memory Bank for Real-World Anomaly Detection. arXiv:2403.12362.
[20] Lee, S., Lee, S. and Song, B.C. (2022) CFA: Coupled-Hypersphere-Based Feature Adaptation for Target-Oriented Anomaly Localization. IEEE Access, 10, 78446-78454.
https://doi.org/10.1109/access.2022.3193699
[21] Liang, Y., Zhang, J., Zhao, S., Wu, R., Liu, Y. and Pan, S. (2023) Omni-Frequency Channel-Selection Representations for Unsupervised Anomaly Detection. IEEE Transactions on Image Processing, 32, 4327-4340.
https://doi.org/10.1109/tip.2023.3293772
[22] Dai, S., Wu, Y., Li, X. and Xue, X. (2024) Generating and Reweighting Dense Contrastive Patterns for Unsupervised Anomaly Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 38, 1454-1462.
https://doi.org/10.1609/aaai.v38i2.27910
[23] You, Z., Cui, L., Shen, Y., Yang, K., Lu, X., Zheng, Y., et al. (2022) A Unified Model for Multi-Class Anomaly Detection. Advances in Neural Information Processing Systems 35, New Orleans, 28 November-9 December 2022, 4571-4584.
https://doi.org/10.52202/068431-0330
[24] Jeong, J., Zou, Y., Kim, T., Zhang, D., Ravichandran, A. and Dabeer, O. (2023) WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, 17-24 June 2023, 19606-19616.
https://doi.org/10.1109/cvpr52729.2023.01878
[25] Zhou, Q., Pang, G., Tian, Y., He, S. and Chen, J. (2024) AnomalyCLIP: Object-Agnostic Prompt Learning for Zero-Shot Anomaly Detection. Proceedings of the Twelfth International Conference on Learning Representations, Vienna, 7-11 May 2024, 1-33.
[26] Li, X., Zhang, Z., Tan, X., Chen, C., Qu, Y., Xie, Y., et al. (2024) PromptAD: Learning Prompts with Only Normal Samples for Few-Shot Anomaly Detection. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 16848-16858.
https://doi.org/10.1109/cvpr52733.2024.01594
[27] Lei, T., Wang, B., Chen, S., Cao, S. and Zou, N. (2024) Texture-AD: An Anomaly Detection Dataset and Benchmark for Real Algorithm Development. arXiv:2409.06367.
[28] Wang, C., Zhu, W., Gao, B., Gan, Z., Zhang, J., Gu, Z., et al. (2024) Real-IAD: A Real-World Multi-View Dataset for Benchmarking Versatile Industrial Anomaly Detection. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 22883-22892.
https://doi.org/10.1109/cvpr52733.2024.02159
[29] Xie, G., Wang, J., Liu, J., Lyu, J., Liu, Y., Wang, C., et al. (2024) IM-IAD: Industrial Image Anomaly Detection Benchmark in Manufacturing. IEEE Transactions on Cybernetics, 54, 2720-2733.
https://doi.org/10.1109/tcyb.2024.3357213
[30] Zou, Y., Jeong, J., Pemula, L., Zhang, D. and Dabeer, O. (2022) Spot-the-Difference Self-Supervised Pre-Training for Anomaly Detection and Segmentation. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M. and Hassner, T., Eds., Lecture Notes in Computer Science, Springer, 392-408.
https://doi.org/10.1007/978-3-031-20056-4_23
[31] Kull, M., Silva Filho, T.M. and Flach, P. (2017) Beyond Sigmoids: How to Obtain Well-Calibrated Probabilities from Binary Classifiers with Beta Calibration. Electronic Journal of Statistics, 11, 5052-5080.
https://doi.org/10.1214/17-ejs1338si
[32] Platt, J.C. (1999) Probabilistic Outputs for Support Vector Machines and Comparisons to Regularized Likelihood Methods. MIT Press.
[33] Zadrozny, B. and Elkan, C. (2002) Transforming Classifier Scores into Accurate Multiclass Probability Estimates. Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Edmonton Alberta, 23-26 July 2002, 694-699.
https://doi.org/10.1145/775047.775151
[34] Hastie, T., Tibshirani, R. and Friedman, J. (2009) The Elements of Statistical Learning. 2nd Edition, Springer.
[35] Kriegel, H., Kroger, P., Schubert, E. and Zimek, A. (2011) Interpreting and Unifying Outlier Scores. Proceedings of the 2011 SIAM International Conference on Data Mining, Mesa, 28-30 April 2011, 13-24.
https://doi.org/10.1137/1.9781611972818.2
[36] Castanedo, F. (2013) A Review of Data Fusion Techniques. The Scientific World Journal, 2013, Article ID: 704504.
https://doi.org/10.1155/2013/704504
[37] Hall, D.L. and Llinas, J. (1997) An Introduction to Multisensor Data Fusion. Proceedings of the IEEE, 85, 6-23.
https://doi.org/10.1109/5.554205
[38] Kittler, J., Hatef, M., Duin, R.P.W. and Matas, J. (1998) On Combining Classifiers. IEEE Transactions on Pattern Analysis and Machine Intelligence, 20, 226-239.
https://doi.org/10.1109/34.667881
[39] Costanzino, A., Ramirez, P.Z., Lisanti, G. and Di Stefano, L. (2024) Multimodal Industrial Anomaly Detection by Crossmodal Feature Mapping. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 16-22 June 2024, 17234-17243.
https://doi.org/10.1109/cvpr52733.2024.01631
[40] Tao, C., Cao, X. and Du, J. (2025) G2SF: Geometry-Guided Score Fusion for Multimodal Industrial Anomaly Detection. 2025 IEEE/CVF International Conference on Computer Vision (ICCV), Honolulu, 19-25 October 2025, 20551-20560.
https://doi.org/10.1109/iccv51701.2025.01911
[41] Chae, J., Luo, L., Liu, Y., Wang, R., Yu, D., Liang, Z., et al. (2026) StructCore: Structure-Aware Image-Level Scoring for Training-Free Unsupervised Anomaly Detection. arXiv:2602.17048v1.
[42] de Haan, L. and Ferreira, A. (2006) Extreme Value Theory: An Introduction. Springer.
[43] Ardelean, A. and Weyrich, T. (2024) High-Fidelity Zero-Shot Texture Anomaly Localization Using Feature Correspondence Analysis. 2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, 3-8 January 2024, 1123-1133.
https://doi.org/10.1109/wacv57701.2024.00117
[44] Huang, D., Xue, F., Li, X. and Zhou, Y. (2025) AnoRefiner: Anomaly-Aware Group-Wise Refinement for Zero-Shot Industrial Anomaly Detection. arXiv:2511.22595.
[45] Soni, J., Prabakar, N. and Upadhyay, H. (2022) Ada-Thres: An Adaptive Thresholding Method to Mitigate the False Alarms. 2022 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, 14-16 December 2022, 916-921.
https://doi.org/10.1109/csci58124.2022.00164
[46] Wang, M., Ding, H., Liew, J.H., Liu, J., Zhao, Y. and Wei, Y. (2023) SegRefiner: Towards Model-Agnostic Segmentation Refinement with Discrete Diffusion Process. Advances in Neural Information Processing Systems 36, New Orleans, 10-16 December 2023, 79761-79780.
https://doi.org/10.52202/075280-3492
[47] He, K., Chen, X., Xie, S., Li, Y., Dollar, P. and Girshick, R. (2022) Masked Autoencoders Are Scalable Vision Learners. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 15979-15988.
https://doi.org/10.1109/cvpr52688.2022.01553
[48] Sener, O. and Savarese, S. (2018) Active Learning for Convolutional Neural Networks: A Core-Set Approach.
https://arxiv.org/abs/1708.00489
[49] Zavrtanik, V., Kristan, M. and Skocaj, D. (2021) DRÆM—A Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection. 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, 10-17 October 2021, 8310-8319.
https://doi.org/10.1109/iccv48922.2021.00822
[50] Schlüter, H.M., Tan, J., Hou, B. and Kainz, B. (2022) Natural Synthetic Anomalies for Self-Supervised Anomaly Detection and Localization. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M. and Hassner, T., Eds., Lecture Notes in Computer Science, 474-489.
https://doi.org/10.1007/978-3-031-19821-2_27
[51] Rousseeuw, P.J. and Croux, C. (1993) Alternatives to the Median Absolute Deviation. Journal of the American Statistical Association, 88, 1273-1283.
https://doi.org/10.1080/01621459.1993.10476408