计算机工程2024,Vol.50Issue(7):282-292,11.DOI:10.19678/j.issn.1000-3428.0068237
基于球面折反射成像和YOLOv7的内螺纹缺陷检测
Internal Thread Defect Detection Based on Spherical Catadioptric Imaging and YOLOv7
摘要
Abstract
Nuts are crucial components in mechanical manufacturing,where the quality of their internal threads significantly impacts mechanical connections.This study proposes a non-contact defect detection method for the internal threads of nuts using an image acquisition device based on spherical catadioptric imaging.This device efficiently collects image datasets and employs an enhanced YOLOv7-based defect detection algorithm.The imaging device offers several advantages,including single-attempt image capture without the need for inner wall extension,providing comprehensive details of internal thread images.These features address issues commonly encountered in traditional visual inspection methods,such as low imaging resolution and limited field-of-view ratio.We enhance the YOLOv7 model by integrating it with defect characteristics of nut internal threads by using the k-means++algorithm to cluster anchor boxes,simplifying model training convergence.Additionally,we improve the network's feature expression ability by incorporating the Coordinate Attention(CA)mechanism into the feature fusion network.Replacing the Complete Intersection over Union(CIoU)loss function in the original YOLOv7 model with the Scylla Intersection over Union(SIoU)loss function,enhances model classification accuracy and reliability.The experimental results demonstrate that the enhanced YOLOv7 model achieves significant precision,with an Average Precision(AP)of 96.89%,100%,98.07%,and 99.98%,and a mean Average Precision(mAP)of 98.74%across four types of internal thread defects:internal thread breaches,unthreaded,grinding crack,and scraps.The model achieves a detection speed of 39.64 frames per second,surpassing other common models in accuracy and meeting the real-time detection needs of industrial sites.关键词
缺陷检测/内螺纹/机器视觉/球面折反射成像/深度学习Key words
defect detection/internal thread/machine vision/spherical catadioptric imaging/deep learning分类
信息技术与安全科学引用本文复制引用
张诗婧,莫绪涛,赵行,董杨林..基于球面折反射成像和YOLOv7的内螺纹缺陷检测[J].计算机工程,2024,50(7):282-292,11.基金项目
安徽省高校优秀青年人才支持计划项目(gxyq2022014) (gxyq2022014)
教育部2021年第二批产学研合作协同育人项目(202102153068) (202102153068)
安徽省教育厅自然科学研究项目(KJ2020A0238). (KJ2020A0238)