Workpiece defect detection method, device, equipment and storage medium

By cutting industrial CT images, the problem of unclear features caused by size mismatch is solved, and more accurate defect detection is achieved.

CN116205854BActive Publication Date: 2025-10-24CHINA UNITED NETWORK COMM GRP CO LTD +2

Patent Information

Application Number
CN202211732514.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-10-24
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In the existing technology, since the size of industrial CT images is large and the input size of the defect detection network is small, the features are not obvious after the image is reduced, which affects the modeling and detection effects.

Method used

By cutting the CT image, the large-sized CT image is divided into small-sized cut images, and the cut images are input into the pre-established defect detection model to avoid the loss of feature information caused by image scaling.

Benefits of technology

The accuracy of defect detection is improved, and the integrity of image features and the accuracy of detection results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116205854B_ABST
    Figure CN116205854B_ABST
Patent Text Reader

Abstract

The present disclosure provides a workpiece defect detection method, device and equipment and storage medium, relates to the technical field of defect detection, and can improve the accuracy of defect detection. The method comprises the following steps: acquiring a computed tomography (CT) image set corresponding to a first workpiece, the CT image set comprising a plurality of first CT images, different first CT images corresponding to different parts of the first workpiece; performing image cutting on each first CT image respectively to obtain a plurality of first cut images; in order to avoid the loss of feature information in the first CT image caused by the size change of the defect detection model on the first CT image with large size, the first CT image with large size is divided into a plurality of first cut images with small size, and then all the first cut images are input into a pre-established defect detection model, so that a defect detection result of the first workpiece can be obtained, and the defect detection model can accurately detect defects of the first workpiece based on the image features in the first CT image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of defect detection technology, and in particular to a workpiece defect detection method, device, equipment and storage medium. Background Art

[0002] Computer vision anomaly detection tasks are now widely used in industrial defect detection and medical image detection. Unsupervised anomaly detection methods use deep neural networks to capture the features of normal sample images, model them using statistical methods, and then detect abnormal samples during testing.

[0003] In the field of industrial anomaly detection, a single part is typically scanned layer by layer, resulting in hundreds of CT scan images. Due to the large size of the part, the CT scan images are also very large, such as 2048*1920. Existing anomaly detection methods, such as CSFlow and FastFlow, have performed well in public datasets. However, due to the large size of industrial CT images and the small input size of existing anomaly detection networks, directly inputting industrial CT images into the network causes the images to be scaled down before feature extraction. This results in a lack of clarity in the original features, impacting modeling and detection effectiveness. Summary of the Invention

[0004] In order to solve the problem in the prior art that the features are not obvious due to the mismatch between the input image size of the defect detection network and the actual image size, thereby failing to ensure accurate defect detection, the present disclosure provides a workpiece defect detection method, device, equipment and storage medium, which can improve the accuracy of defect detection by cutting CT images.

[0005] To achieve the above objectives, the present disclosure adopts the following technical solutions:

[0006] In a first aspect, a workpiece defect detection method is provided, the method comprising:

[0007] Acquire a computed tomography (CT) image set corresponding to a first workpiece, wherein the CT image set includes a plurality of first CT images, and different first CT images correspond to different parts of the first workpiece;

[0008] Performing image segmentation on each first CT image to obtain a plurality of first segmented images; wherein the image size of each first segmented image is less than or equal to a preset image size;

[0009] All first cutting images are input into a pre-established defect detection model to obtain a defect detection result of the above-mentioned first workpiece; wherein the above-mentioned defect detection model is established based on the second CT image of the second workpiece and data used to indicate the defect situation of the above-mentioned second workpiece.

[0010] In a possible implementation manner of the first aspect, the obtaining of the set of computed tomography (CT) images corresponding to the first workpiece comprises:

[0011] The plurality of first original CT images of the first workpiece are obtained, each first original CT image being obtained by scanning a different part of the first workpiece;

[0012] The plurality of first original CT images are grouped to obtain a plurality of first CT image groups, and the plurality of first CT image groups comprise a plurality of continuous first original CT images;

[0013] The plurality of first original CT images included in each first CT image group are superimposed to obtain a first CT image.

[0014] In a possible implementation manner of the first aspect, the second original CT image is obtained by sequentially scanning the second workpiece based on a plurality of scanning layers, and an interval between adjacent scanning layers is a preset interval value.

[0015] The method further comprises:

[0016] The plurality of second original CT images of the second workpiece are obtained, and the plurality of second original CT images of the second workpiece are grouped to obtain a plurality of second CT image groups; each second CT image group comprises a same number of second original CT images, and the second original CT images included in each second CT image group correspond to continuous scanning layers;

[0017] The plurality of second original CT images included in each second CT image group are superimposed to obtain a plurality of second CT images.

[0018] Each second CT image is cut to obtain a plurality of second cut images, and an image size of each second cut image is less than or equal to a preset image size.

[0019] Features of the plurality of second cut images are extracted, and the defect detection model is established based on the features of the second cut images.

[0020] In a possible implementation manner of the first aspect, the obtaining of the set of computed tomography (CT) images corresponding to the first workpiece comprises:

[0021] The plurality of first original CT images of the first workpiece are obtained, and the first original CT images are obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, and an interval between adjacent scanning layers is a preset interval value.

[0022] determining a first target original CT image from the plurality of first original CT images; the first target original CT image corresponds to a first scanning layer, the first scanning layer being a scanning layer with a first scanning order among the plurality of scanning layers;

[0023] determining a second target original CT image from the plurality of second original CT images; the second target original CT image has a similarity greater than a preset threshold with the first target original CT image;

[0024] determining whether the second target original CT image is a second original CT image corresponding to a starting scanning layer in a second CT image group to which the second target original CT image belongs, the starting scanning layer being a scanning layer with a first scanning order among all scanning layers in the second CT image group;

[0025] in response to the second target original CT image not being the second original CT image corresponding to the starting scanning layer, deleting the first target original CT image from the plurality of first original CT images, and returning to the step of determining the first target original CT image from the plurality of first original CT images;

[0026] in response to the second target original CT image being the second original CT image corresponding to the starting scanning layer, grouping the plurality of first original CT images starting from the first target original CT image to obtain a plurality of first CT image groups; each first CT image group includes a same number of first original CT images, and the first original CT images included in each first CT image group correspond to consecutive scanning layers, and the number of original CT images included in each first CT image group is equal to the number of original CT images included in the second CT image group;

[0027] performing image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

[0028] With reference to the first aspect, in a possible implementation, an image input size of an input layer of the defect detection model is the same as the preset image size.

[0029] With reference to the first aspect, in a possible implementation, the defect detection model includes an unsupervised defect detection model or a supervised defect detection model.

[0030] The second aspect provides a workpiece defect detection device, and the device includes:

[0031] a CT image set acquisition module configured to acquire a computed tomography (CT) image set corresponding to a first workpiece, the CT image set including a plurality of first CT images, and different first CT images corresponding to different parts of the first workpiece;

[0032] an image cutting module, configured to perform image cutting on each first CT image respectively to obtain a plurality of first cut images; an image size of each first cut image is less than or equal to a preset image size;

[0033] a defect detection module, configured to input all the first cut images into a pre-established defect detection model to obtain a defect detection result of the first workpiece; the defect detection model is established based on second CT images of a second workpiece and data indicating a defect condition of the second workpiece.

[0034] With reference to the second aspect, in a possible implementation, the CT image set acquisition module comprises:

[0035] a first original CT image acquisition unit, configured to acquire a plurality of first original CT images of the first workpiece, each first original CT image being obtained by scanning a different part of the first workpiece;

[0036] a first image grouping unit, configured to group the plurality of first original CT images to obtain a plurality of first CT image groups; the plurality of first CT image groups comprise a plurality of continuous first original CT images;

[0037] a first image superposition unit, configured to perform image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

[0038] With reference to the second aspect, in a possible implementation, the second original CT image is obtained by sequentially scanning the second workpiece based on a plurality of scanning layers, and an interval between adjacent scanning layers is a preset interval value.

[0039] The device further comprises:

[0040] a second CT image group determination module, configured to acquire a plurality of second original CT images of the second workpiece, and group the plurality of second original CT images of the second workpiece to obtain a plurality of second CT image groups; each second CT image group comprises a same number of second original CT images, and the second original CT images included in each second CT image group correspond to continuous scanning layers;

[0041] a second image superposition module, configured to perform image superposition on the plurality of second original CT images included in each second CT image group to obtain a plurality of second CT images;

[0042] a second image cutting module, configured to perform image cutting on each second CT image respectively to obtain a plurality of second cut images; an image size of each second cut image is less than or equal to a preset image size;

[0043] The feature extraction module is configured to extract features of the plurality of second cut images, and establish the defect detection model based on the features of the second cut images.

[0044] In combination with the second aspect, in a possible implementation, the CT image set acquisition module comprises:

[0045] The first original CT image acquisition unit is configured to acquire a plurality of first original CT images of the first workpiece, the first original CT images being obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, and an interval between adjacent scanning layers being a preset interval value.

[0046] The first target image determination unit is configured to determine a first target original CT image from the plurality of first original CT images, the first target original CT image corresponding to a first layer scanning layer, and the first layer scanning layer being a scanning layer with a first sequence in the plurality of scanning layers.

[0047] The second target determination unit is configured to determine a second target original CT image from the plurality of second original CT images, the second target original CT image having a similarity greater than a preset threshold value with the first target original CT image.

[0048] The CT image judgment unit is configured to determine, in a second CT image group to which the second target original CT image belongs, whether the second target original CT image is a second original CT image corresponding to a start scanning layer, the start scanning layer being a scanning layer with a first sequence in all scanning layers of the second CT image group.

[0049] The image deletion unit is configured to, in response to the second target original CT image not being the second original CT image corresponding to the start scanning layer, delete the first target original CT image from the plurality of first original CT images, and return to the step of determining the first target original CT image from the plurality of first original CT images.

[0050] The first image grouping unit is configured to, in response to the second target original CT image being the second original CT image corresponding to the start scanning layer, group the first original CT images starting from the first target original CT image to obtain a plurality of first CT image groups, each first CT image group comprising a same number of first original CT images, each first CT image group comprising first original CT images corresponding to continuous scanning layers, and the first CT image groups having a same number of original CT images as the second CT image group.

[0051] The first image superposition unit is configured to perform image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

[0052] In a possible implementation manner of the second aspect, an image input size of an input layer of the defect detection model is the same as the preset image size.

[0053] In a possible implementation manner of the second aspect, the defect detection model comprises an unsupervised defect detection model or a supervised defect detection model.

[0054] In a third aspect, a workpiece defect detection device is provided, which comprises a processor and a memory. The memory is configured to store computer-executable instructions. When the workpiece defect detection device is running, the processor executes the computer-executable instructions stored in the memory, so that the workpiece defect detection device performs the workpiece defect detection method described in the first aspect and any possible implementation manner of the first aspect.

[0055] In a fourth aspect, the present disclosure provides a computer-readable storage medium, which stores instructions. When the instructions in the computer-readable storage medium are executed by a processor of a workpiece defect detection device, the workpiece defect detection device can perform the workpiece defect detection method described in the first aspect and any possible implementation manner of the first aspect.

[0056] In the present disclosure, the names of the workpiece defect detection device do not constitute a limitation on the device or functional module itself, and in actual implementation, these devices or functional modules can appear in other names. As long as the functions of each device or functional module are similar to the present disclosure, they belong to the scope of the claims of the present disclosure and equivalent technologies.

[0057] These aspects and other aspects of the present disclosure will be more apparent in the following description.

[0058] The technical scheme provided by the disclosure has at least the following beneficial effects: the disclosure provides a workpiece defect detection method, which comprises the following steps: obtaining a computed tomography (CT) image set corresponding to a first workpiece, wherein the CT image set comprises a plurality of first CT images, different first CT images correspond to different parts of the first workpiece; performing image cutting on each first CT image respectively to obtain a plurality of first cut images; the image size of each first cut image is less than or equal to a preset image size; inputting all the first cut images into a pre-established defect detection model to obtain a defect detection result of the first workpiece; wherein the defect detection model is established based on a second CT image of a second workpiece and data indicating the defect condition of the second workpiece. After obtaining the first CT images corresponding to different parts of the first workpiece, in order to avoid the loss of feature information in the first CT image caused by the size change of the defect detection model to the first CT image with large size, the first CT image with large size is divided into a plurality of first cut images with small size by image cutting, and then the first cut image is input into the defect detection model, so as to ensure that the defect detection model accurately detects the defects of the first workpiece based on the image features in the first CT image. BRIEF DESCRIPTION OF DRAWINGS

[0059] Figure 1 A flowchart of a workpiece defect detection method provided by the disclosure;

[0060] Figure 2 A schematic diagram of a first CT image provided by the disclosure;

[0061] Figure 3 A schematic diagram of a first cut image provided by the disclosure;

[0062] Figure 4 A schematic diagram of the internal flow of a workpiece defect detection provided by the disclosure;

[0063] Figure 5 A schematic diagram of another first CT image provided by the disclosure;

[0064] Figure 6 A flowchart of another workpiece defect detection method provided by the disclosure;

[0065] Figure 7 A schematic diagram of the internal flow of another workpiece defect detection method provided by the disclosure;

[0066] Figure 8 A structural schematic diagram of a workpiece defect detection device provided by the disclosure;

[0067] Figure 9 A hardware structural schematic diagram of a workpiece defect detection device provided by the disclosure. DETAILED DESCRIPTION

[0068] The workpiece defect detection method, device, and storage medium provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0069] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0070] The terms “first” and “second” and the like in the specification and drawings of the present disclosure are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0071] Furthermore, the terms "including," "having," and any variations thereof, as used in the description of this disclosure are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or apparatus.

[0072] It should be noted that in the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0073] The input layer of the unsupervised anomaly detection method network will reset the size of the input image. For example, if the image size of the input layer is 256*256, when the input image is 2048*2048, the image will be reduced by 8 times before feature extraction, which will lead to the loss of feature information.

[0074] In order to avoid the loss of feature information, this application provides a workpiece defect detection method, please refer to Figure 1 , Figure 1 A schematic diagram of a workpiece defect detection method provided by the present disclosure, the method comprising the following steps:

[0075] Step S110: Acquire a computed tomography (CT) image set corresponding to the first workpiece.

[0076] The CT image set includes a plurality of first CT images, and different first CT images correspond to different parts of the first workpiece.

[0077] In the computer tomography, a precisely collimated X-ray beam, gamma ray, ultrasonic wave, etc. is used to make one after another cross-sectional scanning around a certain part of the scanned object together with a highly sensitive detector. The scanning information is calculated to obtain the X-ray attenuation coefficient or absorption coefficient of each voxel, and then arranged into a matrix, i.e. a digital matrix. Each number in the digital matrix is converted into a small block with different gray scales, i.e. a pixel, by a digital / analog converter, and arranged into a matrix, i.e. a CT image. Therefore, by performing the computer tomography on the first workpiece, a plurality of CT images corresponding to different parts of the first workpiece can be obtained, and then a CT image set corresponding to the first workpiece can be acquired.

[0078] Step S120: performing image cutting on each first CT image respectively to obtain a plurality of first cutting images.

[0079] The image size of each first cutting image is less than or equal to the preset image size. The preset image size is determined based on the input image size of the defect detection model.

[0080] In combination with the above first aspect, in a possible implementation manner, the image input size of the input layer of the defect detection model is the same as the preset image size. For example, if the input image size of the defect detection model is 256*256, the preset image size can be 256*256. In this case, each first CT image needs to be cut into a cutting image with a size less than 256*256. In addition, when the preset image size is less than or equal to the input image size of the defect detection model, the cutting image after cutting can be directly input into the defect detection model, and the defect detection model will not perform image scaling on it, thereby ensuring the integrity and accuracy of the image features. Illustratively, please refer to Figure 2 and Figure 3 , Figure 2 is the first CT image before cutting, Figure 3 is the plurality of first cutting images obtained by cutting the first CT image.

[0081] Step S130: inputting all the first cutting images into the pre-established defect detection model to obtain the defect detection result of the first workpiece.

[0082] The defect detection model is established based on the second CT image of the second workpiece and data for indicating the defect condition of the second workpiece.

[0083] The defect detection model includes an unsupervised defect detection model or a supervised defect detection model. When the defect detection model is the unsupervised defect detection model, the defect detection model is established based on a second CT image of a second workpiece and data indicating a defect condition of the second workpiece. The second workpiece can be determined to be a workpiece without defects based on the data indicating the defect condition of the second workpiece. When the defect detection model is the supervised defect detection model, the defect detection model is established based on a second CT image of a second workpiece and data indicating a defect condition of the second workpiece. The second workpiece can be a workpiece with known defects or a workpiece without defects, and the known defects of the second workpiece can be determined through the data indicating the defect condition of the second workpiece.

[0084] Based on the above steps, after obtaining the first CT images corresponding to different parts of the first workpiece, the first CT images with a large size can be segmented into a plurality of first cut images with a small size through image cutting, and then the first cut images are input into the defect detection model, so as to avoid the loss of feature information in the first CT images caused by the change of the size of the defect detection model to the first CT images with a large size, and ensure that the defect detection model accurately detects defects of the first workpiece based on the image features in the first CT images.

[0085] When obtaining the computer tomography (CT) image set corresponding to the first workpiece, the first original CT image of the first workpiece can be directly obtained.

[0086] In a possible implementation, the obtained first original CT image can be directly used as the first CT image in the CT image set.

[0087] In a possible implementation, the first original CT image can be processed to improve the subsequent processing efficiency. Please refer to Figure 4 The process of obtaining the computer tomography (CT) image set corresponding to the first workpiece includes the following steps:

[0088] Step S1111: Obtain a plurality of first original CT images of the first workpiece.

[0089] Each first original CT image is obtained by scanning a different part of the first workpiece.

[0090] Step S1112: Group the plurality of first original CT images to obtain a plurality of first CT image groups.

[0091] The plurality of first CT image groups comprises a plurality of first original CT images in sequence. The first original CT images are obtained by continuously scanning different scanning layers when performing computer tomography on the first workpiece, and each scanning layer corresponds to an original scanning CT image. Since each scanning layer is continuous, the plurality of first original CT images obtained are also continuous. When grouping the first original CT images, the plurality of first original CT images in sequence are grouped into a group, so that each first CT image group comprises a plurality of first original CT images in sequence. For example, 300 first original CT images of the first workpiece are obtained, the first original CT image corresponding to the first scanning layer is A1, the first original CT image corresponding to the last scanning layer is A300, and the first original CT image corresponding to the scanning layer is An, 1 < n < 300. Then, 30 first original CT images in sequence can be grouped into a group, for example, A1-A30 are grouped into a group, and A31-A60 are grouped into a group. Then, the 300 first original CT images can be grouped into 30 first CT image groups. It can be understood that when grouping the images, the number of first original CT images in each first CT image group can be the same or different, and the grouping can be performed according to the characteristics of the first workpiece. For example, in the height corresponding to 10 scanning layers, the shape of the first original CT image obtained by the first scanning layer is the same as the shape of the first original CT image obtained by the third scanning layer, and the shape of the first original CT image obtained by the first scanning layer is different from the shape of the first original CT image obtained by the fourth scanning layer. Then, the first original CT image corresponding to the first scanning layer, the first original CT image corresponding to the second scanning layer, and the first original CT image corresponding to the third scanning layer can be grouped into the same group, and the first original CT image corresponding to the fourth scanning layer is grouped into another group.

[0092] Step S1113: performing image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

[0093] When performing image superposition on the plurality of first original CT images in each first CT image group, the standard deviation or the average value of the pixel values of the pixel points at the same position of the plurality of first original CT images can be obtained to obtain the superimposed first CT image. The superimposed first CT image can represent a CT image corresponding to a plurality of scanning layers. For example, referring to the superimposed first CT image shown in FIG. 11B, the superimposed first CT image includes more image features than the non-superimposed first CT image shown in FIG. 11A. Figure 5 Figure 2

[0094] ​​Based on this, the first original CT images are grouped, and the first original CT images in the same group after grouping are superimposed to reduce the data amount in the subsequent processing process.

[0095] For example, the first workpiece is scanned for 300 layers to obtain 300 first original CT images with a size of 2048*2048. If the input image size of the defect detection model is 256*256, 640 first cut images with a size of 256*256 are obtained after segmentation of one first original CT image. After image segmentation of 300 first original CT images, a total of 19200 first cut images can be obtained. If image superposition processing is performed on every 30 layers of the 300 first original CT images, 10 superimposed first CT images with a size of 2048*2048 can be obtained based on the 300 first original CT images. Based on this, 640 first cut images with a size of 256*256 can be obtained after image segmentation, and thus the efficiency of data processing can be improved.

[0096] As an implementation manner, the defect detection model can be established by using second original CT images. The second original CT images are obtained by sequentially scanning the second workpiece based on multiple scanning layers, and the layer spacing between adjacent scanning layers is a preset spacing value. Please refer to Figure 6 The method further includes the following steps of establishing a defect detection model:

[0097] Step 210: Obtain multiple second original CT images of the second workpiece, and group the multiple second original CT images of the second workpiece to obtain multiple second CT image groups.

[0098] Each second CT image group includes the same number of second original CT images, and the scanning layers corresponding to the second original CT images included in each second CT image group are continuous. Each second original CT image is obtained by scanning different parts of the second workpiece. When the multiple second original CT images are grouped, the continuous second original CT images can be grouped into the same second CT image group, and each second CT image group includes the same number of second original CT images.

[0099] Step S220: Perform image superposition on the multiple second original CT images included in each second CT image group to obtain multiple second CT images.

[0100] Step S230: Perform image segmentation on each second CT image to obtain multiple second cut images.

[0101] The image size of each second cut image is less than or equal to a preset image size.

[0102] Step S240: extracting features of the plurality of second cut images, and establishing the defect detection model based on the features of the second cut images.

[0103] After image superimposition and image cutting of the second original CT images in each second CT image group, the data amount can be reduced while ensuring the integrity of the image features. Therefore, the features are extracted based on the second cut images, and the defect detection model is established based on the extracted features.

[0104] Based on the construction process of the defect detection model, the computer tomography (CT) image set corresponding to the first workpiece can be obtained through the following process, please refer to Figure 7 , and the specific obtaining process includes:

[0105] Step S1121: obtaining a plurality of first original CT images of the first workpiece.

[0106] The first original CT images are obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, and the layer spacing between adjacent scanning layers is a preset spacing value. When performing computer tomography on the first workpiece, the layer spacing between adjacent scanning layers is also the preset spacing value, that is, the scanning parameters for performing computer tomography on the first workpiece are the same as those for performing computer tomography on the second workpiece, so as to ensure that the corresponding relationship between the first original CT images of the first workpiece and the second original CT images of the second workpiece is the same, thereby ensuring that the processing process of the first original CT images is consistent with the processing process of the second original CT images, and the processing process of the second original CT images is in the process of constructing the defect detection model.

[0107] Step S1122: determining a first target original CT image from the plurality of first original CT images.

[0108] The first target original CT image corresponds to a first layer scanning layer, and the first layer scanning layer is a scanning layer with a first scanning order in the plurality of scanning layers. For example, when performing CT scanning on the first workpiece, if there are 300 scanning layers, the first original CT image corresponding to the first layer scanning layer is the first target original CT image.

[0109] Step S1123: determining a second target original CT image from the plurality of second original CT images.

[0110] The similarity between the second target original CT image and the first target original CT image is greater than a preset threshold. After the first target original CT image is determined, the second original CT image can be compared with the first target original CT image in sequence, and the second target original CT image is determined based on the comparison result. Specifically, when the second original CT image is compared with the first target original CT image, the similarity between the second original CT image and the first target original CT image can be calculated by calculating the size difference of the pixel values of the corresponding pixel points.

[0111] Step S1124: In the second CT image group to which the second target original CT image belongs, it is judged whether the second target original CT image is the second original CT image corresponding to the starting scanning layer.

[0112] The starting scanning layer is the scanning layer sequentially in the first position in all scanning layers of the second CT image group

[0113] Step S1125: In response to the second target original CT image not being the second original CT image corresponding to the starting scanning layer, the first target original CT image is deleted from the plurality of first original CT images, and the step of determining the first target original CT image from the plurality of first original CT images is returned.

[0114] Step S1126: In response to the second target original CT image being the second original CT image corresponding to the starting scanning layer, the first original CT images are grouped starting from the first target original CT image, and a plurality of first CT image groups are obtained.

[0115] Each first CT image group includes the same number of first original CT images, and the scanning layers corresponding to the first original CT images included in each first CT image group are continuous. The number of original CT images included in the first CT image group is equal to the number of original CT images included in the second CT image group.

[0116] In order to ensure the consistency of the image data for establishing the defect detection model and the image data corresponding to the first workpiece, the second target original CT image can be determined from the second original CT image by using the first target original CT image, so that the grouping of the first original CT image and the grouping standard of the second original CT image are ensured to be the same in subsequent image grouping. For example, when establishing the defect detection model, the height of the first scanning layer is 0 mm, and the scanning layer interval is 3 mm, the height of the second scanning layer is 3 mm, the height of the third scanning layer is 6 mm, the height of the fourth scanning layer is 9 mm, the height of the fifth scanning layer is 12 mm, and the subsequent scanning layer height is sequentially increased by 3 mm as the scanning layer interval. And when grouping the second original CT image, three images are grouped as a group, so the first second CT image group includes three second original CT images corresponding to the scanning layers with heights of 0 mm, 3 mm and 6 mm, respectively, and the second second CT image group includes three second original CT images corresponding to the scanning layers with heights of 9 mm, 12 mm and 15 mm, respectively. When scanning the first workpiece, the height of the first scanning layer is 3 mm, the height of the second scanning layer is 6 mm, the height of the third scanning layer is 9 mm, and the height of the subsequent scanning layer is sequentially increased by 3 mm as the layer interval. At this time, when the first workpiece is scanned, the first original CT image corresponding to the first scanning layer, i.e., the first original CT image corresponding to 3 mm, is the first target original CT image B1. After comparison, if it is determined that the second original CT image corresponding to the scanning layer with a height of 6 mm of the second workpiece is the second target original CT image, it is judged whether the second target original CT image is the second original CT image corresponding to the starting scanning layer in the second image group. Since the second image group includes three second original CT images, according to the above grouping condition, it can be seen that the second image group includes three second original CT images corresponding to the scanning layers with heights of 0 mm, 3 mm and 6 mm, wherein the scanning layer with a height of 0 mm is the starting scanning layer, and the second target original CT image corresponds to the second original CT image B1 which does not correspond to the starting scanning layer. Therefore, the above first target original CT image, i.e., the first original CT image B1, is deleted from the plurality of first original CT images, and the step of determining the first target original CT image from the plurality of first original CT images is returned. The first original CT image B2 corresponding to the second scanning layer with a height of 6 mm is determined as the new first target original CT image.Based on the first original CT image B2, it can be determined that the scanning slice with a height of 6 mm corresponding to the second target original CT image corresponding to the first original CT image B2 is not the starting scanning slice in the second CT image group. Therefore, the first original CT image B2 can be deleted from the first original CT image, and the first original CT image B3 corresponding to the third scanning slice with a height of 9 mm can be re-determined as the new first target original CT image. When the first original CT image B3 is the new first target original CT image, it can be determined that the second target original CT image is the scanning slice with a scanning slice height of 9 mm. According to the second CT image group, the scanning slice with a scanning slice height of 9 mm is the starting scanning slice. In this case, the first original CT images can be grouped starting from the first original CT image B3 to obtain multiple first CT image groups.

[0117] Step S1127: performing image superposition on the multiple first original CT images included in each of the first CT image groups to obtain a first CT image.

[0118] The step of superimposing the multiple first original CT images included in each of the first CT image groups is the same as described above, and thus will not be described in detail here.

[0119] It can be seen that the above mainly introduces the technical solutions provided by the embodiments of the present disclosure from the perspective of methods. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this disclosure.

[0120] The embodiment of the present disclosure can divide the workpiece defect detection equipment into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or software functional modules. Optionally, the division of modules in the embodiment of the present disclosure is schematic and is only a logical functional division. In actual implementation, other division methods may be used.

[0121] like Figure 8 As shown, a workpiece defect detection device 800 provided in an embodiment of the present disclosure includes:

[0122] The CT image set acquisition module 810 is configured to acquire a computed tomography (CT) image set corresponding to a first workpiece, the CT image set comprising a plurality of first CT images, different first CT images corresponding to different parts of the first workpiece.

[0123] The image cutting module 820 is configured to perform image cutting on each first CT image respectively to obtain a plurality of first cut images, each first cut image having an image size less than or equal to a preset image size.

[0124] The defect detection module 830 is configured to input all the first cut images into a pre-established defect detection model to obtain a defect detection result of the first workpiece, wherein the defect detection model is established based on a second CT image of a second workpiece and data indicating a defect condition of the second workpiece.

[0125] Optionally, in a possible implementation, the CT image set acquisition module comprises:

[0126] The first original CT image acquisition unit is configured to acquire a plurality of first original CT images of the first workpiece, each first original CT image being obtained by scanning a different part of the first workpiece.

[0127] The first image grouping unit is configured to group the plurality of first original CT images to obtain a plurality of first CT image groups, the plurality of first CT image groups comprising a plurality of continuous first original CT images.

[0128] The first image superimposition unit is configured to perform image superimposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

[0129] Optionally, in a possible implementation, the second original CT image is obtained by sequentially scanning the second workpiece based on a plurality of scanning layers, and an interval between adjacent scanning layers is a preset interval value.

[0130] The apparatus further comprises:

[0131] The second CT image group determination module is configured to acquire a plurality of second original CT images of the second workpiece, and group the plurality of second original CT images of the second workpiece to obtain a plurality of second CT image groups, each second CT image group comprising a same number of second original CT images, and the second original CT images included in each second CT image group corresponding to continuous scanning layers.

[0132] The second image superimposition module is configured to perform image superimposition on the plurality of second original CT images included in each second CT image group to obtain a plurality of second CT images.

[0133] a second image cutting module, configured to perform image cutting on each second CT image respectively to obtain a plurality of second cut images; an image size of each second cut image is less than or equal to a preset image size;

[0134] a feature extraction module, configured to extract features of the plurality of second cut images, and establish the defect detection model based on the features of the second cut images.

[0135] Optionally, in a possible implementation, the CT image set acquisition module comprises:

[0136] a first original CT image acquisition unit, configured to acquire a plurality of first original CT images of the first workpiece, the first original CT images being obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, and an interlayer distance between adjacent scanning layers being a preset interval value;

[0137] a first target image determination unit, configured to determine a first target original CT image from the plurality of first original CT images; the first target original CT image corresponds to a first layer scanning layer, and the first layer scanning layer is a scanning layer with a first sequence in the plurality of scanning layers;

[0138] a second target determination unit, configured to determine a second target original CT image from the plurality of second original CT images; a similarity between the second target original CT image and the first target original CT image is greater than a preset threshold value;

[0139] a CT image judgment unit, configured to determine whether the second target original CT image is a second original CT image corresponding to a starting scanning layer in a second CT image group to which the second target original CT image belongs, the starting scanning layer being a scanning layer with a first sequence in all scanning layers of the second CT image group;

[0140] an image deletion unit, configured to, in response to the second target original CT image not being the second original CT image corresponding to the starting scanning layer, delete the first target original CT image from the plurality of first original CT images, and return to the step of determining the first target original CT image from the plurality of first original CT images;

[0141] a first image grouping unit, configured to, in response to the second target original CT image being the second original CT image corresponding to the starting scanning layer, group the first original CT images starting from the first target original CT image to obtain a plurality of first CT image groups; each first CT image group comprises a same number of first original CT images, each first CT image group comprises first original CT images corresponding to continuous scanning layers, and the first CT image groups have a same number of original CT images as the second CT image group.

[0142] The first image superimposition unit is configured to perform image superimposition on a plurality of first original CT images included in each of the first CT image groups to obtain a first CT image.

[0143] Optionally, in a possible implementation, an image input size of an input layer of the defect detection model is the same as the preset image size.

[0144] Optionally, in a possible implementation, the defect detection model includes an unsupervised defect detection model or a supervised defect detection model.

[0145] The embodiments of the present disclosure provide a workpiece defect detection device for performing the method required to be performed by any device in the data integrity determination system. The workpiece defect detection device can be the workpiece defect detection device involved in the present disclosure, or a module in the workpiece defect detection device; or a chip in the workpiece defect detection device, or other device for performing the workpiece defect detection method, which is not limited in the present disclosure.

[0146] When implemented by hardware, the workpiece defect detection device in the embodiments of the present disclosure is specifically implemented as shown in Figure 9 Figure 9 FIG. 9 is a structural schematic diagram of a workpiece defect detection device provided by the embodiments of the present disclosure. The workpiece defect detection device 900 includes at least one processor 901, a communication line 902, and at least one communication interface 904, and can further include a memory 903. The processor 901, the memory 903, and the communication interface 904 can be connected through the communication line 902.

[0147] The processor 901 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).

[0148] The communication line 902 can include a channel for transmitting information between the above components.

[0149] ​The communication interface 904, configured to communicate with other devices or communication networks, can use any transceiver device, such as an Ethernet, a radio access network (RAN), a wireless local area networks (WLAN), etc.

[0150] The memory 903 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.

[0151] In one possible design, the memory 903 can exist independently of the processor 901, i.e., the memory 903 can be an external memory of the processor 901, and the memory 903 can be connected to the processor 901 through the communication line 902, used to store execution instructions or application program codes, and controlled by the processor 901 to execute, to implement the workpiece defect detection method provided in the embodiments of the present disclosure. In another possible design, the memory 903 can also be integrated with the processor 901, i.e., the memory 903 can be an internal memory of the processor 901, for example, the memory 903 is a cache, which can be used to temporarily store some data and instruction information, etc.

[0152] As one possible implementation, the processor 901 can include one or more CPUs, for example, the CPU0 and the CPU1 in FIG. 1. As another possible implementation, the workpiece defect detection device 900 can include multiple processors, for example, the processor 901 and the processor 907 in FIG. 1. As still another possible implementation, the workpiece defect detection device 900 can further include the output device 905 and the input device 906. Figure 9 Figure 9 As one possible implementation, the processor 901 can include one or more CPUs, for example, the CPU0 and the CPU1 in FIG. 1. As another possible implementation, the workpiece defect detection device 900 can include multiple processors, for example, the processor 901 and the processor 907 in FIG. 1. As still another possible implementation, the workpiece defect detection device 900 can further include the output device 905 and the input device 906.

[0153] ​Those skilled in the art can clearly understand the above-described method embodiments through the description of the above embodiments. For the convenience and brevity of description, only the above-described division of functional modules is taken as an example. In actual application, the above-described functions can be completed by different functional modules according to needs, that is, the internal structure of the network node is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described system, module and network node can refer to the corresponding process in the foregoing method embodiments, and will not be described here.

[0154] The embodiments of the present disclosure further provide a computer-readable storage medium, which stores instructions. When a computer executes the instructions, the computer executes each step in the method flow shown in the above method embodiments.

[0155] The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any other suitable combination of the above, or any other form of computer readable storage medium. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present disclosure, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0156] Embodiments of the present disclosure provide a chip, which comprises a processor and a communication interface, the communication interface and the processor are coupled, and the processor is configured to run computer programs or instructions to implement the workpiece defect detection method in the above method embodiments. Since the device, equipment, computer readable storage medium, computer program product in the embodiments of the present disclosure can be applied to the above method, the technical effects that can be obtained are also referred to the above method embodiments, and the present disclosure embodiments will not be repeated here.

[0157] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the above described device embodiments are merely schematic, and the division of the units is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0158] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0159] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0160] The above is merely specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto, any change or replacement within the technical scope disclosed in the present disclosure should be covered in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A method of detecting defects in a workpiece, characterized by, The method comprises: obtaining a computed tomography (CT) image set corresponding to a first workpiece, the CT image set comprising a plurality of first CT images, different first CT images corresponding to different parts of the first workpiece; respectively performing image cutting on each first CT image to obtain a plurality of first cut images, each first cut image having an image size less than or equal to a preset image size; inputting all first cut images into a pre-established defect detection model to obtain a defect detection result of the first workpiece, wherein the defect detection model is established based on a plurality of second CT images of a second workpiece and data indicating a defect condition of the second workpiece, the second CT image being obtained by image superposition of a plurality of second original CT images included in a second CT image group, the second original CT image being obtained by sequentially scanning the second workpiece based on a plurality of scanning layers, an interlayer spacing between adjacent scanning layers being a preset spacing value, and the second original CT images included in each second CT image group corresponding to consecutive scanning layers; wherein the obtaining of the CT image set corresponding to the first workpiece comprises: obtaining a plurality of first original CT images of the first workpiece, the first original CT image being obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, an interlayer spacing between adjacent scanning layers being a preset spacing value; determining a first target original CT image from the plurality of first original CT images, the first target original CT image corresponding to a first layer scanning layer, the first layer scanning layer being a scanning layer having a first order in scanning sequence among the plurality of scanning layers; determining a second target original CT image from the plurality of second original CT images, the second target original CT image having a similarity greater than a preset threshold value with the first target original CT image; in a second CT image group to which the second target original CT image belongs, determining whether the second target original CT image is a second original CT image corresponding to a starting scanning layer, the starting scanning layer being a scanning layer having a first order in sequence among all scanning layers of the second CT image group; in response to the second target original CT image not being the second original CT image corresponding to the starting scanning layer, deleting the first target original CT image from the plurality of first original CT images, and returning to the step of determining the first target original CT image from the plurality of first original CT images; in response to the second target original CT image being the second original CT image corresponding to the starting scanning layer, grouping the first original CT images starting from the first target original CT image to obtain a plurality of first CT image groups, each first CT image group comprising a same number of first original CT images, and the first original CT images included in each first CT image group corresponding to consecutive scanning layers, the first CT image group having a same number of original CT images as the second CT image group; performing image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

2. The method of claim 1, wherein, The acquiring of a computed tomography (CT) image set corresponding to the first workpiece includes: Acquire a plurality of first original CT images of the first workpiece, each first original CT image being obtained by scanning a different portion of the first workpiece; Grouping the plurality of first original CT images to obtain a plurality of first CT image groups; the plurality of first CT image groups include a plurality of continuous first original CT images; The plurality of first original CT images included in each of the first CT image groups are superimposed to obtain a first CT image.

3. The method of claim 1, wherein, The method further comprises: Acquiring a plurality of second original CT images of the second workpiece, and grouping the plurality of second original CT images of the second workpiece to obtain a plurality of second CT image groups, wherein each second CT image group includes the same number of second original CT images; superimposing the plurality of second original CT images included in each of the second CT image groups to obtain a plurality of second CT images; Performing image segmentation on each second CT image to obtain a plurality of second segmented images; wherein the image size of each second segmented image is less than or equal to a preset image size; Features of the plurality of second cutting images are extracted, and the defect detection model is established based on the features of the second cutting images.

4. The method according to any one of claims 1 to 3, characterized in that, The image input size of the input layer of the defect detection model is the same as the preset image size.

5. The method according to any one of claims 1-3, characterized in that, The defect detection model includes an unsupervised defect detection model or a supervised defect detection model.

6. A workpiece defect detection apparatus, characterized by, The device comprises: a CT image set acquisition module, configured to acquire a computed tomography (CT) image set corresponding to a first workpiece, wherein the CT image set includes a plurality of first CT images, wherein different first CT images correspond to different parts of the first workpiece; An image cutting module is used to cut each first CT image to obtain a plurality of first cut images; the image size of each first cut image is less than or equal to a preset image size; a defect detection module, configured to input all first cutting images into a pre-established defect detection model to obtain a defect detection result for the first workpiece; wherein the defect detection model is established based on a plurality of second CT images of the second workpiece and data indicating a defect condition of the second workpiece, wherein the second CT images are obtained by superimposing a plurality of second original CT images included in a second CT image group, wherein the second original CT images are obtained by sequentially scanning the second workpiece based on a plurality of scanning layers, wherein the inter-layer spacing between adjacent scanning layers is a preset spacing value, and the scanning layers corresponding to the second original CT images included in each second CT image group are continuous; The step of acquiring a computed tomography (CT) image set corresponding to the first workpiece includes: Acquire a plurality of first original CT images of the first workpiece, where the first original CT images are obtained by sequentially scanning the first workpiece based on a plurality of scanning layers, and a layer spacing between adjacent scanning layers is a preset spacing value; determining a first target original CT image from the plurality of first original CT images; the first target original CT image corresponds to a first scanning layer, the first scanning layer is a scanning layer with a first scanning sequence in the plurality of scanning layers; determining a second target original CT image from the plurality of second original CT images; the second target original CT image has a similarity greater than a preset threshold with the first target original CT image; determining whether the second target original CT image is a second original CT image corresponding to a starting scanning layer in a second CT image group to which the second target original CT image belongs, the starting scanning layer is a scanning layer with a first scanning sequence in all scanning layers of the second CT image group; in response to the second target original CT image not being the second original CT image corresponding to the starting scanning layer, deleting the first target original CT image from the plurality of first original CT images, and returning to the step of determining the first target original CT image from the plurality of first original CT images; in response to the second target original CT image being the second original CT image corresponding to the starting scanning layer, grouping the first original CT images starting from the first target original CT image to obtain a plurality of first CT image groups; each first CT image group includes the same number of first original CT images, and the first original CT images included in each first CT image group correspond to consecutive scanning layers, and the number of original CT images included in the first CT image group is equal to the number of original CT images included in the second CT image group; performing image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

7. The apparatus of claim 6, wherein, The CT image set acquisition module comprises: a first original CT image acquisition unit configured to acquire a plurality of first original CT images of the first workpiece, each first original CT image being obtained by scanning a different part of the first workpiece; a first image grouping unit configured to group the plurality of first original CT images to obtain a plurality of first CT image groups, the plurality of first CT image groups including consecutive first original CT images; a first image superposition unit configured to perform image superposition on the plurality of first original CT images included in each first CT image group to obtain a first CT image.

8. A workpiece defect detection apparatus, characterized by, comprise: a processor and a memory; wherein the memory is configured to store computer execution instructions, when the workpiece defect detection equipment is running, the processor executes the computer execution instructions stored in the memory, so that the workpiece defect detection equipment executes the method of any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, when the instructions in the computer readable storage medium are executed by the processor of the workpiece defect detection equipment, the workpiece defect detection equipment executes the workpiece defect detection method of any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for testing limit signal-to-noise ratio and stability of limit signal-to-noise ratio

    CN110956607A

  • Deep learning defect automatic detection and identification method based on small sample aero-engine blade CT image

    CN113313695A

Cited By

  • Defect detection meta-model construction method, defect detection method, equipment and medium

    CN117495786A