Automated visual inspection in medical-device manufacturing faces unique challenges, including extremely low defect rates, limited annotated data, hardware restrictions on production lines, and the need for validated, explainable artificial-intelligence systems. This paper presents two attention-guided autoencoder architectures that address these constraints through complementary anomaly-detection strategies. The first employs a multi-scale structural-similarity (4-MS-SSIM) index for inline inspection, enabling interpretable, real-time defect detection on constrained hardware. The second applies a Mahalanobis-distance analysis of randomly reduced latent features for efficient feature-space monitoring and lifecycle verification. Both approaches share a lightweight backbone optimised for high-resolution imagery for typical manufacturing conditions. Evaluations on the Surface Seal Image (SSI) dataset-representing sterile-barrier packaging inspection-demonstrate that the proposed methods outperform reference baselines, including MOCCA, CPCAE, and RAG-PaDiM, under realistic industrial constraints. Cross-domain validation on the MVTec-Zipper benchmark confirms comparable accuracy to state-of-the-art anomaly-detection methods. The dual-mode framework integrates inline anomaly detection and supervisory monitoring, advancing explainable AI architectures toward greater reliability, observability, and lifecycle monitoring in safety-critical manufacturing environments. To facilitate reproducibility, the source code developed for the experiments has been released in the project repository, while the datasets were obtained from publicly available sources.
翻译:医疗设备制造中的自动化视觉检测面临独特挑战,包括极低的缺陷率、有限的标注数据、生产线硬件限制,以及对经过验证、可解释的人工智能系统的需求。本文提出了两种注意力引导的自编码器架构,通过互补的异常检测策略应对这些约束。第一种方法采用多尺度结构相似性(4-MS-SSIM)指数进行在线检测,实现在受限硬件上进行可解释的实时缺陷检测。第二种方法应用随机降维潜在特征的马氏距离分析,用于高效的特征空间监测和生命周期验证。两种方法共享一个针对典型制造条件的高分辨率图像优化的轻量级骨干网络。在代表无菌屏障包装检测的表面密封图像(SSI)数据集上的评估表明,所提方法在现实工业约束下优于包括MOCCA、CPCAE和RAG-PaDiM在内的参考基线。在MVTec-Zipper基准上的跨域验证证实了其与最先进异常检测方法相当的准确性。该双模态框架集成了在线异常检测和监督监控,推动了可解释AI架构在安全关键制造环境中向更高可靠性、可观测性和生命周期监测的发展。为促进可复现性,实验开发的源代码已在项目仓库中发布,而数据集则来源于公开可获取的资源。