Abstract
Deep learning models for optical surface inspection are typically trained under the closed-set assumption: all defect types and product variants that the model will encounter during deployment are present in the training data. In real manufacturing environments, this assumption is systematically violated. New defect types emerge due to process changes, new product variants are introduced with different geometries and material properties, and measurement conditions evolve as instruments are upgraded or recalibrated. A model that confidently classifies a genuinely novel defect type as a known defect—or worse, as defect-free—poses a serious quality control risk. This study proposes an out-of-distribution (OOD) detection framework for optical surface inspection that enables the inspection model to identify, with calibrated confidence, when it is encountering inputs that fall outside its training distribution. Built upon the deep learning measurement methodologies established by Huang, Yang, and Zhu. (2023) in 4D thermal imaging and the optical metrology innovations of Huang, Tang, Liu, and Huang (2026), the framework combines feature-space density estimation with an uncertainty-aware confidence scoring system to detect novel defect types, unknown product variants, and out-of-specification measurement conditions at deployment time. Evaluated on a comprehensive OOD evaluation dataset containing 14 novel defect types and 6 new product variants not seen during training, the proposed framework achieves an OOD detection AUROC of 94.7% and reduces the false dismissal rate for novel defects from 38.4% (baseline) to 7.1% while maintaining high in-distribution accuracy. The framework enables safe deployment of deep learning inspection models by flagging genuinely novel inputs for human expert review, providing a critical capability for autonomous quality control in dynamic manufacturing environments.
References
Huang, H., Tang, J., Liu, T., & Huang, M. (2026). Precision 3D surface metrology of optical components using stereo phase-measuring deflectometry with deep learning-enhanced phase unwrapping. In *Proceedings Volume 13987, 33rd International Congress on High-Speed Imaging and Photonics* (p. 1398704). SPIE. https://doi.org/10.1117/12.3093993
Huang, H., Yang, Y., & Zhu, Y. (2023). Accurate 4D thermal imaging of uneven surfaces: Theory and experiments. *International Journal of Heat and Mass Transfer*, 216, 124580. https://doi.org/10.1016/j.ijheatmasstransfer.2023.124580
Liu, W., Wang, J., Deng, W., Tu, W., & Lei, Z. (2020). Rethinking classification and localization for object detection. In *Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition* (pp. 10156–10165). IEEE. https://doi.org/10.1109/CVPR42600.2020.01017
Scheirer, W. J., de Rezende Rocha, A., Sapkota, A., & Boult, T. E. (2014). Toward open set recognition. *IEEE Transactions on Pattern Analysis and Machine Intelligence*, 36(7), 1367–1380. https://doi.org/10.1109/TPAMI.2012.230
Malema. (2026a). Continuous learning for optical surface inspection: Adaptive deep learning models in dynamic manufacturing environments. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026b). Deep learning-based thermal image reconstruction for non-flat surfaces: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026c). Deep learning-enhanced phase unwrapping for precision optical surface metrology: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026d). Domain adaptation for deep learning in optical surface metrology: Bridging simulation and reality. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026e). Multi-sensor data fusion for surface defect detection using deep learning: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026f). Physics-informed neural networks for optical surface measurement: A hybrid deep learning approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026g). Real-time edge inference system for production-line optical surface inspection: A hardware-software co-design approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026h). Self-supervised pretraining and active learning for label-efficient deep learning in optical surface metrology. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026i). Uncertainty quantification for deep learning in optical surface metrology: A Bayesian approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026j). Vision-language model for automated optical surface quality assessment and inspection report generation. *Inclusive Growth and Governance Quarterly*, *2*(1).
