WO2022222120A1 - Bearing three-dimensional defect detection method and system - Google Patents

Bearing three-dimensional defect detection method and system Download PDF

Info

Publication number
WO2022222120A1
WO2022222120A1 PCT/CN2021/089130 CN2021089130W WO2022222120A1 WO 2022222120 A1 WO2022222120 A1 WO 2022222120A1 CN 2021089130 W CN2021089130 W CN 2021089130W WO 2022222120 A1 WO2022222120 A1 WO 2022222120A1
Authority
WO
WIPO (PCT)
Prior art keywords
bearing
image
defect detection
module
images
Prior art date
Application number
PCT/CN2021/089130
Other languages
French (fr)
Chinese (zh)
Inventor
徐刚
赵明
肖江剑
许根
王菊
Original Assignee
中国科学院宁波材料技术与工程研究所
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 中国科学院宁波材料技术与工程研究所 filed Critical 中国科学院宁波材料技术与工程研究所
Priority to PCT/CN2021/089130 priority Critical patent/WO2022222120A1/en
Publication of WO2022222120A1 publication Critical patent/WO2022222120A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Definitions

  • the application belongs to the technical field of machine vision defect detection, and in particular relates to a bearing three-dimensional defect detection method and system.
  • Bearings are important basic components of various mechanical equipment, and their accuracy, performance, life and reliability play a decisive role in the accuracy, performance, life and reliability of the host.
  • bearings are high-precision products, which not only require comprehensive support from mathematics, physics and many other disciplines, but also require material science, heat treatment technology, precision machining and measurement technology, numerical control technology, effective numerical methods and powerful computers. Technology and many other disciplines serve it, so the bearing is a product that represents the national scientific and technological strength.
  • the appearance defect detection usually has defects that cannot be extracted from a single direction, especially scratches, pits, burrs and other three-dimensional features. It is difficult to distinguish from one direction, resulting in the existing 2D defects.
  • Bearing inspection equipment or systems cannot fully detect the three-dimensional defects of bearings; and most of the existing 3D cameras are used for this type of defects, but because 3D cameras rely on imports and are expensive, they cannot meet the actual application needs of enterprises.
  • the main purpose of the present application is to provide a bearing three-dimensional defect detection method and system, so as to overcome the problems of the prior art bearing surface three-dimensional defect detection technology, the existing 2D camera solution has low detection accuracy and efficiency, and the 3D sensor solution is expensive.
  • the technical solution adopted in this application includes: a bearing three-dimensional defect detection method, the method includes:
  • the bearing to be detected is fixed on the rotating platform, and under the corresponding combined light source, the rotating platform rotates according to the set rotation step length, and the bearing surface is photographed at N angles while rotating to obtain N pieces of the bearing surface to be detected.
  • Two-dimensional bearing image where N is a natural number greater than or equal to 3;
  • S300 Input the 1/N preprocessed images into a pre-trained N-channel deep learning model to obtain a defect detection result.
  • the 2D image acquisition module selects different combined light sources, and uses a rotating platform to set different rotation step sizes, and the combined light source adjusts the bearings according to the rotation step sizes.
  • the methods used in the preprocessing are one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
  • the method further includes:
  • the method further includes:
  • the 10 includes:
  • step S11 label the 1/N preprocessed images obtained in step S200 as training images
  • a multi-attention mechanism is introduced to enhance the weight of the defective parts of the bearing, and the attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel adaptive selection mechanism;
  • the high-level feature difference image is input into the detection network to detect the defect target, and finally the improved YOLO detection model is output to step S300.
  • the S400 includes:
  • the embodiment of the present application also provides a 2D image acquisition module, which includes:
  • Rotating platform used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length
  • the 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
  • the embodiment of the present application also provides a bearing three-dimensional defect detection system, which includes:
  • the 2D image acquisition module is used to fix the bearing to be detected on the rotating platform. Under the corresponding combined light source, the rotating platform rotates according to the set rotation step, and the bearing surface is photographed at N angles while rotating to obtain N two-dimensional bearing images to be detected, where N is a natural number greater than or equal to 3;
  • an image preprocessing module used for preprocessing the N bearing images to be detected to obtain 1/N preprocessing images for defect detection
  • the image defect detection module is used for inputting the 1/N preprocessed images into a pre-trained N-channel target detection model to obtain defect detection results.
  • the 2D image acquisition module includes:
  • Rotating platform used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length
  • the 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
  • the combined light source adopts a set of adjustable coaxial light sources and ring light sources.
  • the method used by the image preprocessing module is one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
  • the system further includes: a deep learning model optimization module for storing the defect detection results and 1/N preprocessed images, and according to the stored defect detection results and 1/N images Preprocess the image, optimize and modify the deep learning model, and the optimization and modification of the deep learning model include:
  • the stored defect detection results and 1/N pre-processed images are handed over to the re-inspection workers for re-inspection, and the detection result pictures with detection errors are eliminated;
  • system further includes: a deep learning model training module connected between the image preprocessing module and the image defect detection module, and the deep learning model training module includes:
  • the multi-channel image loading module is connected to the image preprocessing module, and is used for loading the 1/N preprocessed images obtained by the image preprocessing module into the N-channel feature extraction network, so as to extract high-level image feature information;
  • the image high-level feature information extraction module is connected with the image loading module, and is used to extract the high-level feature information of the preprocessed image to obtain the high-level feature image of the bearing to be tested;
  • the multi-attention mechanism module is connected to the image high-level feature information extraction module and is used to enhance the weight of the defective parts of the bearing in the process of model training.
  • the attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel. Adaptive selection mechanism;
  • the high-level feature image difference module is connected to the multi-attention mechanism module, and is used to differentiate the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature difference image;
  • the defect detection module is connected to the high-level feature image difference module, and is used for inputting the high-level feature difference image to the detection network to detect the defect target, and finally output the improved YOLO detection model to the image defect detection module.
  • the beneficial effect of the present application is at least as follows: the present application uses the 2D camera and the rotating platform to cooperate, and uses the multi-view multi-channel multi-attention mechanism module to improve the detection algorithm of the YOLO network structure, replacing the current expensive detection algorithm. 3D camera detection method, improve detection accuracy and detection efficiency, and reduce system cost.
  • Fig. 1 is the overall flow schematic diagram of the detection method in one embodiment of the present application.
  • FIG. 2 is a structural block diagram of a detection system in an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a 2D image acquisition module in an embodiment of the present application.
  • FIG. 4 is an image acquired by setting a 90° step size on a rotating platform in an embodiment of the present application
  • FIG. 5 is an image of the detection result of three-dimensional defects on the bearing surface according to an embodiment of the present application.
  • a bearing three-dimensional defect detection method and system disclosed in the embodiments of the present application relate to the technical field of industrial inspection, and in particular to a multi-view three-dimensional appearance defect detection method and system for a small bearing based on a 2D camera and a rotating platform. Including but not limited to pits, scratches, burrs, etc.
  • a bearing three-dimensional defect detection method disclosed in the embodiment of the present application includes the following steps:
  • the bearing to be detected is fixed on the rotating platform, and under the corresponding combined light source, the rotating platform rotates according to the set rotation step length, and the bearing surface is photographed at N angles while rotating to obtain N pieces of the bearing surface to be detected.
  • the bearing to be detected is fixed on the center of the rotating platform, and the rotating platform can drive the bearing to rotate 360 degrees in any step length.
  • the rotation step length of the rotating platform 360°/N, where N is a natural number greater than or equal to 3.
  • the combined light source is used to illuminate the bearing on the rotating platform.
  • the combined light source adopts a set of adjustable coaxial light sources and ring light sources, wherein the coaxial light source is located above the rotating platform and is connected to the rotating platform and the bearing. All are arranged coaxially, and the annular optical axis is located above the side of the rotating platform, and is arranged at a certain inclination angle with the top plane of the rotating platform.
  • different combined light sources are selected for bearings of different specifications.
  • the combined light source is controlled by a light source controller (not shown in the figure), and the combined light source may be a combination of two or more light sources among parallel light, coaxial light, and ring light.
  • the rotating platform rotates according to the set step length. While rotating, the bearing surface on the rotating platform of the light source is combined to illuminate, and the bearing is photographed according to the rotation step set by the rotating platform to complete the N angles of the bearing surface under the light source. Obtain N two-dimensional bearing images to be detected, if N is 4, the rotation step of the rotating platform is 90°, and the rotating platform rotates one circle to achieve 4 angles of the bearing surface, as shown in Figure 4, as Turn the platform to set the acquired image in 90° steps. In this embodiment, all 2D cameras are used to photograph the bearings, and the cost is lower than that of 3D cameras.
  • the preprocessing method of the bearing image in the present application may be one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
  • S300 Input 1/N preprocessed images into a pre-trained deep learning model of N channels to obtain a defect detection result.
  • the training process of the deep learning model specifically includes:
  • step S11 label the 1/N preprocessed images obtained in step S200 as training images
  • the attention mechanism includes a spatial attention mechanism, a channel attention mechanism, and a convolution kernel adaptive selection mechanism.
  • the spatial attention mechanism and the channel attention mechanism The force mechanism sequentially infers the attention map along two independent dimensions (channel and space), and then multiplies the attention map with the input feature map for adaptive feature optimization.
  • the convolution kernel adaptive selection mechanism can be adaptively adjusted according to the input Its receptive field size captures target objects with different scales;
  • the high-level feature difference image is input into the detection network to detect the defect target, and finally the improved YOLO detection model is output to step S300.
  • FIG. 5 it is an image of the detection result of three-dimensional defects on the bearing surface in an embodiment of the present application.
  • optimizing and modifying the deep learning model specifically includes:
  • an aspect of the embodiments of the present application further provides a 2D image acquisition module, the module includes:
  • Rotating platform used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length
  • the 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
  • the combined light source adopts a set of adjustable coaxial light sources and ring light sources.
  • the coaxial light source is located above the rotating platform, and is coaxially arranged with the rotating platform and the bearing.
  • the annular optical axis is located above the side of the rotating platform, and is arranged at a certain inclination angle to the top plane of the rotating platform.
  • the rotating platform is mounted on a fixed bracket, and the top platform thereof is horizontally arranged.
  • FIG. 2 and FIG. 3 corresponding to the above-mentioned method for detecting three-dimensional defects of bearings, another aspect of the embodiments of the present application further provides a three-dimensional defect detection system for bearings, which includes:
  • an image preprocessing module used for preprocessing the N bearing images to be detected to obtain 1/N preprocessing images for defect detection
  • the image defect detection module is used for inputting the 1/N preprocessed images into a pre-trained N-channel target detection model to obtain defect detection results.
  • the 2D image acquisition module is used to fix the bearing to be detected on the rotating platform. Under the corresponding combined light source, the rotating platform rotates according to the set rotation step, and the bearing surface is rotated while rotating. Shooting at N angles is performed to obtain N two-dimensional bearing images to be detected, where N is a natural number greater than or equal to 3.
  • the 2D image acquisition module includes a rotating platform 10 mounted on a fixed bracket 20, a combined light source, a 2D camera and a lens 30, wherein the rotating platform 10 may specifically be a rotating platform driven by a stepping motor,
  • the top platform of the rotating platform 10 is set horizontally, which can drive the bearing (not shown) to rotate 360 degrees in any step length.
  • the bearing to be detected is fixed on the central bearing fixing base 11 on the rotating platform 10 .
  • the rotation step length of the rotating platform 360°/N, where N is a natural number greater than or equal to 3.
  • the combined light source is used to illuminate the bearing on the rotating platform 10 .
  • the combined light source adopts a set of adjustable coaxial light sources 40 and/or ring light sources 50 , wherein the coaxial light source 40 is located above the rotating platform 10 , and are arranged coaxially with the rotating platform 10 and the bearing.
  • the annular optical axis 50 is located above the side of the rotating platform 10 and is arranged at a certain inclination angle with the top plane of the rotating platform 10 .
  • different combined light sources are selected for bearings of different specifications.
  • the combined light source is controlled by a light source controller (not shown in the figure), and the combined light source may be a combination of two or more light sources among parallel light, coaxial light, and ring light.
  • the rotating platform rotates according to the set step length. While rotating, the bearing surface on the rotating platform of the light source is combined to illuminate, and the bearing is photographed according to the rotation step set by the rotating platform to complete the N angles of the bearing surface under the light source. Obtain N two-dimensional bearing images to be detected, if N is 4, the rotation step of the rotating platform is 90°, and the rotating platform rotates one circle to achieve 4 angles of the bearing surface, as shown in Figure 4, as Turn the platform to set the acquired image in 90° steps. In this embodiment, all 2D cameras are used to photograph the bearings, and the cost is lower than that of 3D cameras.
  • the image preprocessing module is configured to preprocess the N bearing images to be inspected to obtain 1/N preprocessed images for defect inspection.
  • the preprocessing method used by the image preprocessing module is one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
  • the image defect detection module is configured to input the 1/N pre-processed images into a pre-trained N-channel deep learning model to obtain defect detection results.
  • the bearing three-dimensional defect detection system further includes a deep learning model training module connected between the image preprocessing module and the image defect detection module, and the deep learning model training module includes:
  • the multi-channel image loading module is connected to the image preprocessing module, and is used for loading the 1/N preprocessed images obtained by the image preprocessing module into the N-channel feature extraction network, so as to extract high-level image feature information;
  • the image high-level feature information extraction module is connected with the image loading module, and is used to extract the high-level feature information of the preprocessed image to obtain the high-level feature image of the bearing to be tested;
  • the multi-attention mechanism module is connected to the image high-level feature information extraction module and is used to enhance the weight of the defective parts of the bearing in the process of model training.
  • the attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel. Adaptive selection mechanism;
  • the feature image difference module is connected with the multi-attention mechanism module, and is used to differentiate the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature difference image;
  • the defect detection module is connected with the feature image difference module, and is used for inputting the high-level feature difference image to the detection network to detect the defect target, and finally output the improved YOLO detection model to the image defect detection module.
  • the deep learning model optimization module is used to store the defect detection results and 1/N preprocessed images, and optimize and modify the deep learning model according to the stored defect detection results and 1/N preprocessed images.
  • the bearing three-dimensional defect detection method and system disclosed in the present application can solve the technical problems of high price, low detection accuracy and poor robustness of the system in the surface three-dimensional defect detection technology of existing bearing manufacturers;
  • the technical solution of the present application can achieve higher detection accuracy and robustness under the premise of lower system costs acceptable to enterprises.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The present application discloses a bearing three-dimensional defect detection method and system. The method comprises: under the action of a combined light source and a rotating platform, acquiring N two-dimensional bearing images to be detected; preprocessing said N bearing image to obtain 1/N preprocessed images for defect detection; and inputting said 1/N preprocessed images into a pre-trained N-channel deep learning model to obtain a defect detection result. According to the present application, by means of the cooperation of a 2D camera and the rotating platform, and by replacing a current expensive 3D camera detection method with a detection algorithm for a YOLO network structure improved by a multi-view, multi-channel and multi-attention mechanism, detection accuracy and detection efficiency are improved, and system costs are reduced.

Description

一种轴承三维缺陷检测方法及系统A kind of bearing three-dimensional defect detection method and system 技术领域technical field
本申请属于机器视觉缺陷检测技术领域,具体涉及一种轴承三维缺陷检测方法及系统。The application belongs to the technical field of machine vision defect detection, and in particular relates to a bearing three-dimensional defect detection method and system.
背景技术Background technique
轴承是各类机械装备的重要基础零部件,它的精度、性能、寿命和可靠性对主机的精度、性能、寿命和可靠性起着决定性的作用。在机械产品中,轴承属于高精度产品,不仅需要数学、物理等诸多学科理论的综合支持,而且需要材料科学、热处理技术、精密加工和测量技术、数控技术和有效的数值方法及功能强大的计算机技术等诸多学科为之服务,因此轴承又是一个代表国家科技实力的产品。Bearings are important basic components of various mechanical equipment, and their accuracy, performance, life and reliability play a decisive role in the accuracy, performance, life and reliability of the host. Among mechanical products, bearings are high-precision products, which not only require comprehensive support from mathematics, physics and many other disciplines, but also require material science, heat treatment technology, precision machining and measurement technology, numerical control technology, effective numerical methods and powerful computers. Technology and many other disciplines serve it, so the bearing is a product that represents the national scientific and technological strength.
特别是小型轴承,其外观缺陷检测通常存在从单一方向打光时候无法提取出特别是划痕、凹坑、毛刺等具有三维特征的缺陷,很难从一个方向进行判别,从而导致现有的2D轴承检测设备或系统无法完全检测出轴承的三维缺陷;进而现有针对该类型缺陷,大多采用3D相机,但因3D相机依赖进口及价格昂贵无法满足企业的实际应用需求。Especially for small bearings, the appearance defect detection usually has defects that cannot be extracted from a single direction, especially scratches, pits, burrs and other three-dimensional features. It is difficult to distinguish from one direction, resulting in the existing 2D defects. Bearing inspection equipment or systems cannot fully detect the three-dimensional defects of bearings; and most of the existing 3D cameras are used for this type of defects, but because 3D cameras rely on imports and are expensive, they cannot meet the actual application needs of enterprises.
因此,如何提供一种在成本低廉的前提下,可以解决现有轴承生产企业面临的三维缺陷检测技术中存在的问题的轴承检测方案,是一个急需解决的问题。Therefore, how to provide a bearing detection scheme that can solve the problems existing in the three-dimensional defect detection technology faced by the existing bearing manufacturers under the premise of low cost is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本申请的主要目的在于提供一种轴承三维缺陷检测方法及系统,从而克服现有技术轴承的表面三维缺陷检测技术,存在的2D相机方案检测精度与效率低,3D传感器方案价格又昂贵等问题。The main purpose of the present application is to provide a bearing three-dimensional defect detection method and system, so as to overcome the problems of the prior art bearing surface three-dimensional defect detection technology, the existing 2D camera solution has low detection accuracy and efficiency, and the 3D sensor solution is expensive.
为实现前述发明目的,本申请采用的技术方案包括:一种轴承三维缺陷检测方法,所述方法包括:In order to achieve the aforementioned purpose of the invention, the technical solution adopted in this application includes: a bearing three-dimensional defect detection method, the method includes:
S100,将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数;S100, the bearing to be detected is fixed on the rotating platform, and under the corresponding combined light source, the rotating platform rotates according to the set rotation step length, and the bearing surface is photographed at N angles while rotating to obtain N pieces of the bearing surface to be detected. Two-dimensional bearing image, where N is a natural number greater than or equal to 3;
S200,对所述N张待检测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像;S200, preprocessing the N bearing images to be detected to obtain 1/N preprocessing images for defect detection;
S300,将所述1/N张预处理图像输入到预先训练的N通道的深度学习模型中,得到缺陷检测结果。S300: Input the 1/N preprocessed images into a pre-trained N-channel deep learning model to obtain a defect detection result.
在一优选实施例中,S100中,对于不同规格的轴承,所述2D图像采集模块选用不同的组合光源,并使用转动平台设置不同转动步长,所述组合光源根据所述转动步长对轴承表面进行在光源下的N个角度的拍摄,所述转动步长=360°/N。In a preferred embodiment, in S100, for bearings of different specifications, the 2D image acquisition module selects different combined light sources, and uses a rotating platform to set different rotation step sizes, and the combined light source adjusts the bearings according to the rotation step sizes. The surface is photographed at N angles under the light source, and the rotation step = 360°/N.
在一优选实施例中,S200中,所述预处理所使用的方法为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。In a preferred embodiment, in S200, the methods used in the preprocessing are one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
在一优选实施例中,所述方法还包括:In a preferred embodiment, the method further includes:
S400,存储所述缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型。S400, store the defect detection result and 1/N preprocessed images, and optimize and modify the deep learning model according to the stored defect detection results and 1/N preprocessed images.
在一优选实施例中,所述方法还包括:In a preferred embodiment, the method further includes:
S10,训练YOLO多通道神经网络,得到N通道的检测模型。S10, train a YOLO multi-channel neural network to obtain an N-channel detection model.
在一优选实施例中,所述10包括:In a preferred embodiment, the 10 includes:
S11,将步骤S200得到的所述1/N张预处理图像进行标注,作为训练图像;S11, label the 1/N preprocessed images obtained in step S200 as training images;
S12,将所述训练图像输入多通道特征提取网络,使用特征提取网络进行图像高层特征信息提取,获得待测轴承的高层特征图像;S12, inputting the training image into a multi-channel feature extraction network, and using the feature extraction network to extract high-level feature information of the image to obtain a high-level feature image of the bearing to be tested;
S13,引入多注意力机制,实现对轴承的缺陷部位权重增强,所述注意力机制包括空间注意力机制、通道注意力机制和卷积核自适应选择机制;S13, a multi-attention mechanism is introduced to enhance the weight of the defective parts of the bearing, and the attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel adaptive selection mechanism;
S14,将所述待测轴承的高层特征图像与标准轴承同层的特征图像做差分处理,得到待测轴承的高层特征差分图像;S14, performing differential processing between the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature differential image of the bearing to be tested;
S15,将所述高层特征差分图像输入检测网络,进行缺陷目标的检测,最后输出改进的YOLO检测模型给步骤S300。S15, the high-level feature difference image is input into the detection network to detect the defect target, and finally the improved YOLO detection model is output to step S300.
在一优选实施例中,所述S400包括:In a preferred embodiment, the S400 includes:
S16,将存储的所述缺陷检测结果和1/N张预处理图像,交由复检工人进行复检,剔除检测错误的检测结果图;S16, the stored defect detection results and 1/N preprocessed images are handed over to the re-inspection workers for re-inspection, and the detection result maps with detection errors are eliminated;
S17,将缺陷检测结果正确的图像和对应的标注数据输入改进的YOLO检测网络中重新训 练,优化与修改深度学习模型参数,提高缺陷目标的精度,极大减少人工标注样本数量。S17, input the image with the correct defect detection result and the corresponding annotation data into the improved YOLO detection network for retraining, optimize and modify the parameters of the deep learning model, improve the accuracy of the defect target, and greatly reduce the number of manually annotated samples.
本申请实施例还提供了一种2D图像采集模块,其包括:The embodiment of the present application also provides a 2D image acquisition module, which includes:
转动平台,用于固定待检测的轴承及用于轴承的360度任意步长的旋转;Rotating platform, used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length;
组合光源,用于提供图像采集所需的光源;Combined light source, used to provide the light source required for image acquisition;
2D相机及镜头,用于在转动平台带动轴承转动的同时及组合光源照射的同时,对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像。The 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
本申请实施例还提供了一种轴承三维缺陷检测系统,其包括:The embodiment of the present application also provides a bearing three-dimensional defect detection system, which includes:
2D图像采集模块,用于将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数;The 2D image acquisition module is used to fix the bearing to be detected on the rotating platform. Under the corresponding combined light source, the rotating platform rotates according to the set rotation step, and the bearing surface is photographed at N angles while rotating to obtain N two-dimensional bearing images to be detected, where N is a natural number greater than or equal to 3;
图像预处理模块,用于对所述N张待检测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像;an image preprocessing module, used for preprocessing the N bearing images to be detected to obtain 1/N preprocessing images for defect detection;
图像缺陷检测模块,用于将所述1/N张预处理图像输入到预先训练的N通道的目标检测模型中,得到缺陷检测结果。The image defect detection module is used for inputting the 1/N preprocessed images into a pre-trained N-channel target detection model to obtain defect detection results.
在一优选实施例中,所述2D图像采集模块包括:In a preferred embodiment, the 2D image acquisition module includes:
转动平台,用于固定待检测的轴承及用于轴承的360度任意步长的旋转;Rotating platform, used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length;
组合光源,用于提供图像采集所需的光源;Combined light source, used to provide the light source required for image acquisition;
2D相机及镜头,用于在转动平台带动轴承转动的同时及组合光源照射的同时,对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像。The 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
在一优选实施例中,所述组合光源采用一组可调节的同轴光源和环形光源。In a preferred embodiment, the combined light source adopts a set of adjustable coaxial light sources and ring light sources.
在一优选实施例中,所述图像预处理模块所使用的方法为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。In a preferred embodiment, the method used by the image preprocessing module is one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
在一优选实施例中,所述系统还包括:深度学习模型优化模块,用于存储所述缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型,所述优化与修改深度学习模型包括:In a preferred embodiment, the system further includes: a deep learning model optimization module for storing the defect detection results and 1/N preprocessed images, and according to the stored defect detection results and 1/N images Preprocess the image, optimize and modify the deep learning model, and the optimization and modification of the deep learning model include:
将存储的所述缺陷检测结果和1/N张预处理图像,交由复检工人进行复检,剔除检测错误的检测结果图;The stored defect detection results and 1/N pre-processed images are handed over to the re-inspection workers for re-inspection, and the detection result pictures with detection errors are eliminated;
将缺陷检测结果正确的图像和对应的标注数据输入改进的YOLO检测网络中重新训练, 优化与修改深度学习模型参数,提高缺陷目标的精度,极大减少人工标注样本数量。Input the images with correct defect detection results and the corresponding labeled data into the improved YOLO detection network for retraining, optimize and modify the parameters of the deep learning model, improve the accuracy of the defect target, and greatly reduce the number of manually labeled samples.
在一优选实施例中,所述系统还包括:连接于图像预处理模块与图像缺陷检测模块之间的深度学习模型训练模块,所述深度学习模型训练模块包括:In a preferred embodiment, the system further includes: a deep learning model training module connected between the image preprocessing module and the image defect detection module, and the deep learning model training module includes:
多通道图像载入模块,与图像预处理模块相连,用于将图像预处理模块得到的所述1/N张预处理图像载入N通道特征提取网络,以便进行图像高层特征信息提取;The multi-channel image loading module is connected to the image preprocessing module, and is used for loading the 1/N preprocessed images obtained by the image preprocessing module into the N-channel feature extraction network, so as to extract high-level image feature information;
图像高层特征信息提取模块,与图像载入模块相连,用于提取预处理图像的高层特征信息,得到待测轴承的高层特征图像;The image high-level feature information extraction module is connected with the image loading module, and is used to extract the high-level feature information of the preprocessed image to obtain the high-level feature image of the bearing to be tested;
多注意力机制模块,与图像高层特征信息提取模块相连,用于模型训练的过程中,增强对轴承的缺陷部位权重,所述注意力机制包括空间注意力机制、通道注意力机制和卷积核自适应选择机制;The multi-attention mechanism module is connected to the image high-level feature information extraction module and is used to enhance the weight of the defective parts of the bearing in the process of model training. The attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel. Adaptive selection mechanism;
高层特征图像差分模块,与多注意力机制模块相连,用于将所述待测轴承的高层特征图像与标准轴承同层的特征图像做差分,得到高层特征差分图像;The high-level feature image difference module is connected to the multi-attention mechanism module, and is used to differentiate the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature difference image;
缺陷检测模块,与高层特征图像差分模块相连,用于将所述高层特征差分图像输入至检测网络,进行缺陷目标的检测,最后输出改进的YOLO检测模型给图像缺陷检测模块。The defect detection module is connected to the high-level feature image difference module, and is used for inputting the high-level feature difference image to the detection network to detect the defect target, and finally output the improved YOLO detection model to the image defect detection module.
与现有技术相比较,本申请的有益效果至少在于:本申请通过2D相机和转动平台相配合,并通过多视图多通道多注意力机制模块改进的YOLO网络结构的检测算法,替代目前昂贵的3D相机检测方式,提高检测精度及检测效率,降低系统成本。Compared with the prior art, the beneficial effect of the present application is at least as follows: the present application uses the 2D camera and the rotating platform to cooperate, and uses the multi-view multi-channel multi-attention mechanism module to improve the detection algorithm of the YOLO network structure, replacing the current expensive detection algorithm. 3D camera detection method, improve detection accuracy and detection efficiency, and reduce system cost.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in this application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请一实施方式中检测方法的整体流程示意图;Fig. 1 is the overall flow schematic diagram of the detection method in one embodiment of the present application;
图2是本申请一实施方式中检测系统的结构框图;2 is a structural block diagram of a detection system in an embodiment of the present application;
图3是本申请一实施方式中2D图像采集模块的结构示意图;3 is a schematic structural diagram of a 2D image acquisition module in an embodiment of the present application;
图4是本申请一实施方式中转动平台设置90°步长采集的图像;FIG. 4 is an image acquired by setting a 90° step size on a rotating platform in an embodiment of the present application;
图5是本申请一实施方式中对于轴承表面三维缺陷的检测结果图像。FIG. 5 is an image of the detection result of three-dimensional defects on the bearing surface according to an embodiment of the present application.
具体实施方式Detailed ways
通过应连同所附图式一起阅读的以下具体实施方式将更完整地理解本申请。本文中揭示本申请的详细实施例;然而,应理解,所揭示的实施例仅具本申请的示范性,本申请可以各种形式来体现。因此,本文中所揭示的特定功能细节不应解释为具有限制性,而是仅解释为权利要求书的基础且解释为用于教示所属领域的技术人员在事实上任何适当详细实施例中以不同方式采用本申请的代表性基础。The application will be more fully understood from the following detailed description, which should be read in conjunction with the accompanying drawings. Detailed embodiments of the present application are disclosed herein; however, it is to be understood that the disclosed embodiments are merely exemplary of the present application, which may be embodied in various forms. Therefore, specific functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and for teaching one skilled in the art to vary in virtually any suitable detailed embodiment. The approach adopts the representative basis of this application.
本申请实施例所揭示的一种轴承三维缺陷检测方法及系统,涉及工业检测技术领域,尤其是涉及一种基于2D相机与转动平台的小型轴承的多视角三维外观缺陷检测方法与系统,三维缺陷包括但不限于为凹坑、划痕、毛刺等。A bearing three-dimensional defect detection method and system disclosed in the embodiments of the present application relate to the technical field of industrial inspection, and in particular to a multi-view three-dimensional appearance defect detection method and system for a small bearing based on a 2D camera and a rotating platform. Including but not limited to pits, scratches, burrs, etc.
结合图1和图3所示,本申请实施例所揭示的一种轴承三维缺陷检测方法,包括以下步骤:With reference to FIG. 1 and FIG. 3 , a bearing three-dimensional defect detection method disclosed in the embodiment of the present application includes the following steps:
S100,将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数。S100, the bearing to be detected is fixed on the rotating platform, and under the corresponding combined light source, the rotating platform rotates according to the set rotation step length, and the bearing surface is photographed at N angles while rotating to obtain N pieces of the bearing surface to be detected. Two-dimensional bearing image, where N is a natural number greater than or equal to 3.
具体地,将待检测的轴承固定于转动平台上的中心,转动平台可以带动轴承进行360度任意步长的旋转。本实施例中,转动平台的转动步长=360°/N,其中,N为大于等于3的自然数。Specifically, the bearing to be detected is fixed on the center of the rotating platform, and the rotating platform can drive the bearing to rotate 360 degrees in any step length. In this embodiment, the rotation step length of the rotating platform=360°/N, where N is a natural number greater than or equal to 3.
且采用组合光源对转动平台上的轴承进行照射,本实施例中,组合光源采用一组可调节的同轴光源和环形光源,其中,同轴光源位于转动平台的上方,且与转动平台和轴承均同轴设置,环形光轴位于转动平台的侧上方,与转动平台顶部平面呈一定的倾斜角度设置。本申请对不同规格的轴承选用不同的组合光源。实施时,组合光源由一光源控制器(图未示)控制,所述组合光源可以是平行光、同轴光、环型光中两种以上光源的组合。And the combined light source is used to illuminate the bearing on the rotating platform. In this embodiment, the combined light source adopts a set of adjustable coaxial light sources and ring light sources, wherein the coaxial light source is located above the rotating platform and is connected to the rotating platform and the bearing. All are arranged coaxially, and the annular optical axis is located above the side of the rotating platform, and is arranged at a certain inclination angle with the top plane of the rotating platform. In this application, different combined light sources are selected for bearings of different specifications. During implementation, the combined light source is controlled by a light source controller (not shown in the figure), and the combined light source may be a combination of two or more light sources among parallel light, coaxial light, and ring light.
转动平台按照设定步长转动,转动的同时组合光源转动平台上的轴承表面进行照射,根据转动平台设定的转动步长对轴承进行拍摄,完成对轴承表面在光源下的N个角度拍摄,获得N张待检测的二维轴承图像,如N取4,则转动平台的转动步长则为90°,转动平台转动一圈实现对轴承表面4个角度的拍摄,如图4所示,为转动平台设置90°步长采集的图像。本实施例中,全部采用2D相机对轴承进行拍摄,相比于3D相机,成本较低。The rotating platform rotates according to the set step length. While rotating, the bearing surface on the rotating platform of the light source is combined to illuminate, and the bearing is photographed according to the rotation step set by the rotating platform to complete the N angles of the bearing surface under the light source. Obtain N two-dimensional bearing images to be detected, if N is 4, the rotation step of the rotating platform is 90°, and the rotating platform rotates one circle to achieve 4 angles of the bearing surface, as shown in Figure 4, as Turn the platform to set the acquired image in 90° steps. In this embodiment, all 2D cameras are used to photograph the bearings, and the cost is lower than that of 3D cameras.
S200,对N张待检测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像。S200: Preprocess N bearing images to be detected to obtain 1/N preprocessed images for defect detection.
具体地,实施时,本申请对轴承图像的预处理方法可为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。Specifically, during implementation, the preprocessing method of the bearing image in the present application may be one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
S300,将1/N张预处理图像输入到预先训练的N通道的深度学习模型中,得到缺陷检测结果。S300: Input 1/N preprocessed images into a pre-trained deep learning model of N channels to obtain a defect detection result.
具体地,本实施例中,深度学习模型的训练过程具体包括:Specifically, in this embodiment, the training process of the deep learning model specifically includes:
S11,将步骤S200得到的所述1/N张预处理图像进行标注,作为训练图像;S11, label the 1/N preprocessed images obtained in step S200 as training images;
S12,将所述训练图像输入多通道特征提取网络,使用特征提取网络进行图像高层特征信息提取,获得待测轴承的高层特征图像;S12, inputting the training image into a multi-channel feature extraction network, and using the feature extraction network to extract high-level feature information of the image to obtain a high-level feature image of the bearing to be tested;
S13,引入多注意力机制,实现对轴承的缺陷部位权重增强,所述注意力机制包括空间注意力机制、通道注意力机制和卷积核自适应选择机制,其中,空间注意力机制和通道注意力机制沿着两个独立的维度(通道和空间)依次推断注意力图,然后将注意力图与输入特征图相乘以进行自适应特征优化,卷积核自适应选择机制可以根据输入自适应地调整其感受野尺寸,捕获具有不同尺度的目标物体;S13: Introduce a multi-attention mechanism to enhance the weight of the defective parts of the bearing. The attention mechanism includes a spatial attention mechanism, a channel attention mechanism, and a convolution kernel adaptive selection mechanism. Among them, the spatial attention mechanism and the channel attention mechanism The force mechanism sequentially infers the attention map along two independent dimensions (channel and space), and then multiplies the attention map with the input feature map for adaptive feature optimization. The convolution kernel adaptive selection mechanism can be adaptively adjusted according to the input Its receptive field size captures target objects with different scales;
S14,将所述待测轴承的高层特征图像与标准轴承同层的特征图像做差分处理,得到待测轴承的高层特征差分图像;S14, performing differential processing between the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature differential image of the bearing to be tested;
S15,将所述高层特征差分图像输入检测网络,进行缺陷目标的检测,最后输出改进的YOLO检测模型给步骤S300。S15, the high-level feature difference image is input into the detection network to detect the defect target, and finally the improved YOLO detection model is output to step S300.
如图5所示,为本申请一实施方式中对于轴承表面三维缺陷的检测结果图像。As shown in FIG. 5 , it is an image of the detection result of three-dimensional defects on the bearing surface in an embodiment of the present application.
S400,存储缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型。S400, store the defect detection result and 1/N preprocessed images, and optimize and modify the deep learning model according to the stored defect detection results and 1/N preprocessed images.
具体地,本实施例中,优化与修改深度学习模型具体包括:Specifically, in this embodiment, optimizing and modifying the deep learning model specifically includes:
S16,将存储的所述缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型;具体是交由复检工人进行复检,剔除检测错误的检测结果图;S16, optimize and modify the deep learning model according to the stored defect detection results and 1/N preprocessed images, and according to the stored defect detection results and 1/N preprocessed images; Workers conduct re-inspection and eliminate the detection result map with detection error;
S17,将缺陷检测结果正确的图像和对应的标注数据输入改进的YOLO检测网络中重新训练,优化与修改深度学习模型参数,提高缺陷目标的精度,极大减少人工标注样本数量。S17 , input the image with correct defect detection result and the corresponding labeling data into the improved YOLO detection network for retraining, optimize and modify the parameters of the deep learning model, improve the accuracy of the defect target, and greatly reduce the number of manually labeled samples.
请结合图3所示,本申请实施例的一个方面还提供了一种2D图像采集模块,所述模块包括:Referring to FIG. 3 , an aspect of the embodiments of the present application further provides a 2D image acquisition module, the module includes:
转动平台,用于固定待检测的轴承及用于轴承的360度任意步长的旋转;Rotating platform, used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length;
组合光源,用于提供图像采集所需的光源;Combined light source, used to provide the light source required for image acquisition;
2D相机及镜头,用于在转动平台带动轴承转动的同时及组合光源照射的同时,对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像。The 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
在一优选实施例中,所述组合光源采用一组可调节的同轴光源和环形光源。In a preferred embodiment, the combined light source adopts a set of adjustable coaxial light sources and ring light sources.
在一优选实施例中,所述同轴光源位于转动平台的上方,且与转动平台和轴承均同轴设置。In a preferred embodiment, the coaxial light source is located above the rotating platform, and is coaxially arranged with the rotating platform and the bearing.
在一优选实施例中,所述环形光轴位于转动平台的侧上方,与转动平台顶部平面呈一定的倾斜角度设置。In a preferred embodiment, the annular optical axis is located above the side of the rotating platform, and is arranged at a certain inclination angle to the top plane of the rotating platform.
在一优选实施例中,所述转动平台安装于一固定支架上,且其顶部平台水平设置。In a preferred embodiment, the rotating platform is mounted on a fixed bracket, and the top platform thereof is horizontally arranged.
请结合图2和图3所示,与上述一种轴承三维缺陷检测方法相对应的,本申请实施例的另一个方面还提供了一种轴承三维缺陷检测系统,其包括:Please refer to FIG. 2 and FIG. 3 , corresponding to the above-mentioned method for detecting three-dimensional defects of bearings, another aspect of the embodiments of the present application further provides a three-dimensional defect detection system for bearings, which includes:
2D图像采集模块;2D image acquisition module;
图像预处理模块,用于对所述N张待检测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像;an image preprocessing module, used for preprocessing the N bearing images to be detected to obtain 1/N preprocessing images for defect detection;
图像缺陷检测模块,用于将所述1/N张预处理图像输入到预先训练的N通道的目标检测模型中,得到缺陷检测结果。The image defect detection module is used for inputting the 1/N preprocessed images into a pre-trained N-channel target detection model to obtain defect detection results.
在一些优选实施方案中,所述2D图像采集模块用于将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数。In some preferred embodiments, the 2D image acquisition module is used to fix the bearing to be detected on the rotating platform. Under the corresponding combined light source, the rotating platform rotates according to the set rotation step, and the bearing surface is rotated while rotating. Shooting at N angles is performed to obtain N two-dimensional bearing images to be detected, where N is a natural number greater than or equal to 3.
具体地,本实施例中,2D图像采集模块包括安装于一固定支架20上的转动平台10、组合光源和2D相机及镜头30,其中,转动平台10具体可为步进电机驱动的转动平台,转动平台10的顶部平台水平设置,其可以带动轴承(图未示)进行360度任意步长的旋转,待检测的轴承固定于转动平台10上的中心的轴承固定底座11上。本实施例中,转动平台的转动步长=360°/N,其中,N为大于等于3的自然数。Specifically, in this embodiment, the 2D image acquisition module includes a rotating platform 10 mounted on a fixed bracket 20, a combined light source, a 2D camera and a lens 30, wherein the rotating platform 10 may specifically be a rotating platform driven by a stepping motor, The top platform of the rotating platform 10 is set horizontally, which can drive the bearing (not shown) to rotate 360 degrees in any step length. The bearing to be detected is fixed on the central bearing fixing base 11 on the rotating platform 10 . In this embodiment, the rotation step length of the rotating platform=360°/N, where N is a natural number greater than or equal to 3.
组合光源用于对转动平台10上的轴承进行照射,本实施例中,组合光源采用一组可调节的同轴光源40和/或环形光源50,其中,同轴光源40位于转动平台10的上方,且与转动平台10和轴承均同轴设置,环形光轴50位于转动平台10的侧上方,与转动平台10顶部平面 呈一定的倾斜角度设置。本申请对不同规格的轴承选用不同的组合光源。实施时,组合光源由一光源控制器(图未示)控制,所述组合光源可以是平行光、同轴光、环型光中两种以上光源的组合。The combined light source is used to illuminate the bearing on the rotating platform 10 . In this embodiment, the combined light source adopts a set of adjustable coaxial light sources 40 and/or ring light sources 50 , wherein the coaxial light source 40 is located above the rotating platform 10 , and are arranged coaxially with the rotating platform 10 and the bearing. The annular optical axis 50 is located above the side of the rotating platform 10 and is arranged at a certain inclination angle with the top plane of the rotating platform 10 . In this application, different combined light sources are selected for bearings of different specifications. During implementation, the combined light source is controlled by a light source controller (not shown in the figure), and the combined light source may be a combination of two or more light sources among parallel light, coaxial light, and ring light.
转动平台按照设定步长转动,转动的同时组合光源转动平台上的轴承表面进行照射,根据转动平台设定的转动步长对轴承进行拍摄,完成对轴承表面在光源下的N个角度拍摄,获得N张待检测的二维轴承图像,如N取4,则转动平台的转动步长则为90°,转动平台转动一圈实现对轴承表面4个角度的拍摄,如图4所示,为转动平台设置90°步长采集的图像。本实施例中,全部采用2D相机对轴承进行拍摄,相比于3D相机,成本较低。The rotating platform rotates according to the set step length. While rotating, the bearing surface on the rotating platform of the light source is combined to illuminate, and the bearing is photographed according to the rotation step set by the rotating platform to complete the N angles of the bearing surface under the light source. Obtain N two-dimensional bearing images to be detected, if N is 4, the rotation step of the rotating platform is 90°, and the rotating platform rotates one circle to achieve 4 angles of the bearing surface, as shown in Figure 4, as Turn the platform to set the acquired image in 90° steps. In this embodiment, all 2D cameras are used to photograph the bearings, and the cost is lower than that of 3D cameras.
在一些优选实施方案中,所述图像预处理模块用于对所述N张待检测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像。In some preferred embodiments, the image preprocessing module is configured to preprocess the N bearing images to be inspected to obtain 1/N preprocessed images for defect inspection.
本实施例中,图像预处理模块所使用的预处理方法为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。In this embodiment, the preprocessing method used by the image preprocessing module is one or more of filtering, character template positioning, channel separation and fusion, and splicing and matching methods.
在一些优选实施方案中,所述图像缺陷检测模块用于将所述1/N张预处理图像输入到预先训练的N通道的深度学习模型中,得到缺陷检测结果。In some preferred embodiments, the image defect detection module is configured to input the 1/N pre-processed images into a pre-trained N-channel deep learning model to obtain defect detection results.
进一步地,所述轴承三维缺陷检测系统还包括连接于图像预处理模块与图像缺陷检测模块之间的深度学习模型训练模块,所述深度学习模型训练模块包括:Further, the bearing three-dimensional defect detection system further includes a deep learning model training module connected between the image preprocessing module and the image defect detection module, and the deep learning model training module includes:
多通道图像载入模块,与图像预处理模块相连,用于将图像预处理模块得到的所述1/N张预处理图像载入N通道特征提取网络,以便进行图像高层特征信息提取;The multi-channel image loading module is connected to the image preprocessing module, and is used for loading the 1/N preprocessed images obtained by the image preprocessing module into the N-channel feature extraction network, so as to extract high-level image feature information;
图像高层特征信息提取模块,与图像载入模块相连,用于提取预处理图像的高层特征信息,得到待测轴承的高层特征图像;The image high-level feature information extraction module is connected with the image loading module, and is used to extract the high-level feature information of the preprocessed image to obtain the high-level feature image of the bearing to be tested;
多注意力机制模块,与图像高层特征信息提取模块相连,用于模型训练的过程中,增强对轴承的缺陷部位权重,所述注意力机制包括空间注意力机制、通道注意力机制和卷积核自适应选择机制;The multi-attention mechanism module is connected to the image high-level feature information extraction module and is used to enhance the weight of the defective parts of the bearing in the process of model training. The attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel. Adaptive selection mechanism;
特征图像差分模块,与多注意力机制模块相连,用于将所述待测轴承的高层特征图像与标准轴承同层的特征图像做差分,得到高层特征差分图像;The feature image difference module is connected with the multi-attention mechanism module, and is used to differentiate the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature difference image;
缺陷检测模块,与特征图像差分模块相连,用于将所述高层特征差分图像输入至检测网络,进行缺陷目标的检测,最后输出改进的YOLO检测模型给图像缺陷检测模块。The defect detection module is connected with the feature image difference module, and is used for inputting the high-level feature difference image to the detection network to detect the defect target, and finally output the improved YOLO detection model to the image defect detection module.
深度学习模型优化模块,用于存储所述缺陷检测结果和1/N张预处理图像,并根据存储 的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型。The deep learning model optimization module is used to store the defect detection results and 1/N preprocessed images, and optimize and modify the deep learning model according to the stored defect detection results and 1/N preprocessed images.
本申请所揭示的一种轴承三维缺陷检测方法及系统,可解决现有轴承生产企业的表面三维缺陷检测技术中存在的系统价格昂贵、检测精度不高、鲁棒性较差等技术问题;实施本申请的技术方案,可实现在企业能够接受的系统较低成本前提下,具备较高的检测精度与鲁棒性。The bearing three-dimensional defect detection method and system disclosed in the present application can solve the technical problems of high price, low detection accuracy and poor robustness of the system in the surface three-dimensional defect detection technology of existing bearing manufacturers; The technical solution of the present application can achieve higher detection accuracy and robustness under the premise of lower system costs acceptable to enterprises.
应当理解,上述实施例仅为说明本申请的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本申请的内容并据以实施,并不能以此限制本申请的保护范围。凡根据本申请精神实质所作的等效变化或修饰,都应涵盖在本申请的保护范围之内。It should be understood that the above-mentioned embodiments are only intended to illustrate the technical concept and characteristics of the present application, and the purpose thereof is to enable those who are familiar with the technology to understand the content of the present application and implement accordingly, and cannot limit the protection scope of the present application. All equivalent changes or modifications made according to the spirit and spirit of this application shall be covered within the protection scope of this application.

Claims (10)

  1. 一种轴承三维缺陷检测方法,其特征在于,所述方法包括:A bearing three-dimensional defect detection method, characterized in that the method comprises:
    S100,将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数;S100, the bearing to be detected is fixed on the rotating platform, and under the corresponding combined light source, the rotating platform rotates according to the set rotation step length, and the bearing surface is photographed at N angles while rotating to obtain N pieces of the bearing surface to be detected. Two-dimensional bearing image, where N is a natural number greater than or equal to 3;
    S200,对所述N张待检测轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像;S200, preprocessing the N images of the bearing to be detected to obtain 1/N preprocessing images for defect detection;
    S300,将所述1/N张预处理图像输入到预先训练的N通道的深度学习模型中,得到缺陷检测结果。S300: Input the 1/N preprocessed images into a pre-trained N-channel deep learning model to obtain a defect detection result.
  2. 根据权利要求1所述的一种轴承三维缺陷检测方法,其特征在于:S100中,对于不同规格的轴承,所述2D图像采集模块选用不同的组合光源,并使用转动平台设置不同转动步长,所述组合光源根据所述转动步长对轴承表面进行在光源下的N个角度的拍摄,所述转动步长=360°/N。A bearing three-dimensional defect detection method according to claim 1, characterized in that: in S100, for bearings of different specifications, the 2D image acquisition module selects different combined light sources, and uses a rotating platform to set different rotation step sizes, The combined light source photographs the bearing surface at N angles under the light source according to the rotation step size, where the rotation step size=360°/N.
  3. 根据权利要求1所述的一种轴承三维缺陷检测方法,其特征在于:S200中,所述预处理所使用的方法为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。A bearing three-dimensional defect detection method according to claim 1, characterized in that: in S200, the method used in the preprocessing is one of filtering, character template positioning, channel separation and fusion, and splicing and matching methods. or more.
  4. 根据权利要求1所述的一种轴承三维缺陷检测方法,其特征在于,所述方法还包括:S400,存储所述缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型。A bearing three-dimensional defect detection method according to claim 1, characterized in that, the method further comprises: S400, storing the defect detection result and 1/N preprocessed images, and detecting the defect according to the stored defect Results and 1/N preprocessed images to optimize and modify deep learning models.
  5. 根据权利要求1所述的一种轴承三维缺陷检测方法,其特征在于,所述深度学习模型的训练过程包括:A bearing three-dimensional defect detection method according to claim 1, wherein the training process of the deep learning model comprises:
    S11,将步骤S200得到的所述1/N张预处理图像进行标注,作为训练图像;S11, label the 1/N preprocessed images obtained in step S200 as training images;
    S12,将所述训练图像输入多通道特征提取网络进行图像高层特征信息提取,获得待测轴承的高层特征图像;S12, inputting the training image into a multi-channel feature extraction network to extract high-level feature information of the image to obtain a high-level feature image of the bearing to be tested;
    S13,模型训练的过程中,引入多注意力机制实现轴承的缺陷部位权重增强,所述多注意力机制包括空间注意力机制、通道注意力机制以及卷积核自适应选择机制;S13, in the process of model training, a multi-attention mechanism is introduced to enhance the weight of the defective parts of the bearing, and the multi-attention mechanism includes a spatial attention mechanism, a channel attention mechanism, and a convolution kernel adaptive selection mechanism;
    S14,将所述待测轴承的高层特征图像与标准轴承的同层的特征图像做差分处理,得到待测轴承的差分特征图像;S14, performing differential processing between the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a differential feature image of the bearing to be tested;
    S15,将所述差分特征图像输入检测网络,进行模型训练,最后输出改进的YOLO检测 模型给步骤S300。S15, the differential feature image input detection network, carry out model training, and finally output the improved YOLO detection model to step S300.
  6. 一种轴承三维缺陷检测系统,其特征在于,所述系统包括:A bearing three-dimensional defect detection system, characterized in that the system includes:
    2D图像采集模块,用于将待检测的轴承固定于转动平台上,在相应的组合光源下,转动平台根据其设置的转动步长转动,转动的同时对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像,其中,N为大于等于3的自然数;The 2D image acquisition module is used to fix the bearing to be detected on the rotating platform. Under the corresponding combined light source, the rotating platform rotates according to the set rotation step, and the bearing surface is photographed at N angles while rotating to obtain N two-dimensional bearing images to be detected, where N is a natural number greater than or equal to 3;
    图像预处理模块,用于对所述N张待测的轴承图像进行预处理,得到用于缺陷检测的1/N张预处理图像;an image preprocessing module for preprocessing the N bearing images to be tested to obtain 1/N preprocessing images for defect detection;
    图像缺陷检测模块,用于将所述1/N张预处理图像输入到预先训练的N通道的深度学习模型中,得到缺陷检测结果。The image defect detection module is used for inputting the 1/N preprocessed images into a pre-trained N-channel deep learning model to obtain defect detection results.
  7. 根据权利要求6所述的一种轴承三维缺陷检测系统,其特征在于,所述2D图像采集模块包括:A bearing three-dimensional defect detection system according to claim 6, wherein the 2D image acquisition module comprises:
    转动平台,用于固定待检测的轴承及用于轴承的360度任意步长的旋转;Rotating platform, used to fix the bearing to be tested and used for 360-degree rotation of the bearing in any step length;
    组合光源,用于提供图像采集所需的光源;Combined light source, used to provide the light source required for image acquisition;
    2D相机及镜头,用于在转动平台带动轴承转动的同时及组合光源照射的同时,对轴承表面进行N个角度的拍摄,获得N张待检测的二维轴承图像。The 2D camera and lens are used to photograph the bearing surface at N angles while the rotating platform drives the bearing to rotate and the combined light source illuminates, to obtain N two-dimensional bearing images to be inspected.
  8. 根据权利要求6所述的一种轴承三维缺陷检测系统,其特征在于:所述图像预处理模块所使用的预处理方法为滤波、字符模板定位、通道分离与融合、拼接与匹配方法中的一种或多种。A bearing three-dimensional defect detection system according to claim 6, wherein the preprocessing method used by the image preprocessing module is one of filtering, character template positioning, channel separation and fusion, and splicing and matching methods. one or more.
  9. 根据权利要求6所述的一种轴承三维缺陷检测系统,其特征在于,所述系统还包括:深度学习模型优化模块,用于存储所述缺陷检测结果和1/N张预处理图像,并根据存储的所述缺陷检测结果和1/N张预处理图像,优化与修改深度学习模型,所述优化与修改深度学习模型包括:A bearing three-dimensional defect detection system according to claim 6, characterized in that, the system further comprises: a deep learning model optimization module for storing the defect detection results and 1/N preprocessed images, and according to The stored defect detection results and 1/N preprocessed images optimize and modify the deep learning model, and the optimized and modified deep learning model includes:
    将存储的所述缺陷检测结果和1/N张预处理图像,交由复检工人进行复检,剔除检测错误的检测结果图;The stored defect detection results and 1/N pre-processed images are handed over to the re-inspection workers for re-inspection, and the detection result pictures with detection errors are eliminated;
    将缺陷检测结果正确的图像和对应的标注数据输入改进的YOLO检测网络中重新训练,优化与修改深度学习模型参数,提高缺陷目标的精度,极大减少人工标注样本数量。Input the images with correct defect detection results and the corresponding labeled data into the improved YOLO detection network for retraining, optimize and modify the parameters of the deep learning model, improve the accuracy of the defect target, and greatly reduce the number of manually labeled samples.
  10. 根据权利要求9所述的一种轴承三维缺陷检测系统,其特征在于,所述系统还包括:连接于图像预处理模块与图像缺陷检测模块之间的深度学习模型训练模块,所述深度学习模 型训练模块包括:A bearing three-dimensional defect detection system according to claim 9, wherein the system further comprises: a deep learning model training module connected between the image preprocessing module and the image defect detection module, the deep learning model Training modules include:
    多通道图像载入模块,与图像预处理模块相连,用于将图像预处理模块得到的所述1/N张预处理图像载入N通道特征提取网络,以便进行图像高层特征提取;The multi-channel image loading module is connected with the image preprocessing module, and is used for loading the 1/N preprocessed images obtained by the image preprocessing module into the N-channel feature extraction network, so as to perform image high-level feature extraction;
    图像高层特征信息提取模块,与图像载入模块相连,用于提取预处理图像的高层特征信息,得到待测轴承的高层特征图像;The image high-level feature information extraction module is connected with the image loading module, and is used to extract the high-level feature information of the preprocessed image to obtain the high-level feature image of the bearing to be tested;
    多注意力机制模块,与图像高层特征信息提取模块相连,用于模型训练的过程中,增强对轴承的缺陷部位权重,所述注意力机制包括空间注意力机制、通道注意力机制和卷积核自适应选择机制;The multi-attention mechanism module is connected to the image high-level feature information extraction module and is used to enhance the weight of the defective parts of the bearing in the process of model training. The attention mechanism includes a spatial attention mechanism, a channel attention mechanism and a convolution kernel. Adaptive selection mechanism;
    高层特征图像差分模块,与多注意力机制模块相连,用于将所述待测轴承的高层特征图像与标准轴承同层的特征图像做差分,得到高层特征差分图像;The high-level feature image difference module is connected to the multi-attention mechanism module, and is used to differentiate the high-level feature image of the bearing to be tested and the feature image of the same layer of the standard bearing to obtain a high-level feature difference image;
    缺陷检测模块,与高层特征图像差分模块相连,用于将所述高层特征差分图像输入至检测网络,进行缺陷目标的检测,最后输出改进的YOLO检测模型给图像缺陷检测模块。The defect detection module is connected to the high-level feature image difference module, and is used for inputting the high-level feature difference image to the detection network to detect the defect target, and finally output the improved YOLO detection model to the image defect detection module.
PCT/CN2021/089130 2021-04-23 2021-04-23 Bearing three-dimensional defect detection method and system WO2022222120A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/089130 WO2022222120A1 (en) 2021-04-23 2021-04-23 Bearing three-dimensional defect detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/089130 WO2022222120A1 (en) 2021-04-23 2021-04-23 Bearing three-dimensional defect detection method and system

Publications (1)

Publication Number Publication Date
WO2022222120A1 true WO2022222120A1 (en) 2022-10-27

Family

ID=83723703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/089130 WO2022222120A1 (en) 2021-04-23 2021-04-23 Bearing three-dimensional defect detection method and system

Country Status (1)

Country Link
WO (1) WO2022222120A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117495837A (en) * 2023-11-17 2024-02-02 哈尔滨工程大学 Intelligent detection method for three-dimensional appearance defects of bearing

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019052872A (en) * 2017-09-13 2019-04-04 Ntn株式会社 Bearing inspection device
CN109934821A (en) * 2019-03-22 2019-06-25 杭州睿工科技有限公司 A kind of part defect detection method and system
CN110473178A (en) * 2019-07-30 2019-11-19 上海深视信息科技有限公司 A kind of open defect detection method and system based on multiple light courcess fusion
CN110658202A (en) * 2019-09-30 2020-01-07 贵州航天云网科技有限公司 Industrial component appearance defect detection method based on deep learning
CN112070749A (en) * 2020-09-10 2020-12-11 深兰人工智能芯片研究院(江苏)有限公司 Paper defect detection method and device
CN212321462U (en) * 2020-03-31 2021-01-08 广西师范大学 Surface defect detection device
CN112308832A (en) * 2020-10-29 2021-02-02 常熟理工学院 Bearing quality detection method based on machine vision
CN112345539A (en) * 2020-11-05 2021-02-09 菲特(天津)检测技术有限公司 Aluminum die casting surface defect detection method based on deep learning
CN112465759A (en) * 2020-11-19 2021-03-09 西北工业大学 Convolutional neural network-based aeroengine blade defect detection method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019052872A (en) * 2017-09-13 2019-04-04 Ntn株式会社 Bearing inspection device
CN109934821A (en) * 2019-03-22 2019-06-25 杭州睿工科技有限公司 A kind of part defect detection method and system
CN110473178A (en) * 2019-07-30 2019-11-19 上海深视信息科技有限公司 A kind of open defect detection method and system based on multiple light courcess fusion
CN110658202A (en) * 2019-09-30 2020-01-07 贵州航天云网科技有限公司 Industrial component appearance defect detection method based on deep learning
CN212321462U (en) * 2020-03-31 2021-01-08 广西师范大学 Surface defect detection device
CN112070749A (en) * 2020-09-10 2020-12-11 深兰人工智能芯片研究院(江苏)有限公司 Paper defect detection method and device
CN112308832A (en) * 2020-10-29 2021-02-02 常熟理工学院 Bearing quality detection method based on machine vision
CN112345539A (en) * 2020-11-05 2021-02-09 菲特(天津)检测技术有限公司 Aluminum die casting surface defect detection method based on deep learning
CN112465759A (en) * 2020-11-19 2021-03-09 西北工业大学 Convolutional neural network-based aeroengine blade defect detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117495837A (en) * 2023-11-17 2024-02-02 哈尔滨工程大学 Intelligent detection method for three-dimensional appearance defects of bearing

Similar Documents

Publication Publication Date Title
CN108765416B (en) PCB surface defect detection method and device based on rapid geometric alignment
CN106903426B (en) A kind of laser welding localization method based on machine vision
CN105548212A (en) System and method for online automatically detecting defects on glass surface of touch screen
CN107449782A (en) Phone housing side edge surface defect digitizes quantitative detection system
CN101251496A (en) Defect detection device and defect detection method
CN208833689U (en) Detection device
CN103175847A (en) Grating surface blemish detection device
WO2022222120A1 (en) Bearing three-dimensional defect detection method and system
CN114742818A (en) Visual defect detection system based on industrial area array camera and detection method thereof
CN113344888A (en) Surface defect detection method and device based on combined model
CN212301356U (en) Wheel hub welding seam visual detection device
CN113222901A (en) Method for detecting surface defects of steel ball based on single stage
CN112452808A (en) Multi-camera transparent object defect detection system
CN117934980B (en) Glass container defect detection method and system based on attention supervision adjustment
CN117291880A (en) Brake block surface defect detecting system based on image analysis
CN111929239A (en) AOI detection device and detection method for PCB part defects
CN113111828B (en) Three-dimensional defect detection method and system for bearing
CN215066100U (en) 2D image acquisition equipment and bearing three-dimensional defect detection device
CN114218692A (en) Similar part identification system, medium and method based on deep learning and model simulation
CN117788400A (en) Binocular vision-based photovoltaic module defect detection method and system
CN117761060A (en) Visual detection system and detection method thereof
CN112763496A (en) Mobile phone battery surface defect detection device and detection method thereof
CN109884082B (en) Method for detecting smooth surface defects
CN106841211A (en) Platform and method of a kind of utilization machine vision to cell piece surface defects detection
CN210321644U (en) Digital automobile sign surface finish degree detection equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21937358

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937358

Country of ref document: EP

Kind code of ref document: A1