A method for detecting surface defects of stamped synchronizer gear ring
By eliminating the background, extracting and enhancing edge pixel points characteristics in the surface image of the tooth ring of the stamping synchronizer, and combining with the dual-channel fusion neural network, the problem of low detection accuracy of the surface defect of the stamping synchronizer is solved, achieving more efficient defects Detection accuracy.
Patent Information
- Application Number
- CN202411467742.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In the prior art, the detection accuracy of the surface defects of the stamping synchronizer is not high, and is limited by the complex inherent texture and the morphological characteristics of various types of defects, resulting in the risk of false detection and inefficient detection.
The surface image of the tooth ring is collected, the background area is eliminated, the edge pixel points are extracted, and the enhanced image is constructed through pixel value enhancement processing and position change rate. The dual-channel fusion neural network is used to combine edge contour and pixel value characteristics to improve defect detection accuracy.
By reducing background interference, highlighting defect positions, improving detection sensitivity and accuracy, effectively distinguishing between normal structures and defect structures, the accuracy of surface defect detection of stamping synchronizer teeth rings is improved.
Smart Images

Figure CN118967696B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a method for detecting surface defects of a stamped synchronizer gear ring. Background Art
[0002] In the modern automobile manufacturing industry, the quality of stamped synchronizer rings, as key components of the gearbox, directly affects the performance, smoothness of gear shifting and service life of the gearbox. With the rapid development of the automobile industry and the continuous improvement of consumers' requirements for vehicle quality, efficient and accurate surface defect detection has become crucial in the production process. Traditional quality control methods mainly rely on manual inspection, which is not only time-consuming and labor-intensive, but also easily affected by the subjective judgment, fatigue level and environmental factors of the inspectors, making it difficult to ensure the consistency and reliability of the inspection. Especially in a large-scale production environment, the low efficiency of manual inspection has become a bottleneck restricting the improvement of product quality and production efficiency.
[0003] In recent years, with the rapid development of computer vision, artificial intelligence, and machine learning technologies, automated surface defect detection has gradually been introduced into the manufacturing industry. These technologies, including machine vision, traditional image processing algorithms, and various deep learning models, provide new possibilities for surface defect detection of stamped synchronizer gear rings. However, the surface characteristics of stamped synchronizer gear rings pose great challenges to automated detection. First, there are complex inherent textures on the surface of the gear ring, which may be similar to certain types of defects, increasing the risk of false detection. Second, there are many types of surface defects, including scratches, pits, cracks, corrosion, etc. Each defect has its own unique morphological characteristics, so there is a problem of low defect detection accuracy. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, a method for detecting surface defects of a stamped synchronizer gear ring provided by the present invention solves the problem of low defect detection accuracy in the prior art.
[0005] In order to achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a method for detecting surface defects of a stamped synchronizer gear ring, comprising the following steps:
[0006] S1, collecting a surface image of a stamping synchronizer gear ring, removing a background area from the surface image, and obtaining a gear ring area;
[0007] S2, extracting edge pixel points from the gear ring area, and performing pixel value enhancement processing based on the distribution density of the edge pixel points to construct a first defect enhanced image;
[0008] S3, extracting the position change rate of each edge pixel point on the first defect enhancement image, and constructing a second defect enhancement image based on the irregularity of the edge pixel points;
[0009] S4. Obtain a surface defect degree value based on the first defect enhanced image and the second defect enhanced image and a dual-channel fusion neural network.
[0010] Further, S2 includes the following sub-steps:
[0011] S21, taking each pixel point on each gear ring area as the center, calculating the neighborhood difference degree of each pixel point;
[0012] S22, when the neighborhood difference is less than or equal to the difference threshold, setting the pixel value of the pixel to 0, and obtaining an edge image, wherein the pixel points with pixel values greater than 0 on the edge image are edge pixels, and the pixel values of the edge pixels are all set to 1;
[0013] S23, counting the distribution density of edge pixels on the edge image;
[0014] S24. According to the distribution density of the edge pixels, the pixel values of the edge pixels on the edge image are enhanced to obtain a first defect enhanced image.
[0015] Furthermore, the formula for calculating the neighborhood difference of each pixel in S21 is: , where θ is the neighborhood difference of the pixel at the center, f o is the pixel value of the center pixel, f max is the maximum pixel value in the neighborhood of the central pixel, f min is the minimum pixel value in the neighborhood of the central pixel, and | | is the absolute value operation;
[0016] The formula for enhancing the pixel value in S24 is: , , where f en is the enhanced pixel value, f is the pixel value of the edge pixel to be enhanced, μ is the distribution density, Q is the number of edge pixels in the neighborhood of the edge pixel to be enhanced, and E is The size of the neighborhood.
[0017] Furthermore, S3 includes the following sub-steps:
[0018] S31, calculating the position change rate of each edge pixel on the first defect enhancement image;
[0019] S32, calculating the irregularity of the edge pixel point according to the position change rate on both sides of the edge pixel point neighborhood;
[0020] S33: Use the irregularity as a new pixel value of the edge pixel to obtain a second defect enhanced image.
[0021] Furthermore, the formula for calculating the position change rate in S31 is: , where γ i is the position change rate of the i-th edge pixel on the first defect enhancement image, y i+1 is the ordinate of the i+1th edge pixel on the first defect enhanced image, y i-1 is the ordinate of the i-1th edge pixel on the first defect enhancement image, x i+1 is the horizontal coordinate of the i+1th edge pixel on the first defect enhancement image, x i-1 is the horizontal coordinate of the i-1th edge pixel point on the first defect enhanced image, arctan is the inverse tangent function, and i is a positive integer.
[0022] Furthermore, the formula for calculating the irregularity of edge pixels in S32 is: , where ε is the irregularity of the edge pixel, σ is the variance of the position change rate within the (2N+1) range, N is the length of one side of the neighborhood centered on the edge pixel, and K is the number of positions within the (2N+1) range whose change rate is greater than the change rate threshold.
[0023] Furthermore, the dual-channel fusion neural network in S4 includes: a first defect feature extraction unit, a second defect feature extraction unit, a first feature enhancement unit, a second feature enhancement unit, a mean feature fusion layer, a significant feature fusion layer, a first residual unit, a second residual unit, a first Sigmoid layer, a second Sigmoid layer and a fully connected layer;
[0024] The input end of the first defect feature extraction unit is used to input the first defect enhanced image, and the output end thereof is connected to the input end of the first feature enhancement unit;
[0025] The input end of the second defect feature extraction unit is used to input the second defect enhanced image, and the output end thereof is connected to the input end of the second feature enhancement unit;
[0026] The input end of the mean feature fusion layer is connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit respectively, and the output end thereof is connected to the input end of the first residual unit;
[0027] The input end of the salient feature fusion layer is connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit respectively, and the output end thereof is connected to the input end of the second residual unit;
[0028] The input end of the first Sigmoid layer is connected to the output end of the first residual unit, and its output end is connected to the input end of the fully connected layer;
[0029] The input end of the second Sigmoid layer is connected to the output end of the second residual unit, and its output end is connected to the input end of the fully connected layer;
[0030] The output of the fully connected layer serves as the output of the dual-channel fusion neural network.
[0031] Furthermore, the expression of the first feature enhancement unit is: ,in, is the output of the first feature enhancement unit, X1 is the input of the first feature enhancement unit, W 1,1 is the first weight matrix in the first feature enhancement unit, W 1,2 is the second weight matrix in the first feature enhancement unit, b 1,1 is the first bias matrix in the first feature enhancement unit, b 1,2 is the second bias matrix in the first feature enhancement unit, is element-by-element multiplication, tanh is the hyperbolic tangent function, and Sigmoid is the S-type activation function;
[0032] The expression of the second feature enhancement unit is: ,in, is the output of the second feature enhancement unit, X2 is the input of the second feature enhancement unit, and W 2,1 is the first weight matrix in the second feature enhancement unit, W 2,2 is the second weight matrix in the second feature enhancement unit, b 2,1 is the first bias matrix in the second feature enhancement unit, b 2,2 is the second bias matrix in the second feature enhancement unit.
[0033] Furthermore, the expression of the mean feature fusion layer is: , the expression of the salient feature fusion layer is: , where H G is the output of the mean feature fusion layer, H M is the output of the salient feature fusion layer, GAP is the global average pooling operation, and MaxPool is the maximum pooling operation.
[0034] Furthermore, the first Sigmoid layer is used to obtain a first prediction value based on the output of the first residual unit, the second Sigmoid layer is used to obtain a second prediction value based on the output of the second residual unit, and the fully connected layer is used to weight the first prediction value and the second prediction value to obtain a surface defect degree value.
[0035] The beneficial effects of the present invention are as follows: after collecting the surface image of the stamping synchronizer gear ring, the present invention removes the background area of the surface image to obtain the gear ring area, reduces the background interference, extracts the edge pixel points in the gear ring area, and then enhances the pixel values according to the distribution density of the edge pixel points to obtain a first defect enhanced image, thereby highlighting the pixel values at the defect, and then evaluates the irregularity of the edge pixel points according to the position change rate of each edge pixel point on the first defect enhanced image, constructs a second defect enhanced image, reflects the changes of each edge contour on the image, and adopts a dual-channel fusion neural network to perceive the defect characteristics from both the edge contour change and the pixel value, thereby improving the defect detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The present invention is a flow chart of a method for detecting surface defects of a stamped synchronizer gear ring.
[0037] Figure 2 Schematic diagram of the structure of the dual-channel fusion neural network. DETAILED DESCRIPTION
[0038] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0039] like Figure 1 As shown, a method for detecting surface defects of a stamped synchronizer gear ring comprises the following steps:
[0040] S1, collecting a surface image of a stamping synchronizer gear ring, removing a background area from the surface image, and obtaining a gear ring area;
[0041] S2, extracting edge pixel points from the gear ring area, and performing pixel value enhancement processing based on the distribution density of the edge pixel points to construct a first defect enhanced image;
[0042] S3, extracting the position change rate of each edge pixel point on the first defect enhancement image, and constructing a second defect enhancement image based on the irregularity of the edge pixel points;
[0043] S4. Obtain a surface defect degree value based on the first defect enhanced image and the second defect enhanced image and a dual-channel fusion neural network.
[0044] In this embodiment, step S1 is specifically as follows: calculating the similarity between the pixel value of the pixel point on the surface image of the stamped synchronizer gear ring and the stored background pixel value. When the similarity is greater than the similarity threshold, the corresponding pixel point is the pixel point on the background, and the background area is obtained.
[0045] In this embodiment, S2 includes the following sub-steps:
[0046] S21, taking each pixel point on each gear ring area as the center, calculating the neighborhood difference degree of each pixel point;
[0047] S22, when the neighborhood difference is less than or equal to the difference threshold, setting the pixel value of the pixel to 0, and obtaining an edge image, wherein the pixel points with pixel values greater than 0 on the edge image are edge pixels, and the pixel values of the edge pixels are all set to 1;
[0048] S23, counting the distribution density of edge pixels on the edge image;
[0049] S24. According to the distribution density of the edge pixels, the pixel values of the edge pixels on the edge image are enhanced to obtain a first defect enhanced image.
[0050] The present invention can effectively identify edge contours and potential defect areas in an image by calculating the neighborhood difference of each pixel point, thereby improving the sensitivity of detection. Secondly, by using the difference threshold for screening, the smooth area can be effectively removed, and the pixel value of the smooth area is set to 0 to obtain an edge image. The edge image reflects the contour structure of the image. Therefore, the pixel value of the edge pixel point is enhanced by using the distribution density of the edge pixel point. In the area where the distribution density of the edge pixel point is higher, the pixel value is higher, thereby highlighting the defect position.
[0051] In this embodiment, the formula for calculating the neighborhood difference of each pixel in S21 is: , where θ is the neighborhood difference of the pixel at the center, f o is the pixel value of the center pixel, f max is the maximum pixel value in the neighborhood of the central pixel, f min is the minimum pixel value in the neighborhood of the central pixel, and || is the absolute value operation.
[0052] In step S21, the neighborhood size is , select the maximum pixel value and the minimum pixel value in the neighborhood, and calculate the difference between the pixel value at the center and the maximum pixel value and the minimum pixel value, respectively, to reflect the pixel value gap and the fluctuation of the pixel value in the local area, so as to screen out the edge pixels.
[0053] In this embodiment, the formula for enhancing the pixel value in S24 is: , , where f en is the enhanced pixel value, f is the pixel value of the edge pixel to be enhanced, μ is the distribution density, Q is the number of edge pixels in the neighborhood of the edge pixel to be enhanced, and E is The size of the neighborhood.
[0054] In this embodiment, E=25.
[0055] Since the present invention sets the pixel values of edge pixels to 1, the pixel values of edge pixels in the edge image are consistent. In order to highlight the defect position, the present invention uses distribution density to enhance the pixel values of edge pixels, so that the pixel values of the defect position are more significant, thereby improving the perception ability of the dual-channel fusion neural network.
[0056] In this embodiment, S3 includes the following sub-steps:
[0057] S31, calculating the position change rate of each edge pixel on the first defect enhancement image;
[0058] S32, calculating the irregularity of the edge pixel point according to the position change rate on both sides of the edge pixel point neighborhood;
[0059] S33: Use the irregularity as a new pixel value of the edge pixel to obtain a second defect enhanced image.
[0060] In step S32, the irregularity of each edge pixel is calculated, and therefore, the irregularity can be used as a new pixel value of the edge pixel.
[0061] In this embodiment, the formula for calculating the position change rate in S31 is: , where γ i is the position change rate of the i-th edge pixel on the first defect enhancement image, y i+1 is the ordinate of the i+1th edge pixel on the first defect enhanced image, y i-1 is the ordinate of the i-1th edge pixel on the first defect enhancement image, x i+1 is the horizontal coordinate of the i+1th edge pixel on the first defect enhancement image, x i-1 is the horizontal coordinate of the i-1th edge pixel point on the first defect enhanced image, arctan is the inverse tangent function, and i is a positive integer.
[0062] The present invention reflects the direction of the edge pixel point and the degree of change of the edge contour through the edge pixel points before and after the edge pixel point.
[0063] In this embodiment, the formula for calculating the irregularity of edge pixels in S32 is: , where ε is the irregularity of the edge pixel, σ is the variance of the position change rate within the (2N+1) range, N is the length of one side of the neighborhood centered on the edge pixel, and K is the number of positions within the (2N+1) range whose change rate is greater than the change rate threshold.
[0064] In this embodiment, the change rate threshold and the difference threshold are specifically set according to experiments or experience.
[0065] In the present invention, the position change rate reflects the curvature of the edge profile, and N is a positive integer.
[0066] The present invention reflects the fluctuation of the position change rate in a length (2N+1) range through the variance of the position change rate, and counts the number of position change rates greater than the change rate threshold, reflecting the turning point of the edge contour in the length, and effectively distinguishes the normal structure and defective structure on the stamping synchronizer gear ring. The present invention uses the irregularity as the new pixel value of the edge pixel point, so that the pixel value on the second defect enhancement image reflects the change of the edge contour on the first defect enhancement image, so that the area with more complex edge contour has a higher pixel value.
[0067] like Figure 2 As shown, the dual-channel fusion neural network in S4 includes: a first defect feature extraction unit, a second defect feature extraction unit, a first feature enhancement unit, a second feature enhancement unit, a mean feature fusion layer, a significant feature fusion layer, a first residual unit, a second residual unit, a first Sigmoid layer, a second Sigmoid layer and a fully connected layer;
[0068] The input end of the first defect feature extraction unit is used to input the first defect enhanced image, and its output end is connected to the input end of the first feature enhancement unit; the input end of the second defect feature extraction unit is used to input the second defect enhanced image, and its output end is connected to the input end of the second feature enhancement unit; the input end of the mean feature fusion layer is respectively connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit, and its output end is connected to the input end of the first residual unit; the input end of the significant feature fusion layer is respectively connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit, and its output end is connected to the input end of the second residual unit; the input end of the first Sigmoid layer is connected to the output end of the first residual unit, and its output end is connected to the input end of the fully connected layer; the input end of the second Sigmoid layer is connected to the output end of the second residual unit, and its output end is connected to the input end of the fully connected layer; the output end of the fully connected layer serves as the output end of the dual-channel fusion neural network.
[0069] In this embodiment, the first defect feature extraction unit and the second defect feature extraction unit adopt a CNN network.
[0070] After extracting features through the first defect feature extraction unit and the second defect feature extraction unit, the present invention uses the first feature enhancement unit and the second feature enhancement unit to perform feature enhancement processing respectively, uses the mean feature fusion layer to fuse the mean features, and uses the significant feature fusion layer to fuse the significant features to obtain two-way features, and processes one way of features through the first residual unit and the first Sigmoid layer to obtain a first prediction value, and processes the other way of features through the second residual unit and the second Sigmoid layer to obtain a second prediction value, and uses a fully connected layer to integrate the first prediction value and the second prediction value to improve the accuracy of defect detection.
[0071] The expression of the first feature enhancement unit is: ,in, is the output of the first feature enhancement unit, X1 is the input of the first feature enhancement unit, W 1,1 is the first weight matrix in the first feature enhancement unit, W 1,2 is the second weight matrix in the first feature enhancement unit, b 1,1 is the first bias matrix in the first feature enhancement unit, b 1,2 is the second bias matrix in the first feature enhancement unit, is element-by-element multiplication, tanh is the hyperbolic tangent function, and Sigmoid is the S-type activation function;
[0072] The expression of the second feature enhancement unit is: ,in, is the output of the second feature enhancement unit, X2 is the input of the second feature enhancement unit, and W 2,1 is the first weight matrix in the second feature enhancement unit, W 2,2 is the second weight matrix in the second feature enhancement unit, b 2,1 is the first bias matrix in the second feature enhancement unit, b 2,2 is the second bias matrix in the second feature enhancement unit.
[0073] In the first feature enhancement unit and the second feature enhancement unit of the present invention, a hyperbolic tangent function and an S-type activation function are respectively set to process the input, so as to achieve adaptive enhancement of the features and combine the input to avoid feature loss.
[0074] In this embodiment, the expression of the mean feature fusion layer is: , the expression of the salient feature fusion layer is: , where H G is the output of the mean feature fusion layer, H M is the output of the salient feature fusion layer, GAP is the global average pooling operation, and MaxPool is the maximum pooling operation.
[0075] The present invention extracts significant features through the maximum pooling operation, extracts mean features through the global average pooling operation, realizes the fusion of mean features and mean features, realizes the fusion of significant features and significant features, constructs two classification channels, and improves detection accuracy.
[0076] The first Sigmoid layer is used to obtain a first prediction value according to the output of the first residual unit, the second Sigmoid layer is used to obtain a second prediction value according to the output of the second residual unit, and the fully connected layer is used to weight the first prediction value and the second prediction value to obtain a surface defect degree value.
[0077] In this embodiment, the expressions of the first Sigmoid layer and the second Sigmoid layer are both: , where h is the predicted value output by the first Sigmoid layer or the second Sigmoid layer, r n is the nth input value of the first Sigmoid layer or the second Sigmoid layer, w n For r n The weight of b n For r n The bias of , M is the number of input values.
[0078] In this embodiment, the gradient descent method can be used to train the weights and biases in the dual-channel fusion neural network.
[0079] In this embodiment, the first residual unit and the second residual unit are residual neural networks.
[0080] After collecting the surface image of the stamping synchronizer gear ring, the present invention removes the background area of the surface image to obtain the gear ring area, reduces the interference of the background, extracts edge pixel points in the gear ring area, and then enhances the pixel values according to the distribution density of the edge pixel points to obtain a first defect enhanced image, thereby highlighting the pixel values at the defects, and then evaluates the irregularity of the edge pixel points according to the position change rate of each edge pixel point on the first defect enhanced image, constructs a second defect enhanced image, reflects the changes of each edge contour on the image, and adopts a dual-channel fusion neural network to perceive defect characteristics from both the changes of edge contours and pixel values, thereby improving the defect detection accuracy.
[0081] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting surface defects of a stamped synchronizer gear ring, characterized in that: The following steps are involved: S1, collecting a surface image of a stamping synchronizer gear ring, removing a background area from the surface image, and obtaining a gear ring area; S2, extracting edge pixel points from the gear ring area, and performing pixel value enhancement processing based on the distribution density of the edge pixel points to construct a first defect enhanced image; S3, extracting the position change rate of each edge pixel point on the first defect enhancement image, and constructing a second defect enhancement image based on the irregularity of the edge pixel points; S4, obtaining a surface defect degree value based on the first defect enhanced image and the second defect enhanced image based on a dual-channel fusion neural network; The S2 comprises the following sub-steps: S21, taking each pixel point on each gear ring area as the center, calculating the neighborhood difference degree of each pixel point; S22, when the neighborhood difference is less than or equal to the difference threshold, setting the pixel value of the pixel to 0, and obtaining an edge image, wherein the pixel points with pixel values greater than 0 on the edge image are edge pixels, and the pixel values of the edge pixels are all set to 1; S23, counting the distribution density of edge pixels on the edge image; S24, enhancing the pixel values of the edge pixels on the edge image according to the distribution density of the edge pixels to obtain a first defect enhanced image; The S3 comprises the following sub-steps: S31, calculating the position change rate of each edge pixel on the first defect enhancement image; S32, calculating the irregularity of the edge pixel point according to the position change rate on both sides of the edge pixel point neighborhood; S33, taking the irregularity as a new pixel value of the edge pixel point to obtain a second defect enhanced image; The formula for calculating the irregularity of edge pixels in S32 is: , where ε is the irregularity of the edge pixel, σ is the variance of the position change rate within the (2N+1) range, N is the length of one side of the neighborhood centered on the edge pixel, and K is the number of positions within the (2N+1) range whose change rate is greater than the change rate threshold.
2. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 1, characterized in that: The formula for calculating the neighborhood difference of each pixel in S21 is: , where θ is the neighborhood difference of the pixel at the center, f o is the pixel value of the center pixel, f max is the maximum pixel value in the neighborhood of the central pixel, f min is the minimum pixel value in the neighborhood of the central pixel, and | | is the absolute value operation; The formula for enhancing the pixel value in S24 is: , , where f en is the enhanced pixel value, f is the pixel value of the edge pixel to be enhanced, μ is the distribution density, Q is the number of edge pixels in the neighborhood of the edge pixel to be enhanced, and E is The size of the neighborhood.
3. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 1, characterized in that: The formula for calculating the position change rate in S31 is: , where γ i is the position change rate of the i-th edge pixel on the first defect enhancement image, y i+1 is the ordinate of the i+1th edge pixel on the first defect enhanced image, y i-1 is the ordinate of the i-1th edge pixel on the first defect enhancement image, x i+1 is the horizontal coordinate of the i+1th edge pixel on the first defect enhancement image, x i-1 is the horizontal coordinate of the i-1th edge pixel point on the first defect enhanced image, arctan is the inverse tangent function, and i is a positive integer.
4. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 1, characterized in that: The dual-channel fusion neural network in S4 includes: a first defect feature extraction unit, a second defect feature extraction unit, a first feature enhancement unit, a second feature enhancement unit, a mean feature fusion layer, a significant feature fusion layer, a first residual unit, a second residual unit, a first Sigmoid layer, a second Sigmoid layer and a fully connected layer; The input end of the first defect feature extraction unit is used to input the first defect enhanced image, and its output end is connected to the input end of the first feature enhancement unit; the input end of the second defect feature extraction unit is used to input the second defect enhanced image, and its output end is connected to the input end of the second feature enhancement unit; the input end of the mean feature fusion layer is respectively connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit, and its output end is connected to the input end of the first residual unit; the input end of the significant feature fusion layer is respectively connected to the output end of the first feature enhancement unit and the output end of the second feature enhancement unit, and its output end is connected to the input end of the second residual unit; the input end of the first Sigmoid layer is connected to the output end of the first residual unit, and its output end is connected to the input end of the fully connected layer; the input end of the second Sigmoid layer is connected to the output end of the second residual unit, and its output end is connected to the input end of the fully connected layer; the output end of the fully connected layer serves as the output end of the dual-channel fusion neural network.
5. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 4, characterized in that: The expression of the first feature enhancement unit is: ,in, is the output of the first feature enhancement unit, X1 is the input of the first feature enhancement unit, W 1,1 is the first weight matrix in the first feature enhancement unit, W 1,2 is the second weight matrix in the first feature enhancement unit, b 1,1 is the first bias matrix in the first feature enhancement unit, b 1,2 is the second bias matrix in the first feature enhancement unit, is element-by-element multiplication, tanh is the hyperbolic tangent function, and Sigmoid is the S-type activation function; The expression of the second feature enhancement unit is: ,in, is the output of the second feature enhancement unit, X2 is the input of the second feature enhancement unit, and W 2,1 is the first weight matrix in the second feature enhancement unit, W 2,2 is the second weight matrix in the second feature enhancement unit, b 2,1 is the first bias matrix in the second feature enhancement unit, b 2,2 is the second bias matrix in the second feature enhancement unit.
6. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 5, characterized in that: The expression of the mean feature fusion layer is: , the expression of the significant feature fusion layer is: , where H G is the output of the mean feature fusion layer, H M is the output of the salient feature fusion layer, GAP is the global average pooling operation, and MaxPool is the maximum pooling operation.
7. The method for detecting surface defects of a stamped synchronizer gear ring according to claim 5, characterized in that: The first Sigmoid layer is used to obtain a first prediction value based on the output of the first residual unit, the second Sigmoid layer is used to obtain a second prediction value based on the output of the second residual unit, and the fully connected layer is used to weight the first prediction value and the second prediction value to obtain a surface defect degree value.
