CN118566235A - A method and system for visually detecting surface defects of fasteners - Google Patents

A method and system for visually detecting surface defects of fasteners Download PDF

Info

Publication number
CN118566235A
CN118566235A CN202410656014.2A CN202410656014A CN118566235A CN 118566235 A CN118566235 A CN 118566235A CN 202410656014 A CN202410656014 A CN 202410656014A CN 118566235 A CN118566235 A CN 118566235A
Authority
CN
China
Prior art keywords
defect
fastener
terminal
image
cloud
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410656014.2A
Other languages
Chinese (zh)
Inventor
徐亮
杨瑞英
陈湘国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei University of Engineering
Original Assignee
Hebei University of Engineering
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei University of Engineering filed Critical Hebei University of Engineering
Priority to CN202410656014.2A priority Critical patent/CN118566235A/en
Publication of CN118566235A publication Critical patent/CN118566235A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N2021/845Objects on a conveyor
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a visual detection method and a visual detection system for surface defects of a fastener, and belongs to the technical field of intelligent manufacturing. The method comprises the following steps: collecting an image of a fastener; processing the image; respectively deploying defect detection models at a cloud end and a terminal; the terminal detects the defects of the images of each fastener through the defect detection model, and alarms after the defect types are identified; in addition, the terminal extracts an image of one fastener every N fasteners and sends the image to the cloud, the cloud detects defects through the defect detection model, and after the defect types are identified, the terminal is informed to alarm; and when the terminal gives an alarm, judging that the corresponding fastener has surface defects. According to the invention, the product quality is automatically detected in the production process of the product in a visual identification mode, so that the quality inspection work of the product is finished on one hand, and the timely early warning effect is realized on the other hand, so that the production rate of waste parts can be greatly reduced, and raw materials are saved.

Description

一种紧固件表面缺陷视觉检测方法及系统A method and system for visually detecting surface defects of fasteners

技术领域Technical Field

本发明涉及智能制造技术领域,特别是一种紧固件表面缺陷视觉检测方法及系统。The present invention relates to the field of intelligent manufacturing technology, and in particular to a method and system for visually detecting surface defects of fasteners.

背景技术Background Art

随着计算机技术和人工智能技术的快速发展,制造业数字化升级具备了技术基础,智能制造也成为制造业的重要发展方向。紧固件在冷压生产过程中,在金属表面会产生缺孔、剐蹭、毛边、开裂等缺陷,这就是紧固件表面缺陷。紧固件行业属于传统的制造业,该行业智能化和数字化一直比较低。对生产出的紧固件产品的质检工作长期采用人工检测的方式,生产设备中只采用了简单的传感器实现计数功能,没有采用自动化的检测方法检测产品的质量。这导致一方面人工质检工作量大,另一方面人工质检容易有漏检、误检。With the rapid development of computer technology and artificial intelligence technology, the digital upgrade of the manufacturing industry has a technical foundation, and intelligent manufacturing has also become an important development direction of the manufacturing industry. During the cold pressing production process of fasteners, defects such as missing holes, scratches, burrs, and cracks will occur on the metal surface. These are surface defects of fasteners. The fastener industry belongs to the traditional manufacturing industry, and the intelligence and digitization of this industry have always been relatively low. The quality inspection of the fastener products produced has long been carried out by manual inspection. Only simple sensors are used in the production equipment to realize the counting function, and no automated detection methods are used to detect the quality of the products. This leads to a large workload for manual quality inspection on the one hand, and on the other hand, manual quality inspection is prone to missed inspections and false inspections.

目前,基于视觉的工业品表面缺陷检测的主流方法主要有以下两类:At present, the mainstream methods of industrial product surface defect detection based on vision are mainly divided into the following two categories:

1.基于传统方法的缺陷检测方法1. Defect detection method based on traditional methods

传统的视觉缺陷检测方法通常学习一个正常图像的模型,在检测阶段根据待检测图像与模型之间的匹配程度实现缺陷检测。传统视觉缺陷检测方法主要有基于模板匹配、基于统计模型、基于图像分解、基于频域分析、基于稀疏编码重构和基于分类面构建的缺陷检测方法。传统方法适用于场景固定、背景简单的识别情况,容易受到光照变化、噪声等外界因素的干扰,鲁棒性和泛化能力较弱,通用性较差,不能适应场景变化的情况。紧固件行业中需要生产的产品多种多样,传统方法在此应用中,扩展难度较大,泛化性较差。Traditional visual defect detection methods usually learn a model of a normal image, and implement defect detection in the detection stage based on the degree of match between the image to be detected and the model. Traditional visual defect detection methods mainly include defect detection methods based on template matching, statistical models, image decomposition, frequency domain analysis, sparse coding reconstruction, and classification surface construction. Traditional methods are suitable for recognition situations with fixed scenes and simple backgrounds. They are easily disturbed by external factors such as lighting changes and noise. They have weak robustness and generalization capabilities, poor versatility, and cannot adapt to scene changes. There are many kinds of products that need to be produced in the fastener industry. In this application, traditional methods are difficult to expand and have poor generalization.

2.基于深度学习的缺陷检测方法2. Defect detection method based on deep learning

与传统方法相比,深度学习方法能够自动学习特征,算法泛化能力强,已经广泛用于视觉缺陷检测领域。根据数据标签的不同,可以整体上分为全监督学习模型、无监督学习模型和半监督/弱监督学习模型。但是,深度学习方法在应用于具体工业场景中时,受到现场环境和资源的约束,仍然需要根据实际要求进行优化,满足准确性和实时性的要求。此外,训练数据的收集问题、模型的准确率问题、模型的推理速度问题也是目前深度学习模型要重点解决的问题。Compared with traditional methods, deep learning methods can automatically learn features and have strong algorithm generalization capabilities. They have been widely used in the field of visual defect detection. According to different data labels, they can be generally divided into fully supervised learning models, unsupervised learning models, and semi-supervised/weakly supervised learning models. However, when deep learning methods are applied to specific industrial scenarios, they are constrained by the on-site environment and resources and still need to be optimized according to actual requirements to meet the requirements of accuracy and real-time performance. In addition, the collection of training data, the accuracy of the model, and the reasoning speed of the model are also key issues that deep learning models need to address.

总之,对于紧固件表面缺陷检测,由于受到现场环境、资源和时效性的限制,深度学习模型需要小型化、轻量化才能满足工业界的实际需要。在生产现场实现紧固件视觉检测,现场环境比较复杂,需要考虑将产品小型化、一体化,将图像采集、处理、检测识别、报警等功能集成为一体,方便现场部署。但是,现有技术中还没有比较完善的一体化解决方案。In short, for fastener surface defect detection, due to the limitations of the on-site environment, resources and timeliness, the deep learning model needs to be miniaturized and lightweight to meet the actual needs of the industry. To realize fastener visual inspection at the production site, the on-site environment is relatively complex, and it is necessary to consider miniaturization and integration of products, and integrate image acquisition, processing, detection and recognition, alarm and other functions into one, so as to facilitate on-site deployment. However, there is no relatively complete integrated solution in the existing technology.

发明内容Summary of the invention

为了提高质检的效率,提高检测质量,结合紧固件产品的特点,本发明提出一种紧固件表面缺陷视觉检测方法及系统。本发明通过视觉识别的方式在产品生产过程中自动检测产品质量,一方面完成产品的质检工作,另一方面实现及时预警作用,可以大大减少废件的产生比率,节省原材料。In order to improve the efficiency of quality inspection and improve the inspection quality, the present invention proposes a fastener surface defect visual inspection method and system in combination with the characteristics of fastener products. The present invention automatically detects product quality during the production process by visual recognition, which can complete the product quality inspection work on the one hand, and realize timely early warning on the other hand, which can greatly reduce the generation rate of scrap parts and save raw materials.

为了实现上述目的,本发明采用的技术方案为:In order to achieve the above object, the technical solution adopted by the present invention is:

一种紧固件表面缺陷视觉检测方法,包括以下步骤:A method for visually detecting surface defects of fasteners comprises the following steps:

步骤1,在传送带的上方及左右两侧设置三个相机,并在传送带两侧设置对射传感器,当对射传感器判断到有紧固件经过时,通过三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;Step 1: three cameras are set above and on both sides of the conveyor belt, and a through-beam sensor is set on both sides of the conveyor belt. When the through-beam sensor determines that a fastener passes by, the three cameras take multi-angle photos of the front, left and right sides of the fastener;

步骤2,对拍摄的图像进行处理;Step 2, processing the captured image;

步骤3,在云端和终端分别部署缺陷检测模型;云端和终端采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;Step 3: Deploy defect detection models on the cloud and the terminal respectively. The cloud and the terminal use the same defect detection model, but use different network parameter scales. The terminal uses a model based on YOLO-nano to achieve faster detection, while the cloud uses a version based on YOLO-large to achieve more accurate detection.

步骤4,终端通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。In step 4, the terminal performs defect detection on the image of each fastener through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has a surface defect.

进一步地,步骤2所述的处理包括:Furthermore, the processing described in step 2 includes:

(1)降噪:采用双边滤波降噪实现去噪,同时保持边缘信息;(1) Noise reduction: Bilateral filtering is used to achieve denoising while maintaining edge information;

(2)增强:采用锐化滤波增强图像中的边缘和细节;(2) Enhancement: Use sharpening filtering to enhance the edges and details in the image;

(3)抠图:对图像中的紧固件部分进行截取,减小背景对缺陷识别的影响;抠图模型基于YOLO-nano实现。(3) Cutout: Cut out the fastener part in the image to reduce the impact of the background on defect identification. The cutout model is implemented based on YOLO-nano.

进一步地,步骤3中的缺陷检测模型同时完成姿态识别和缺陷定位,其训练方式为:Furthermore, the defect detection model in step 3 simultaneously completes posture recognition and defect location, and its training method is:

(1)样本构建(1) Sample construction

在生产现场收集紧固件的真实图像数据,对于每种紧固件,根据缺陷类型,在不同的紧固件姿态下分别进行数据标注,缺陷类型包括:缺少孔、角度不正、孔有毛边、R角偏、毛边毛刺、剐蹭、多块;姿态包括正面、左侧面和右侧面三种,标注采用Label Studio工具,通过标记框的方式标记具体的缺陷位置;将样本分为训练集、验证集和测试集;Collect real image data of fasteners at the production site. For each fastener, perform data annotation in different fastener postures according to the defect type. The defect types include: missing holes, incorrect angles, burrs on holes, R angle deviation, burrs, scratches, and multiple pieces. The postures include front, left, and right sides. The annotation uses the Label Studio tool to mark the specific defect locations by marking boxes. The samples are divided into training sets, validation sets, and test sets.

(2)模型训练(2) Model training

模型的损失函数包括BCE loss、DFL loss和CIOU loss,其中,BCE loss作为分类损失,DFL loss和CIOU loss作为边框回归损失;将三种损失加权求和,形成总的损失函数,用于指导网络的训练;The loss functions of the model include BCE loss, DFL loss and CIOU loss, where BCE loss is used as classification loss, DFL loss and CIOU loss are used as bounding box regression losses. The three losses are weighted and summed to form a total loss function, which is used to guide network training.

在模型迭代过程中,设置平均精度mAP作为评估指标,当在验证集上的指标平稳后结束训练,评估指标最好的模型参数被选为最终的模型。During the model iteration process, the mean average precision (mAP) is set as the evaluation indicator. When the indicator on the validation set becomes stable, the training ends and the model parameters with the best evaluation indicator are selected as the final model.

一种紧固件表面缺陷视觉检测系统,包括传送带、补光系统、拍摄系统、终端缺陷识别系统以及云端缺陷识别系统;A fastener surface defect visual inspection system, comprising a conveyor belt, a fill light system, a shooting system, a terminal defect recognition system and a cloud defect recognition system;

所述补光系统设置在传送带旁边,用于对传送带上的紧固件进行补光;The fill light system is arranged beside the conveyor belt and is used to fill light for the fasteners on the conveyor belt;

所述拍摄系统包括设置在传送带的上方及左右两侧的三个相机,以及设置在传送带两侧的对射传感器;当对射传感器判断到有紧固件经过时,触发三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;The shooting system includes three cameras arranged above and on the left and right sides of the conveyor belt, and a shooting sensor arranged on both sides of the conveyor belt; when the shooting sensor determines that a fastener passes by, the three cameras are triggered to shoot the fastener from multiple angles, such as the front, left side, and right side;

所述终端缺陷识别系统和云端缺陷识别系统通过网络进行通信,终端缺陷识别系统和云端缺陷识别系统分别部署有缺陷检测模型;终端缺陷识别系统和云端缺陷识别系统采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;The terminal defect recognition system and the cloud defect recognition system communicate through a network, and the terminal defect recognition system and the cloud defect recognition system are respectively deployed with defect detection models; the terminal defect recognition system and the cloud defect recognition system use the same defect detection model, but use different network parameter scales, wherein the terminal uses a model based on YOLO-nano to achieve faster detection, and the cloud uses a version based on YOLO-large to achieve more accurate detection;

终端缺陷识别系统根据拍摄系统拍摄的图像,通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。The terminal defect recognition system performs defect detection on the image of each fastener based on the images taken by the shooting system through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, it notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has surface defects.

进一步地,所述拍摄系统拍摄图像后,还对图像进行处理,包括:Furthermore, after the shooting system shoots the image, it also processes the image, including:

(1)降噪:采用双边滤波降噪实现去噪,同时保持边缘信息;(1) Noise reduction: Bilateral filtering is used to achieve denoising while maintaining edge information;

(2)增强:采用锐化滤波增强图像中的边缘和细节;(2) Enhancement: Use sharpening filtering to enhance the edges and details in the image;

(3)抠图:对图像中的紧固件部分进行截取,减小背景对缺陷识别的影响;抠图模型基于YOLO-nano实现。(3) Cutout: Cut out the fastener part in the image to reduce the impact of the background on defect identification. The cutout model is implemented based on YOLO-nano.

进一步地,所述补光系统、拍摄系统、终端缺陷识别系统集成为一体化装置。Furthermore, the fill light system, the shooting system, and the terminal defect recognition system are integrated into an integrated device.

本发明的有益效果在于:The beneficial effects of the present invention are:

1、本发明通过在终端集成数据采集与处理、在终端和云端分别实现不同难易程度的缺陷检测,实现生产线上各种类型缺陷的在线检测。1. The present invention realizes online detection of various types of defects on the production line by integrating data collection and processing in the terminal and realizing defect detection of different degrees of difficulty in the terminal and the cloud.

2、本发明在紧固件生产线环境中,将图像采集、处理、检测识别、报警等功能集成为一体,易于部署。2. The present invention integrates image acquisition, processing, detection and recognition, alarm and other functions into one in the fastener production line environment, which is easy to deploy.

3、本发明装置采用环绕式的补光系统解决光照不足问题,采用多角度采集以便识别定位不同姿态的缺陷问题。3. The device of the present invention adopts a surround-type fill-light system to solve the problem of insufficient illumination, and adopts multi-angle acquisition to identify and locate defects in different postures.

4、本发明提出基于姿态的多任务深度缺陷检测模型,将紧固件的姿态识别和缺陷检测两个任务在一个模型中实现,即在识别缺陷的同时区分紧固件的姿态。4. The present invention proposes a posture-based multi-task deep defect detection model, which implements the two tasks of fastener posture recognition and defect detection in one model, that is, distinguishing the posture of the fastener while identifying defects.

5、本发明提出紧固件缺陷分级的策略,依据缺陷对紧固件正常使用的影响程度,对缺陷进行分级处理,满足实际场景中紧固件缺陷检测的要求。5. The present invention proposes a strategy for fastener defect classification, which classifies defects according to the degree of impact of defects on the normal use of fasteners to meet the requirements of fastener defect detection in actual scenarios.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明实施例中一种紧固件表面缺陷视觉检测方法的原理示意图。FIG. 1 is a schematic diagram showing the principle of a method for visually detecting surface defects of fasteners according to an embodiment of the present invention.

图2为本发明实施例中一种紧固件表面缺陷视觉检测系统的结构示意图。FIG. 2 is a schematic diagram of the structure of a fastener surface defect visual inspection system according to an embodiment of the present invention.

图3为本发明实施例中基于姿态的多任务深度缺陷检测模型的示意图。FIG3 is a schematic diagram of a posture-based multi-task depth defect detection model in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面结合附图对本发明做进一步地详细说明。The present invention is further described in detail below in conjunction with the accompanying drawings.

一种紧固件表面缺陷视觉检测方法,包括以下步骤:A method for visually detecting surface defects of fasteners comprises the following steps:

步骤1,在传送带的上方及左右两侧设置三个相机,并在传送带两侧设置对射传感器,当对射传感器判断到有紧固件经过时,通过三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;Step 1: three cameras are set above and on both sides of the conveyor belt, and a through-beam sensor is set on both sides of the conveyor belt. When the through-beam sensor determines that a fastener passes by, the three cameras take multi-angle photos of the front, left and right sides of the fastener;

步骤2,对拍摄的图像进行处理;Step 2, processing the captured image;

步骤3,在云端和终端分别部署缺陷检测模型;云端和终端采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;Step 3: Deploy defect detection models on the cloud and the terminal respectively. The cloud and the terminal use the same defect detection model, but use different network parameter scales. The terminal uses a model based on YOLO-nano to achieve faster detection, while the cloud uses a version based on YOLO-large to achieve more accurate detection.

步骤4,终端通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。In step 4, the terminal performs defect detection on the image of each fastener through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has a surface defect.

其中,N可根据实际的处理速度和网络速度决定,保证云端对下一个紧固件进行检测时,前一个紧固件已经检测完成。Among them, N can be determined according to the actual processing speed and network speed to ensure that when the cloud detects the next fastener, the previous fastener has been detected.

进一步地,步骤2所述的处理包括:Furthermore, the processing described in step 2 includes:

(1)降噪:采用双边滤波降噪实现去噪,同时保持边缘信息;(1) Noise reduction: Bilateral filtering is used to achieve denoising while maintaining edge information;

(2)增强:采用锐化滤波增强图像中的边缘和细节;(2) Enhancement: Use sharpening filtering to enhance the edges and details in the image;

(3)抠图:对图像中的紧固件部分进行截取,减小背景对缺陷识别的影响;抠图模型基于YOLO-nano实现。(3) Cutout: Cut out the fastener part in the image to reduce the impact of the background on defect identification. The cutout model is implemented based on YOLO-nano.

步骤3中的缺陷检测模型同时完成姿态识别和缺陷定位,其训练方式为:The defect detection model in step 3 simultaneously completes posture recognition and defect location, and its training method is:

(1)样本构建(1) Sample construction

在生产现场收集紧固件的真实图像数据,对于每种紧固件,根据缺陷类型,在不同的紧固件姿态下分别进行数据标注,缺陷类型包括:缺少孔、角度不正、孔有毛边、R角偏、毛边毛刺、剐蹭、多块;姿态包括正面、左侧面和右侧面三种,标注采用Label Studio工具,通过标记框的方式标记具体的缺陷位置;将样本分为训练集、验证集和测试集;Collect real image data of fasteners at the production site. For each fastener, perform data annotation in different fastener postures according to the defect type. The defect types include: missing holes, incorrect angles, burrs on holes, R angle deviation, burrs, scratches, and multiple pieces. The postures include front, left, and right sides. The annotation uses the Label Studio tool to mark the specific defect locations by marking boxes. The samples are divided into training sets, validation sets, and test sets.

(2)模型训练(2) Model training

模型的损失函数包括BCE loss、DFL loss和CIOU loss,其中,BCE loss作为分类损失,DFL loss和CIOU loss作为边框回归损失;将三种损失加权求和,形成总的损失函数,用于指导网络的训练;The loss functions of the model include BCE loss, DFL loss and CIOU loss, where BCE loss is used as classification loss, DFL loss and CIOU loss are used as bounding box regression losses. The three losses are weighted and summed to form a total loss function, which is used to guide network training.

在模型迭代过程中,设置平均精度mAP作为评估指标,当在验证集上的指标平稳后结束训练,评估指标最好的模型参数被选为最终的模型。During the model iteration process, the mean average precision (mAP) is set as the evaluation indicator. When the indicator on the validation set becomes stable, the training ends and the model parameters with the best evaluation indicator are selected as the final model.

一种紧固件表面缺陷视觉检测系统,包括传送带、补光系统、拍摄系统、终端缺陷识别系统以及云端缺陷识别系统;A fastener surface defect visual inspection system, comprising a conveyor belt, a fill light system, a shooting system, a terminal defect recognition system and a cloud defect recognition system;

所述补光系统设置在传送带旁边,用于对传送带上的紧固件进行补光;The fill light system is arranged beside the conveyor belt and is used to fill light for the fasteners on the conveyor belt;

所述拍摄系统包括设置在传送带的上方及左右两侧的三个相机,以及设置在传送带两侧的对射传感器;当对射传感器判断到有紧固件经过时,触发三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;The shooting system includes three cameras arranged above and on the left and right sides of the conveyor belt, and a shooting sensor arranged on both sides of the conveyor belt; when the shooting sensor determines that a fastener passes by, the three cameras are triggered to shoot the fastener from multiple angles, such as the front, left side, and right side;

所述终端缺陷识别系统和云端缺陷识别系统通过网络进行通信,终端缺陷识别系统和云端缺陷识别系统分别部署有缺陷检测模型;终端缺陷识别系统和云端缺陷识别系统采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;The terminal defect recognition system and the cloud defect recognition system communicate through a network, and the terminal defect recognition system and the cloud defect recognition system are respectively deployed with defect detection models; the terminal defect recognition system and the cloud defect recognition system use the same defect detection model, but use different network parameter scales, wherein the terminal uses a model based on YOLO-nano to achieve faster detection, and the cloud uses a version based on YOLO-large to achieve more accurate detection;

终端缺陷识别系统根据拍摄系统拍摄的图像,通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。The terminal defect recognition system performs defect detection on the image of each fastener based on the images taken by the shooting system through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, it notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has surface defects.

进一步地,所述补光系统、拍摄系统、终端缺陷识别系统集成为一体化装置,该装置将所需要的软件硬件实现一体化集成,方便生产现场部署。采用的数据采集与预处理、检测识别、后处理框架可以融合多种不同的缺陷检测模型,实现了兼容不同先进模型的能力,本装置主要包含以下3个模块:Furthermore, the fill light system, shooting system, and terminal defect recognition system are integrated into an integrated device, which integrates the required software and hardware to facilitate on-site deployment. The data acquisition and preprocessing, detection and recognition, and post-processing frameworks used can integrate a variety of different defect detection models and achieve the ability to be compatible with different advanced models. This device mainly includes the following three modules:

1.图像采集与处理:为实现直接在生产流水线上捕获可靠的紧固件产品图像,采集系统设计了环绕式补光系统弥补生产现场光照不足的影响;为捕获完整的产品图像,采用多角度采集的方式;此外,对于捕获的图像进行降噪、增强等预处理,提高图像的质量,为后续识别做准备。1. Image acquisition and processing: In order to capture reliable fastener product images directly on the production line, the acquisition system is designed with a surround fill light system to compensate for the lack of light at the production site. In order to capture complete product images, a multi-angle acquisition method is adopted. In addition, the captured images are pre-processed by noise reduction, enhancement, etc. to improve the image quality and prepare for subsequent recognition.

2.缺陷检测:缺陷检测采用云、端结合的方式,提供云和终端两种形式的服务;缺陷检测采用基于深度学习的缺陷检测模型,根据生产线上捕获图像的实际情况,采用姿态识别与缺陷定位融合的识别方法。2. Defect detection: Defect detection adopts a cloud-end combination approach to provide services in both cloud and terminal forms; defect detection adopts a defect detection model based on deep learning, and adopts a recognition method that integrates posture recognition and defect positioning according to the actual situation of the images captured on the production line.

3.检测后处理:在检测识别后要执行缺陷告警、自动分拣等动作,提升生产线的智能化水平。3. Post-detection processing: After detection and identification, defect alarms, automatic sorting and other actions should be performed to improve the intelligence level of the production line.

如图1所示,各模块均包含若干数据处理环节,不同环节数据处理流程的详细介绍如下:As shown in Figure 1, each module contains several data processing links. The detailed description of the data processing flow in different links is as follows:

101补光系统101 Fill Light System

本装置是直接用到紧固件生产线上的装置,生产线上光照条件比较差,传送带上油污比较多,由于沾上油污背景与工件颜色不容易区分,因此设计了环绕式的补光系统,降低现场光照不足对于捕获图像质量的影响。This device is directly used in fastener production lines. The lighting conditions on the production line are relatively poor, and there is a lot of oil on the conveyor belt. Since the oily background and the workpiece color are not easy to distinguish, a surround fill light system is designed to reduce the impact of insufficient on-site lighting on the quality of captured images.

102多角度采集102 Multi-angle acquisition

由于从生产线上送出的工件到传送带后姿态各不相同,从不同角度观察到的工件缺陷不同,要全面观察到工件正面、反面、侧面上的不同缺陷,就需要从不同角度同时捕获工件图像,以便在后续缺陷识别过程中同时识别定位不同姿态的缺陷问题。比如,一个带有90度拐角的工件,拐角的两个面上分别是一个孔和两个孔,这就导致了从不同视角看到的图像是不一样的,因此缺陷类型也不同。Since the workpieces sent from the production line have different postures after arriving at the conveyor belt, the defects of the workpieces observed from different angles are different. In order to fully observe the different defects on the front, back, and sides of the workpiece, it is necessary to capture the workpiece images from different angles at the same time, so as to simultaneously identify and locate defects in different postures during the subsequent defect identification process. For example, a workpiece with a 90-degree corner has one hole and two holes on the two faces of the corner, which results in different images seen from different perspectives, and therefore different defect types.

103图像预处理103 Image Preprocessing

生产现场条件复杂,即使做了补光处理,捕获的图像也会受到环境影响存在一些问题,在送入识别模型之前,需要对图像做预处理尽量降低噪声对后续识别的干扰。需要做的预处理包括但不限于如下:图像裁剪、缩放、滤波降噪、图像增强、样本增强、抠图等预处理。The production site conditions are complex. Even if fill light processing is done, the captured image will be affected by the environment and there will be some problems. Before sending it to the recognition model, the image needs to be preprocessed to minimize the interference of noise on subsequent recognition. The preprocessing that needs to be done includes but is not limited to the following: image cropping, scaling, filtering and noise reduction, image enhancement, sample enhancement, cutout and other preprocessing.

201云、端融合缺陷检测201 Cloud and terminal integrated defect detection

紧固件产品种类繁多,对应的缺陷类型也多种多样,比如如下的一些缺陷:缺少孔、角度不正、孔有毛边、R角偏、毛边毛刺、剐蹭。There are many types of fastener products, and the corresponding defect types are also varied, such as the following defects: missing holes, incorrect angles, burrs on holes, deviated R angles, burrs on edges, and scratches.

各种类型的缺陷识别难度较大,采用单一的模型很难识别所有的缺陷,因此采用云、端结合的缺陷检测框架,如图2所示。对于出现较多的缺陷类型采用轻量级的模型部署在终端一体机中做实时处理,本装置根据紧固件生产线环境,将图像采集、处理、检测识别、报警等功能集成为一体,设计了一种小型化集成终端装置,满足工业现场实时检测的需要。It is difficult to identify various types of defects. It is difficult to identify all defects using a single model. Therefore, a cloud-end combined defect detection framework is adopted, as shown in Figure 2. For defect types that appear frequently, a lightweight model is deployed in the terminal all-in-one for real-time processing. According to the fastener production line environment, this device integrates image acquisition, processing, detection and recognition, alarm and other functions into one, and designs a miniaturized integrated terminal device to meet the needs of real-time detection in industrial sites.

对于难以在终端实时识别的缺陷,将图像通过网络传送到云端,采用检测功能更强的模型识别,比如采用三维立体视觉检测模型检测角度不正缺陷,检测结果实时回传至终端做后续处理。云端与终端之间是相互独立又相互补充验证的关系,一方面云端的缺陷检测结果可以弥补终端由于处理能力不足导致缺陷检测不足;另一方面云端结果可以对终端的缺陷检测结果进行进一步确认,提升检测准确度。For defects that are difficult to identify in real time at the terminal, the image is transmitted to the cloud through the network, and a model with stronger detection function is used for recognition. For example, a three-dimensional stereoscopic vision detection model is used to detect defects with incorrect angles, and the detection results are sent back to the terminal in real time for subsequent processing. The cloud and the terminal are independent of each other and complement each other for verification. On the one hand, the defect detection results of the cloud can make up for the insufficient defect detection caused by the insufficient processing power of the terminal; on the other hand, the cloud results can further confirm the defect detection results of the terminal and improve the detection accuracy.

202缺陷视觉检测模型202 Defect Vision Detection Model

如图3所示,在缺陷检测环节可以兼容各种缺陷检测模型,在此根据产品部署场景和紧固件的特点提出基于姿态的多任务深度缺陷检测模型,如图3所示,由于不同姿态拍摄的工件表面图像缺陷不同,因此需要在明确工件姿态的情况下定位缺陷。As shown in Figure 3, various defect detection models can be compatible in the defect detection link. Here, a posture-based multi-task deep defect detection model is proposed according to the product deployment scenarios and the characteristics of fasteners. As shown in Figure 3, since the defects of the workpiece surface images taken with different postures are different, it is necessary to locate the defects with a clear workpiece posture.

为了让模型能够部署到终端实时完成缺陷检测任务,模型采用单阶段缺陷检测模型Yolo,该模型同时完成两个任务,即姿态识别和缺陷定位,目的是提高模型识别性能,同时完成区分姿态的缺陷定位任务。因此Yolo模型的目标则是两种目标的结合,两个目标互相约束。In order to deploy the model to the terminal to complete the defect detection task in real time, the model uses the single-stage defect detection model Yolo, which completes two tasks at the same time, namely posture recognition and defect location, in order to improve the model recognition performance and complete the defect location task of distinguishing postures. Therefore, the goal of the Yolo model is a combination of the two goals, and the two goals constrain each other.

301缺陷分级与告警301 Defect Classification and Warning

本装置的目的是在紧固件生产过程中及时发现有缺陷的工件,从而发现模具是否出现损坏等问题。因此,对于识别出的缺陷,采用报警的方式及时通知工作人员进行排查。紧固件的缺陷中,严重程度存在差异,需要对不同的缺陷做分级处理,比如缺孔这种严重缺陷导致该工件不能使用,则属于严重缺陷;刮痕、毛刺这种缺陷不影响工件使用,但影像产品的外观,则缺陷等级相对较低。因此本装置对紧固件的缺陷类型根据严重程度进行分级,结合缺陷识别结果,在进行缺陷告警时,根据不同的缺陷等级做出差异化的告警。The purpose of this device is to promptly detect defective workpieces during the fastener production process, so as to find out whether the mold is damaged and other problems. Therefore, for the identified defects, an alarm is used to promptly notify the staff to conduct an investigation. There are differences in the severity of fastener defects, and different defects need to be graded. For example, a serious defect such as a missing hole causes the workpiece to be unusable, which is a serious defect; scratches and burrs do not affect the use of the workpiece, but affect the appearance of the product, so the defect level is relatively low. Therefore, this device grades the defect types of fasteners according to their severity, and combines the defect identification results to make differentiated alarms according to different defect levels when issuing defect alarms.

进一步地,本装置还可实现有缺陷工件的自动分拣,这样不仅可以降低次品率,还能节省人力。缺陷分拣可在传送带上实现,基于缺陷识别的结果,给分拣装置发送指令,对存在缺陷的工件采用自动机械装置分拨。Furthermore, the device can also realize automatic sorting of defective workpieces, which can not only reduce the defective rate but also save manpower. Defect sorting can be realized on the conveyor belt. Based on the results of defect identification, instructions are sent to the sorting device, and defective workpieces are sorted by automatic mechanical devices.

Claims (6)

1.一种紧固件表面缺陷视觉检测方法,其特征在于,包括以下步骤:1. A method for visually detecting surface defects of fasteners, comprising the following steps: 步骤1,在传送带的上方及左右两侧设置三个相机,并在传送带两侧设置对射传感器,当对射传感器判断到有紧固件经过时,通过三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;Step 1: three cameras are set above and on both sides of the conveyor belt, and a through-beam sensor is set on both sides of the conveyor belt. When the through-beam sensor determines that a fastener passes by, the three cameras take multi-angle photos of the front, left and right sides of the fastener; 步骤2,对拍摄的图像进行处理;Step 2, processing the captured image; 步骤3,在云端和终端分别部署缺陷检测模型;云端和终端采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;Step 3: Deploy defect detection models on the cloud and the terminal respectively. The cloud and the terminal use the same defect detection model, but use different network parameter scales. The terminal uses a model based on YOLO-nano to achieve faster detection, while the cloud uses a version based on YOLO-large to achieve more accurate detection. 步骤4,终端通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。In step 4, the terminal performs defect detection on the image of each fastener through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has a surface defect. 2.根据权利要求1所述的一种紧固件表面缺陷视觉检测方法,其特征在于,步骤2所述的处理包括:2. A method for visually inspecting surface defects of fasteners according to claim 1, characterized in that the processing in step 2 comprises: (1)降噪:采用双边滤波降噪实现去噪,同时保持边缘信息;(1) Noise reduction: Bilateral filtering is used to achieve denoising while maintaining edge information; (2)增强:采用锐化滤波增强图像中的边缘和细节;(2) Enhancement: Use sharpening filtering to enhance the edges and details in the image; (3)抠图:对图像中的紧固件部分进行截取,减小背景对缺陷识别的影响;抠图模型基于YOLO-nano实现。(3) Cutout: Cut out the fastener part in the image to reduce the impact of the background on defect identification. The cutout model is implemented based on YOLO-nano. 3.根据权利要求1所述的一种紧固件表面缺陷视觉检测方法,其特征在于,步骤3中的缺陷检测模型同时完成姿态识别和缺陷定位,其训练方式为:3. A method for visually inspecting surface defects of fasteners according to claim 1, characterized in that the defect detection model in step 3 simultaneously completes posture recognition and defect location, and its training method is: (1)样本构建(1) Sample construction 在生产现场收集紧固件的真实图像数据,对于每种紧固件,根据缺陷类型,在不同的紧固件姿态下分别进行数据标注,缺陷类型包括:缺少孔、角度不正、孔有毛边、R角偏、毛边毛刺、剐蹭、多块;姿态包括正面、左侧面和右侧面三种,标注采用LabelStudio工具,通过标记框的方式标记具体的缺陷位置;将样本分为训练集、验证集和测试集;Collect real image data of fasteners at the production site. For each fastener, perform data annotation in different fastener postures according to the defect type. The defect types include: missing holes, incorrect angles, burrs on holes, R angle deviation, burrs, scratches, and multiple pieces. The postures include front, left, and right sides. The LabelStudio tool is used for annotation to mark the specific defect locations by marking boxes. The samples are divided into training, validation, and test sets. (2)模型训练(2) Model training 模型的损失函数包括BCEloss、DFLloss和CIOUloss,其中,BCE loss作为分类损失,DFLloss和CIOUloss作为边框回归损失;将三种损失加权求和,形成总的损失函数,用于指导网络的训练;The loss functions of the model include BCEloss, DFLloss and CIOUloss, where BCE loss is used as classification loss, DFLloss and CIOUloss are used as bounding box regression losses. The three losses are weighted and summed to form a total loss function, which is used to guide network training. 在模型迭代过程中,设置平均精度mAP作为评估指标,当在验证集上的指标平稳后结束训练,评估指标最好的模型参数被选为最终的模型。During the model iteration process, the mean average precision (mAP) is set as the evaluation indicator. When the indicator on the validation set becomes stable, the training ends and the model parameters with the best evaluation indicator are selected as the final model. 4.一种紧固件表面缺陷视觉检测系统,其特征在于,包括传送带、补光系统、拍摄系统、终端缺陷识别系统以及云端缺陷识别系统;4. A fastener surface defect visual inspection system, characterized by comprising a conveyor belt, a fill light system, a shooting system, a terminal defect recognition system and a cloud defect recognition system; 所述补光系统设置在传送带旁边,用于对传送带上的紧固件进行补光;The fill light system is arranged beside the conveyor belt and is used to fill light for the fasteners on the conveyor belt; 所述拍摄系统包括设置在传送带的上方及左右两侧的三个相机,以及设置在传送带两侧的对射传感器;当对射传感器判断到有紧固件经过时,触发三个相机对紧固件进行正面、左侧面、右侧面的多角度拍摄;The shooting system includes three cameras arranged above and on the left and right sides of the conveyor belt, and a shooting sensor arranged on both sides of the conveyor belt; when the shooting sensor determines that a fastener passes by, the three cameras are triggered to shoot the fastener from multiple angles, such as the front, left side, and right side; 所述终端缺陷识别系统和云端缺陷识别系统通过网络进行通信,终端缺陷识别系统和云端缺陷识别系统分别部署有缺陷检测模型;终端缺陷识别系统和云端缺陷识别系统采用相同的缺陷检测模型,但是采用不同的网络参数规模,其中,终端采用基于YOLO-nano的模型以实现速度更快的检测,云端则采用基于YOLO-large的版本以实现更准确的检测;The terminal defect recognition system and the cloud defect recognition system communicate through a network, and the terminal defect recognition system and the cloud defect recognition system are respectively deployed with defect detection models; the terminal defect recognition system and the cloud defect recognition system use the same defect detection model, but use different network parameter scales, wherein the terminal uses a model based on YOLO-nano to achieve faster detection, and the cloud uses a version based on YOLO-large to achieve more accurate detection; 终端缺陷识别系统根据拍摄系统拍摄的图像,通过缺陷检测模型对每一个紧固件的图像进行缺陷检测,识别到缺陷类型后进行报警;此外,终端每隔N个紧固件,抽取一个紧固件的图像发送给云端,云端通过缺陷检测模型进行缺陷检测,识别到缺陷类型后,通知终端进行报警;当终端发出报警后,则判定相应的紧固件存在表面缺陷。The terminal defect recognition system performs defect detection on the image of each fastener based on the images taken by the shooting system through the defect detection model, and issues an alarm after identifying the defect type. In addition, the terminal extracts an image of one fastener for every N fasteners and sends it to the cloud. The cloud performs defect detection through the defect detection model, and after identifying the defect type, it notifies the terminal to issue an alarm. When the terminal issues an alarm, it is determined that the corresponding fastener has surface defects. 5.根据权利要求4所述的一种紧固件表面缺陷视觉检测系统,其特征在于,所述拍摄系统拍摄图像后,还对图像进行处理,包括:5. A fastener surface defect visual inspection system according to claim 4, characterized in that after the shooting system shoots the image, it also processes the image, including: (1)降噪:采用双边滤波降噪实现去噪,同时保持边缘信息;(1) Noise reduction: Bilateral filtering is used to achieve denoising while maintaining edge information; (2)增强:采用锐化滤波增强图像中的边缘和细节;(2) Enhancement: Use sharpening filtering to enhance the edges and details in the image; (3)抠图:对图像中的紧固件部分进行截取,减小背景对缺陷识别的影响;抠图模型基于YOLO-nano实现。(3) Cutout: Cut out the fastener part in the image to reduce the impact of the background on defect identification. The cutout model is implemented based on YOLO-nano. 6.根据权利要求4所述的一种紧固件表面缺陷视觉检测系统,其特征在于,所述补光系统、拍摄系统、终端缺陷识别系统集成为一体化装置。6. A fastener surface defect visual inspection system according to claim 4, characterized in that the fill light system, the shooting system, and the terminal defect recognition system are integrated into an integrated device.
CN202410656014.2A 2024-05-24 2024-05-24 A method and system for visually detecting surface defects of fasteners Pending CN118566235A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410656014.2A CN118566235A (en) 2024-05-24 2024-05-24 A method and system for visually detecting surface defects of fasteners

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410656014.2A CN118566235A (en) 2024-05-24 2024-05-24 A method and system for visually detecting surface defects of fasteners

Publications (1)

Publication Number Publication Date
CN118566235A true CN118566235A (en) 2024-08-30

Family

ID=92478954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410656014.2A Pending CN118566235A (en) 2024-05-24 2024-05-24 A method and system for visually detecting surface defects of fasteners

Country Status (1)

Country Link
CN (1) CN118566235A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119178799A (en) * 2024-09-05 2024-12-24 南昌航空大学 Aircraft skin rivet hole Zhou Quexian magnetic detection system and method based on machine vision
CN119338827A (en) * 2024-12-20 2025-01-21 深圳亚太航空技术股份有限公司 Surface detection method and system for precision fasteners

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119178799A (en) * 2024-09-05 2024-12-24 南昌航空大学 Aircraft skin rivet hole Zhou Quexian magnetic detection system and method based on machine vision
CN119338827A (en) * 2024-12-20 2025-01-21 深圳亚太航空技术股份有限公司 Surface detection method and system for precision fasteners
CN119338827B (en) * 2024-12-20 2025-03-21 深圳亚太航空技术股份有限公司 Surface detection method and system for precision fasteners

Similar Documents

Publication Publication Date Title
CN110992317B (en) A PCB board defect detection method based on semantic segmentation
CN118566235A (en) A method and system for visually detecting surface defects of fasteners
CN112053318A (en) Real-time automatic detection and classification device for two-dimensional PCB defects based on deep learning
CN109239102A (en) A kind of flexible circuit board open defect detection method based on CNN
CN107886500A (en) A kind of production monitoring method and system based on machine vision and machine learning
CN113592813B (en) New energy battery welding defect detection method based on deep learning semantic segmentation
CN105973148A (en) Pen point appearance size standardization detection system based on machine vision
CN109724984A (en) A kind of defects detection identification device and method based on deep learning algorithm
CN115170497B (en) PCBA on-line measuring platform based on AI visual detection technique
CN106226325A (en) A kind of seat surface defect detecting system based on machine vision and method thereof
CN107895362A (en) A kind of machine vision method of miniature binding post quality testing
CN117314829A (en) Industrial part quality inspection method and system based on computer vision
CN117409005B (en) Image-based defective product detection system and method for receiving board
US20240169510A1 (en) Surface defect detection model training method, and surface defect detection method and system
CN116777836A (en) A multimodal data-driven quality inspection method for injection molding process products
CN113128555A (en) Method for detecting abnormality of train brake pad part
CN118274215A (en) Control method and system of pipeline damage detection robot
CN112465784A (en) Method for detecting appearance abnormity of subway clamp
CN120213946A (en) High-precision defect detection method for complex workpieces based on dynamic light source and multi-dimensional detection
Wang et al. Visual defect detection for substation equipment based on joint inspection data of camera and robot
CN117689646A (en) A high-precision defect detection method, system and medium for fusion of positive and negative samples
KR102883296B1 (en) Apparatus and method for inspecting tool status and cut products in plastic working using artificial intelligence
CN119574582B (en) SMT surface defect visual inspection device based on AI image recognition
CN110245582A (en) A method for identifying single-class components in bitmaps based on deep learning
CN119850561A (en) Method, device, storage medium and system for detecting quality of inner frame paper of cigarette packet of packing machine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination