Search

CN-121998931-A - Defect detection method and device for CNC machined part

CN121998931ACN 121998931 ACN121998931 ACN 121998931ACN-121998931-A

Abstract

The invention discloses a defect detection method and device for CNC machined parts. The method comprises the steps of obtaining a target image of a CNC machined part, inputting the target image into an edge differential reverse region sensing network model, processing the target image through the edge differential reverse region sensing network model, and outputting a defect image, wherein the edge differential reverse region sensing network model comprises a first network branch, a second network branch and a decoder, the first network branch is a hybrid self-adaptive module and an edge differential convolution module which are sequentially connected, the second network branch is a hybrid self-adaptive module, a multi-scale self-adaptive module and a reverse region sensing module which are sequentially connected, and determining defect parameters according to the defect image. According to the technical scheme, the defect detection precision and the defect detection efficiency can be remarkably improved, and meanwhile, the stability of the detection process is enhanced.

Inventors

  • CHEN ZHENGYU

Assignees

  • 立铠精密科技(盐城)有限公司

Dates

Publication Date
20260508
Application Date
20260121

Claims (10)

  1. 1. A method of defect detection of a CNC workpiece, comprising: Acquiring a target image of a CNC machined part; Inputting the target image into an edge differential reverse region sensing network model, and processing the target image through the edge differential reverse region sensing network model to output a defect image, wherein the edge differential reverse region sensing network model comprises a first network branch, a second network branch and a decoder, wherein the first network branch is a hybrid self-adaptive module and an edge differential convolution module which are sequentially connected, and the second network branch is a hybrid self-adaptive module, a multi-scale self-adaptive module and a reverse region sensing module which are sequentially connected; And determining defect parameters according to the defect image.
  2. 2. The method of claim 1, wherein inputting the target image into an edge differential inverse region-aware network model, processing the target image through the edge differential inverse region-aware network model, outputting a defect image, comprises: Processing the target image by using the first network branch to generate a first feature map, and processing the target image by using the second network branch to generate a second feature map; And fusing the first feature map and the feature map through the decoder to obtain a defect image.
  3. 3. The method of claim 2, wherein processing the target image with the first network branch to generate a first feature map comprises: Processing the target image based on the hybrid self-adaptive module to generate a third feature map; And processing the third feature map by using the edge difference convolution module to generate a first feature map.
  4. 4. The method of claim 3, wherein processing the third feature map with the edge differential convolution module to generate a first feature map comprises: performing convolution operation on a preset first convolution kernel and the third feature map to obtain a horizontal feature map and a vertical feature map; and fusing the horizontal direction feature image and the vertical direction feature image to generate a first feature image.
  5. 5. The method of claim 4, wherein fusing the horizontal direction feature map and the vertical direction feature map to generate a first feature map comprises: determining a first weight corresponding to the horizontal direction feature map, and determining a second weight corresponding to the vertical direction feature map; taking the difference value between 1 and the first weight as a third weight, and taking the difference value between 1 and the second weight as a fourth weight; Weighting the horizontal direction feature images by using the second weights, weighting the vertical direction feature images by using the fourth weights, and fusing weighting results to obtain a fourth feature image; weighting the horizontal direction feature images according to the first weight, weighting the vertical direction feature images by using the third weight, and fusing the weighted results to obtain a fifth feature image; and splicing the fourth characteristic diagram and the fifth characteristic diagram to obtain a first characteristic diagram.
  6. 6. The method of claim 2, wherein processing the target image with the second network branch to generate a second feature map comprises: Processing the target image based on the hybrid self-adaptive module to generate a sixth feature map; Processing the sixth feature map by using the multi-scale self-adaptive module to generate a seventh feature map; and processing the seventh feature map and the sixth feature map according to the reverse region sensing module to generate a second feature map.
  7. 7. The method of claim 6, wherein processing the sixth feature map with the multi-scale adaptation module to generate a seventh feature map comprises: performing convolution operation on a preset second convolution kernel and the sixth feature map to obtain an eighth feature map; Performing convolution operation on the eighth feature map by utilizing separable convolution with a preset depth to obtain a ninth feature map; and fusing the ninth feature map, the eighth feature map and the sixth feature map to generate a seventh feature map.
  8. 8. The method of claim 7, wherein the depth separable convolution is comprised of convolution kernels of different shape and size, and wherein performing a convolution operation with the eighth feature map using a predetermined depth separable convolution to obtain a ninth feature map comprises: And carrying out convolution operation on the convolution kernels with different shapes and sizes and the eighth feature map to obtain a ninth feature map.
  9. 9. The method of claim 6, wherein processing the seventh feature map and the sixth feature map in accordance with the inverse region awareness module generates a second feature map comprising: Processing the seventh feature map based on average pooling and maximum pooling to obtain a tenth feature map, and performing convolution operation on the tenth feature map by using a preset third convolution check to generate an eleventh feature map; Performing activation function processing on the eleventh feature map to obtain an attention weight map; And determining a second characteristic diagram according to the attention weight diagram and the sixth characteristic diagram.
  10. 10. A defect detection device for a CNC workpiece, comprising: The target image acquisition unit is used for acquiring a target image of the CNC machined part; The defect image output unit is used for inputting the target image into an edge differential reverse region perception network model, processing the target image through the edge differential reverse region perception network model and outputting the defect image, wherein the edge differential reverse region perception network model comprises a first network branch, a second network branch and a decoder, the first network branch is a hybrid self-adaptive module and an edge differential convolution module which are sequentially connected, and the second network branch is a hybrid self-adaptive module, a multi-scale self-adaptive module and a reverse region perception module which are sequentially connected; and the defect parameter determining unit is used for determining defect parameters according to the defect image.

Description

Defect detection method and device for CNC machined part Technical Field The invention relates to the technical field of defect detection, in particular to a defect detection method and device for CNC machined parts. Background In the CNC processing manufacturing field, the appearance quality of machined parts directly determines the assembly precision, the service performance and the service life of products, so appearance defect detection is an indispensable key link in the production process, and the core aim is to accurately identify various defects such as burrs, corner defects, tool marks, angle breakage and the like, so that the consistency and the qualification rate of the products are ensured. Currently, the appearance detection means of CNC machined parts are mainly divided into two major types of manual detection and traditional automatic optical detection (AOI) systems, but all have obvious technical limitations, and are difficult to meet the industrial detection requirements of high precision, high efficiency and high stability. Therefore, a technology for detecting the appearance of a CNC machined part, which breaks through the technical bottleneck, is needed to improve the detection precision, efficiency and stability. Disclosure of Invention The invention provides a defect detection method and device for CNC machined parts, which can remarkably improve the accuracy and detection efficiency of defect detection and enhance the stability of the detection process. According to an aspect of the present invention, there is provided a defect detection method of a CNC workpiece, the method comprising: Acquiring a target image of a CNC machined part; Inputting the target image into an edge differential reverse region sensing network model, and processing the target image through the edge differential reverse region sensing network model to output a defect image, wherein the edge differential reverse region sensing network model comprises a first network branch, a second network branch and a decoder, wherein the first network branch is a hybrid self-adaptive module and an edge differential convolution module which are sequentially connected, and the second network branch is a hybrid self-adaptive module, a multi-scale self-adaptive module and a reverse region sensing module which are sequentially connected; And determining defect parameters according to the defect image. According to another aspect of the present invention, there is provided a defect detection device for a CNC machined part, the device comprising: The target image acquisition unit is used for acquiring a target image of the CNC machined part; The defect image output unit is used for inputting the target image into an edge differential reverse region perception network model, processing the target image through the edge differential reverse region perception network model and outputting the defect image, wherein the edge differential reverse region perception network model comprises a first network branch, a second network branch and a decoder, the first network branch is a hybrid self-adaptive module and an edge differential convolution module which are sequentially connected, and the second network branch is a hybrid self-adaptive module, a multi-scale self-adaptive module and a reverse region perception module which are sequentially connected; and the defect parameter determining unit is used for determining defect parameters according to the defect image. According to another aspect of the present invention, there is provided an electronic apparatus including: The defect detection method for the CNC machined part comprises the steps of enabling at least one processor to execute a defect detection method for the CNC machined part, enabling the at least one processor to execute the defect detection method for the CNC machined part, and enabling the at least one processor to execute the defect detection method for the CNC machined part. According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a method for detecting defects in a CNC workpiece according to any of the embodiments of the present invention. According to the technical scheme, the target image of the CNC machined part is obtained, the target image is input into the edge difference reverse region perception network model, the target image is processed through the edge difference reverse region perception network model, the defect image is output, and the defect parameters are determined according to the defect image. According to the technical scheme, the defect detection precision and the defect detection efficiency can be remarkably improved, and meanwhile, the stability of the detection process is enhanced. It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to