Gearbox component surface defect detection method and system
The transmission component entity and defect area are divided by two-layer U-net models, and the passing confidence is calculated to determine the detection result. This solves the problem of complex model structure and insufficient training samples in the prior art, and achieves high-precision surface defect detection.
Patent Information
- Application Number
- CN202411538449.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The model structure of the existing computer vision detection method is complex and requires a large number of training samples, but the number of training samples of gearbox components is small, which makes it impossible to drive the normal-scale model, and the surface defect distribution is uneven and has strong randomness, making it difficult to accurately detect.
The surface defect detection of transmission component is detected by two-layer U-net model. First, the physical image of the transmission component is divided by the first U-net model to generate a structure image, and then the defect area image is divided by the second U-net model to calculate the qualification confidence. to determine the detection result.
The model structure is simplified, suitable for small sample learning, and can detect surface defects of transmission components with high accuracy, solving the problems of uneven defect distribution and strong randomness.
Smart Images

Figure CN119417801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial computer vision technology, and in particular to a method and system for detecting surface defects of gearbox components. Background Art
[0002] In the field of industrial production inspection, the use of target detection, image segmentation and other technologies in computer vision for defect detection has shown strong application potential and practical value. These technologies help industrial production inspection become more efficient and provide automated and intelligent solutions.
[0003] Nowadays, the automobile industry is developing by leaps and bounds, and social demand is constantly increasing. There is an urgent need to improve automobile production efficiency and the level of automation in the automobile industry. As the core part of the automobile, the gearbox has strict requirements on materials and quality. The surface defects of the gearbox components will reduce their strength and performance. Therefore, during the production and processing process, it is necessary to use computer vision technology to detect surface defects of the gearbox components in order to further improve the level of automation and intelligence in automobile production and improve production efficiency.
[0004] However, the model structures of existing computer vision detection methods are mostly very complex and require an extremely large number of training samples, while the number of training samples for gearbox components is relatively small. This makes it impossible to drive conventional computer vision models for gearbox component surface defects. In addition, gearbox component surface defects are unevenly distributed and highly random, making them difficult to accurately capture and detect. Summary of the invention
[0005] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a method and system for detecting surface defects of gearbox components, aiming to solve the problems that the model structures of current computer vision detection methods are mostly very complex and require an extremely large number of training samples, while the number of training samples of gearbox components is relatively small, resulting in the inability to drive conventional computer vision models, and the surface defects of gearbox components are unevenly distributed and highly random, making them difficult to detect accurately.
[0006] In view of the above problems, the present application provides a method and system for detecting surface defects of gearbox components.
[0007] The first aspect disclosed in the present application provides a method for detecting surface defects of a gearbox component, comprising the following steps: The surface image of the gearbox component on the production line is acquired by a camera device, grayscale processing is performed, and a grayscale image is generated; The grayscale image is subjected to a first U-net model to perform a segmentation of a transmission component entity image, to generate a binary image identifying the transmission component entity, and the binary image identifying the transmission component entity is subjected to a Hadamard product operation with the grayscale image to generate a construction image, wherein the binary image identifying the transmission component entity is a single-channel image having the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the transmission component; The structured image is subjected to a second U-net model to perform defect region image segmentation, and a binary image is generated to identify the defect region on the surface of the gearbox component, wherein the binary image to identify the defect region on the surface of the gearbox component is a single-channel image of the same size as the structured image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defect region; Calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component; calculate the number of non-zero pixels in the structure image to generate the surface area of the gearbox component; calculate the gearbox component qualification confidence degree according to the gearbox component surface defect area and the gearbox component surface area, wherein the calculation method of the gearbox component qualification confidence degree is: (1-gearbox component surface defect area ÷ gearbox component surface area) × 100%; If the confidence level of the transmission component is less than 90%, it is judged as unqualified; if the confidence level of the transmission component is greater than or equal to 90% and less than 97%, it is judged as suspected unqualified; if the confidence level of the transmission component is greater than or equal to 97%, it is judged as qualified.
[0008] Preferably, the grayscale process comprises the following steps: Obtain the values of each pixel of the gearbox component surface image on the three channels of R, G, and B; Multiply the values of each pixel in the three channels of R, G, and B by weights of 0.3, 0.6, and 0.1 respectively, and add them together to generate the pixel value of each grayscale image.
[0009] Preferably, the first U-net model is trained before performing the segmentation of the gearbox component entity image, comprising the following steps: Collect 1,800 images of the surface of gearbox components on the production line, crop all images to the same size, and perform grayscale processing to generate the first input data set; Using labelme to label all images in the first input data set to generate a first output data set, wherein the images in the first input data set and the images in the first output data set are in one-to-one correspondence; The first input data set and the corresponding first output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the first U-net model using the training set, validation set, and test set.
[0010] Preferably, the second U-net model is trained before performing the segmentation of the defect area image, comprising the following steps: Collecting surface images of gearbox components with surface defects on the production line, cropping all images to the same size, and performing grayscale processing to generate a second input data set; For each image in the second input data set, five data augmentation strategies are adopted, namely, 90-degree rotation, 180-degree rotation, 270-degree rotation, top-bottom mirror adjustment, and left-right mirror adjustment, to expand the number of samples in the second input data set; Using labelme to label defect areas in all images in the second input data set to generate a second output data set, wherein the images in the second input data set and the images in the second output data set are in one-to-one correspondence; The second input data set and the corresponding second output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the second U-net model using the training, validation, and test sets.
[0011] Preferably, the structure of the first U-net model or the second U-net model is: Perform two convolutions with a kernel size of 3×3 on the input image to generate the first convolution result, and perform 2×2 maximum pooling on the first convolution result to generate the first pooling result; Perform two convolutions with a kernel size of 3×3 on the first pooling result to generate a second convolution result, and perform 2×2 maximum pooling on the second convolution result to generate a second pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the second pooling result to generate a third convolution result, and perform 2×2 maximum pooling on the third convolution result to generate a third pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the third pooling result to generate a fourth convolution result, and perform 2×2 maximum pooling on the fourth convolution result to generate a fourth pooling result; Perform two convolutions with a kernel size of 3×3 on the fourth pooling result to generate the fifth convolution result; Perform 2×2 upsampling on the fifth convolution result and concatenate it with the center-cropped fourth convolution result. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the first feature map. Perform 2×2 upsampling on the first feature map and concatenate it with the third convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the second feature map. Perform 2×2 upsampling on the second feature map and concatenate it with the center-cropped second convolution result. Perform two convolutions with a kernel size of 3×3 on the concatenated result to generate the third feature map. Perform 2×2 upsampling on the third feature map and concatenate it with the first convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate a fourth feature map. A convolution with a kernel size of 1×1 is performed on the fourth feature map to generate an image segmentation result.
[0012] Preferably, the defective area includes: an iron oxide area, a plaque area, a crack area, a pitting area, an inclusion area and a scratch area.
[0013] The second aspect disclosed in the present application provides a gearbox component surface defect detection system, the system is used in the above-mentioned gearbox component surface defect detection method, the system comprises: Image module: The image module is used to obtain the surface image of the gearbox component on the production line through a camera device, perform grayscale processing, and generate a grayscale image; Entity segmentation module: The entity segmentation module is used to perform segmentation of the gearbox component entity image on the grayscale image through the first U-net model to generate a binary image identifying the gearbox component entity, perform a Hadamard product operation on the binary image identifying the gearbox component entity and the grayscale image to generate a construction image, wherein the binary image identifying the gearbox component entity is a single-channel image of the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the gearbox component; Defect segmentation module: The defect segmentation module is used to perform defect area image segmentation on the structural image through the second U-net model to generate a binary image identifying the defect area on the surface of the gearbox component, wherein the binary image identifying the defect area on the surface of the gearbox component is a single-channel image of the same size as the structural image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defect area; Confidence module: The confidence module is used to calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component, calculate the number of non-zero pixels in the structural image to generate the surface area of the gearbox component, and calculate the qualified confidence of the gearbox component according to the surface defect area of the gearbox component and the surface area of the gearbox component, wherein the calculation method of the qualified confidence of the gearbox component is: (1-the surface defect area of the gearbox component ÷ the surface area of the gearbox component) × 100%; Determination module: The determination module is used to determine that a gearbox component is unqualified if the confidence level of its qualification is less than 90%, to determine that the component is suspected to be unqualified if the confidence level of its qualification is greater than or equal to 90% and less than 97%, and to determine that the component is qualified if the confidence level of its qualification is greater than or equal to 97%.
[0014] The beneficial effects of the present invention are: (1) The complex gearbox component surface defect detection task is divided into two relatively simple U-net models, so that the complex single task evolves into two relatively simple upstream and downstream tasks, which simplifies the model structure of the gearbox component surface defect detection method and does not consume too much computing resources; (2) The shrink-expand path and jump connection design in the U-net model can make it more suitable for small sample learning. Even when the number of training samples of surface defects of gearbox components is relatively small, high-precision detection can still be achieved. (3) Five types of data enhancement are implemented on the surface images of gearbox components with surface defects to expand the number of training samples in the data set. This can balance the various morphological types of surface defects in the data set, improve the diversity of the data set, accurately detect multi-morphological surface defects in actual production, and solve the problem of uneven distribution and strong randomness of surface defects, which are difficult to detect accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 The present invention is an overall flow chart of a method for detecting surface defects of a gearbox component.
[0017] Figure 2 A diagram of the entity segmentation and defect segmentation process in a method for detecting surface defects of a gearbox component.
[0018] Figure 3 The figure is an overall structural diagram of a gearbox component surface defect detection system.
[0019] Explanation of reference numerals: grayscale image 60 , binary image 70 identifying a transmission component entity, structural image 80 , binary image 90 identifying a surface defect area of a transmission component, image module 10 , entity segmentation module 20 , defect segmentation module 30 , confidence module 40 , determination module 50 . DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] like Figure 1 As shown, the embodiment of the present application provides a method for detecting surface defects of a gearbox component, comprising the following steps: The surface image of the gearbox component on the production line is acquired by a camera device, grayscale processing is performed, and a grayscale image is generated; Specifically, graying the image can make the semantic features of the image more obvious, and can reduce the information entropy of the image, facilitate the detection of subsequent tasks, and improve the detection accuracy.
[0022] like Figure 2 As shown, the grayscale image 60 is segmented by a first U-net model to generate a binary image 70 identifying the gearbox component entity, and the binary image identifying the gearbox component entity is subjected to a Hadamard product operation with the grayscale image to generate a construction image 80, wherein the binary image 70 identifying the gearbox component entity is a single-channel image of the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the gearbox component; Specifically, after the surface image of the gearbox component on the production line is grayed, the entity of the gearbox component is segmented from the background through the first U-net model to generate a binary image identifying the entity of the gearbox component. Then, in order to erase the background and retain only the entity of the gearbox component, the binary image identifying the entity of the gearbox component and the grayscale image are subjected to a Hadamard product operation.
[0023] like Figure 2As shown, the structure image 80 is segmented by a second U-net model to generate a binary image 90 for identifying the defective area on the surface of the gearbox component, wherein the binary image 90 for identifying the defective area on the surface of the gearbox component is a single-channel image of the same size as the structure image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defective area; Specifically, the background is erased and only the transmission component entity is retained in the structural image, and the defect area is detected and segmented through the second U-net model, and the surface defects of the transmission component are identified in the form of a binary image.
[0024] Calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component; calculate the number of non-zero pixels in the structure image to generate the surface area of the gearbox component; calculate the gearbox component qualification confidence degree according to the gearbox component surface defect area and the gearbox component surface area, wherein the calculation method of the gearbox component qualification confidence degree is: (1-gearbox component surface defect area ÷ gearbox component surface area) × 100%; Specifically, it is assumed that the number of non-zero pixels in the binary image that identifies the surface defect area of the gearbox component is the surface defect area of the gearbox component. Because in the binary image, the non-zero pixel represents that this is a defect area, and the non-zero pixel in the construction image represents that this is a gearbox component entity. It is assumed that the number of non-zero pixels is the surface area of the gearbox component. Obviously, the ratio of the two areas is the proportion of the defect area to the entire gearbox component, thereby calculating the qualified confidence level of the gearbox construction.
[0025] If the confidence level of the transmission component is less than 90%, it is judged as unqualified; if the confidence level of the transmission component is greater than or equal to 90% and less than 97%, it is judged as suspected unqualified; if the confidence level of the transmission component is greater than or equal to 97%, it is judged as qualified.
[0026] Furthermore, the grayscale process comprises the following steps: Obtain the values of each pixel of the gearbox component surface image on the three channels of R, G, and B; Multiply the values of each pixel in the three channels of R, G, and B by weights of 0.3, 0.6, and 0.1 respectively, and add them together to generate the pixel value of each grayscale image.
[0027] Furthermore, the first U-net model is required to perform model training before performing the segmentation of the gearbox component entity image, including the following steps: Collect 1,800 images of the surface of gearbox components on the production line, crop all images to the same size, and perform grayscale processing to generate the first input data set; Using labelme to label all images in the first input data set to generate a first output data set, wherein the images in the first input data set and the images in the first output data set are in one-to-one correspondence; The first input data set and the corresponding first output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the first U-net model using the training set, validation set, and test set.
[0028] Furthermore, the second U-net model needs to be trained before performing the segmentation of the defect area image, including the following steps: Collecting surface images of gearbox components with surface defects on the production line, cropping all images to the same size, and performing grayscale processing to generate a second input data set; For each image in the second input data set, five data augmentation strategies are adopted, namely, 90-degree rotation, 180-degree rotation, 270-degree rotation, top-bottom mirror adjustment, and left-right mirror adjustment, to expand the number of samples in the second input data set; Using labelme to label defect areas in all images in the second input data set to generate a second output data set, wherein the images in the second input data set and the images in the second output data set are in one-to-one correspondence; The second input data set and the corresponding second output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the second U-net model using the training, validation, and test sets.
[0029] Furthermore, the structure of the first U-net model or the second U-net model is: Perform two convolutions with a kernel size of 3×3 on the input image to generate the first convolution result, and perform 2×2 maximum pooling on the first convolution result to generate the first pooling result; Perform two convolutions with a kernel size of 3×3 on the first pooling result to generate a second convolution result, and perform 2×2 maximum pooling on the second convolution result to generate a second pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the second pooling result to generate a third convolution result, and perform 2×2 maximum pooling on the third convolution result to generate a third pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the third pooling result to generate a fourth convolution result, and perform 2×2 maximum pooling on the fourth convolution result to generate a fourth pooling result; Perform two convolutions with a kernel size of 3×3 on the fourth pooling result to generate the fifth convolution result; Perform 2×2 upsampling on the fifth convolution result and concatenate it with the center-cropped fourth convolution result. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the first feature map. Perform 2×2 upsampling on the first feature map and concatenate it with the third convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the second feature map. Perform 2×2 upsampling on the second feature map and concatenate it with the center-cropped second convolution result. Perform two convolutions with a kernel size of 3×3 on the concatenated result to generate the third feature map. Perform 2×2 upsampling on the third feature map and concatenate it with the first convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate a fourth feature map. A convolution with a kernel size of 1×1 is performed on the fourth feature map to generate an image segmentation result.
[0030] Furthermore, the defective area includes: an iron oxide area, a plaque area, a crack area, a pitting area, an inclusion area and a scratch area.
[0031] In summary, the surface defect detection method of a gearbox component provided by the embodiment of the present application has the following technical effects: (1) The complex gearbox component surface defect detection task is divided into two relatively simple U-net models, so that the complex single task evolves into two relatively simple upstream and downstream tasks, which simplifies the model structure of the gearbox component surface defect detection method and does not consume too much computing resources; (2) The shrink-expand path and jump connection design in the U-net model can make it more suitable for small sample learning. Even when the number of training samples of surface defects of gearbox components is relatively small, high-precision detection can still be achieved. (3) Five types of data enhancement are implemented on the surface images of gearbox components with surface defects to expand the number of training samples in the data set. This can balance the various morphological types of surface defects in the data set, improve the diversity of the data set, accurately detect multi-morphological surface defects in actual production, and solve the problem of uneven distribution and strong randomness of surface defects, which are difficult to detect accurately.
[0032] Based on the same inventive concept as the method for detecting surface defects of a gearbox component in the aforementioned embodiment, Figure 3 As shown, the present application provides a gearbox component surface defect detection system, the system comprising: Image module 10: The image module 10 is used to obtain the surface image of the gearbox component on the production line through a camera device, perform grayscale processing, and generate a grayscale image; Entity segmentation module 20: The entity segmentation module 20 is used to perform segmentation of the gearbox component entity image on the grayscale image through the first U-net model to generate a binary image identifying the gearbox component entity, perform a Hadamard product operation on the binary image identifying the gearbox component entity and the grayscale image to generate a construction image, wherein the binary image identifying the gearbox component entity is a single-channel image of the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the gearbox component; Defect segmentation module 30: The defect segmentation module 30 is used to perform defect area image segmentation on the structural image through a second U-net model to generate a binary image identifying the defect area on the surface of the gearbox component, wherein the binary image identifying the defect area on the surface of the gearbox component is a single-channel image of the same size as the structural image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defect area; Confidence module 40: The confidence module 40 is used to calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component, calculate the number of non-zero pixels in the structural image to generate the surface area of the gearbox component, and calculate the qualified confidence of the gearbox component according to the surface defect area of the gearbox component and the surface area of the gearbox component, wherein the qualified confidence of the gearbox component is calculated as follows: (1-the surface defect area of the gearbox component÷the surface area of the gearbox component)×100%; Determination module 50: The determination module 50 is used to determine that a gearbox component is unqualified if the confidence level of its qualification is less than 90%, to determine that the gearbox component is suspected to be unqualified if the confidence level of its qualification is greater than or equal to 90% and less than 97%, and to determine that the gearbox component is qualified if the confidence level of its qualification is greater than or equal to 97%.
[0033] Through the above detailed description of a method for detecting surface defects of a gearbox component, those skilled in the art can clearly understand a gearbox component surface defect detection system in this embodiment. Since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0034] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0035] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting surface defects of a gearbox component, characterized in that: The following steps are involved: The surface image of the gearbox component on the production line is acquired by a camera device, grayscale processing is performed, and a grayscale image is generated; The grayscale image is subjected to a first U-net model to perform a segmentation of a transmission component entity image, to generate a binary image identifying the transmission component entity, and the binary image identifying the transmission component entity is subjected to a Hadamard product operation with the grayscale image to generate a construction image, wherein the binary image identifying the transmission component entity is a single-channel image having the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the transmission component; The structured image is subjected to a second U-net model to perform defect region image segmentation, and a binary image is generated to identify the defect region on the surface of the gearbox component, wherein the binary image to identify the defect region on the surface of the gearbox component is a single-channel image of the same size as the structured image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defect region; Calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component; calculate the number of non-zero pixels in the structure image to generate the surface area of the gearbox component; calculate the gearbox component qualification confidence degree according to the gearbox component surface defect area and the gearbox component surface area, wherein the calculation method of the gearbox component qualification confidence degree is: (1-gearbox component surface defect area ÷ gearbox component surface area) × 100%; If the confidence level of the transmission component is less than 90%, it is judged as unqualified; if the confidence level of the transmission component is greater than or equal to 90% and less than 97%, it is judged as suspected unqualified; if the confidence level of the transmission component is greater than or equal to 97%, it is judged as qualified.
2. A method for detecting surface defects of a gearbox component according to claim 1, characterized in that: The grayscale process comprises the following steps: Obtain the values of each pixel of the gearbox component surface image on the three channels of R, G, and B; Multiply the values of each pixel in the three channels of R, G, and B by weights of 0.3, 0.6, and 0.1 respectively, and add them together to generate each pixel value of the grayscale image.
3. A method for detecting surface defects of a gearbox component according to claim 1, characterized in that: The first U-net model needs to be trained before performing the segmentation of the gearbox component entity image, including the following steps: Collect 1,800 images of the surface of gearbox components on the production line, crop all images to the same size, and perform grayscale processing to generate the first input data set; Using labelme to label all images in the first input data set to generate a first output data set, wherein the images in the first input data set and the images in the first output data set are in one-to-one correspondence; The first input data set and the corresponding first output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the first U-net model using the training set, validation set, and test set.
4. A method for detecting surface defects of a gearbox component according to claim 1, characterized in that: The second U-net model needs to be trained before performing the segmentation of the defect area image, including the following steps: Collecting surface images of gearbox components with surface defects on the production line, cropping all images to the same size, and performing grayscale processing to generate a second input data set; For each image in the second input data set, five data augmentation strategies are adopted, namely, 90-degree rotation, 180-degree rotation, 270-degree rotation, top-bottom mirror adjustment, and left-right mirror adjustment, to expand the number of samples in the second input data set; Using labelme to label defect areas in all images in the second input data set to generate a second output data set, wherein the images in the second input data set and the images in the second output data set are in one-to-one correspondence; The second input data set and the corresponding second output data set are divided into a training set, a validation set, and a test set in a ratio of 8:1:1; Perform training, validation, and testing of the second U-net model using the training, validation, and test sets.
5. A method for detecting surface defects of a gearbox component according to claim 1, characterized in that: The structure of the first U-net model or the second U-net model is: Perform two convolutions with a kernel size of 3×3 on the input image to generate the first convolution result, and perform 2×2 maximum pooling on the first convolution result to generate the first pooling result; Perform two convolutions with a kernel size of 3×3 on the first pooling result to generate a second convolution result, and perform 2×2 maximum pooling on the second convolution result to generate a second pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the second pooling result to generate a third convolution result, and perform 2×2 maximum pooling on the third convolution result to generate a third pooling result; Perform two convolutions with a convolution kernel size of 3×3 on the third pooling result to generate a fourth convolution result, and perform 2×2 maximum pooling on the fourth convolution result to generate a fourth pooling result; Perform two convolutions with a kernel size of 3×3 on the fourth pooling result to generate the fifth convolution result; Perform 2×2 upsampling on the fifth convolution result and concatenate it with the center-cropped fourth convolution result. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the first feature map. Perform 2×2 upsampling on the first feature map and concatenate it with the third convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate the second feature map. Perform 2×2 upsampling on the second feature map and concatenate it with the center-cropped second convolution result. Perform two convolutions with a kernel size of 3×3 on the concatenated result to generate the third feature map. Perform 2×2 upsampling on the third feature map and concatenate it with the first convolution result after center cropping. Perform two convolutions with a convolution kernel size of 3×3 on the concatenated result to generate a fourth feature map. A convolution with a kernel size of 1×1 is performed on the fourth feature map to generate an image segmentation result.
6. A method for detecting surface defects of a gearbox component according to claim 1 or 4, characterized in that: The defective areas include: iron oxide areas, plaque areas, crack areas, pitting areas, inclusion areas and scratch areas.
7. A gearbox component surface defect detection system, characterized in that: include: Image module: The image module is used to obtain the surface image of the gearbox component on the production line through a camera device, perform grayscale processing, and generate a grayscale image; Entity segmentation module: The entity segmentation module is used to perform segmentation of the gearbox component entity image on the grayscale image through the first U-net model to generate a binary image identifying the gearbox component entity, perform a Hadamard product operation on the binary image identifying the gearbox component entity and the grayscale image to generate a construction image, wherein the binary image identifying the gearbox component entity is a single-channel image of the same size as the grayscale image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the gearbox component; Defect segmentation module: The defect segmentation module is used to perform defect area image segmentation on the structural image through the second U-net model to generate a binary image identifying the defect area on the surface of the gearbox component, wherein the binary image identifying the defect area on the surface of the gearbox component is a single-channel image of the same size as the structural image, and each pixel is a Boolean value, indicating whether the current pixel belongs to the defect area; Confidence module: The confidence module is used to calculate the number of non-zero pixels in the binary image identifying the surface defect area of the gearbox component to generate the surface defect area of the gearbox component, calculate the number of non-zero pixels in the structural image to generate the surface area of the gearbox component, and calculate the qualified confidence of the gearbox component according to the surface defect area of the gearbox component and the surface area of the gearbox component, wherein the calculation method of the qualified confidence of the gearbox component is: (1-the surface defect area of the gearbox component ÷ the surface area of the gearbox component) × 100%; Determination module: The determination module is used to determine that a gearbox component is unqualified if the confidence level of its qualification is less than 90%, to determine that the component is suspected to be unqualified if the confidence level of its qualification is greater than or equal to 90% and less than 97%, and to determine that the component is qualified if the confidence level of its qualification is greater than or equal to 97%.
Citation Information
Patent Citations
Industrial CT detection defect intelligent identification method based on deep learning
CN112102229A
Hardware defect identification detection method and device and computer readable storage medium
CN112767369A
Metal surface defect detection method based on U-NET convolutional neural network
CN113298757A
Composite material defect nondestructive inspection method based on deep learning algorithm
CN113870236A
Plastic package food package multi-area defect detection method based on U-net network and improved DRA model
CN117635555A
Cited By
Vision-based automobile part defect detection method and system
CN120219347A
A vision-based automotive parts defect detection method and system
CN120219347B