Knowledge Distillation for Optical Surface Inspection: Compressing Large Inspection Networks into Efficient Deployable Models
PDF

Keywords

Knowledge distillation
Model compression
Optical inspection
Deep learning deployment
Edge computing

Abstract

State-of-the-art deep learning models for optical surface inspection achieve impressive accuracy but are computationally expensive, requiring high-end GPU servers for real-time inference. This creates a deployment barrier for manufacturing facilities that lack GPU infrastructure or require inspection systems that can operate on low-power embedded devices. Knowledge distillation addresses this problem by training a compact student network to mimic the behavior of a larger teacher network, transferring not just the final predictions but the rich dark knowledge encoded in the teacher's logits, attention maps, and intermediate representations. This study proposes a comprehensive knowledge distillation framework for optical surface inspection that compresses high-accuracy teacher models into lightweight student networks suitable for edge deployment, while preserving the teacher's ability to detect rare defects, reason about uncertainty, and generalize across diverse product variants. 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 logit-based distillation, intermediate representation matching, and defect-aware prioritization to achieve up to 12.7× model compression while retaining 96.4% of the teacher's accuracy on defect detection and within 0.3 K of the teacher's thermal reconstruction MAE. The distilled student models achieve real-time inference at 156 FPS on a mobile ARM processor (Jetson Nano) and 94 FPS on a low-power edge TPU, enabling deployment of state-of-the-art inspection accuracy on compact, low-cost hardware. This work provides a practical pathway for deploying the most accurate optical inspection models on the full range of manufacturing hardware, from high-end datacenters to embedded edge devices.

PDF

References

Zhou, K., Zhong, L., Liu, J. et al. Unveiling the Role of Western Pacific Subtropical High in Urban Heat Islands Using Local Climate Zones Coupled WRF-BEP/BEM. Earth Syst Environ 10, 363–390 (2026). https://doi.org/10.1007/s41748-025-00589-z

Hinton, G., Vinyals, O., & Dean, J. (2015). Distilling the knowledge in a neural network. *arXiv preprint* arXiv:1503.02531.

S. Wang, Y. Yu, R. Feldt and D. Parthasarathy, "Automating a Complete Software Test Process Using LLMs: An Automotive Case Study," 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE), Ottawa, ON, Canada, 2025, pp. 373-384, doi: 10.1109/ICSE55347.2025.00211.

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

Romero, A., Ballas, N., Kahou, S. E., Chassang, A., Gatta, C., & Bengio, Y. (2015). FitNets: Hints for thin deep nets. In *International Conference on Learning Representations*. arXiv. https://arxiv.org/abs/1412.6550

Zagoruyko, S., & Komodakis, N. (2017). Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In *International Conference on Learning Representations*. arXiv. https://arxiv.org/abs/1612.03928

Wang, S., Yu, Y., Feldt, R., & Parthasarathy, D. (2025). Automating a complete software test process using llms: An automotive case study. arXiv preprint arXiv:2502.04008. https://doi.org/10.1109/ICSE55347.2025.00211

Zhu, Y., Liu, Q. Hybrid graph attention network-LSTM models for causal-aware supply chain forecasting. J Intell Manuf (2026). https://doi.org/10.1007/s10845-025-02782-3

Zhu, Y., & Liu, Q. (2025). Toward transparent groundwater contamination risk forecasting: Integrating causal discovery and Bayesian graph neural networks. Science of the Total Environment, 998, 180233. https://doi.org/10.1016/j.scitotenv.2025.180233

Zhu, Y. Application of a QPSO-optimized CNN-LSTM model in water quality prediction. Discov Water 4, 100 (2024). https://doi.org/10.1007/s43832-024-00161-2

Zhou, K., Zhong, L., Liu, J. et al. Unveiling the Role of Western Pacific Subtropical High in Urban Heat Islands Using Local Climate Zones Coupled WRF-BEP/BEM. Earth Syst Environ 10, 363–390 (2026). https://doi.org/10.1007/s41748-025-00589-z

Zhao, Y., Zhong, L., Zhou, K., Liu, B., & Shu, W. (2024). Responses of the urban atmospheric thermal environment to two distinct heat waves and their changes with future urban expansion in a Chinese megacity. Geophysical Research Letters, 51(11), Article e2024GL109018. https://doi.org/10.1029/2024GL109018

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

Wang, S., Yu, Y., Feldt, R., & Parthasarathy, D. (2025). Automating a complete software test process

using LLMs: An automotive case study. 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE), 1–12. https://doi.org/10.1109/ICSE55347.2025.00211