A defect detection method and related apparatus
By using a coordinate transformation neural network model, the problem of transforming defects on the wafer relative to the coordinate system of the carrier device was solved, enabling fast and convenient defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SKYVERSE TECH CO LTD
- Filing Date
- 2023-09-28
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies cannot directly obtain the position coordinates of defects on the wafer relative to the second reference coordinate system of the carrier device, which makes defect processing difficult.
A coordinate transformation neural network model is adopted. By obtaining the first position coordinates of the defect relative to the first reference coordinate system, the transformation from the first position coordinates to the second position coordinates is realized by using convolutional modules, batch normalization layers, long short-term memory network layers, fully connected layers, and shape-changing layers.
It enables the rapid and convenient acquisition of the second position coordinates of defects relative to the supporting device, improving the efficiency and accuracy of defect detection.
Smart Images

Figure CN119757348B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a defect detection method and related apparatus. Background Technology
[0002] As a wafer defect detection device, the wafer surface can be probed first using a detection device, the detected images can be processed by a computer to extract defects, and then the processed image data can be stored in the computer. All of the above processes have been implemented in wafer inspection instruments. In other words, the detected images of wafer defects can now be quickly displayed on a computer, and the distribution of defects on the wafer can be intuitively understood based on the detected images.
[0003] However, since the coordinates of each position on a wafer are generally composed of two coordinates, one is the coordinate of the target position on the wafer relative to the first reference coordinate system on the wafer, and the other is the coordinate of the wafer relative to the second reference coordinate system on the carrier device (which is generally used to support the wafer, such as a flat plate or panel), in order to process defects on the wafer, it is currently necessary to first obtain the position coordinates of the defect relative to the second reference coordinate system, and then process the defects on the wafer according to the position coordinates of the defect relative to the second reference coordinate system.
[0004] Currently, we only know the position coordinates of the defect relative to the first reference coordinate system, but we cannot obtain the position coordinates of the defect relative to the second reference coordinate system. Summary of the Invention
[0005] This invention provides a defect detection method and related apparatus, which are used to quickly obtain the position coordinates of a defect relative to a second reference coordinate system based on the first position coordinates of the defect relative to a first reference coordinate system.
[0006] The first aspect of this application provides a defect detection method, including:
[0007] Obtain the first position coordinates of the defect in the object being inspected relative to a first reference coordinate system, wherein the first reference coordinate system is set in the object being inspected;
[0008] The first position coordinates of the defect are input into the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system, which is output by the coordinate transformation neural network model. The second reference coordinate system is set in the carrier device of the detection object. The coordinate transformation neural network model is used to realize the transformation from the first position coordinates to the second position coordinates.
[0009] The defect is detected based on its second location coordinates.
[0010] Preferably, obtaining the first position coordinates of the defect in the detection object relative to the first reference coordinate system includes:
[0011] Obtain the coordinates of multiple first positions of multiple defects in the detected object relative to the first reference coordinate system;
[0012] The first position coordinates of the defect are input into a coordinate transformation neural network model to obtain the second position coordinates of the defect relative to a second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0013] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0014] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0015] The multiple first position coordinates of the multiple defects are input into a coordinate transformation neural network model using a multi-threaded approach to obtain multiple second position coordinates of the multiple defects relative to the second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0016] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0017] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0018] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0019] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0020] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution model.
[0021] Preferably, before inputting the first location coordinates of the defect into the coordinate transformation neural network model, the method further includes:
[0022] Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one.
[0023] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0024] Based on a preset loss function, calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects;
[0025] The coordinate transformation neural network model is trained using the aforementioned loss and backpropagation algorithm until the loss meets the target loss.
[0026] Preferably, before inputting the multiple first position coordinates of the plurality of defects into the coordinate transformation neural network model, the method further includes:
[0027] The training samples are cleaned, wherein the data cleaning includes at least one of the following: removing duplicate values, removing outliers, and filling in missing values.
[0028] Preferably, training the coordinate transformation neural network model using the loss and backpropagation algorithm includes:
[0029] When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
[0030] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0031] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model, including:
[0032] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0033] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0034] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0035] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0036] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
[0037] A second aspect of this application provides a defect detection device, comprising:
[0038] The acquisition unit is used to acquire the first position coordinates of a defect in the detection object relative to a first reference coordinate system, wherein the first reference coordinate system is set in the detection object;
[0039] The input / output unit is used to input the first position coordinates of the defect into the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system output by the coordinate transformation neural network model, wherein the second reference coordinate system is set in the carrier device of the detection object;
[0040] The detection unit is used to detect the defect based on the second position coordinates of the defect.
[0041] Preferably, the acquisition unit is specifically used for:
[0042] Obtain the coordinates of multiple first positions of multiple defects in the detected object relative to the first reference coordinate system;
[0043] Preferably, the input / output unit is specifically used for:
[0044] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0045] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0046] Input / output unit, specifically used for:
[0047] The multiple first position coordinates of the multiple defects are input into a coordinate transformation neural network model using a multi-threaded approach to obtain multiple second position coordinates of the multiple defects relative to the second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0048] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0049] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0050] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0051] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0052] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution model.
[0053] Preferably, the acquisition unit is also used for:
[0054] Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one.
[0055] The input / output unit is also used for:
[0056] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0057] The device further includes:
[0058] The calculation unit is used to calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects according to a preset loss function;
[0059] The training unit is used to train the coordinate transformation neural network model using the loss and backpropagation algorithm until the loss meets the target loss.
[0060] The device further includes:
[0061] A cleaning unit is used to clean the training samples, wherein the data cleaning includes at least one of: deleting duplicate values, deleting outliers, and filling in missing values.
[0062] The training unit is also used for:
[0063] When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
[0064] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0065] Input / output unit, specifically used for:
[0066] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0067] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0068] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0069] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0070] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
[0071] A third aspect of this application provides a computer device including a processor, which, when executing a computer program stored in a memory, implements the defect detection method provided in the first aspect of this application.
[0072] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is used to implement the defect detection method provided in the first aspect of this application.
[0073] As can be seen from the above technical solutions, the embodiments of the present invention have the following advantages:
[0074] In this embodiment, a first position coordinate of a defect in a detection object relative to a first reference coordinate system is obtained, wherein the first reference coordinate system is set in the detection object; the first position coordinate of the defect is input into a coordinate transformation neural network model to obtain a second position coordinate of the defect relative to a second reference coordinate system output by the coordinate transformation neural network model, wherein the second reference coordinate system is set in a carrier device of the detection object, and the coordinate transformation neural network model is used to realize the transformation from the first position coordinate to the second position coordinate; the defect is detected according to the second position coordinate of the defect.
[0075] Because the embodiments of this application can input the first position coordinates of the defect in the detection object into the coordinate transformation neural network model to obtain the second position coordinates output by the coordinate transformation neural network model, wherein the second position coordinates are set in the carrier device of the detection object, thereby improving the convenience of obtaining the second position coordinates of the defect. Attached Figure Description
[0076] Figure 1 This is a schematic diagram of one embodiment of the defect detection method in this application;
[0077] Figure 2 This is a schematic diagram of another embodiment of the defect detection method in this application;
[0078] Figure 3 for Figure 1 Detailed steps of step 102 in the embodiment;
[0079] Figure 4 This is a schematic diagram of the coordinate transformation neural network model in the embodiments of this application;
[0080] Figure 5 This is a schematic diagram of an embodiment of the coordinate transformation neural network model training process in this application.
[0081] Figure 6 for Figure 5Detailed steps of step 502 in the embodiment;
[0082] Figure 7 This is a schematic diagram of one embodiment of the defect detection device in this application. Detailed Implementation
[0083] This invention provides a defect detection method and related apparatus for quickly obtaining the position coordinates of a defect relative to a second reference coordinate system.
[0084] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0085] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0086] For ease of understanding, the defect detection method in the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the defect detection method in this application includes:
[0087] 101. Obtain the first position coordinates of the defect in the inspection object relative to the first reference coordinate system, wherein the first reference coordinate system is set in the inspection object;
[0088] Specifically, the detection objects in this application embodiment include, but are not limited to, wafers, glass masks, or screens. Generally, in this application embodiment, a first reference coordinate system is set on the detection object itself. The first reference coordinate system may have the lower left corner of the detection object as the origin, or the center of the detection object as the origin, etc. There is no restriction on the position of the origin of the first reference coordinate system, as long as it can locate the defects in the detection object.
[0089] In this application, the wafer is generally set with two position coordinates. The second position coordinate of the target position on the other wafer is relative to the wafer carrier device. In order to process the defects in the wafer, it is generally necessary to first obtain the second position coordinate of the defect in the wafer relative to the carrier device.
[0090] 102. Input the first position coordinates of the defect into the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system output by the coordinate transformation neural network model, wherein the second reference coordinate system is set in the carrier device of the detection object, and the coordinate transformation neural network model is used to realize the transformation from the first position coordinates to the second position coordinates.
[0091] After obtaining the first position coordinates of the defect in the wafer, this embodiment further inputs the first position coordinates of the defect into a coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system output by the coordinate transformation neural network model. The coordinate transformation neural network model is used to realize the coordinate transformation from the first position coordinates to the second position coordinates. The second reference coordinate system is set in the carrier device of the detection object. The carrier device of the detection object is used to carry the detection object, such as a flat plate or panel. There are no specific restrictions on the shape of the carrier device of the detection object.
[0092] 103. Detect the defect based on its second location coordinates.
[0093] After obtaining the second position coordinates of the defect in the object to be inspected, the defect can be further inspected based on the second position coordinates of the defect.
[0094] In this embodiment of the application, the first position coordinates of the defect in the detection object are input into the coordinate transformation neural network model to obtain the second position coordinates output by the coordinate transformation neural network model. The second position coordinates are set in the carrier device of the detection object, thereby improving the convenience of obtaining the second position coordinates of the defect.
[0095] based on Figure 1 In the embodiments described above, when inputting the first position coordinates of a defect into a coordinate transformation neural network model to obtain the corresponding second position coordinates of the defect, the prior art generally inputs the first position coordinates of a single defect and then obtains the single second position coordinates output by the coordinate transformation neural network model. However, to improve the convenience of obtaining the second position coordinates of multiple defects relative to the supporting device, the present application can implement the following embodiments, please refer to [link to relevant documentation]. Figure 2 Another embodiment of the defect detection method in this application includes:
[0096] 201. Obtain the coordinates of multiple first positions of multiple defects in the detection object relative to the first reference coordinate system;
[0097] To obtain multiple second position coordinates of multiple defects relative to the second reference coordinate system, it is first necessary to obtain multiple first position coordinates of multiple defects in the detection object relative to the first reference coordinate system. These multiple first position coordinates can be position coordinates stored in advance locally or in a third party, or they can be first position coordinates obtained in real time from the detection object. There are no specific restrictions on the method of obtaining multiple first position coordinates of multiple defects.
[0098] 202. The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0099] Unlike the method of obtaining the second position coordinates of defects one by one, the embodiments of this application use multiple threads to input the first position coordinates of multiple defects into the coordinate transformation neural network model, thereby obtaining the second position coordinates output by the coordinate transformation neural network model, thus improving the convenience of obtaining the second position coordinates of multiple defects.
[0100] 203. Detect multiple defects based on multiple second position coordinates of multiple defects.
[0101] After obtaining the second position coordinates of multiple defects, the defects can be detected separately based on the second position coordinates of each defect.
[0102] In this embodiment, multiple threads are used to input multiple first position coordinates of multiple defects into a coordinate transformation neural network model, thereby obtaining multiple second position coordinates output by the coordinate transformation neural network model, thus improving the convenience of obtaining the second position coordinates of multiple defects.
[0103] based on Figure 1 The embodiment described in this application, the coordinate transformation neural network model includes a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer. The following will further elaborate on... Figure 1 For a detailed description of step 102, please refer to [link / reference]. Figure 3 , Figure 3 Detailed steps for step 102:
[0104] 301. Input the multiple first position coordinates of the multiple defects into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0105] For ease of understanding, Figure 4 A schematic diagram of the coordinate transformation neural network model in this application is given. The convolution module is used to extract the coordinate features of multiple first position coordinates. Therefore, in the embodiments of this application, multiple first position coordinates of multiple defects can be input into the convolution module to extract the coordinate features of multiple first position coordinates.
[0106] 302. Input the coordinate features of the plurality of first position coordinates into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates;
[0107] To prevent small coordinate features from being ignored during model transformation, this community embodiment adds a batch normalization layer to the coordinate transformation neural network model. The function of the batch normalization layer is to normalize the output of each layer to ensure that the coordinate features of the first position coordinate can be taken into account. The normalization method is to subtract the average value of the output data of the previous layer from the output data of the previous layer and divide by the standard deviation of the output data of the previous layer.
[0108] 303. Input the coordinate features of the normalized multiple first position coordinates into the Long Short-Term Memory network, so as to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, and obtain the output of the Long Short-Term Memory network layer.
[0109] Some of the coordinate features of the normalized first position coordinates are useless features, while others are features that need to be emphasized. If these useless features are added to the coordinate transformation neural network model, it will increase the computational power of the coordinate transformation neural network model, thereby affecting the output efficiency of the coordinate transformation neural network model.
[0110] Therefore, in this embodiment, the coordinate features of the normalized multiple first position coordinates are input into a Long Short-Term Memory (LSTM) network to ignore the first part of the coordinate features of the multiple first position coordinates (such as useless features) and emphasize the second part of the coordinate features of the multiple first position coordinates (such as useful features), thereby improving the output efficiency of the coordinate transformation neural network model.
[0111] 304. Input the output of the Long Short-Term Memory network layer into the fully connected layer to fit the coordinate features of the plurality of first position coordinates;
[0112] Because each node in the fully connected layer is connected to all nodes in the previous layer to synthesize the previously extracted features, the embodiments of this application can input the output of the long short-term memory network layer into the fully connected layer to fit the coordinate features of the multiple first position coordinates.
[0113] 305. Input the coordinate features of the fitted multiple first position coordinates into the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input into the convolution model.
[0114] The coordinate transformation neural network model includes multiple different network layers. Therefore, the number of coordinate features of the fitted multiple first position coordinates may not be equal to the number of pre-input multiple first position coordinates. Therefore, in this embodiment, a shape-changing layer is set after the long short-term memory network layer, and the coordinate features of the fitted multiple first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates. The preset number of second position coordinates is equal to the number of first position coordinates input to the convolution module.
[0115] The coordinate transformation neural network model in this embodiment includes a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer. The batch normalization layer can prevent smaller coordinate features in the coordinate features of the first position coordinates from being ignored, while ensuring that all coordinate features of the first position coordinates can be taken into account, thereby improving the accuracy of the coordinate transformation neural network model in outputting the second position coordinates.
[0116] Furthermore, the Long Short-Term Memory network in this embodiment can also ignore useless features in the coordinate features of the first position coordinate, while emphasizing useful features in the coordinate features of the first position coordinate, which further improves the accuracy of the coordinate transformation neural network model outputting the second position coordinate.
[0117] Furthermore, based on Figures 1 to 3 In the aforementioned embodiment, before inputting the first position coordinates of the defect into the coordinate transformation neural network model, the coordinate transformation neural network model needs to be trained. The training process of the coordinate transformation neural network model is described below. Please refer to [link to relevant documentation]. Figure 5 One embodiment of the training process of the coordinate transformation neural network model in this application includes:
[0118] 501. Obtain training samples, the training samples including: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one;
[0119] It is easy to understand that before training the coordinate transformation neural network model, training samples need to be obtained first. These training samples include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of multiple defects relative to the second reference coordinate system. The first position coordinates and second position coordinates of each defect correspond one-to-one. The second position coordinates of each defect are used as labels for the first position coordinates for subsequent loss calculation.
[0120] In order to train the coordinate transformation neural network model using the training samples, in reality, due to various unforeseen circumstances, the training sample data may contain errors, such as omissions, unreasonable values, or incorrect values. Therefore, before training the coordinate transformation neural network model using the training samples, this application also needs to clean the data in the training samples to eliminate inaccurate, incomplete, or irrelevant information.
[0121] Specifically, in deep learning, the purpose of data cleaning is to improve data quality, reduce noise and bias in model training, and improve model performance and accuracy. The data cleaning described in this application includes at least one of the following: removing duplicate values, removing outliers, and filling in missing values.
[0122] When filling in missing values, this embodiment of the application uses interpolation to fill in the missing values, thereby improving the accuracy of the filled values.
[0123] 502. Input the multiple first position coordinates of the multiple defects into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0124] After obtaining the first and second position coordinates of multiple defects (as labels for the first position coordinates), the first position coordinates of each defect are input into the coordinate transformation neural network model to obtain the corresponding third position coordinates output by the coordinate transformation neural network model.
[0125] The process of inputting the first position coordinates into the coordinate transformation neural network model to obtain the third position coordinates output by the coordinate transformation neural network model will be described in the following embodiments and will not be repeated here.
[0126] 503. Calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects according to the preset loss function;
[0127] Furthermore, in this embodiment of the application, the loss between the third position coordinate and the second position coordinate of each defect among multiple defects is calculated according to a preset loss function. The preset loss function includes L1 loss function, L2 loss function and cross-entropy loss function, etc., and no specific limitation is made here.
[0128] 504. Train the coordinate transformation neural network model using the loss and backpropagation algorithm until the loss meets the target loss.
[0129] After obtaining the loss between the second and third position coordinates of each defect, the coordinate transformation neural network model is further trained using this loss and the backpropagation algorithm until the loss meets the target loss.
[0130] Furthermore, in this embodiment, when updating the model parameters of the coordinate transformation neural network model using loss and backpropagation algorithms, in order to ensure the speed of gradient convergence, this application uses the Adamw optimizer to optimize the learning rate of parameter updates. As an adaptive learning rate optimization algorithm, the Adamw optimizer can automatically adjust the learning rate of different parameters to better adapt to the changes in gradients of different parameters, resulting in faster training speed and better handling of sparse gradients. In addition, the Adamw optimizer performs L2 regularization on larger weight updates, which can further improve the training effect of the model.
[0131] The structure of the Adamw optimizer itself is consistent with that described in existing technologies, and will not be repeated here.
[0132] based on Figure 5 The training process of the coordinate transformation neural network model, which includes a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer, is described in detail below. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 Detailed steps for step 502:
[0133] 601. Input the multiple first position coordinates of the multiple defects into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0134] 602. Input the coordinate features of the plurality of first position coordinates into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates;
[0135] 603. Input the coordinate features of the normalized multiple first position coordinates into the long short-term memory network, so as to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, and obtain the output of the long short-term memory network layer.
[0136] 604. Input the output of the Long Short-Term Memory network layer into the fully connected layer to fit the coordinate features of the plurality of first position coordinates;
[0137] 605. Input the coordinate features of the fitted multiple first position coordinates into the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input into the convolution module.
[0138] It should be noted that the descriptions of steps 601 to 605 are consistent with... Figure 3 The examples described are similar and will not be repeated here.
[0139] Because the coordinate transformation neural network model in this embodiment includes a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer, the batch normalization layer can prevent smaller coordinate features in the coordinate features of the first position coordinates from being ignored, and ensure that all coordinate features of the first position coordinates can be taken into account, thereby improving the accuracy of the coordinate transformation neural network model in outputting the second position coordinates.
[0140] Furthermore, the Long Short-Term Memory network in this embodiment can also ignore useless features in the coordinate features of the first position coordinate, while emphasizing useful features in the coordinate features of the first position coordinate, which further improves the accuracy of the coordinate transformation neural network model outputting the second position coordinate.
[0141] The defect detection method in this application has been described in detail above. The defect detection device in the embodiments of this application will now be described in detail below. Please refer to [link / reference]. Figure 7 One embodiment of the defect detection device in this application includes:
[0142] The acquisition unit 701 is used to acquire the first position coordinates of the defect in the detection object relative to the first reference coordinate system, wherein the first reference coordinate system is set in the detection object;
[0143] The input / output unit 702 is used to input the first position coordinates of the defect to the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system output by the coordinate transformation neural network model, wherein the second reference coordinate system is set in the carrier device of the detection object;
[0144] The detection unit 703 is used to detect the defect based on the second position coordinates of the defect.
[0145] Preferably, the acquisition unit 701 is specifically used for:
[0146] Obtain the coordinates of multiple first positions of multiple defects in the detected object relative to the first reference coordinate system;
[0147] Preferably, the input / output unit 702 is specifically used for:
[0148] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0149] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0150] Input / output unit 702 is specifically used for:
[0151] The multiple first position coordinates of the multiple defects are input into a coordinate transformation neural network model using a multi-threaded approach to obtain multiple second position coordinates of the multiple defects relative to the second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0152] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0153] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0154] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0155] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0156] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution model.
[0157] Preferably, the acquisition unit 701 is further configured to:
[0158] Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one.
[0159] Input / output unit 702 is also used for:
[0160] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0161] The device further includes:
[0162] The calculation unit 704 is used to calculate the loss between the third position coordinates of the plurality of defects and the plurality of second position coordinates according to a preset loss function;
[0163] Training unit 705 is used to train the coordinate transformation neural network model using the loss and backpropagation algorithm until the loss meets the target loss.
[0164] The device further includes:
[0165] The cleaning unit 706 is used to clean the training samples, wherein the data cleaning includes at least one of: deleting duplicate values, deleting outliers, and filling missing values.
[0166] The training unit 705 is also used for:
[0167] When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
[0168] Preferably, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer;
[0169] Input / output unit 702 is specifically used for:
[0170] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0171] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0172] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0173] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0174] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
[0175] It should be noted that the functions of the above-mentioned units are the same as... Figures 1 to 6 The examples described are similar and will not be repeated here.
[0176] In this embodiment, the first position coordinates of the defect in the detection object are input to the coordinate transformation neural network model through the input / output unit 702 to obtain the second position coordinates output by the coordinate transformation neural network model. The second position coordinates are set in the carrier device of the detection object, thereby improving the convenience of obtaining the second position coordinates of the defect.
[0177] The defect detection device in the embodiments of the present invention has been described above from the perspective of modular functional entities. The computer device in the embodiments of the present invention will now be described from the perspective of hardware processing.
[0178] This computer device is used to implement the functions of a defect detection device. One embodiment of the computer device in this invention includes:
[0179] Processor and memory;
[0180] When a memory is used to store computer programs, and a processor executes the computer programs stored in the memory, the following steps can be achieved:
[0181] Obtain the first position coordinates of the defect in the object being inspected relative to a first reference coordinate system, wherein the first reference coordinate system is set in the object being inspected;
[0182] The first position coordinates of the defect are input into the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system, which is output by the coordinate transformation neural network model. The second reference coordinate system is set in the carrier device of the detection object. The coordinate transformation neural network model is used to realize the transformation from the first position coordinates to the second position coordinates.
[0183] The defect is detected based on its second location coordinates.
[0184] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0185] Obtain the coordinates of multiple first positions of multiple defects in the detected object relative to the first reference coordinate system;
[0186] The first position coordinates of the defect are input into a coordinate transformation neural network model to obtain the second position coordinates of the defect relative to a second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0187] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0188] In some embodiments of the present invention, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer; the processor can also be used to implement the following steps:
[0189] The multiple first position coordinates of the multiple defects are input into a coordinate transformation neural network model using a multi-threaded approach to obtain multiple second position coordinates of the multiple defects relative to the second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0190] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0191] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0192] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0193] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0194] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution model.
[0195] In some embodiments of the present invention, before inputting the first location coordinates of the defect into the coordinate transformation neural network model, the processor may also perform the following steps:
[0196] Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one.
[0197] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0198] Based on a preset loss function, calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects;
[0199] The coordinate transformation neural network model is trained using the aforementioned loss and backpropagation algorithm until the loss meets the target loss.
[0200] In some embodiments of the present invention, before inputting the multiple first position coordinates of the plurality of defects into the coordinate transformation neural network model, the processor may further be configured to perform the following steps:
[0201] The training samples are cleaned, wherein the data cleaning includes at least one of the following: removing duplicate values, removing outliers, and filling in missing values.
[0202] In some embodiments of the present invention, the processor may also be used to implement the following steps:
[0203] When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
[0204] In some embodiments of the present invention, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer. The processor can also be used to implement the following steps:
[0205] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model, including:
[0206] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0207] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0208] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0209] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0210] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
[0211] It is understood that when the processor in the computer device described above executes the computer program, it can also realize the functions of each unit in the corresponding device embodiments described above, which will not be repeated here. For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the defect detection device. For example, the computer program can be divided into units in the aforementioned defect detection device, and each unit can realize the specific functions described in the corresponding defect detection devices above.
[0212] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the processor and memory are merely examples of a computer device and do not constitute a limitation on the computer device. It may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.
[0213] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.
[0214] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0215] The present invention also provides a computer-readable storage medium for implementing the functions of a defect detection device, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the processor can perform the following steps:
[0216] Obtain the first position coordinates of the defect in the object being inspected relative to a first reference coordinate system, wherein the first reference coordinate system is set in the object being inspected;
[0217] The first position coordinates of the defect are input into the coordinate transformation neural network model to obtain the second position coordinates of the defect relative to the second reference coordinate system, which is output by the coordinate transformation neural network model. The second reference coordinate system is set in the carrier device of the detection object. The coordinate transformation neural network model is used to realize the transformation from the first position coordinates to the second position coordinates.
[0218] The defect is detected based on its second location coordinates.
[0219] In some embodiments of the present invention, when a computer program is executed by a processor, the processor may also be used to perform the following steps:
[0220] Obtain the coordinates of multiple first positions of multiple defects in the detected object relative to the first reference coordinate system;
[0221] The first position coordinates of the defect are input into a coordinate transformation neural network model to obtain the second position coordinates of the defect relative to a second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0222] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
[0223] In some embodiments of the present invention, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer; when the computer program is executed by a processor, the processor can also be used to implement the following steps:
[0224] The multiple first position coordinates of the multiple defects are input into a coordinate transformation neural network model using a multi-threaded approach to obtain multiple second position coordinates of the multiple defects relative to the second reference coordinate system, as output by the coordinate transformation neural network model, including:
[0225] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0226] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0227] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0228] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0229] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution model.
[0230] In some embodiments of the present invention, before the first location coordinates of the defect are input into the coordinate transformation neural network model, when the computer program is executed by the processor, the processor may also be used to implement the following steps:
[0231] Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one.
[0232] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model;
[0233] Based on a preset loss function, calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects;
[0234] The coordinate transformation neural network model is trained using the aforementioned loss and backpropagation algorithm until the loss meets the target loss.
[0235] In some embodiments of the present invention, before the computer program is executed by the processor, the processor may also be configured to perform the following steps:
[0236] The training samples are cleaned, wherein the data cleaning includes at least one of the following: removing duplicate values, removing outliers, and filling in missing values.
[0237] In some embodiments of the present invention, when a computer program is executed by a processor, the processor may also be used to perform the following steps:
[0238] When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
[0239] In some embodiments of the present invention, the coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer. When the computer program is executed by a processor, the processor can also be used to implement the following steps:
[0240] The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model, including:
[0241] The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates;
[0242] The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates.
[0243] The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer.
[0244] The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates;
[0245] The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
[0246] It is understood that if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a corresponding computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0247] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0248] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0249] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0250] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0251] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A defect detection method, characterized in that, include: Obtain multiple first position coordinates of multiple defects in the detection object relative to a first reference coordinate system, wherein the first reference coordinate system is set in the detection object; The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system output by the coordinate transformation neural network model. The second reference coordinate system is set in the carrier device of the detection object. The coordinate transformation neural network model is used to realize the transformation from the first position coordinates to the second position coordinates. The multiple defects are detected based on multiple second position coordinates of the multiple defects; The coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer; The step of inputting the multiple first position coordinates of the multiple defects into a coordinate transformation neural network model to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system output by the coordinate transformation neural network model includes: The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates; The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates. The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer. The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates; The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
2. The method according to claim 1, characterized in that, The step of inputting the multiple first position coordinates of the multiple defects into a coordinate transformation neural network model to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system output by the coordinate transformation neural network model includes: The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model using multiple threads to obtain the multiple second position coordinates of the multiple defects relative to the second reference coordinate system, which are output by the coordinate transformation neural network model.
3. The method according to claim 1, characterized in that, Before inputting the multiple first location coordinates of the multiple defects into the coordinate transformation neural network model, the method further includes: Acquire training samples, which include: multiple first position coordinates of multiple defects in multiple detection objects relative to the first reference coordinate system, and multiple second position coordinates of the multiple defects relative to the second reference coordinate system, wherein the first position coordinates and the second position coordinates of each defect correspond one-to-one. The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model; Based on a preset loss function, calculate the loss between the third position coordinates and the second position coordinates of the plurality of defects; The coordinate transformation neural network model is trained using the aforementioned loss and backpropagation algorithm until the loss meets the target loss.
4. The method according to claim 3, characterized in that, Before inputting the multiple first position coordinates of the multiple defects into the coordinate transformation neural network model, the method further includes: The training samples are cleaned, wherein the data cleaning includes at least one of the following: removing duplicate values, removing outliers, and filling in missing values.
5. The method according to claim 3, characterized in that, The process of training the coordinate transformation neural network model using the loss and backpropagation algorithm includes: When updating the model parameters of the coordinate transformation neural network model using the aforementioned loss and backpropagation algorithm, the Adamw optimizer is used to optimize the learning rate for parameter updates.
6. The method according to claim 3, characterized in that, The coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer; The multiple first position coordinates of the multiple defects are input into the coordinate transformation neural network model to obtain multiple corresponding third position coordinates output by the coordinate transformation neural network model, including: The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates; The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates. The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer. The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates; The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of third position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
7. A defect detection device, characterized in that, include: The acquisition unit is used to acquire multiple first position coordinates of multiple defects in the detection object relative to a first reference coordinate system, wherein the first reference coordinate system is set in the detection object; The input / output unit is used to input multiple first position coordinates of the plurality of defects to the coordinate transformation neural network model to obtain multiple second position coordinates of the plurality of defects relative to the second reference coordinate system output by the coordinate transformation neural network model, wherein the second reference coordinate system is set in the carrier device of the detection object; The coordinate transformation neural network model includes: a convolutional module, a batch normalization layer, a long short-term memory network layer, a fully connected layer, and a shape-changing layer; The input / output unit is specifically used for: The multiple first position coordinates of the multiple defects are input into the convolution module to extract the coordinate features of the multiple first position coordinates; The coordinate features of the plurality of first position coordinates are input into the batch normalization layer to normalize the coordinate features of the plurality of first position coordinates. The coordinate features of the normalized multiple first position coordinates are input into the Long Short-Term Memory network to ignore the first part of the coordinate features of the multiple first position coordinates and emphasize the second part of the coordinate features of the multiple first position coordinates, so as to obtain the output of the Long Short-Term Memory network layer. The output of the long short-term memory network layer is input to the fully connected layer to fit the coordinate features of the multiple first position coordinates; The coordinate features of the fitted first position coordinates are input to the shape-changing layer to obtain a preset number of second position coordinates, wherein the preset number is equal to the number of first position coordinates input to the convolution module.
8. A computer device comprising a processor, characterized in that, When the processor executes a computer program stored in the memory, it is used to implement the defect detection method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it is used to implement the defect detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Construction method of deep learning model and nonlinear coordinate conversion method
CN114387240A
Vehicle defect positioning system, method and device and storage medium
CN116148259A