Gear forming defect recognition method
By converting gear images to polar coordinates and constructing standard tooth profiles and residual profiles, combined with a gear defect classification network, the problem of low accuracy in identifying gear forming defects was solved, and high-precision identification and classification of minute defects was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-27
AI Technical Summary
Existing image recognition technologies struggle to accurately separate minute defect features from the strongly periodic background of gear teeth, resulting in low defect recognition accuracy.
The gear image is converted to polar coordinates, the radial grayscale profile is extracted and normalized, and a standard tooth profile and residual profile are constructed. The positive deviation, negative deviation, profile skeleton and extreme diameter abrupt change feature map are processed by the gear defect classification network to identify gear forming defects.
It significantly improves the recognition accuracy of gear forming defects, can clearly separate minute defect features, reduces the influence of factors such as uneven lighting, and improves the reliability of identification and classification accuracy of fine linear defects.
Smart Images

Figure CN121353288B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and particularly relates to a gear forming defect recognition method. BACKGROUND
[0002] As the core basic component of mechanical transmission system, the forming precision of gear is directly related to the transmission efficiency, running stability and service life of mechanical equipment. In the forming process of gear forging, injection molding, stamping and the like, various defects such as flash, shrink mark, micro-crack, tooth size deviation and the like are easily produced due to multiple factors such as material properties, mold precision, process parameter fluctuation and the like. If these defects cannot be accurately recognized, not only the gear transmission precision will be reduced, but also fatigue damage may be caused due to stress concentration, and thus the whole mechanical system fails, so the defect detection after gear forming is a key link to guarantee product quality.
[0003] At present, with the development of automatic production technology, image recognition technology has gradually replaced traditional manual detection and contact measurement, and has become one of the mainstream schemes for gear forming defect detection. The existing image recognition type detection method usually first collects the gear surface image through an industrial camera, then adopts traditional image processing algorithms such as threshold segmentation, edge detection, morphological processing and the like to segment and extract features of the gear region in the image, and finally judges whether there is a defect and the defect type according to a preset feature threshold or a template matching rule. With the automation advantage of machine vision, this kind of method effectively improves the detection efficiency, avoids the subjectivity of manual detection and the damage to the gear surface caused by contact measurement, but there are still significant technical problems in actual application: due to the strong periodicity of gear tooth shape, and the fact that the gray feature of part of the micro-defects is extremely small and the normal tooth surface is easily disturbed by uneven illumination, the traditional image processing algorithm is difficult to accurately separate this kind of weak defect feature from the strong periodic background, and there is a problem of low defect recognition accuracy. SUMMARY
[0004] In view of the above problems in the prior art, the gear forming defect recognition method provided by the present application solves the problem of low defect recognition accuracy in the prior art.
[0005] In order to achieve the above-mentioned application purposes, the technical scheme adopted by the present application is as follows: a gear forming defect recognition method, comprising:
[0006] Collecting a gear forming image, separating the background in the gear forming image to obtain a gear image;
[0007] Taking the center point of the gear as the origin, converting the gear image to polar coordinates to obtain a gear polar image;
[0008] In the gear polar image, based on the periodicity of the gear tooth number, extracting radial gray profiles at each angle and normalizing to construct a standard tooth profile at each angle.
[0009] A residual profile is obtained by calculating the difference between the normalized radial gray profile and the standard tooth profile, and a residual profile graph is constructed, from which a positive deviation profile graph and a negative deviation profile graph are extracted respectively;
[0010] Defect skeleton points are extracted from the positive deviation profile graph and the negative deviation profile graph, and a profile skeleton graph is obtained by merging the two graphs;
[0011] According to the normalized radial gray profile of each angle, the difference between the polar radius mutation value and the average value is found at the same polar radius, and a polar radius mutation feature value is calculated to form a polar radius mutation feature graph;
[0012] The gear forming defect type is obtained by processing the positive deviation profile graph, the negative deviation profile graph, the profile skeleton graph and the polar radius mutation feature graph using a gear defect classification network.
[0013] Further, the process of constructing a standard tooth profile of each angle includes:
[0014] According to the number of teeth of the gear, the inherent angle occupied by a single tooth is obtained;
[0015] On the gear polar graph, the gray values at different polar radii of the same angle are used to form a radial gray profile of each angle;
[0016] In the radial gray profile of each angle, each gray value is normalized to obtain a normalized radial gray profile of each angle;
[0017] According to the normalized radial gray profile of each angle, based on the inherent angle occupied by a single tooth, a standard tooth profile of each angle is calculated.
[0018] Further, the calculation formula of the standard tooth profile of each angle is:
[0019] ,
[0020] where P ref (θ i , r) is the standard tooth profile of the i-th angle θ i , △θ is the inherent angle occupied by a single tooth, △θ = 2π / N, N is the number of teeth of the gear, K is the number of teeth participating in the calculation, k is the tooth number, P no (θ i +k·△θ, r) is the normalized radial gray profile at θ i +k·△θ different polar radii r, and i is the angle number.
[0021] Further, the process of extracting the positive deviation profile graph and the negative deviation profile graph includes:
[0022] Subtracting the corresponding standard tooth profile from the normalized radial gray profile of each angle, a residual profile of each angle is obtained;
[0023] The residual profiles of each angle are composed into a residual profile graph;
[0024] In the residual profile graph, the pixel points with gray value greater than 0 are retained, and the gray values of other pixel points are set to 0, to compose a positive deviation profile graph;
[0025] In the residual profile graph, the pixel points with gray value less than 0 are retained, and the gray values of other pixel points are set to 0, to compose a negative deviation profile graph.
[0026] Further, the process of obtaining the profile skeleton graph comprises:
[0027] In the positive deviation profile graph, the pixel points with gray value greater than 0 are taken as the center, and when there are pixel points with gray value of 0 in the center neighborhood range, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and other pixel points are set to 0, to obtain a first skeleton graph;
[0028] In the negative deviation profile graph, the pixel points with gray value less than 0 are taken as the center, and when there are pixel points with gray value of 0 in the center neighborhood range, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and other pixel points are set to 0, to obtain a second skeleton graph;
[0029] The first skeleton graph and the second skeleton graph are subjected to AND operation, to obtain a profile skeleton graph.
[0030] Further, the process of composing the polar radius mutation feature graph comprises:
[0031] The partial derivative of the normalized radial gray profile P no (θ i ,r) along the polar radius direction is obtained, to obtain the polar radius gradient of each pixel point at the angle;
[0032] In the normalized radial gray profile of each angle, the polar radius mutation value of each pixel point is obtained according to the difference of the polar radius gradient of adjacent pixel points;
[0033] The polar radius mutation values of the pixel points belonging to the same polar radius are averaged, to obtain the mutation average value of the same polar radius;
[0034] Under the same polar radius, the mutation feature value of each pixel point is calculated according to the difference between the polar radius mutation value and the mutation average value of each pixel point;
[0035] The mutation feature values of each pixel point are combined into a polar radius mutation feature graph according to the corresponding polar coordinate positions thereof.
[0036] Further, the formula for calculating the mutation feature value of each pixel point is:
[0037] ,
[0038] wherein ζ j is the mutation feature value of the jth pixel point, D j is the polar radius mutation value of the jth pixel point, D avg is the mutation mean value of the same polar radius, σ(D j ) is the standard deviation of the polar radius mutation value of each pixel point of the same polar radius, ε is to prevent division by zero, j is the number of pixel points, and || is the absolute value operation.
[0039] Further, the gear defect classification network comprises: four feature mapping units, a defect feature enhancement gate unit, a multiplier M1, a multiplier M2, a multiplier M3, three deep residual units, a first Concat layer, and a fully connected layer.
[0040] The input end of the first feature mapping unit is configured to input the positive deviation profile, and the output end thereof is connected with the first input end of the multiplier M1; the input end of the second feature mapping unit is configured to input the negative deviation profile, and the output end thereof is connected with the first input end of the multiplier M2; and the input end of the third feature mapping unit is configured to input the profile skeleton, and the output end thereof is connected with the first input end of the multiplier M3.
[0041] The input end of the fourth feature mapping unit is configured to input the polar radius mutation feature map, and the output end thereof is connected with the input end of the defect feature enhancement gate unit.
[0042] The output end of the defect feature enhancement gate unit is connected with the second input end of the multiplier M1, the second input end of the multiplier M2, and the second input end of the multiplier M3, respectively.
[0043] The input end of the first deep residual unit is connected with the output end of the multiplier M1; the input end of the second deep residual unit is connected with the output end of the multiplier M2; and the input end of the third deep residual unit is connected with the output end of the multiplier M3.
[0044] The input end of the first Concat layer is connected with the output end of the first deep residual unit, the output end of the second deep residual unit, and the output end of the third deep residual unit, respectively, and the output end thereof is connected with the input end of the fully connected layer.
[0045] The output end of the fully connected layer serves as the output end of the gear defect classification network.
[0046] Further, the four feature mapping units are of the same structure, and each comprises: a first convolutional block, a second convolutional block, a third convolutional block, a fourth convolutional block, a fifth convolutional block, and a second Concat layer.
[0047] The input end of the first convolutional block is connected with the output end of the second convolutional block, the output end of the third convolutional block and the output end of the fourth convolutional block.
[0048] The input end of the second Concat layer is connected with the output end of the second convolutional block, the output end of the third convolutional block and the output end of the fourth convolutional block, and the output end is connected with the input end of the fifth convolutional block.
[0049] The output end of the fifth convolutional block is the output end of the feature mapping unit.
[0050] Further, the defect feature enhancement gate unit comprises a first convolutional layer, a BN layer and a Sigmoid layer.
[0051] The input end of the first convolutional layer is the input end of the defect feature enhancement gate unit, and the output end is connected with the input end of the BN layer.
[0052] The input end of the Sigmoid layer is connected with the output end of the BN layer, and the output end is the output end of the defect feature enhancement gate unit.
[0053] The present application has the following advantages:
[0054] 1. The present application converts the gear image to the polar coordinate system with the gear center as the origin, so that the periodic structure such as the gear slot can be stretched into a regular periodic sequence, and the gray scale distribution in the same angle direction is attributed to the same radial section. This processing aligns the strong periodicity of the gear shape in the radial direction, which fundamentally reduces the interference of the periodic structure on the defect detection.
[0055] 2. The present application extracts the radial gray scale profile for each angle and normalizes it, which can eliminate the influence of uneven illumination, local exposure difference and other factors, and construct the difference value (residual profile) between the standard gear profile and the actual profile. The defects with extremely low amplitude such as micro-cracks and slight burrs are significantly enlarged in the residual profile, and are clearly separated from the periodic background, so that the weak disturbance that is difficult to detect by traditional algorithms is enhanced.
[0056] 3. The present application separates the residual profile into positive deviation and negative deviation, which can distinguish defects in different situations, so that the network learns the cause characteristics of different types of defects and improves the classification accuracy.
[0057] 4. The present application extracts defect skeleton points from the positive deviation and negative deviation profile, and constructs a profile skeleton graph, which reflects the texture of the defect and improves the recognition reliability of small linear defects.
[0058] 5、The application calculates the difference value between the mutation value and the average value under the same polar radius, can find the deviation characteristics of each position and the average value of the same polar radius, find the defect characteristics of each point from the ring direction, again accurately strip out the defects from the strong periodic background, and then process 4 defect characteristic significant images through the gear defect classification network, so that the network can learn the defect characteristics from multiple dimensions, and improve the recognition accuracy of the defects. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 It is a flowchart of a gear forming defect recognition method;
[0060] Figure 2 It is a structural schematic diagram of a gear defect classification network;
[0061] Figure 3 It is a structural schematic diagram of a feature mapping unit;
[0062] Figure 4 It is a structural schematic diagram of a defect feature enhancement gate unit;
[0063] Figure 5 It is a structural schematic diagram of a deep residual unit. DETAILED DESCRIPTION
[0064] The specific embodiments of the application are described below to facilitate those skilled in the art to understand the application, but it should be clear that the application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the application defined and determined by the appended claims, and all applications utilizing the concept of the application are within the scope of protection.
[0065] As Figure 1 shown, a gear forming defect recognition method comprises:
[0066] Collecting a gear forming image, separating the background in the gear forming image to obtain a gear image;
[0067] Taking the gear center point as the origin, converting the gear image to polar coordinates to obtain a gear polar image;
[0068] In the gear polar image, based on the periodicity of the gear teeth, extracting radial gray scale profiles at each angle and normalizing, and constructing a standard tooth profile at each angle;
[0069] By calculating the difference between the normalized radial gray scale profile and the standard tooth profile, a residual profile is obtained, and then a residual profile image is constructed, and then the positive deviation profile image and the negative deviation profile image are extracted therefrom;
[0070] Extracting defect skeleton points from the positive deviation profile image and the negative deviation profile image, and merging to obtain a profile skeleton image.
[0071] According to the normalized radial gray profile of each angle, the difference between the polar radius mutation value and the average value is found under the same polar radius, the mutation feature value is calculated, and the polar radius mutation feature map is formed.
[0072] The gear forming defect type is obtained by using the gear defect classification network to process the positive deviation profile, the negative deviation profile, the profile skeleton map and the polar radius mutation feature map.
[0073] In this embodiment, after the gear forming is completed, the gear forming surface is photographed by using a high-resolution industrial camera at a fixed position.
[0074] The process of separating the background in the gear forming image includes: calculating the distance between the pixel value in the gear forming image and the pixel value of the stored gear pixel point, when the distance is less than the distance threshold, the gear forming image corresponding pixel point is classified as the gear pixel point, the isolated gear pixel point is removed, and the remaining gear pixel point constitutes the gear image.
[0075] In this embodiment, the formula for converting the gear image to polar coordinates is:
[0076] ,
[0077] ,
[0078] ,
[0079] ,
[0080] wherein r j is the polar radius of the jth pixel point, θ j is the angle of the jth pixel point, x o is the horizontal coordinate of the gear center point, y o is the vertical coordinate of the gear center point, x j is the horizontal coordinate of the jth pixel point in the gear image, y j is the vertical coordinate of the jth pixel point in the gear image, is the horizontal relative offset of the jth pixel point, is the vertical relative offset of the jth pixel point, and j is a positive integer.
[0081] The gear tooth profile is periodically distributed in the circumferential direction (the distribution direction of the teeth), and the polar radius dimension corresponds to the radial direction (the direction from the tooth top to the tooth root) after polar coordinate conversion. This conversion makes the periodic tooth structure of the gear present a regular “radial-circumferential” feature distribution in polar coordinates.
[0082] In this embodiment, the process of constructing the standard tooth profile of each angle includes:
[0083] According to the number of teeth of the gear, an inherent angle occupied by a single tooth is obtained;
[0084] On the gear polar diagram, the gray value at different polar radii of the same angle is used to form a radial gray profile P(θ i ,r) of each angle, wherein the radial gray profile P(θ i ,r) of each angle is a set of gray values at different polar radii under the same angle;
[0085] In the radial gray profile P(θ i ,r) of each angle, each gray value is normalized (each gray value is divided by the maximum gray value) to obtain a normalized radial gray profile P no (θ i ,r) of each angle;
[0086] According to the normalized radial gray profile P no (θ i ,r) of each angle, a standard tooth profile of each angle is calculated based on the inherent angle occupied by a single tooth.
[0087] In this embodiment, the calculation formula of the standard tooth profile of each angle is:
[0088] ,
[0089] wherein P ref (θ i ,r) is the standard tooth profile of the i-th angle θ i ,△θ is the inherent angle occupied by a single tooth,△θ=2π / N, N is the number of teeth of the gear, K is the number of teeth participating in the calculation, k is the number of teeth, P no (θ i +k·△θ,r) is the normalized radial gray profile at different polar radii r of θ i +k·△θ, and i is the number of angles.
[0090] In the construction of the standard tooth profile of each angle, the angle occupied by a single tooth is obtained according to the number of teeth of the gear, the radial gray profile of each angle is normalized, and finally the normalized profiles of multiple teeth are averaged based on the angle of a single tooth to construct the standard tooth profile. This process eliminates the individual difference interference of a single tooth by using the strong periodicity of the gear tooth profile, and eliminates the influence of light and gray scale difference by normalization processing.
[0091] In this embodiment, the process of extracting the positive deviation profile and the negative deviation profile includes:
[0092] Subtracting the corresponding standard tooth profile from the normalized radial gray profile of each angle, a residual profile of each angle is obtained: P res (θ i ,r) = P no (θ i ,r)- P ref (θ i ,r), wherein P res (θ i ,r) is the residual profile of the i-th angle;
[0093] The residual profiles of each angle are combined to form a residual profile graph;
[0094] In the residual profile graph, the pixel points with a gray value greater than 0 are retained, and the gray values of other pixel points are set to 0 to form a positive deviation profile graph;
[0095] In the residual profile graph, the pixel points with a gray value less than 0 are retained, and the gray values of other pixel points are set to 0 to form a negative deviation profile graph.
[0096] The present application separates the gray abnormality caused by defects from the periodic background by residual calculation (normalized radial gray profile minus standard tooth profile), and puts different defects in different graphs, which facilitates the feature separation of different types of defects.
[0097] In the present embodiment, the process of obtaining the profile skeleton graph includes:
[0098] In the positive deviation profile graph, the pixel points with a gray value greater than 0 are taken as the center, and when there are pixel points with a gray value of 0 in the 3x3 neighborhood range of the center, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and the other pixel points are set to 0 to obtain a first skeleton graph;
[0099] In the negative deviation profile graph, the pixel points with a gray value less than 0 are taken as the center, and when there are pixel points with a gray value of 0 in the 3x3 neighborhood range of the center, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and the other pixel points are set to 0 to obtain a second skeleton graph;
[0100] The first skeleton graph and the second skeleton graph are subjected to AND operation to obtain a profile skeleton graph.
[0101] The present application can extract the core contour line that best represents the defect shape from the defect gray area by taking the defect pixel with a non-zero gray value as the center in the positive and negative deviation profile graphs and combining the pixel points with a gray value of 0 in the neighborhood to determine the defect skeleton point. This way filters the redundant pixel points in the defect area and retains the structure information of the defect.
[0102] In the present embodiment, the process of forming the polar radius mutation feature graph includes:
[0103] normalizing the radial gray profile P no (θ i ,r) along the polar direction to obtain the polar gradient of each pixel point at the angle;
[0104] normalizing the radial gray profile P no (θ i ,r) to obtain the polar mutation value of each pixel point according to the polar gradient difference of adjacent pixel points;
[0105] averaging the polar mutation values of the pixel points belonging to the same polar direction to obtain the mutation average value of the same polar direction;
[0106] under the same polar direction, calculating the mutation characteristic value of each pixel point according to the difference between the polar mutation value and the mutation average value of each pixel point;
[0107] combining the mutation characteristic values of the pixel points according to their corresponding polar coordinate positions into a polar mutation feature map.
[0108] The polar gradient is the difference between the gray values of the pixel point and the adjacent pixel points divided by 2.
[0109] The polar mutation value of each pixel point is equal to the absolute value of the polar gradient difference of adjacent pixel points.
[0110] In this embodiment, the formula for calculating the mutation characteristic value of each pixel point is:
[0111] ,
[0112] wherein ζ j is the mutation characteristic value of the jth pixel point, D j is the polar mutation value of the jth pixel point, D avg is the mutation average value of the same polar direction, σ(D j ) is the standard deviation of the polar mutation values of the pixel points of the same polar direction, ε is to prevent division by zero, j is the number of pixel points, and | | is the absolute value operation.
[0113] The application can sensitively identify the gray scale mutation caused by defects in the polar direction of the gear (such as the tooth top and tooth root) by calculating the polar mutation value of the normalized radial gray scale profile with respect to the polar radius. By calculating the mutation characteristic value of each pixel point, the polar mutation value is associated with the mutation mean value and standard deviation of the same polar radius, and the standardization processing of the mutation characteristics is realized. Under the same polar radius, the statistical characteristics of the mean value and the standard deviation can effectively filter the non-defect gray scale fluctuations caused by image noise, slight light fluctuations and other factors. Only the polar mutation caused by defects and significantly deviating from the statistical mean will be highlighted in the polar mutation feature map, thereby reducing the false detection rate and improving the accuracy of defect identification.
[0114] As shown in Figure 2 The gear defect classification network includes four feature mapping units, a defect feature enhancement gate unit, a multiplier M1, a multiplier M2, a multiplier M3, three deep residual units, a first Concat layer and a full connection layer.
[0115] The input end of the first feature mapping unit is used for inputting the positive deviation profile graph, and the output end is connected with the first input end of the multiplier M1; the input end of the second feature mapping unit is used for inputting the negative deviation profile graph, and the output end is connected with the first input end of the multiplier M2; the input end of the third feature mapping unit is used for inputting the profile skeleton graph, and the output end is connected with the first input end of the multiplier M3.
[0116] The input end of the fourth feature mapping unit is used for inputting the polar mutation feature graph, and the output end is connected with the input end of the defect feature enhancement gate unit.
[0117] The output end of the defect feature enhancement gate unit is connected with the second input end of the multiplier M1, the second input end of the multiplier M2 and the second input end of the multiplier M3 respectively.
[0118] The input end of the first deep residual unit is connected with the output end of the multiplier M1; the input end of the second deep residual unit is connected with the output end of the multiplier M2; the input end of the third deep residual unit is connected with the output end of the multiplier M3.
[0119] The input end of the first Concat layer is connected with the output end of the first deep residual unit, the output end of the second deep residual unit and the output end of the third deep residual unit respectively, and the output end is connected with the input end of the full connection layer.
[0120] The output end of the full connection layer is used as the output end of the gear defect classification network.
[0121] The fourth feature mapping unit and the defect feature enhancement gate unit are used to generate attention, the attention is applied to corresponding features of the positive deviation profile through the multiplier M1, the key features related to defects in the positive deviation profile can be accurately identified and highlighted, the attention is applied to corresponding features of the negative deviation profile through the multiplier M2, the key features related to defects in the negative deviation profile can be accurately identified and highlighted, and the attention is applied to corresponding features of the profile skeleton graph through the multiplier M3, the key features related to defects in the profile skeleton graph can be accurately identified and highlighted. Finally, the different features are subjected to hierarchical deep residual processing, then the multi-branch features are fused through the Concat layer, and finally the classification result is output through the fully connected layer, so that the detection accuracy is improved.
[0122] As shown in Figure 3 , the four feature mapping units have the same structure and each include a first convolutional block, a second convolutional block, a third convolutional block, a fourth convolutional block, a fifth convolutional block and a second Concat layer;
[0123] The input end of the first convolutional block is used as the input end of the feature mapping unit, and the output end is connected with the input end of the second convolutional block, the input end of the third convolutional block and the input end of the fourth convolutional block respectively;
[0124] The input end of the second Concat layer is connected with the output end of the second convolutional block, the output end of the third convolutional block and the output end of the fourth convolutional block respectively, and the output end is connected with the input end of the fifth convolutional block;
[0125] The output end of the fifth convolutional block is used as the output end of the feature mapping unit.
[0126] After the output of the first convolutional block, the second, third and fourth convolutional blocks are connected simultaneously to extract multi-scale feature information. Then, the multi-scale features are fused through the second Concat layer, so that the output features contain not only fine-grained local defect details but also global structure information.
[0127] The convolution kernel size of the first convolutional block is 3x3, and the activation function is ReLU, the convolution kernel size of the second convolutional block is 3x3, and the activation function is ReLU, the convolution kernel size of the third convolutional block is 5x5, and the activation function is ReLU, the convolution kernel size of the fourth convolutional block is 7x7, and the activation function is ReLU, and the convolution kernel size of the fifth convolutional block is 1x1, and the activation function is ReLU.
[0128] As shown in Figure 4 , the defect feature enhancement gate unit includes a first convolutional layer, a BN layer and a Sigmoid layer;
[0129] The input end of the first convolutional layer is used as the input end of the defect feature enhancement gate unit, and the output end is connected with the input end of the BN layer;
[0130] The input end of the sigmoid layer is connected with the output end of the BN layer, and the output end thereof serves as the output end of the defect feature enhancement gate unit.
[0131] The convolution kernel size of the first convolution layer is 1*1, and the activation function is ReLU.
[0132] The present application can generate the attention weight feature map matched with the input feature dimension through the point-by-point convolution operation of the input feature by the first convolution layer, the normalization processing of the BN layer and the activation mapping of the sigmoid layer.
[0133] As shown in Figure 5 The three deep residual unit structures are the same, and each includes a sixth convolution block, a seventh convolution block, a first residual module, a second residual module and an adder A1.
[0134] The input end of the sixth convolution block is connected with the first input end of the adder A1 and serves as the input end of the deep residual unit, and the output end thereof is connected with the input end of the first residual module.
[0135] The output end of the first residual module is connected with the input end of the second residual module.
[0136] The second input end of the adder A1 is connected with the output end of the seventh convolution block, and the output end thereof serves as the output end of the deep residual unit.
[0137] The first residual module and the second residual module each include two convolution blocks and a residual connection, the convolution kernel size of the convolution block is 3*3, and the activation function is ReLU. The convolution kernel size of the sixth convolution block is 3*3, the activation function is ReLU, and the convolution kernel size of the seventh convolution block is 3*3, and the activation function is ReLU.
[0138] The gear forming defect types include cracks, folds, inclusions, pores, shrinkage holes, sand holes and the like.
[0139] The present application can gradually and deeply extract the deep semantic features of the gear defects through the multi-level structure of the sixth convolution block, the first residual module, the second residual module and the seventh convolution block. The design of the residual module effectively alleviates the gradient vanishing problem, so that the network can learn more complex and more discriminative defect features (such as the fine texture of micro-cracks and the morphological profile of the flash), thereby greatly improving the recognition accuracy of the micro-defects.
[0140] The present application can stretch the periodic structure such as the gear slot into a regular periodic sequence by converting the gear image to the polar coordinate system with the gear center as the origin, so that the gray scale distribution in the same angle direction is attributed to the same radial section. This processing aligns the strong periodicity of the gear shape in the radial direction, which fundamentally reduces the interference of the periodic structure on the defect detection.
[0141] The present application extracts radial gray scale profiles for each angle and normalizes, which can eliminate the influence of uneven illumination, local exposure difference and other factors, and construct the difference value (residual profile) between the standard tooth profile and the actual profile. The defects with very low amplitude such as micro-cracks and slight burrs are significantly amplified in the residual profile, and are clearly separated from the periodic background, so that the weak disturbance that is difficult to detect by traditional algorithms is enhanced.
[0142] The present application separates the residual profile into positive deviation and negative deviation, which can distinguish defects in different situations, so that the network learns the cause characteristics of different types of defects and improves the classification accuracy.
[0143] The present application extracts defect skeleton points from the positive deviation and negative deviation profile, and constructs a profile skeleton graph, which reflects the texture of the defect and improves the recognition reliability of small linear defects.
[0144] The present application calculates the difference between the mutation value and the average value under the same polar radius, which can find the deviation characteristics of each position and the average value under the same polar radius, find the defect characteristics of each point from the ring direction, and accurately strip the defects from the strong periodic background again. Then, the four defect feature significant graphs are processed by the gear defect classification network, so that the network can learn the defect features from multiple dimensions and improve the recognition accuracy of the defects.
[0145] The above is only the preferred embodiment of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A gear form defect recognition method characterized by, The method comprises the following steps: Collecting a gear forming image, separating the background in the gear forming image, and obtaining a gear image; Taking the center point of the gear as the origin, converting the gear image to polar coordinates, and obtaining a gear polar image; In the gear polar image, based on the periodicity of the gear tooth number, extracting the radial gray profile at each angle and normalizing it to construct a standard tooth profile at each angle; By calculating the difference between the normalized radial gray profile and the standard tooth profile, a residual profile is obtained, and then a residual profile image is constructed, from which a positive deviation profile image and a negative deviation profile image are extracted; Extracting defect skeleton points from the positive deviation profile image and the negative deviation profile image, and merging them to obtain a profile skeleton image; According to the normalized radial gray profile at each angle, the difference between the polar radius mutation value and the mean value at the same polar radius is found, the mutation feature value of each pixel point is calculated, and a polar radius mutation feature image is constructed; The gear defect classification network processes the positive deviation profile image, the negative deviation profile image, the profile skeleton image, and the polar radius mutation feature image to obtain the gear forming defect type; The process of constructing a standard tooth profile at each angle includes: According to the number of teeth of the gear, the inherent angle occupied by a single tooth is obtained; In the gear polar image, the gray values at different polar radii at the same angle are combined to form a radial gray profile at each angle; In the radial gray profile at each angle, each gray value is normalized to obtain a normalized radial gray profile at each angle; According to the normalized radial gray profile at each angle, based on the inherent angle occupied by a single tooth, the standard tooth profile at each angle is calculated; The calculation formula of the standard tooth profile at each angle is: , where P ref (θ i ,r) is the standard tooth profile at the i-th angle θ i ,△θ is the inherent angle occupied by a single tooth,△θ=2π / N, N is the number of teeth of the gear, K is the number of teeth involved in the calculation, k is the number of teeth, P no (θ i +k·△θ,r) is the normalized radial gray profile at different polar radii r at θ i +k·△θ, i is the number of angles; The process of extracting the positive deviation profile image and the negative deviation profile image includes: Subtracting the corresponding standard tooth profile from the normalized radial gray profile at each angle to obtain a residual profile at each angle; Constructing a residual profile image from the residual profiles at each angle; In the residual profile image, the pixel points with a gray value greater than 0 are retained, and the gray values of other pixel points are set to 0 to construct a positive deviation profile image; In the residual profile image, the pixel points with a gray value less than 0 are retained, and the gray values of other pixel points are set to 0 to construct a negative deviation profile image; The process of constructing a polar radius mutation feature image includes: Taking the partial derivative of the normalized radial gray profile at each angle along the polar radius direction to obtain the polar radius gradient of each pixel point at that angle; In the normalized radial gray profile at each angle, the polar radius mutation value of each pixel point is obtained according to the difference in polar radius gradient between adjacent pixel points; Taking the mean value of the polar radius mutation values of the pixel points belonging to the same polar radius to obtain the mutation mean value of the same polar radius; According to the difference between the polar radius mutation value and the mutation mean value of each pixel point at the same polar radius, the mutation feature value of each pixel point is calculated; Combining the mutation feature values of each pixel point according to their corresponding polar coordinate positions to form a polar radius mutation feature image; The formula for calculating the mutation feature value of each pixel point is: , wherein ζ j is the mutation characteristic value of the jth pixel point, D j is the polar radius mutation value of the jth pixel point, D avg is the mutation average value of the same polar radius, σ(D j ) is the standard deviation of the polar radius mutation values of each pixel point of the same polar radius, ε is to prevent division by zero, j is the number of pixel points, and | | is the absolute value operation. The gear defect classification network includes: four feature mapping units, a defect feature enhancement gate unit, a multiplier M1, a multiplier M2, a multiplier M3, three deep residual units, a first Concat layer, and a fully connected layer; The input end of the first feature mapping unit is configured to input the positive deviation profile, and the output end thereof is connected with the first input end of the multiplier M1; the input end of the second feature mapping unit is configured to input the negative deviation profile, and the output end thereof is connected with the first input end of the multiplier M2; and the input end of the third feature mapping unit is configured to input the profile skeleton, and the output end thereof is connected with the first input end of the multiplier M3; The input end of the fourth feature mapping unit is configured to input the polar diameter mutation feature map, and the output end thereof is connected with the input end of the defect feature enhancement gate unit; The output end of the defect feature enhancement gate unit is connected with the second input end of the multiplier M1, the second input end of the multiplier M2 and the second input end of the multiplier M3 respectively; The input end of the first depth residual unit is connected with the output end of the multiplier M1; the input end of the second depth residual unit is connected with the output end of the multiplier M2; and the input end of the third depth residual unit is connected with the output end of the multiplier M3; The input end of the first Concat layer is connected with the output end of the first depth residual unit, the output end of the second depth residual unit and the output end of the third depth residual unit respectively, and the output end thereof is connected with the input end of the full connection layer; The output end of the full connection layer is the output end of the gear defect classification network.
2. The gear profile defect recognition method according to claim 1, characterized by, The process of obtaining the profile skeleton includes: In the positive deviation profile, taking the pixel point with a gray value greater than 0 as the center, if there is a pixel point with a gray value of 0 in the center neighborhood range, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and other pixel points are set to 0, thereby obtaining a first skeleton map; In the negative deviation profile, taking the pixel point with a gray value less than 0 as the center, if there is a pixel point with a gray value of 0 in the center neighborhood range, the pixel point at the center is a defect skeleton point, and the defect skeleton point is set to 1 and other pixel points are set to 0, thereby obtaining a second skeleton map; The first skeleton map and the second skeleton map are subjected to AND operation, thereby obtaining the profile skeleton.
3. The gear profile defect recognition method according to claim 1, characterized by, The four feature mapping units are structurally identical, and each includes a first convolution block, a second convolution block, a third convolution block, a fourth convolution block, a fifth convolution block and a second Concat layer; The input end of the first convolution block is the input end of the feature mapping unit, and the output end thereof is connected with the input end of the second convolution block, the input end of the third convolution block and the input end of the fourth convolution block respectively; The input end of the second Concat layer is connected with the output end of the second convolution block, the output end of the third convolution block and the output end of the fourth convolution block respectively, and the output end thereof is connected with the input end of the fifth convolution block; The output end of the fifth convolution block is the output end of the feature mapping unit.
4. The gear profile defect recognition method according to claim 1, characterized by, The defect feature enhancement gate unit includes a first convolution layer, a BN layer and a Sigmoid layer; The input end of the first convolution layer is the input end of the defect feature enhancement gate unit, and the output end thereof is connected with the input end of the BN layer; The input end of the Sigmoid layer is connected with the output end of the BN layer, and the output end thereof is the output end of the defect feature enhancement gate unit.
Citation Information
Patent Citations
Sobel operator Wigner-Hough transform based gear fault feature extraction method
CN106384076A
Gear defect detection method and system based on template matching
CN114998341A