首页|基于球面折反射成像和YOLOv7的内螺纹缺陷检测

基于球面折反射成像和YOLOv7的内螺纹缺陷检测

扫码查看
螺母在机械制造环节得到广泛应用,其内壁螺纹质量对于机械联接至关重要。为了实现螺母内螺纹的非接触缺陷检测,首先提出一种基于球面折反射全景成像原理的图像采集装置,其次利用该装置采集图像数据集并提出一种基于改进YOLOv7的缺陷检测算法。该成像装置具备一次性成像、无须伸入内壁、采集到的内螺纹图像细节完整等优势,有效地改进了传统视觉检测方案存在的成像分辨率低、相机视场占比小的问题。对YOLOv7模型进行改进并结合螺母内螺纹的缺陷特征,使用k-means++算法聚类锚框,使得模型训练更容易收敛。通过在特征融合网络中加入坐标注意力(CA)机制,提高网络的特征表达能力。使用SIoU损失函数替换原YOLOv7模型中的CIoU损失函数,提高模型分类的准确性和可靠性。实验结果表明,针对缺口、漏攻纹、刮痕、碎屑4种内螺纹缺陷,改进后的YOLOv7模型的平均精度(AP)分别达到96。89%、100%、98。07%、99。98%,平均精度均值(mAP)达到 98。74%,检测速度达到39。64帧/s,与其他常见模型相比,改进模型精度更高,能够满足工业现场的实时检测需求。
Internal Thread Defect Detection Based on Spherical Catadioptric Imaging and YOLOv7
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.

defect detectioninternal threadmachine visionspherical catadioptric imagingdeep learning

张诗婧、莫绪涛、赵行、董杨林

展开 >

安徽工业大学微电子与数据科学学院,安徽 马鞍山 243002

缺陷检测 内螺纹 机器视觉 球面折反射成像 深度学习

安徽省高校优秀青年人才支持计划项目教育部2021年第二批产学研合作协同育人项目安徽省教育厅自然科学研究项目

gxyq2022014202102153068KJ2020A0238

2024

计算机工程
华东计算技术研究所 上海市计算机学会

计算机工程

CSTPCD北大核心
影响因子:0.581
ISSN:1000-3428
年,卷(期):2024.50(7)