Vision-based automobile part defect detection method and system

By using super-resolution model, solid segmentation U-Net model and defect detection U-Net model in automotive accessories defect detection, the problems of low resolution and background interference are solved, and defect detection with high accuracy and robustness are achieved.

CN120219347AActive Publication Date: 2025-06-27JIANGSU JIUXIANG AUTOMOTIVE ELECTRICAL GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510334916.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-06-27
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

In the detection of defects of automotive parts, the resolution of image acquisition devices for industrial purposes is low, making it difficult to accurately detect subtle defects, and the variable backgrounds and defect patterns with different shapes lead to insufficient detection accuracy and universality.

Method used

The super-resolution model is used for end-to-end super-resolution reconstruction, combined with the solid segmentation U-Net model for image segmentation, segment the automotive accessories entity and remove background interference, and finally, the defect detection U-Net model is used for pixel-level defect detection.

Benefits of technology

Highly accurate automotive parts defect detection is achieved, the problems of low resolution and background interference are solved, and the robustness and universality of detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219347A_ABST
    Figure CN120219347A_ABST
Patent Text Reader

Abstract

The invention discloses an automobile part defect detection method and system based on vision, and the method comprises the steps: obtaining an automobile part surface image through an image collection device, carrying out the graying processing, and generating an initial image; inputting the initial image into a super-resolution model to generate a reconstructed image; inputting the reconstructed image into an entity segmentation U-Net model, segmenting an automobile accessory entity in the reconstructed image, and generating an entity image; inputting the entity image into a defect detection U-Net model, carrying out pixel-level defect area detection on the entity image, carrying out distinguishing identification in the form of binary systems 1 and 0, and generating a defect binary image; and respectively carrying out logic and operation on the defect binary image and the reconstructed image on each pixel to finally obtain a surface defect area of the automobile part, thereby completing defect detection of the automobile part. According to the method, high-accuracy computer vision detection is carried out on the defects of the automobile parts, the problem that the background interferes with the detection accuracy is solved, and high robustness is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and particularly to a vision-based method and system for defect detection of automotive parts. Background Art

[0002] In the current production process of automotive parts, automation and intelligence have been widely achieved. The popularization of automated and intelligent production lines can greatly improve production efficiency and reduce production costs. Among them, using computer vision for quality inspection is a widely used technical means.

[0003] However, when using computer vision technology for defect detection of automotive parts, due to the usually low resolution of industrial image acquisition devices, it is difficult to accurately detect some subtle defects. In addition, when collecting images of automotive parts, the variable backgrounds of automotive parts will interfere with the accuracy of detection, and the surface defect forms of automotive parts are diverse, requiring the detection method to have high robustness. Summary of the Invention

[0004] The purpose of the present invention is to provide a vision-based method and system for defect detection of automotive parts, aiming to solve the problems that due to the usually low resolution of industrial image acquisition devices, it is difficult to accurately detect some subtle defects, and when collecting images of automotive parts, the variable backgrounds of automotive parts will interfere with the accuracy of detection. In addition, the surface defect forms of automotive parts are diverse, and the detection method has insufficient universality.

[0005] In view of the above problems, the present application provides a vision-based method and system for defect detection of automotive parts.

[0006] In the first aspect disclosed by the present application, a vision-based method for defect detection of automotive parts is provided. The method includes the following steps: Step 1: Obtain the surface image of the automotive part through an image acquisition device, perform grayscale processing on the surface image of the automotive part to generate an initial image; Step 2: Input the initial image into a super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; Step 3: Input the reconstructed image into an entity segmentation U-Net model, and the entity segmentation U-Net model performs image segmentation on the reconstructed image, segments out the automotive part entity in the reconstructed image, and sets the pixel gray values outside the automotive part entity in the reconstructed image to 0 to generate an entity image; Step 4: Input the entity image into the defect detection U-Net model. The defect detection U-Net model performs pixel-level defect area detection on the entity image, and differentiates and identifies the pixel gray values of the defect area and the normal area of the auto parts in the entity image in the form of binary 1 and 0 respectively, generating a defect binary image. Step 5: Perform a logical AND operation on each pixel of the defect binary image and the reconstructed image respectively, and finally obtain the surface defect area of the auto parts, completing the defect detection of the auto parts.

[0007] Preferably, step 2 specifically includes the following steps: Step 2.1: Use bicubic interpolation to magnify the input initial image by two times, generating a magnified image. Step 2.2: Use 64 convolution kernels of size 9×9 to perform a convolution operation on the magnified image, extract image features, and generate a first feature map with 64 channels. Step 2.3: Use 32 convolution kernels of size 1×1 to perform a convolution operation on the first feature map, perform non-linear mapping, map the low-resolution features to the high-resolution feature space, and generate a second feature map with 32 channels. Step 2.4: Use 1 convolution kernel of size 5×5 to perform a convolution operation on the second feature map, perform image reconstruction, and generate a reconstructed image.

[0008] Preferably, step 3 specifically includes the following steps: Step 3.1: Construct an entity segmentation U-Net model, where the entity segmentation U-Net model has an encoder, a decoder, and an output layer connected in sequence. Step 3.2: Input the reconstructed image into the encoder, and perform feature extraction on the reconstructed image through 4 convolutional blocks stacked in sequence in the encoder, generating feature maps of corresponding scales respectively. Each convolutional block includes 2 convolutional layers and 1 pooling layer. Step 3.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through 4 deconvolutional blocks stacked in sequence in the decoder, generates feature maps of corresponding scales respectively, and fuses the feature maps generated at the corresponding levels in the encoder and the decoder through skip connections. Each deconvolutional block includes 2 convolutional layers and 1 deconvolutional layer. Step 3.4: The output layer classifies each pixel of the feature map finally output by the decoder, generating a segmentation image. The output layer includes 1 convolutional layer, and the value of each pixel in the segmentation image represents the probability of belonging to the auto parts entity. Step 3.5: Reset all pixels with values less than 0.5 in the segmentation image to 0, and reset all pixels with values greater than or equal to 0.5 to 1, generating a reset segmentation image. Step 3.6: Perform a logical AND operation on the reset segmented image and the reconstructed image to generate an entity image.

[0009] Preferably, step 4 specifically includes the following steps: Step 4.1: Construct a defect detection U-Net model, where the defect detection U-Net model has an encoder, a decoder, and an output layer connected in sequence; Step 4.2: Input the entity image into the encoder, and perform feature extraction on the reconstructed image through 6 convolutional blocks stacked in sequence in the encoder to generate feature maps of corresponding scales, where each convolutional block includes 3 convolutional layers and 1 pooling layer; Step 4.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through 6 transposed convolutional blocks stacked in sequence in the decoder to generate feature maps of corresponding scales, and fuses the feature maps generated by the corresponding levels in the encoder and the decoder through skip connections, where each transposed convolutional block includes 3 convolutional layers and 1 transposed convolutional layer; Step 4.4: The output layer classifies each pixel of the feature map finally output by the decoder to generate a defect detection image, where the output layer includes 4 convolutional layers, and the value of each pixel in the defect detection image represents the probability of belonging to the automotive parts entity; Step 4.5: Reset all pixels with values less than 0.5 in the defect detection image to 0, and reset all pixels with values greater than or equal to 0.5 to 1 to generate a defect binary image.

[0010] In the second aspect disclosed in this application, a vision-based automotive parts defect detection system is provided. The system is used for the above-mentioned vision-based automotive parts defect detection method, and the system includes: A preprocessing module, which is used to obtain the surface image of the automotive parts through an image acquisition device, perform grayscale processing on the surface image of the automotive parts to generate an initial image; A reconstruction module, which is used to input the initial image into a super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; An entity segmentation module, which is used to input the reconstructed image into an entity segmentation U-Net model. The entity segmentation U-Net model performs image segmentation on the reconstructed image, segments out the automotive parts entity in the reconstructed image, and sets the grayscale values of the pixels outside the automotive parts entity in the reconstructed image to 0 to generate an entity image; The first defect detection module is configured to input the entity image into a defect detection U-Net model. The defect detection U-Net model performs pixel-level defect area detection on the entity image, and distinguishes and identifies the pixel gray values of the defect area and the normal area of the auto parts in the entity image in the form of binary 1 and 0 respectively, generating a defect binary image. The second defect detection module is configured to perform a logical AND operation on each pixel of the defect binary image and the reconstructed image respectively, and finally obtain the surface defect area of the auto parts, completing the defect detection of the auto parts.

[0011] In a third aspect disclosed in the present application, there is provided a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned vision-based auto parts defect detection method are implemented.

[0012] In a fourth aspect disclosed in the present application, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned vision-based auto parts defect detection method are implemented.

[0013] In a fifth aspect disclosed in the present application, there is provided a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, the steps of the above-mentioned vision-based auto parts defect detection method are implemented.

[0014] The beneficial effects of the present invention are as follows: (1) Through end-to-end super-resolution reconstruction by the super-resolution model, the problem that it is difficult to accurately detect subtle defects due to the low resolution of the image acquisition device for industrial use is solved, and high-accuracy computer vision detection for auto parts defects is achieved. (3) By using the entity segmentation U-Net model, the auto parts entity in the image is first segmented by semantic segmentation, solving the problem that the background of the auto parts in the image interferes with the detection accuracy. (2) By using the defect detection U-Net model, the robustness of the method is increased by stacking more convolutional layers, and variously shaped defects that may appear on the surface of the auto parts are accurately detected. Description of the Drawings

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 It is the overall flowchart of a vision-based defect detection method for automotive parts.

[0017] Figure 2 It is the overall structure diagram of a vision-based defect detection system for automotive parts. Specific implementation manners

[0018] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0019] Embodiment 1: As Figure 1 shown, the embodiment of the present application provides a vision-based defect detection method for automotive parts, and the method includes the following steps: Step 1: Obtain the surface image of the automotive part through an image acquisition device, and perform grayscale processing on the surface image of the automotive part to generate an initial image.

[0020] Specifically, for the grayscale processing, the weighted average method is adopted, different weights are assigned to the red, green, and blue color components respectively, and then the weighted average value is calculated as the grayscale value. Among them, the weights of the red, green, and blue color components are 0.299, 0.587, and 0.114 respectively.

[0021] Step 2: Input the initial image into a super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; Step 2 specifically includes the following steps: Step 2.1: Use bicubic interpolation to magnify the input initial image by two times to generate a magnified image; Step 2.2: Use 64 convolution kernels of size 9×9 to perform convolution operations on the magnified image, extract image features, and generate a first feature map with 64 channels; Step 2.3: Use 32 convolution kernels of size 1×1 to perform convolution operations on the first feature map, perform non-linear mapping, map the low-resolution features to the high-resolution feature space, and generate a second feature map with 32 channels; Step 2.4: Use 1 convolution kernel of size 5×5 to perform convolution operations on the second feature map, perform image reconstruction, and generate a reconstructed image.

[0022] Specifically, the specific steps of bicubic interpolation are as follows: First, determine the position of the interpolation point of the initial image in the grid coordinates of the original pixel points, and find the nearest 4×4 known pixel points around it; then, construct a cubic interpolation function for the horizontal coordinate direction and the vertical coordinate direction respectively, and calculate the coefficients of the cubic interpolation function based on the information of these 16 known pixel points and their first-order and second-order partial derivatives in the two coordinate axis directions; finally, first obtain 4 intermediate values in the horizontal coordinate direction using the interpolation function, and then perform interpolation calculation on these 4 intermediate values in the vertical coordinate direction to obtain the final result of the interpolation point.

[0023] Step 3: Input the reconstructed image into the entity segmentation U-Net model. The entity segmentation U-Net model performs image segmentation on the reconstructed image, segments out the automotive parts entities in the reconstructed image, and sets the pixel gray values outside the automotive parts entities in the reconstructed image to 0 to generate an entity image; Step 3 specifically includes the following steps: Step 3.1: Construct an entity segmentation U-Net model, where the entity segmentation U-Net model has an encoder, a decoder, and an output layer connected in sequence; Step 3.2: Input the reconstructed image into the encoder, and perform feature extraction on the reconstructed image through 4 convolutional blocks stacked in sequence in the encoder to generate feature maps of corresponding scales respectively, where each convolutional block includes 2 convolutional layers and 1 pooling layer; Step 3.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through 4 transposed convolutional blocks stacked in sequence in the decoder to generate feature maps of corresponding scales respectively, and fuses the feature maps generated by the corresponding levels in the encoder and the decoder through skip connections, where each transposed convolutional block includes 2 convolutional layers and 1 transposed convolutional layer; Step 3.4: The output layer classifies each pixel of the feature map finally output by the decoder to generate a segmentation image, where the output layer includes 1 convolutional layer, and the value of each pixel in the segmentation image represents the probability of belonging to the automotive parts entity; Step 3.5: Reset all pixels with values less than 0.5 in the segmentation image to 0, and reset all pixels with values greater than or equal to 0.5 to 1 to generate a reset segmentation image; Step 3.6: Perform a logical AND operation on the reset segmentation image and the reconstructed image to generate an entity image.

[0024] Specifically, the model training steps of the entity segmentation U-Net model are as follows: (1) Collect automotive parts image data, perform data annotation on the automotive parts entities, and divide the training set and test set according to a ratio of 8:2; (2) Use the cross-entropy loss function as the loss function, and use Adam as the optimizer, set the learning rate to 0.001, the number of training epochs to 200, and the batch size to 128; (3) Input the training set into the entity segmentation U-Net model, and perform training through backpropagation and gradient descent iteration until the value of the loss function converges; (4) Use the test set to test the capabilities of the trained entity segmentation U-Net model.

[0025] Step 4: Input the entity image into the defect detection U-Net model. The defect detection U-Net model performs pixel-level defect area detection on the entity image, and distinguishes and marks the pixel gray values of the defect area and the normal area of the automotive parts in the entity image in the form of binary 1 and 0 respectively to generate a defect binary image. Step 4 specifically includes the following steps: Step 4.1: Construct a defect detection U-Net model, where the defect detection U-Net model has an encoder, a decoder, and an output layer connected in sequence. Step 4.2: Input the entity image into the encoder, and perform feature extraction on the reconstructed image through 6 convolutional blocks stacked in sequence in the encoder to generate feature maps of corresponding scales respectively. Each convolutional block includes 3 convolutional layers and 1 pooling layer. Step 4.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through 6 transposed convolutional blocks stacked in sequence in the decoder to generate feature maps of corresponding scales respectively, and fuses the feature maps generated by the corresponding levels in the encoder and the decoder through skip connections. Each transposed convolutional block includes 3 convolutional layers and 1 transposed convolutional layer. Step 4.4: The output layer classifies each pixel of the feature map finally output by the decoder to generate a defect detection image. The output layer includes 4 convolutional layers, and the value of each pixel in the defect detection image represents the probability of belonging to the automotive parts entity. Step 4.5: Reset all pixels with values less than 0.5 in the defect detection image to 0, and reset all pixels with values greater than or equal to 0.5 to 1 to generate a defect binary image.

[0026] Specifically, the model training steps of the defect detection U-Net model are as follows: (1) Collect the automotive parts entity images segmented by the entity segmentation U-Net model, and ensure that the number of defective samples is the same as that of non-defective samples to balance positive and negative samples. Subsequently, perform data annotation on the defective areas of the automotive parts, and divide the training set and test set according to a ratio of 8:2; (2) Use the cross-entropy loss function as the loss function, and use Adam as the optimizer. Set the learning rate to 0.001, the number of training epochs to 200, and the batch size to 64; (3) Input the training set into the defect detection U-Net model, and perform training through backpropagation and gradient descent iteration until the value of the loss function tends to converge; (4) Use the test set to test the capabilities of the trained defect detection U-Net model.

[0027] Step 5: Perform a logical AND operation on each pixel of the binary defect image and the reconstructed image to finally obtain the defective area on the surface of the automotive parts, completing the defect detection of the automotive parts.

[0028] In summary, the vision-based automotive parts defect detection method provided by the embodiments of the present application has the following technical effects: (1) Through end-to-end super-resolution reconstruction using a super-resolution model, the problem that it is difficult to accurately detect fine defects due to the low resolution of industrial image acquisition devices is solved, and high-accuracy computer vision detection of automotive parts defects is achieved; (3) Using the entity segmentation U-Net model, the automotive parts entities in the image are first segmented through semantic segmentation, solving the problem that the background of the automotive parts in the image interferes with the detection accuracy; (2) Using the defect detection U-Net model, the robustness of the method is increased by stacking more convolutional layers, and variously shaped defects that may appear on the surface of automotive parts are accurately detected.

[0029] Embodiment 2: Based on the same inventive concept as the vision-based automotive parts defect detection method in Embodiment 1, as Figure 2 shown, the present application provides a vision-based automotive parts defect detection system, and the system includes: A preprocessing module, which is used to obtain the surface image of the automotive parts through an image acquisition device, perform grayscale processing on the surface image of the automotive parts, and generate an initial image; A reconstruction module, which is used to input the initial image into a super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; An entity segmentation module, which is used to input the reconstructed image into the entity segmentation U-Net model. The entity segmentation U-Net model performs image segmentation on the reconstructed image, segments out the automotive parts entities in the reconstructed image, and sets the pixel gray values outside the automotive parts entities in the reconstructed image to 0 to generate an entity image; A first defect detection module, which is used to input the entity image into the defect detection U-Net model. The defect detection U-Net model performs pixel-level defect area detection on the entity image, and distinguishes and marks the pixel gray values of the defect areas and normal areas of the automotive parts in the entity image in the form of binary 1 and 0 respectively to generate a defect binary image; A second defect detection module, which is used to perform a logical AND operation on each pixel of the defect binary image and the reconstructed image respectively, and finally obtain the surface defect area of the automotive parts to complete the defect detection of the automotive parts.

[0030] Through the foregoing detailed description of a vision-based automotive parts defect detection method in this specification, those skilled in the art can clearly know a vision-based automotive parts defect detection system in this embodiment. Since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For related parts, refer to the description in the method part.

[0031] Embodiment 3: In Embodiment 3, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the foregoing vision-based automotive parts defect detection method are implemented.

[0032] Embodiment 4: In Embodiment 4, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing vision-based automotive parts defect detection method are implemented.

[0033] Embodiment 5: In Embodiment 5, a computer program product is provided, including a computer program or instruction. When the computer program or instruction is executed by a processor, the steps of the foregoing vision-based automotive parts defect detection method are implemented.

[0034] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope recorded in this specification.

[0035] The foregoing 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 readily 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. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A vision-based automotive parts defect detection method, characterized in that: The method comprises: Step 1: Acquire the surface image of the automobile part through an image acquisition device, perform grayscale processing on the surface image of the automobile part, and generate an initial image; Step 2: Input the initial image into the super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; Step 3: Input the reconstructed image into the entity segmentation U-Net model. The entity segmentation U-Net model performs image segmentation on the reconstructed image, segments the auto parts entity in the reconstructed image, and sets the grayscale value of pixels other than the auto parts entity in the reconstructed image to 0 to generate an entity image. Step 4: Input the entity image into the defect detection U-Net model. The defect detection U-Net model performs pixel-level defect area detection on the entity image, distinguishes and identifies the pixel grayscale values ​​of the defect area and normal area of ​​the auto parts in the entity image in the form of binary 1 and 0, and generates a defect binary image; Step 5: Perform logical AND operations on each pixel of the defect binary image and the reconstructed image, and finally obtain the surface defect area of ​​the automobile part to complete the automobile part defect detection.

2. A method for detecting defects in automotive parts based on vision as claimed in claim 1, characterized in that: The step 2 specifically includes the following steps: Step 2.1: Using the bicubic interpolation method, the input initial image is enlarged to twice to generate an enlarged image; Step 2.2: Use 64 convolution kernels of size 9×9 to perform convolution operation on the enlarged image, extract image features, and generate the first feature map with 64 channels; Step 2.3: Use 32 convolution kernels of size 1×1 to perform convolution operation on the first feature map, perform nonlinear mapping, map the low-resolution features to the high-resolution feature space, and generate a second feature map with 32 channels; Step 2.4: Use a convolution kernel of size 5×5 to perform a convolution operation on the second feature map to reconstruct the image and generate a reconstructed image.

3. The method for detecting defects of automobile parts based on vision as claimed in claim 1, characterized in that: The step 3 specifically includes the following steps: Step 3.1: construct an entity segmentation U-Net model, wherein the entity segmentation U-Net model has an encoder, a decoder, and an output layer connected in sequence; Step 3.2: Input the reconstructed image into the encoder, and extract features of the reconstructed image through four convolution blocks stacked in sequence in the encoder to generate feature maps of corresponding scales. Each convolution block includes two convolution layers and one pooling layer. Step 3.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through the four deconvolution blocks stacked in sequence in the decoder, generates feature maps of corresponding scales respectively, and fuses the feature maps generated by the encoder and the corresponding layers in the decoder through skip connections, where each deconvolution block includes 2 convolution layers and 1 deconvolution layer; Step 3.4: The output layer classifies each pixel of the feature map finally output by the decoder to generate a segmented image, where the output layer includes 1 convolutional layer, and the value of each pixel in the segmented image represents the probability of belonging to the auto parts entity; Step 3.5: Reset all pixels with values ​​less than 0.5 in the segmented image to 0, and reset all pixels with values ​​greater than or equal to 0.5 to 1, to generate a reset segmented image; Step 3.6: Perform a logical AND operation on the reset segmented image and the reconstructed image to generate a solid image.

4. The method for detecting defects of automobile parts based on vision as claimed in claim 1, characterized in that: The step 4 specifically comprises the following steps: Step 4.1: Construct a defect detection U-Net model, wherein the defect detection U-Net model has an encoder, a decoder, and an output layer connected in sequence; Step 4.2: Input the entity image into the encoder, extract features of the reconstructed image through the six convolution blocks stacked in sequence in the encoder, and generate feature maps of corresponding scales respectively, where each convolution block includes three convolution layers and one pooling layer; Step 4.3: The decoder receives the feature map finally generated by the encoder, performs upsampling through the six deconvolution blocks stacked in sequence in the decoder, generates feature maps of corresponding scales respectively, and fuses the feature maps generated by the encoder and the corresponding layers in the decoder through skip connections, where each deconvolution block includes three convolution layers and one deconvolution layer; Step 4.4: The output layer classifies each pixel of the feature map finally output by the decoder to generate a defect detection image, wherein the output layer includes 4 convolutional layers, and the value of each pixel in the defect detection image represents the probability of belonging to an automobile part entity; Step 4.5: Reset all pixels with values ​​less than 0.5 in the defect detection image to 0, and reset all pixels with values ​​greater than or equal to 0.5 to 1, to generate a defect binary image.

5. A vision-based automotive parts defect detection system, the system comprising: A preprocessing module, the preprocessing module is used to obtain an image of the surface of the automobile part through an image acquisition device, grayscale the image of the surface of the automobile part, and generate an initial image; A reconstruction module, wherein the reconstruction module is used to input the initial image into the super-resolution model, and the super-resolution model performs end-to-end super-resolution reconstruction on the initial image to generate a reconstructed image; An entity segmentation module, wherein the entity segmentation module is used to input the reconstructed image into an entity segmentation U-Net model, and the entity segmentation U-Net model performs image segmentation on the reconstructed image, segments out the automobile parts entity in the reconstructed image, and sets the grayscale value of pixels other than the automobile parts entity in the reconstructed image to 0, thereby generating an entity image; A first defect detection module, wherein the first defect detection module is used to input the entity image into a defect detection U-Net model, and the defect detection U-Net model performs pixel-level defect area detection on the entity image, and distinguishes and identifies the pixel grayscale values ​​of the defect area and the normal area of ​​the automobile parts in the entity image in the form of binary 1 and 0, respectively, to generate a defect binary image; The second defect detection module is used to perform logical AND operation on each pixel of the defect binary image and the reconstructed image, and finally obtain the surface defect area of ​​the automobile part to complete the defect detection of the automobile part.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the vision-based automobile parts defect detection method described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of any one of the vision-based automobile parts defect detection methods of claims 1 to 4 are implemented.

8. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of a vision-based automobile parts defect detection method described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Gearbox component surface defect detection method and system

    CN119417801A