摘要
表面缺陷检测是产品质检的重要工序之一,现有深度学习视觉检测大多基于云端服务器,存在模型大、算力需求高、成本高等不足。以STM32微控制器为核心,提出了一种基于轻量化网络的表面缺陷视觉检测方法,采用轻量级SSD作为缺陷检测模型,利用MobileNetV1替换原有的骨干网络VGG-16以减小网络规模;采用INT8量化的训练后量化方法对模型进行计算加速,生成的TFlite模型仅有578 KB,运行占用RAM仅为288.29 KB,并在STM32微控制器中实现了模型的移植和部署。实验测试结果表明,该方法能实现锂电池表面划痕和凹坑两种缺陷的边缘侧准确检测。
Surface defect detection is one of important processes of product quality inspection,most of existing deep learning visual inspection is based on cloud servers,which has disadvantages of large models,high requirements of computing power and high costs.To this end,this paper uses the STM32 microcontroller as the core and proposes an light-weight network-based visual detection method of surface defects.Firstly,the lightweight SSD is used as the defect detection model,where the original backbone network VGG-16 is replaced by the MobileNetv1 to reduce the network scale.Then,the post-training quantization method based on the INT8 quantization is used to accelerate the model calculation,and the generated TFlite model was only 578 KB,and the RAM occupied by operation was only 288.29 KB,and the model was ported and deployed in the STM32 microcontroller.Finally,the experimental test results show that the proposed method can accurately detect the edge side of scratches and pits on the surface of lithium batteries.
作者
汪国平
胡博
陈仲生
侯幸林
WANG Guo-ping;HU Bo;CHEN Zhong-sheng;HOU Xing-lin(College of Electrical and Information Engineering,Hunan University of Technology,Zhuzhou 412007,China;National Key Laboratory of Transient Physics,Nanjing University of Science and Technology,Nanjing 210094,China;College of Automotive Engineering,Changzhou Institute of Technology,Changzhou 213032,China)
出处
《电工电气》
2024年第2期47-52,共6页
Electrotechnics Electric
基金
国家自然科学基金项目(62101074)。