Adaptive gear defect detection method based on deep learning
By applying deep learning technology in gear detection, combining convolutional neural networks, long and short-term memory networks, three-dimensional modeling and support vector machines, the problems of image processing limitations, feature extraction inaccuracy and comprehensive evaluation of gear detection in the prior art are solved, and efficient and accurate gear defect detection and quality evaluation are achieved.
Patent Information
- Application Number
- CN202410056070.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-01-15
AI Technical Summary
The existing gear detection methods have problems such as image processing limitations, inaccurate feature extraction and missing comprehensive evaluation, resulting in inconsistent and inaccurate detection results.
Adaptive method based on deep learning is adopted, convolutional neural networks and long and short-term memory networks are used to extract and analyze gear images, and comprehensive defect indicators are calculated by combining three-dimensional modeling and support vector machines.
It significantly improves the accuracy and efficiency of gear defect detection, reduces the dependence of manual inspection, ensures consistency of inspection results, and provides a comprehensive gear quality evaluation.
Smart Images

Figure CN117876342B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gear detection, and in particular to an adaptive gear defect detection method based on deep learning. Background Art
[0002] In the modern machinery industry, gears, as one of the most basic transmission mechanisms, play an important role in various mechanical equipment. The quality of gears directly affects the performance and reliability of the entire mechanical system. Therefore, gear quality inspection and defect analysis are key links to ensure the normal operation of mechanical equipment.
[0003] Traditional gear inspection methods mainly rely on physical measurement tools and manual inspection, which are usually time-consuming and susceptible to the operator's skill level and subjective judgment, resulting in inconsistent and inaccurate inspection results. With the development of computer vision and machine learning technology, gear inspection methods based on image processing have gradually attracted attention. These methods analyze the image of the gear to identify its surface defects, such as cracks, scratches or wear. However, these existing technologies still have some limitations and challenges:
[0004] The first is the limitation of image processing: Traditional image processing methods are often limited by image quality and environmental factors in gear surface defect detection. Factors such as image contrast, brightness, and clarity directly affect the accuracy of defect detection. In addition, due to the complexity of the gear surface structure, such as non-convex shapes and reflective properties, traditional image processing technology is difficult to accurately identify and locate gear defects.
[0005] The second is the inaccuracy of feature extraction: When using image analysis methods for gear inspection, accurate extraction of gear features is crucial. However, existing methods often lack effectiveness and accuracy in extracting key features of gears (such as tooth surface angle, gear tooth shape, etc.). These methods are usually not well adapted to the diversity and complexity of gear shapes.
[0006] The third is the lack of comprehensive assessment: existing gear inspection technologies often focus on a single type of defect, such as analyzing gear cracks or measuring gear wear. This results in the inability to provide a comprehensive gear quality assessment and reflect the overall condition of the gear.
[0007] Therefore, how to provide an adaptive gear defect detection method based on deep learning is an urgent problem that technicians in this field need to solve. Summary of the invention
[0008] One object of the present invention is to propose an adaptive gear defect detection method based on deep learning, which can more accurately identify and locate various defects on gears, such as cracks, scratches, wear, etc., by using convolutional neural networks and long short-term memory networks. Compared with traditional rule-based image processing methods, deep learning methods can more effectively process complex features and patterns in images, thereby improving the accuracy of defect detection.
[0009] An adaptive gear defect detection method based on deep learning according to an embodiment of the present invention comprises the following steps:
[0010] S1. Image enhancement processing: Use contrast-limited adaptive histogram equalization technology to perform image enhancement processing on the gear surface image to be inspected;
[0011] S2, image preprocessing: preprocessing the enhanced gear surface image to obtain a gear area image;
[0012] S3, feature extraction: use convolutional neural network to extract features from the gear area image, and extract features of the gear edge, gear center point and each corner point;
[0013] S4, Corner analysis: Use a segmentation algorithm that combines a convolutional neural network with a long short-term memory network to determine suspected corners and pseudo corners;
[0014] S5. Calculation of distance defect index: Calculate the distance defect index value D by the difference between the standard deviation σ of the distance between corner points and the average distance μ;
[0015] S6. Calculation of area defect index: Determine the area defect index value A of the gear through three-dimensional modeling analysis;
[0016] S7, angle defect index calculation: use support vector machine to analyze the angle defect of the gear and determine the angle defect index value Θ of the gear;
[0017] S8. Calculation of comprehensive defect index: Calculate the comprehensive defect index value C of the gear by combining the distance defect index value D, the area defect index value A and the angle defect index value θ;
[0018] S9. Defect grade determination: Determine the defect grade of the gear according to the comprehensive defect index value C of the gear.
[0019] Optionally, the step S1 specifically includes:
[0020] S11, dividing the gear surface image into multiple small blocks according to the gear tooth surface and tooth bottom areas, and independently performing histogram equalization on each small block according to the characteristics of the area where it is located;
[0021] S12, limiting the contrast of each small block, and adjusting the contrast of the gear tooth surface reflection area and the gear tooth bottom shadow area;
[0022] S13, using bilinear interpolation to fuse the equalized small blocks;
[0023] S14. Quantitative evaluation of the enhanced gear surface image quality:
[0024]
[0025] in, represents the pixel value of the i-th row and j-th column in the enhanced gear surface image, represents the average pixel value of the enhanced gear surface image, M and N represent the number of rows and columns of the image respectively.
[0026] Optionally, the S2 specifically includes:
[0027] S21. Automatic threshold segmentation technology is applied to distinguish the gear surface from the background. The optimal threshold T is determined using the formula based on the unique reflective characteristics of the gear surface and the difference in the background:
[0028]
[0029] Among them, I gear represents the enhanced gear surface image, min(I gear ) and max(I gear ) represent the minimum and maximum pixel values in the image respectively;
[0030] S22, applying morphological operations to the segmented image, and applying corrosion operations to the image according to the optimal threshold T determined by the threshold segmentation result:
[0031]
[0032] Among them, E gear represents the image after corrosion, I is the original image, S is the structural element designed for the gear, and the structural element S is the gear surface characteristics obtained from the threshold segmentation T;
[0033] Apply the dilation operation to the eroded image based on the optimal threshold T determined by the threshold segmentation result:
[0034]
[0035] Among them, D gear represents the image after dilation;
[0036] S23, apply Gaussian blur to preprocess the enhanced gear surface image, the standard deviation of Gaussian blur σ Gand quantified image quality Q gear Related:
[0037]
[0038] Among them, k is a coefficient adjusted according to the characteristics of the gear image;
[0039] The improved Canny edge detection algorithm is used to perform non-maximum suppression on the edge, and the threshold is set based on the average pixel value of the gear image. and standard deviation
[0040]
[0041] Among them, λ is a coefficient adjusted according to the characteristics of the gear image.
[0042] Optionally, the S3 specifically includes:
[0043] S31, using a pre-trained convolutional neural network model to perform deep feature extraction on the pre-processed gear image, and identify the key features of the gear edge, gear center point and corner point, wherein the extraction of the key features is based on the superposition of the convolution layer and the pooling layer, wherein the output of each convolution layer is l :
[0044] O l =f(W l *I+b l );
[0045] Among them, W l and b l are the convolution kernel weights and bias terms of the lth layer, l is the input image, * represents the convolution operation, and f is the activation function;
[0046] S32, after deep feature extraction, applying a corner point detection algorithm to identify corner points of the gear;
[0047] S33, calculate the distance d between each detected corner point and the center point of the gear i :
[0048]
[0049] Among them, (x i ,y i ) is the coordinate of the i-th corner point, (x c ,y c ) are the coordinates of the gear center point.
[0050] Optionally, the S4 specifically includes:
[0051] S41, converting the gear edge and corner features into time series data, and inputting the data into a long short-term memory network, wherein the long short-term memory network processes continuous image frames when the gear rotates, and identifies suspected corners that continuously appear during the rotation process:
[0052] O t =LSTM(F t ,H t-1 );
[0053] Among them, F t is the input feature at time t, representing the corner feature of the gear, H t-1 is the hidden state of the previous moment, the output of the long short-term memory network unit O t With input feature F t Related;
[0054] S42. By analyzing the output of the long short-term memory network, for each suspected corner point, the stability index S of each corner point is calculated by calculating the consistency of the corner point during the continuous gear rotation process. i :
[0055]
[0056] Among them, P it represents the probability of occurrence of corner point i at time t, where T is the number of time frames considered;
[0057] S43. Combining the results of convolutional neural network and long short-term memory network, further analyze each suspected corner point to distinguish the real gear corner points from the pseudo corner points:
[0058] if S i <δ or d i >η·Q edge ,exclude corners i;
[0059] Among them, δ and η are threshold parameters adjusted according to the gear characteristics.
[0060] Optionally, the S5 specifically includes:
[0061] S51. Based on the real corner points of the gear identified by the convolutional neural network and the long short-term memory network, the corner point distance d between each pair of adjacent corner points i and j on the gear is calculated. ij :
[0062]
[0063] Among them, (x i ,y i ) and (x j ,y j ) are the coordinates of adjacent corner points;
[0064] S52, the distance between the corner points d ij With edge clarity index Q edge Combined with the evaluation of the uniformity and symmetry of the gear tooth surface, the standard deviation σ of the distances between all corner points is calculated d and the average distance μ d :
[0065]
[0066] Where N is the total number of corner points;
[0067] S53, combined with standard deviation σ d and the average distance μ d The difference is obtained, and the distance defect index value D of the gear is obtained:
[0068] D=θ·σ d +(1-θ)·|μ d -μ ideal |;
[0069] Among them, μ ideal is the average angular distance of an ideal gear, and θ is a coefficient that weighs the importance of the difference between the standard deviation and the average distance.
[0070] Optionally, the S6 specifically includes:
[0071] S61. Using the gear surface features of the gear edge, gear center point and corner point and the changes of the features in consecutive frames, combined with 3D modeling technology, a 3D model of the gear is created, wherein the 3D model maps the actual geometry of the gear surface, including irregularities caused by wear and manufacturing defects:
[0072] M 3D =f 3D (F cnn ,F lstm );
[0073] Among them, M 3D represents the three-dimensional model of the gear, F cnn and F lstm Represent the output features of convolutional neural network and long short-term memory network respectively;
[0074] The actual shape of the gear tooth surface and tooth bottom is defined by the corner points and gear edges identified by the convolutional neural network and the long short-term memory network, and the two-dimensional image features are converted into coordinate points in three-dimensional space to reconstruct the geometric structure of the gear:
[0075] P 3D (i) = f CT (F cnn (i),F lstm (i));
[0076] Among them, P 3D (i) is the coordinate of the i-th point in the 3D model, F cnn (i) and F lstm (i) is the convolutional neural network and long short-term memory network output of the i-th feature point, f CT represents the coordinate transformation function;
[0077] S62, using 3D model combined with edge clarity Q edge and distance defect index D, calculate the actual surface area A of the gear actual :
[0078]
[0079] Among them, (x i ,y i ) is the coordinate of the i-th vertex in the three-dimensional model, and N is the total number of model vertices;
[0080] S63, the actual area A actual The expected area A of the ideal gear model ideal By comparison, the area defect index value A is obtained:
[0081]
[0082] Among them, A ideal is the expected area of the gear under ideal conditions.
[0083] Optionally, the S7 specifically includes:
[0084] S71. Use the gear 3D model M 3D The angle information of each tooth surface is calculated by comparing the relative directions of adjacent tooth surfaces. For the angle of each tooth surface:
[0085]
[0086] Among them, P 3D (i) and P 3D (i+1) is the vector representation of the adjacent tooth surface in the three-dimensional model;
[0087] S72. Analyze the extracted angle data using a support vector machine to identify the angle deviation compared to the ideal gear model:
[0088] Θ defect =SVM({θ i -θ ideal});
[0089] Among them, Θ defectrepresents the angle defect value identified by the support vector machine, and the support vector machine model is trained on the ideal angle θ of the gear ideal and the actual measured angle θ i The difference between.
[0090] Optionally, the S8 specifically includes: defect Combined with the area defect index A and the distance defect index D, a comprehensive defect assessment of the gear is formed:
[0091] C total =ω A ·A+ω D ·D+ω Θ ·Θ defect ;
[0092] Among them, C total is the comprehensive defect index value of the gear, ω A ,ω D and ω Θ are the weight coefficients of area, distance and angle defects respectively.
[0093] Optionally, the S9 specifically includes:
[0094] S91. Gears are divided into different categories according to their application type, each category having its own specific performance requirements and safety standards;
[0095] S92. Define a different set of thresholds for each category, the thresholds refer to the specific requirements of the category, including angle defects, area defects, and distance defects;
[0096] S93, using a weighted scoring system, adjust C according to the type of gear total The weight of each indicator in:
[0097] C weighted,i =ω D,i ·D+ω A,i ·A+ω Θ,i ·Θ defect (1≤i);
[0098] Among them, ω D,i ,ω A,i and ω Θ,i are the weight coefficients of distance, area and angle defects in category i, respectively;
[0099] S94, according to the weighted comprehensive defect index value C weighted,i And the threshold standard corresponding to category i, the gears are divided into different quality grades:
[0100]
[0101] Among them, T1,i , T 2,i and T 3,i is the threshold for class i.
[0102] The beneficial effects of the present invention are:
[0103] (1) The present invention can more accurately identify and locate various defects on gears, such as cracks, scratches, wear, etc., by utilizing convolutional neural networks and long short-term memory networks. Compared with traditional rule-based image processing methods, deep learning methods can more effectively process complex features and patterns in images, thereby improving the accuracy of defect detection.
[0104] (2) The present invention significantly reduces the reliance on manual inspection and improves the efficiency of inspection through an automated image analysis process. The automated process not only speeds up the inspection, but also eliminates the subjective judgment differences in manual inspection, ensuring the consistency of the inspection results. Combining multiple types of defect indicators (such as distance, area and angle defects) and adopting a comprehensive evaluation model, the system can comprehensively evaluate the overall quality of the gear. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0106] Figure 1 A flowchart of an adaptive gear defect detection method based on deep learning proposed by the present invention;
[0107] Figure 2 This is an effect diagram of enhancing the image in the adaptive gear defect detection method based on deep learning proposed in the present invention and using the Canny edge detection algorithm to highlight the edge of the gear. DETAILED DESCRIPTION
[0108] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0109] refer to Figure 1 , an adaptive gear defect detection method based on deep learning, comprising the following steps:
[0110] S1. Image enhancement processing: Use contrast-limited adaptive histogram equalization technology to perform image enhancement processing on the gear surface image to be inspected;
[0111] In this implementation, step S1 specifically includes:
[0112] S11, dividing the gear surface image into multiple small blocks according to the gear tooth surface and tooth bottom areas, and independently performing histogram equalization on each small block according to the characteristics of the area where it is located;
[0113] S12. Apply contrast limitation to each small block, especially make appropriate contrast adjustment in the reflective area on the gear surface and the shadow area on the gear bottom to reduce the impact of high reflection and deep shadow on image quality;
[0114] S13, using bilinear interpolation to fuse the equalized small blocks to ensure the continuity and natural transition of the gear surface image;
[0115] S14. Quantitative evaluation of the enhanced gear surface image quality:
[0116]
[0117] in, represents the pixel value of the i-th row and j-th column in the enhanced gear surface image, represents the average pixel value of the enhanced gear surface image, M and N represent the number of rows and columns of the image respectively.
[0118] Through the customized image enhancement processing for the surface characteristics of the gear in this embodiment, the detailed features of the gear can be more effectively highlighted and the accuracy of subsequent defect detection can be improved.
[0119] S2, image preprocessing: preprocessing the enhanced gear surface image to obtain a gear area image;
[0120] In this implementation, S2 specifically includes:
[0121] S21. Automatic threshold segmentation technology is applied to distinguish the gear surface from the background. The optimal threshold T is determined using the formula based on the unique reflective characteristics of the gear surface and the difference in the background:
[0122]
[0123] Among them, I gear represents the enhanced gear surface image, min(I gear ) and max(I gear ) represent the minimum and maximum pixel values in the image respectively;
[0124] S22. Apply an erosion operation to the image according to the threshold segmentation result T to remove small noise points and irregular edges. The mathematical representation of the erosion operation, considering the segmentation threshold T:
[0125]
[0126] Among them, E gearrepresents the image after corrosion, I is the original image, S is the structural element designed for the gear, and the structural element S is the gear surface characteristics obtained from the threshold segmentation T;
[0127] Apply a dilation operation to the eroded image based on the optimal threshold T determined by the threshold segmentation result to enhance the continuity of the gear edge:
[0128]
[0129] Among them, D gear represents the image after dilation;
[0130] In order to adapt to different types and sizes of gears, the size and shape of the structural element S can be adjusted according to the specific parameters of the gear. For example, for small gears, smaller structural elements are used, while for large gears or gears with complex tooth shapes, relatively larger or more complex shaped structural elements are used. The number of iterations of the morphological operation is optimized according to the characteristics of the gear surface and the image quality. For cleaner gear surfaces, the number of iterations is reduced to avoid over-processing, and for dirty or worn gear surfaces, the number of iterations is increased to ensure sufficient noise removal and edge enhancement. Morphological operations targeting gear characteristics can more effectively process gear images and provide higher quality image input for subsequent feature extraction and defect detection.
[0131] S23, apply Gaussian blur to preprocess the enhanced gear surface image, the standard deviation of Gaussian blur σ G and quantified image quality Q gear Related:
[0132]
[0133] Among them, k is a coefficient adjusted according to the characteristics of the gear image;
[0134] The improved Canny edge detection algorithm is used to perform non-maximum suppression on the edge, and the threshold is set based on the average pixel value of the gear image. and standard deviation
[0135]
[0136] Among them, λ is a coefficient adjusted according to the characteristics of the gear image.
[0137] The edge is processed by non-maximum suppression to enhance the clarity of the gear edge. This step is performed on the basis of Gaussian blur to ensure that the gear edge remains clear while denoising. Finally, the edge connection technology is applied to ensure that the edge information of the gear is fully presented in the image.
[0138] S3, feature extraction: use convolutional neural network to extract features from the gear area image, and extract features of the gear edge, gear center point and each corner point;
[0139] In this implementation, S3 specifically includes:
[0140] S31. Use the pre-trained convolutional neural network model to perform deep feature extraction on the pre-processed gear image to identify the key features of the gear edge, gear center point and corner point. The extraction of key features is based on the superposition of convolution layer and pooling layer, where the output of each convolution layer is l :
[0141] O l =f(W l *I+b l );
[0142] Among them, W l and b l are the convolution kernel weights and bias terms of the lth layer, l is the input image, * represents the convolution operation, and f is the activation function;
[0143] S32, applying the output after feature extraction to a corner detection algorithm to identify the real corners of the gear. Considering that the gear image has been processed by Gaussian blur and edge detection, the corner detection algorithm will be optimized based on these preprocessing steps to improve the accuracy and robustness of corner detection;
[0144] S33, calculate the distance d between each detected corner point and the center point of the gear i , and associate these distances with the edge detection results to improve the accuracy of corner detection:
[0145]
[0146] Among them, (x i ,y i ) is the coordinate of the i-th corner point, (x c ,y c ) are the coordinates of the gear center point.
[0147] This implementation method can accurately extract the key features of the gear and provide important input for subsequent defect analysis.
[0148] S4, Corner analysis: Use a segmentation algorithm that combines a convolutional neural network with a long short-term memory network to determine suspected corners and pseudo corners;
[0149] In this implementation, S4 specifically includes:
[0150] S41. Convert the gear edge and corner features into time series data and input them into the long short-term memory network. The long short-term memory network processes the continuous image frames when the gear rotates and identifies the suspected corners that appear continuously during the rotation process:
[0151] O t =LSTM(F t ,H t-1 );
[0152] Among them, F t is the input feature at time t, representing the corner feature of the gear, H t-1 is the hidden state of the previous moment, the output of the long short-term memory network unit O t With input feature F t Related;
[0153] S42. By analyzing the output of the long short-term memory network, for each suspected corner point, the stability index S of each corner point is calculated by calculating the consistency of the corner point during the continuous gear rotation process. i :
[0154]
[0155] Among them, P it represents the probability of occurrence of corner point i at time t, where T is the number of time frames considered;
[0156] S43. Combining the results of convolutional neural network and long short-term memory network, further analyze each suspected corner point to distinguish the real gear corner point from the false corner point to ensure the authenticity of the corner point:
[0157] if S i <δ or d i >η·Q edge ,exclude corners i;
[0158] Among them, δ and η are threshold parameters adjusted according to the gear characteristics.
[0159] In this embodiment, the rotation characteristics and tooth structure of the gear are particularly considered to ensure accurate identification and differentiation of real and fake corner points in complex gear movements and changes.
[0160] S5. Calculation of distance defect index: Calculate the distance defect index value D by the difference between the standard deviation σ of the distance between corner points and the average distance μ;
[0161] In this implementation, S5 specifically includes:
[0162] S51. Based on the real corner points of the gear identified by the convolutional neural network and the long short-term memory network, the corner point distance d between each pair of adjacent corner points i and j on the gear is calculated. ij , these distances are key to measuring gear tooth wear and geometric accuracy:
[0163]
[0164] Among them, (x i ,y i ) and (x j ,y j ) are the coordinates of adjacent corner points;
[0165] S52, the distance between the corner points d ij With edge clarity index Q edge Combined with the evaluation of the uniformity and symmetry of the gear tooth surface, the standard deviation σ of the distances between all corner points is calculated d and the average distance μ d :
[0166]
[0167] Where N is the total number of corner points;
[0168] S53, combined with standard deviation σ d and the average distance μ d The difference is obtained, and the distance defect index value D of the gear is obtained. The distance defect index value D reflects the overall condition of the gear, especially the wear and geometric accuracy of the tooth surface:
[0169] D=θ·σ d +(1-θ)·|μ d -μ ideal |;
[0170] Among them, μ ideal is the average angular distance of an ideal gear, and θ is a coefficient that weighs the importance of the difference between the standard deviation and the average distance.
[0171] S6. Calculation of area defect index: Determine the area defect index value A of the gear through three-dimensional modeling analysis;
[0172] In this implementation, S6 specifically includes:
[0173] S61. Using the gear surface features of the gear edge, gear center point and corner point and the changes of the features in consecutive frames, combined with 3D modeling technology, a 3D model of the gear is created. The 3D model maps the actual geometry of the gear surface, including irregularities caused by wear and manufacturing defects:
[0174] M 3D =f 3D (Fcnn ,F lstm );
[0175] Among them, M 3D represents the three-dimensional model of the gear, F cnn and F lstm Represent the output features of convolutional neural network and long short-term memory network respectively;
[0176] The actual shape of the gear tooth surface and tooth bottom is defined by the corner points and gear edges identified by the convolutional neural network and the long short-term memory network, and the two-dimensional image features are converted into coordinate points in three-dimensional space to reconstruct the geometric structure of the gear:
[0177] P 3D (i) = f CT (F cnn (i),F lstm (i));
[0178] Among them, P 3D (i) is the coordinate of the i-th point in the 3D model, F cnn (i) and F lstm (i) is the convolutional neural network and long short-term memory network output of the i-th feature point, f CT represents the coordinate transformation function;
[0179] After the 3D model is completed, it is refined to ensure that every detail of the gear can be reflected in the model. This includes optimizing the details of each tooth surface of the gear to ensure that the model can accurately reflect the state of the actual gear.
[0180] The 3D model can be used to create an accurate 3D gear model, which provides the necessary basis for subsequent area defect analysis. The 3D gear model not only reflects the actual geometric characteristics of the gear, but also converts the analysis results into a 3D structure that can be used for further analysis.
[0181] S62, using 3D model combined with edge clarity Q edge and distance defect index D, calculate the actual surface area A of the gear actual :
[0182]
[0183] Among them, (x i ,y i ) is the coordinate of the i-th vertex in the three-dimensional model, and N is the total number of model vertices;
[0184] S63, the actual area A actual The expected area A of the ideal gear model ideal By comparison, the area defect index value A is obtained:
[0185]
[0186] Among them, A ideal is the expected area of the gear under ideal conditions.
[0187] S7, angle defect index calculation: use support vector machine to analyze the angle defect of the gear and determine the angle defect index value Θ of the gear;
[0188] In this implementation, S7 specifically includes:
[0189] S71. Use the gear 3D model M 3D The angle information of each tooth surface is calculated by comparing the relative directions of adjacent tooth surfaces. For the angle of each tooth surface:
[0190]
[0191] Among them, P 3D (i) and P 3D (i+1) is the vector representation of the adjacent tooth surface in the three-dimensional model;
[0192] S72. Analyze the extracted angle data using a support vector machine to identify angle deviations compared to an ideal gear model. The support vector machine model is trained based on the difference between the ideal angle value and the actual angle value of the gear to accurately identify angle defects:
[0193] Θ defect =SVM({θ i -θ ideal});
[0194] Among them, Θ defect represents the angle defect value identified by the support vector machine, and the support vector machine model is trained on the ideal angle θ of the gear ideal and the actual measured angle θ i The difference between.
[0195] S8. Calculation of comprehensive defect index: Calculate the comprehensive defect index value C of the gear by combining the distance defect index value D, the area defect index value A and the angle defect index value θ;
[0196] In this embodiment, S8 specifically includes: defect Combined with the area defect index A and the distance defect index D, a comprehensive defect assessment of the gear is formed:
[0197] C total =ω A ·A+ω D ·D+ω θ ·Θ defect ;
[0198] Among them, C total is the comprehensive defect index value of the gear, ω A ,ω D and ω Θ are the weight coefficients of area, distance and angle defects respectively.
[0199] S9. Defect grade determination: Determine the defect grade of the gear according to the comprehensive defect index value C of the gear.
[0200] In this implementation, S9 specifically includes:
[0201] S91. Gears are divided into different categories according to their application type, each category having its own specific performance requirements and safety standards;
[0202] This embodiment classifies gears into different categories according to their application types (such as high speed, heavy load, precision, etc.). Each category has its own specific performance requirements and safety standards. For example:
[0203] Category A (High-speed applications)
[0204] Category B (heavy duty applications)
[0205] Category C (Precision Applications)
[0206] S92. Define a different set of thresholds for each category, the thresholds refer to the specific requirements of the category, including angle defects, area defects, and distance defects;
[0207] For each category, define a different set of thresholds that take into account the specific requirements of that category. For example, for category A, we may be more concerned with angle defects, for category B, we may be more concerned with area, and for category C, we may be more concerned with distance defects.
[0208] S93, using a weighted scoring system, adjust C according to the type of gear total The weight of each indicator in:
[0209] C weighted,i =ω D,i ·D+ω A,i ·A+ω Θ,i ·Θ defect (1≤i);
[0210] Among them, ω D,i ,ω A,i and ω Θ,i are the weight coefficients of distance, area and angle defects in category i, respectively;
[0211] S94, according to the weighted comprehensive defect index value C wighted,iAnd the threshold standard corresponding to category i, the gears are divided into different quality grades:
[0212]
[0213] Among them, T 1,i , T 2,i and T 3,i is the threshold for class i.
[0214] This embodiment not only provides a gear quality grading method based on comprehensive defect evaluation, but also takes into account the use category of the gear and the needs of specific applications, making the evaluation more comprehensive and accurate.
[0215] Embodiment 1:
[0216] The deep learning-based adaptive gear defect detection system of the present invention is deployed in Company A, a company specializing in automobile transmission system manufacturing located in Hangzhou, Zhejiang Province, China. Company A has a gear production line with an annual output of about 1 million pieces. There are many types of gears, including spur gears, helical gears, and bevel gears, which are used in different models of automobile transmission systems.
[0217] Each gear on the production line needs to undergo rigorous quality inspection after manufacturing. Traditional inspection methods rely on manual measurement and visual inspection, which is not only inefficient but also easily affected by the operator's technical level and subjective judgment. In order to improve inspection efficiency and accuracy, we installed high-resolution cameras and computer vision processing units at the end of the production line, and sent the collected image data to an analysis platform equipped with a deep learning algorithm.
[0218] During the six-month implementation, we conducted comprehensive quality inspections on the different types of gears produced on the production line. During this period, a total of about 500,000 gears were produced, covering a variety of types such as spur gears, helical gears and bevel gears. The diameter of each gear ranged from 10cm to 50cm, and the gear materials were mainly steel and aluminum alloy.
[0219] Table 1 Gear quality inspection data comparison table
[0220]
[0221] As shown in Table 1 above, in the traditional method, the average inspection time for each gear is about 3 minutes. After using the system of the present invention, the average inspection time is shortened to 31 seconds. During the 6-month implementation period, the total inspection time was reduced from 152,654 minutes to 16,856 minutes, and the efficiency was improved by 9.05 times. In manual inspection, the average false alarm rate was about 4.1% and the missed alarm rate was about 2.75%. In our system, the false alarm rate dropped to about 0.8% and the missed alarm rate dropped to 0.34%. Through the deep learning algorithm, the system can accurately identify defects such as tiny cracks, scratches and wear. Through the system, each gear obtains a comprehensive defect index value based on distance defects, area defects and angle defects. These data help us evaluate the overall quality of the gear more comprehensively. According to the comprehensive defect index, about 95.9% of the gears were rated as "excellent" or "good", which is about 10.9% higher than the traditional method.
[0222] By implementing the adaptive gear defect detection system of the present invention, Company A has significantly improved the efficiency and accuracy of gear detection, reduced labor costs, and improved product quality and customer satisfaction. In addition, the deployment of the system has also laid the foundation for Company A to further implement automated production and quality control in the future.
[0223] The present invention can more accurately identify and locate various defects on gears, such as cracks, scratches, wear, etc., by using convolutional neural networks and long short-term memory networks. Compared with traditional rule-based image processing methods, deep learning methods can more effectively process complex features and patterns in images, thereby improving the accuracy of defect detection.
[0224] The present invention significantly reduces the reliance on manual inspection and improves the efficiency of inspection through an automated image analysis process. The automated process not only speeds up the inspection, but also eliminates the subjective judgment differences in manual inspection, ensuring the consistency of the inspection results. Combining multiple types of defect indicators (such as distance, area and angle defects) and adopting a comprehensive evaluation model enables the system to comprehensively evaluate the overall quality of the gear.
[0225] In summary, the deep learning adaptive gear defect detection method described in the present invention not only improves the accuracy and efficiency of detection, but also provides a comprehensive quality assessment, while having strong adaptability and the potential to reduce maintenance costs.
[0226] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. An adaptive gear defect detection method based on deep learning, characterized in that: The steps include: S1. Image enhancement processing: Use contrast-limited adaptive histogram equalization technology to perform image enhancement processing on the gear surface image to be inspected; S2, image preprocessing: preprocessing the enhanced gear surface image to obtain a gear area image; S3, feature extraction: use convolutional neural network to extract features from the gear area image, and extract features of the gear edge, gear center point and each corner point; S4, Corner analysis: Use a segmentation algorithm that combines a convolutional neural network with a long short-term memory network to determine suspected corners and pseudo corners; S5. Calculation of distance defect index: Calculate the distance defect index value D by the difference between the standard deviation σ of the distance between corner points and the average distance μ; S6. Calculation of area defect index: Determine the area defect index value A of the gear through three-dimensional modeling analysis; The S6 specifically includes: S61. Using the gear surface features of the gear edge, gear center point and corner point and the changes of the features in consecutive frames, combined with 3D modeling technology, a 3D model of the gear is created, wherein the 3D model maps the actual geometry of the gear surface, including irregularities caused by wear and manufacturing defects: M 3D =f 3D (F cnn ,F lstm ); Among them, M 3D represents the three-dimensional model of the gear, F cnn and F lstm Represent the output features of convolutional neural network and long short-term memory network respectively; The actual shape of the gear tooth surface and tooth bottom is defined by the corner points and gear edges identified by the convolutional neural network and the long short-term memory network, and the two-dimensional image features are converted into coordinate points in three-dimensional space to reconstruct the geometric structure of the gear: P 3D (i)=f CT (F cnn (i),F lstm (i)); Among them, P 3D (i) is the coordinate of the i-th point in the 3D model, F cnn (i) and F lstm (i) is the convolutional neural network and long short-term memory network output of the i-th feature point, f CT represents the coordinate transformation function; S62, using 3D model combined with edge clarity Q edge and distance defect index D, calculate the actual surface area A of the gear actual : Among them, (x i ,y i ) is the coordinate of the i-th vertex in the three-dimensional model, and N is the total number of model vertices; S63, the actual area A actual The expected area A of the ideal gear model ideal By comparison, the area defect index value A is obtained: Among them, A ideal is the expected area of the gear under ideal conditions; S7, angle defect index calculation: use support vector machine to analyze the angle defect of the gear and determine the angle defect index value Θ of the gear; S8. Calculation of comprehensive defect index: Calculate the comprehensive defect index value C of the gear by combining the distance defect index value D, the area defect index value A and the angle defect index value θ; S9. Defect grade determination: Determine the defect grade of the gear based on the comprehensive defect index value C of the gear.
2. The method for adaptive gear defect detection based on deep learning according to claim 1, characterized in that: The step S1 specifically includes: S11, dividing the gear surface image into multiple small blocks according to the gear tooth surface and tooth bottom areas, and independently performing histogram equalization on each small block according to the characteristics of the area where it is located; S12, limiting the contrast of each small block, and adjusting the contrast of the gear tooth surface reflection area and the gear tooth bottom shadow area; S13, using bilinear interpolation to fuse the equalized small blocks; S14. Quantitative evaluation of the enhanced gear surface image quality: in, represents the pixel value of the i-th row and j-th column in the enhanced gear surface image, represents the average pixel value of the enhanced gear surface image, M and N represent the number of rows and columns of the image respectively.
3. The method for adaptive gear defect detection based on deep learning according to claim 2, characterized in that: The S2 specifically includes: S21. Automatic threshold segmentation technology is applied to distinguish the gear surface from the background. The optimal threshold T is determined using the formula based on the unique reflective characteristics of the gear surface and the difference in the background: Among them, I gear represents the enhanced gear surface image, min(I gear ) and max(I gear ) represent the minimum and maximum pixel values in the image respectively; S22, applying morphological operations to the segmented image, and applying corrosion operations to the image according to the optimal threshold T determined by the threshold segmentation result: Among them, E gear represents the image after corrosion, I is the original image, S is the structural element designed for the gear, and the structural element S is the gear surface characteristics obtained from the threshold segmentation T; Apply the dilation operation to the eroded image based on the optimal threshold T determined by the threshold segmentation result: Among them, D gear represents the image after dilation; S23, apply Gaussian blur to preprocess the enhanced gear surface image, the standard deviation of Gaussian blur σ G and quantified image quality Q gear Related: Among them, k is a coefficient adjusted according to the characteristics of the gear image; The improved Canny edge detection algorithm is used to perform non-maximum suppression on the edge, and the threshold is set based on the average pixel value of the gear image. and standard deviation Among them, λ is a coefficient adjusted according to the characteristics of the gear image.
4. The method for adaptive gear defect detection based on deep learning according to claim 2, characterized in that: The S3 specifically includes: S31, using a pre-trained convolutional neural network model to perform deep feature extraction on the pre-processed gear image, and identify the key features of the gear edge, gear center point and corner point, wherein the extraction of the key features is based on the superposition of the convolution layer and the pooling layer, wherein the output of each convolution layer is l : O l =f(W l *I+b l ); Among them, W l and b l are the convolution kernel weights and bias terms of the lth layer, l is the input image, * represents the convolution operation, and f is the activation function; S32, after deep feature extraction, applying a corner point detection algorithm to identify corner points of the gear; S33, calculate the distance d between each detected corner point and the center point of the gear i : Among them, (x i ,y i ) is the coordinate of the i-th corner point, (x c ,y c ) are the coordinates of the gear center point.
5. The method for adaptive gear defect detection based on deep learning according to claim 4, characterized in that: The S4 specifically includes: S41, converting the gear edge and corner features into time series data, and inputting the data into a long short-term memory network, wherein the long short-term memory network processes continuous image frames when the gear rotates, and identifies suspected corners that continuously appear during the rotation process: O t =LSTM(F t ,H t-1 ); Among them, F t is the input feature at time t, representing the corner feature of the gear, H t-1 is the hidden state of the previous moment, the output of the long short-term memory network unit O t With input feature F t Related; S42. By analyzing the output of the long short-term memory network, for each suspected corner point, the stability index S of each corner point is calculated by calculating the consistency of the corner point during the continuous gear rotation process. i : Among them, P it represents the probability of occurrence of corner point i at time t, where T is the number of time frames considered; S43. Combining the results of convolutional neural network and long short-term memory network, further analyze each suspected corner point to distinguish the real gear corner points from the pseudo corner points: if S i <δ or d i >η·Q edge ,exclude corners i; Among them, δ and η are threshold parameters adjusted according to the gear characteristics.
6. The method for adaptive gear defect detection based on deep learning according to claim 3, characterized in that: The S5 specifically includes: S51. Based on the real corner points of the gear identified by the convolutional neural network and the long short-term memory network, the corner point distance d between each pair of adjacent corner points i and j on the gear is calculated. ij : Among them, (x i ,y i ) and (x j ,y j ) are the coordinates of adjacent corner points; S52, the distance between the corner points d ij With edge clarity index Q edge Combined with the evaluation of the uniformity and symmetry of the gear tooth surface, the standard deviation σ of the distances between all corner points is calculated d and the average distance μ d : Where N is the total number of corner points; S53, combined with standard deviation σ d and the average distance μ d The difference is obtained, and the distance defect index value D of the gear is obtained: D=θ·σ d +(1-θ)·|μ d -m ideal |; Among them, μ ideal is the average angular distance of an ideal gear, and θ is a coefficient that weighs the importance of the difference between the standard deviation and the average distance.
7. The method for adaptive gear defect detection based on deep learning according to claim 1, characterized in that: The S7 specifically includes: S71. Use the gear 3D model M 3D The angle information of each tooth surface is calculated by comparing the relative directions of adjacent tooth surfaces. For the angle of each tooth surface: Among them, P 3D (i) and P 3D (i+1) is the vector representation of the adjacent tooth surface in the three-dimensional model; S72. Analyze the extracted angle data using a support vector machine to identify the angle deviation compared to the ideal gear model: I defect =SVM({θ i -θ ideal }); Among them, Θ defect represents the angle defect value identified by the support vector machine, and the support vector machine model is trained on the ideal angle θ of the gear ideal and the actual measured angle θ i The difference between.
8. The method for adaptive gear defect detection based on deep learning according to claim 7, characterized in that: The S8 specifically includes setting the angle defect value θ defect Combined with the area defect index A and the distance defect index D, a comprehensive defect assessment of the gear is formed: C total =ω A ·A+ω D ·D+ω Θ ·I defect ; Among them, C total is the comprehensive defect index value of the gear, ω A ,ω D and ω Θ are the weight coefficients of area, distance and angle defects respectively.
9. The method for adaptive gear defect detection based on deep learning according to claim 1, characterized in that: The S9 specifically includes: S91. Gears are divided into different categories according to their application type, each category having its own specific performance requirements and safety standards; S92. Define a different set of thresholds for each category, the thresholds refer to the specific requirements of the category, including angle defects, area defects, and distance defects; S93, using a weighted scoring system, adjust C according to the type of gear total The weight of each indicator in: C weighted,i =ω D,i ·D+ω A,i ·A+ω Θ,i ·I defect (1≤i); Among them, ω D,i ,ω A,i and ω Θ,i are the weight coefficients of distance, area and angle defects in category i, respectively; S94, according to the weighted comprehensive defect index value C weighted,i And the threshold standard corresponding to category i, the gears are divided into different quality grades: Among them, T 1,i 、T 2,i and T 3,i is the threshold for class i.
Citation Information
Patent Citations
Gear defect detection method
CN115049667A
Mesh fabric defect rapid detection method based on image data processing
CN117218114A