Object detection method and apparatus

By constructing a defect map and using graph convolutional networks to process the correlation between steel surface defects, the problem of large detection errors in steel surface defects in existing technologies is solved, thereby improving the accuracy and recall of detection.

CN114241251BActive Publication Date: 2025-12-02ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111328385.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-12-02
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In existing technologies, the detection of defects on the surface of steel has large errors, resulting in inaccurate qualification test results and low recall rate.

Method used

A defect map is constructed, and the relationships in the defect map are processed by a graph convolutional network (GCN). The map is then combined with statistical vectors for compliance detection.

Benefits of technology

This improves the accuracy and recall rate of steel surface defect detection, ensuring the reliability of steel quality inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114241251B_ABST
    Figure CN114241251B_ABST
Patent Text Reader

Abstract

This specification provides an object detection method and apparatus. The object detection method includes: acquiring defect data of the surface of a target object; constructing a defect map based on the defect data; encoding the defect map to generate a corresponding encoding result; statistically analyzing the defect data to generate a corresponding statistical result; vectorizing the statistical result to generate a corresponding statistical vector; and performing a conformity detection on the target object based on the encoding result and the statistical vector to generate a corresponding detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of artificial intelligence technology, and in particular to object detection methods. Background Technology

[0002] Steel is an essential raw material in industry, widely used in automobile manufacturing, aerospace, and power energy. However, due to complex factors such as manufacturing processes and production environments, various defects can easily appear on its surface. These defects not only affect the appearance of products but also adversely impact their performance and safety. Therefore, detecting surface defects in steel to control its quality is of paramount importance. Summary of the Invention

[0003] In view of this, embodiments of this specification provide an object detection method. One or more embodiments of this specification also relate to an object detection model training method, an object detection device, an object detection model training device, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0004] According to a first aspect of the embodiments of this specification, an object detection method is provided, comprising:

[0005] Obtain defect data on the surface of the target object;

[0006] Based on the defect data, a defect map is constructed, and the defect map is encoded to generate corresponding encoding results;

[0007] The defect data is statistically analyzed to generate corresponding statistical results, and the statistical results are vectorized to generate corresponding statistical vectors.

[0008] Based on the encoding results and the statistical vector, the target object is subjected to a qualification test, and a corresponding test result is generated.

[0009] Optionally, the step of performing a qualification test on the target object based on the encoding result and the statistical vector to generate a corresponding test result includes:

[0010] The encoded result and the statistical vector are input into the object detection model for qualification testing, and the detection result corresponding to the target object is generated.

[0011] Optionally, the object detection model is trained in the following manner:

[0012] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0013] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0014] A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results.

[0015] Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

[0016] Optionally, generating an object detection model for performing conformity detection on the target object based on the historical encoding results, the historical statistical vectors, and the historical detection results includes:

[0017] The historical encoding results and the historical statistical vectors are used as training samples, and the historical detection results are used as sample labels. These are then input into the object detection model to be trained to obtain the object detection model.

[0018] Optionally, constructing a defect map based on the defect data includes:

[0019] Based on the size information of the defects contained in the defect data, the defect node corresponding to the defect is determined;

[0020] Based on the first location information of the defect on the surface of the target object contained in the defect data, the second location information corresponding to the defect node is determined;

[0021] Based on the second location information corresponding to the defect node, the positional relationship between the defect nodes is determined, and a defect map is constructed according to the positional relationship.

[0022] Optionally, determining the positional relationship between the defect nodes based on the second positional information corresponding to the defect nodes, and constructing a defect map based on the positional relationship, includes:

[0023] Based on the horizontal and vertical coordinates of the defective nodes in the second location information corresponding to the defective nodes, the defective nodes are sorted.

[0024] Based on the sorting results, determine any two adjacent defect nodes and establish an edge between the two adjacent defect nodes;

[0025] The weight of the edge between any two adjacent defect nodes is determined based on the distance between them, so as to construct a defect graph.

[0026] Optionally, determining the weight of the edge between any two adjacent defect nodes based on the distance between them includes:

[0027] Based on the second position information corresponding to any two adjacent defect nodes, determine the first coordinates of multiple vertices of the first defect node and the second coordinates of multiple vertices of the second defect node among the two adjacent defect nodes.

[0028] Based on the first coordinate and the second coordinate, the distance between any two adjacent defect nodes is determined, and the reciprocal of the distance is used as the weight of the edge between any two adjacent defect nodes.

[0029] Optionally, the step of encoding the defect map to generate a corresponding encoding result includes:

[0030] The defect map is input into the encoding module of the object detection model for encoding processing;

[0031] The encoding module determines the second defect node in the defect map that is connected to the first defect node, and performs a convolution operation on the node vectors corresponding to the first defect node and the second defect node to generate the convolution result corresponding to the first defect node.

[0032] The convolution results corresponding to the first defect node are summed to generate the corresponding processing result, and the mean of the convolution results corresponding to the first defect node is determined.

[0033] The processing result and the mean are concatenated to generate the corresponding encoding result.

[0034] Optionally, the step of inputting the encoding result and the statistical vector into the object detection model for qualification testing includes:

[0035] The encoding results and the statistical vectors are input into the detection module of the object detection model for qualification detection.

[0036] Optionally, the encoding module is trained in the following manner:

[0037] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0038] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0039] A historical defect map is constructed based on the historical defect data, and the historical defect map, the historical statistical vector, and the historical detection results are used as training samples and input into the encoding module for training to generate the encoding module.

[0040] According to a second aspect of the embodiments of this specification, a method for training an object detection model is provided, comprising:

[0041] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0042] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0043] A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results.

[0044] Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

[0045] According to a third aspect of the embodiments of this specification, an object detection apparatus is provided, comprising:

[0046] The acquisition module is configured to acquire defect data on the surface of the target object;

[0047] The construction module is configured to construct a defect map based on the defect data, and to encode the defect map to generate corresponding encoding results;

[0048] The statistics module is configured to perform statistics on the defect data, generate corresponding statistical results, and perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0049] The detection module is configured to perform a qualification test on the target object based on the encoding result and the statistical vector, and generate a corresponding detection result.

[0050] According to a fourth aspect of the embodiments of this specification, another object detection method is provided, including:

[0051] Acquire detection data of the target object's surface;

[0052] A detection map is constructed based on the detection data, and the detection map is encoded to generate corresponding encoding results;

[0053] The detection data is statistically analyzed to generate corresponding statistical results, and the statistical results are vectorized to generate corresponding statistical vectors.

[0054] The target object is detected based on the encoding result and the statistical vector, and a corresponding detection result is generated.

[0055] According to the fifth page of the embodiments of this specification, a computing device is provided, comprising:

[0056] Memory and processor;

[0057] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement any of the steps of the object detection method or the object detection model training method.

[0058] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of any one of the object detection methods or the object detection model training methods.

[0059] According to a seventh aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of any of the object detection methods or object detection model training methods described above.

[0060] One embodiment of this specification involves acquiring defect data of the surface of a target object, constructing a defect map based on the defect data, encoding the defect map to generate corresponding encoding results, statistically analyzing the defect data to generate corresponding statistical results, vectorizing the statistical results to generate corresponding statistical vectors, and performing a conformity test on the target object based on the encoding results and the statistical vectors to generate corresponding test results.

[0061] In this embodiment of the specification, after obtaining the defect data of the surface of the target object, a defect map corresponding to the defect data is constructed. This defect map can be used to characterize the correlation between different defects. Therefore, based on this defect map, the target object is subjected to conformity testing. This is because the conformity testing of the target object is based on the correlation between the defects of the target object in the defect map, which helps to improve the accuracy of the obtained conformity testing results. Attached Figure Description

[0062] Figure 1 This is a flowchart of an object detection method provided in one embodiment of this specification;

[0063] Figure 2aThis is a schematic diagram of a defect map provided in one embodiment of this specification;

[0064] Figure 2b This is a schematic diagram of a graph convolutional network provided in one embodiment of this specification;

[0065] Figure 2c This is a schematic diagram of an object detection process provided in one embodiment of this specification;

[0066] Figure 3 This is a flowchart illustrating the processing procedure of an object detection method provided in one embodiment of this specification.

[0067] Figure 4 This is a schematic diagram of the structure of an object detection device provided in one embodiment of this specification;

[0068] Figure 5 This is a flowchart of an object detection model training method provided in one embodiment of this specification;

[0069] Figure 6 This is a schematic diagram of the structure of an object detection model training device provided in one embodiment of this specification;

[0070] Figure 7 This is a flowchart of another object detection method provided in one embodiment of this specification;

[0071] Figure 8 This is a schematic diagram of the structure of another object detection module device provided in one embodiment of this specification;

[0072] Figure 9 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0073] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0074] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0075] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0076] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0077] Cold rolling: Using hot-rolled steel coils as raw materials, after pickling to remove oxide scale, the finished product is cold continuous rolling. Due to the work hardening caused by continuous cold deformation, the strength and hardness of the cold rolled coil increase and the toughness and plasticity decrease. Therefore, the stamping performance will deteriorate and it can only be used for parts with simple deformation.

[0078] Cold-rolled steel sheet surface inspection: This refers to the process of identifying defects on the surface of cold-rolled steel sheets using a surface inspection instrument. The result of the identification is called the "surface judgment code" (0 for pass and 1 for fail), and the grade of the identified steel sheet is called the "sorting degree".

[0079] Defect-graph: This refers to representing defect data (list) as a graph. Related defects are connected by edges, and the weight of each edge is determined by the distance between the defects.

[0080] Graph convolutional networks (GCNs) are neural network structures that perform convolution operations on nodes (and their neighboring nodes) in a graph. GCNs can integrate and extract node information (based on node feature data, weight information, and network connection information) of a graph.

[0081] Steel surface inspection refers to the defect detection of steel coils to determine whether the production of the steel coils meets the specified quality requirements, which is a key production step in the steel industry. Current mainstream solutions, such as rule-based models and rule-based health models, are limited by issues such as noise in the surface inspection instrument data, and cannot effectively model defects, resulting in a low recall rate for non-conforming samples in practical applications.

[0082] Based on this, the embodiments of this specification provide an object detection method that constructs a defect graph based on defect data to represent the correlation between defects. In subsequent processing, the correlation between the defects of the target object represented by the defect graph can be further combined to perform conformity detection on the target object, so as to make the obtained conformity detection results more accurate.

[0083] This specification provides an object detection method, and also relates to an object detection model training method, an object detection device, an object detection model training device, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0084] Figure 1 A flowchart of an object detection method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0085] Step 102: Obtain defect data on the surface of the target object.

[0086] Specifically, the target object is the object whose surface needs to be inspected for defects, and whose qualification is determined based on the defect inspection results. This includes, but is not limited to, steel strip, stainless steel or other metals.

[0087] Among them, surface defects of steel refer to macroscopic defects that can be directly observed with the naked eye, such as folds, scratches, scars, and gas cracks, caused during the production, processing, and transportation of steel.

[0088] Surface defects in steel not only affect the appearance of products, but also easily lead to rust, stress concentration, and cracking, greatly reducing the performance and service life of steel. Therefore, each batch of steel products must undergo rigorous surface quality testing before leaving the factory.

[0089] In practical applications, defect data on the surface of a target object (steel) can be obtained through a surface inspection instrument. This involves acquiring multiple images of the target object's surface using the instrument, then stitching these images together based on the correspondence between the images and different local locations on the target object, and finally performing defect detection on the stitched images to obtain defect data.

[0090] The obtained defect data may include multiple defects on the surface of the target object, as well as information such as the defect type, the location of the defect on the surface of the target object, the size of the defect, and the depth of the defect for each defect.

[0091] In addition, after obtaining information such as the defect type and the location of the defect on the surface of the target object, a corresponding defect vector can be generated based on the defect data of each defect, and a defect list of the target object can be generated based on the defect vector. Subsequently, a defect map can be constructed based on the defect list.

[0092] Currently, the data used for conformity testing of target objects is typically the identification results of surface inspection instruments, rather than the original image data. Because surface inspection instrument identification results may contain errors, the resulting conformity testing using conformity testing rules is not accurate enough. Therefore, in this embodiment, after acquiring the defect data of the target object's surface, a defect map can be constructed based on this data to represent the correlation between different defects. Then, based on these correlations, further conformity testing of the target object can be performed.

[0093] Step 104: Construct a defect map based on the defect data, and encode the defect map to generate the corresponding encoding result.

[0094] Specifically, currently, after acquiring defect data, the defect data used for conformity testing of the target object is typically the identification result of a surface inspection instrument, rather than the original image data. Because the identification results of the surface inspection instrument may contain errors, the resulting conformity testing using conformity testing rules is not accurate enough. Therefore, in this embodiment, after acquiring the defect data of the target object's surface, a defect map can be constructed based on this data to represent the correlation between different defects. Then, based on these correlations, further conformity testing of the target object can be performed.

[0095] In specific implementation, a defect map is constructed based on the defect data, which can be achieved in the following ways:

[0096] Based on the size information of the defects contained in the defect data, the defect node corresponding to the defect is determined;

[0097] Based on the first location information of the defect on the surface of the target object contained in the defect data, the second location information corresponding to the defect node is determined;

[0098] Based on the second location information corresponding to the defect node, the positional relationship between the defect nodes is determined, and a defect map is constructed according to the positional relationship.

[0099] Furthermore, based on the second location information corresponding to the defective nodes, the positional relationship between the defective nodes is determined, and a defect map is constructed according to the positional relationship. This can be achieved in the following ways:

[0100] Based on the horizontal and vertical coordinates of the defective nodes in the second location information corresponding to the defective nodes, the defective nodes are sorted.

[0101] Based on the sorting results, determine any two adjacent defect nodes and establish an edge between the two adjacent defect nodes;

[0102] The weight of the edge between any two adjacent defect nodes is determined based on the distance between them, so as to construct a defect graph.

[0103] Furthermore, the weight of the edge between any two adjacent defect nodes is determined based on the distance between them, which can be achieved in the following way:

[0104] Based on the second position information corresponding to any two adjacent defect nodes, determine the first coordinates of multiple vertices of the first defect node and the second coordinates of multiple vertices of the second defect node among the two adjacent defect nodes.

[0105] Based on the first coordinate and the second coordinate, the distance between any two adjacent defect nodes is determined, and the reciprocal of the distance is used as the weight of the edge between any two adjacent defect nodes.

[0106] Specifically, the defect data of the target object may include information such as the defect type, the location of the defect on the surface of the target object, the size of the defect, and the depth of the defect for each defect. However, since the shapes of each defect on the surface of the target object may vary, in this embodiment of the specification, for ease of processing, the shape of each defect can be uniformly abstracted as a rectangle. As for the size of the rectangle corresponding to each defect, it can be determined according to the actual size of each defect, with the rectangle being able to cover the actual defect.

[0107] After determining the actual size of the rectangle corresponding to each defect, the actual size of each rectangle and its position coordinates on the target object surface (first position information) can be proportionally reduced. The reduced rectangles are then used as defect nodes, and their position coordinates (second position information) are used as the position coordinates of the defect nodes in the defect map. The positional relationships between defect nodes can then be determined based on their position coordinates in the defect map, and the defect map can be constructed according to these relationships.

[0108] In addition, after determining the position coordinates of each defect node in the defect map, the positional relationship between each defect node is determined, and the defect map is constructed based on the position information. Specifically, based on the position coordinates of each defect node in the defect map, each defect node is sorted, and an edge is established between any two adjacent defect nodes in the sorting result.

[0109] For example, if the position coordinates of each defect node in the defect map, that is, the horizontal and vertical coordinates of each defect node in the defect map, are represented by w and l respectively, then the defect nodes can be sorted based on their position coordinates in the defect map. Specifically, the defect nodes can be sorted according to (w, l) first.

[0110] Taking a defect graph containing 11 defect nodes as an example, the defect nodes are defect node 1, defect node 2, defect node 3, ..., defect node 11. The defect nodes 1, 2, 3, ..., 11 are sorted according to (w,l) to obtain the first sorting result. Then, an edge is established between any two adjacent defect nodes in the first sorting result.

[0111] Among them, defect node 1, defect node 2, defect node 3, ..., defect node 11 are sorted according to (w,l). First, defect node 1, defect node 2, defect node 3, ..., defect node 11 are sorted according to the size of w. If there are defect nodes with the same w, then the defect nodes with the same w can be further sorted according to the size of l to obtain the first sorting result.

[0112] Alternatively, defect node 1, defect node 2, defect node 3, ..., defect node 11 can be sorted according to (l, w) to obtain a second sorting result. Then, an edge can be established between any two adjacent defect nodes in the second sorting result.

[0113] Among them, defect node 1, defect node 2, defect node 3, ..., defect node 11 are sorted according to (l, w). First, defect node 1, defect node 2, defect node 3, ..., defect node 11 are sorted according to the size of l. If there are defect nodes with the same l, then the defect nodes with the same l can be further sorted according to the size of w to obtain the second sorting result.

[0114] A schematic diagram of a defect map provided in the embodiments of this specification is shown below. Figure 2aAs shown. After sorting defective nodes 1, 2, 3, ..., 11 according to (l, w) or (w, l) to obtain the first and second sorting results, taking defective nodes 1 and 2 as examples, based on the first and second sorting results, the nodes connected to defective node 1 are determined to be defective nodes 9, 2, 5, and 7. Therefore, edges can be established between defective nodes 1 and 9, 2, 5, and 7 to establish their connection. Alternatively, based on the first and second sorting results, the nodes connected to defective node 2 are determined to be defective nodes 1 and 4. Therefore, edges can be established between defective nodes 2 and 4 to establish their connection.

[0115] After establishing edges between each defect node, the weight of the edge between any two defect nodes that are connected can be determined based on the distance between them.

[0116] Since the defect nodes in the defect map are rectangular, the distance between any two defect nodes that are connected can be calculated by calculating the distance between the four vertices of one defect node and the four vertices of the other defect node.

[0117] For example, defect node 1 and defect node 2 are connected. The four vertices of defect node 1 are vertices 11, 12, 13, and 14, and the four vertices of defect node 2 are vertices 21, 22, 23, and 24. Therefore, when calculating the distance between defect node 1 and defect node 2, the first coordinates of the four vertices of defect node 1 and the second coordinates of the four vertices of defect node 2 can be determined. Then, based on the first and second coordinates, the distances L1 and L2 between vertex 11 and vertices 21, 22, 23, and 24 can be calculated respectively. 2. Calculate the distances between vertex 12 and vertices 21, 22, 23, and 24 using L3 and L4. Calculate the distances between vertex 13 and vertices 21, 22, 23, and 24 using L5, L6, L7, and L8. Calculate the distances between vertex 13 and vertices 21, 22, 23, and 24 using L9, L10, L11, and L12. Calculate the distances between vertex 14 and vertices 21, 22, 23, and 24 using L13, L14, L15, and L16. Sort L1 to L16 in ascending order and take the first distance in the sorted result as the distance between defect node 1 and defect node 2.

[0118] After determining the distance between defect node 1 and defect node 2, the reciprocal of this distance can be used as the weight of the edge between defect node 1 and defect node 2, and this weight can be added to the edge between defect node 1 and defect node 2 to construct the defect graph.

[0119] Furthermore, after constructing a defect map based on defect data, the defect map can be encoded to learn the relationships between defect nodes in the defect map through the encoding results. The encoding process for the defect map, generating corresponding encoding results, includes:

[0120] The defect map is input into the encoding module of the object detection model for encoding processing;

[0121] The encoding module determines the second defect node in the defect map that is connected to the first defect node, and performs a convolution operation on the node vectors corresponding to the first defect node and the second defect node to generate the convolution result corresponding to the first defect node.

[0122] The convolution results corresponding to the first defect node are summed to generate the corresponding processing result, and the mean of the convolution results corresponding to the first defect node is determined.

[0123] The processing result and the mean are concatenated to generate the corresponding encoding result.

[0124] Specifically, the encoding module can be implemented based on a graph convolutional network (GCN), and this encoding module can be used as part of the object detection model. Therefore, the defect map can be encoded by inputting the defect map into the encoding module of the object detection model.

[0125] A schematic diagram of a graph convolutional network provided in the embodiments of this specification is shown below. Figure 2b As shown in the figure, the convolutional network consists of 7 layers: the first layer is the input layer, the seventh layer is the output layer, the second to fourth layers are convolutional layers, the fifth layer is the processing layer, and the sixth layer is the concatenation layer.

[0126] The input to the graph convolutional network consists of defect-graph view 1, defect-graph view 2, and statistical vector (X_ensemble). If the target object has two sides, i.e., front and back, then defect-graph view 1 can be a defect-graph constructed based on the defect data of the front side of the target object, and defect-graph view 2 can be a defect-graph constructed based on the defect data of the back side of the target object. X_ensemble can be the statistical vector corresponding to the statistical results of the defect data of the front and back sides of the target object.

[0127] Taking the input of Defect-graph view1 as an example, the GCN's processing of Defect-graph view1 is as follows: Since the defect data of each defect node in the defect graph can be represented by a vector of the same dimension, for example, each defect node corresponds to a 10-dimensional vector, and Defect-graph view1 contains 11 defect nodes, namely defect node 1 to defect node 11, after inputting Defect-graph view1 into GCN through the first input layer, the second to fourth layers of GCN are convolutional layers, which can perform convolution operations on any target defect node and the vectors corresponding to the defect nodes that are connected to the target defect node to generate the processed vector corresponding to the target defect node. This vector contains the correlation between the target defect node and the defect nodes that are connected to the target defect node.

[0128] For example, in Defect-graph view1, the nodes connected to defect node 1 are defect node 9, defect node 2, defect node 5, and defect node 7. Therefore, after inputting Defect-graph view1 into GCN through the first input layer, the second convolutional layer of GCN will perform a convolution operation on the 10-dimensional vectors corresponding to defect nodes 1, 9, 2, 5, and 7 to generate a 128-dimensional vector corresponding to defect node 1. Similarly, the third convolutional layer of GCN will perform a convolution operation on the 128-dimensional vectors corresponding to defect nodes 1, 9, 2, 5, and 7 to generate a 64-dimensional vector corresponding to defect node 1. The fourth convolutional layer of GCN will perform a convolution operation on the 64-dimensional vectors corresponding to defect nodes 1, 9, 2, 5, and 7 to generate a 32-dimensional vector corresponding to defect node 1. This 32-dimensional vector is the convolution result of defect node 1.

[0129] The generation process of the convolution results of other defect nodes in Defect-graph view1 and Defect-graph view2 is similar to that of the generation process of the convolution result of defect node 1, and will not be repeated here.

[0130] After generating the convolution results of each defect node in Defect-graph view1 and Defect-graph view2, the 32-dimensional vectors of each defect node can be summed through the fifth processing layer to generate the corresponding processing results. The mean of the 32-dimensional vectors of each defect node is calculated. Then, the sixth concatenation layer concatenates the summed processing results with the mean, and the seventh output layer outputs the concatenation result. The output concatenation result is the encoding result of the defect map.

[0131] In the embodiments of this specification, since the input of the GCN model also includes X_ensemble, after generating the summation result and the mean, the summation result, the mean, and X_ensemble can be concatenated together and the concatenated result can be output.

[0132] Alternatively, if X_ensemble is not input into the GCN model, after the GCN model outputs the summation result and the concatenation result of the mean, X_ensemble can be concatenated with the model's output to perform qualification detection on the target object based on the concatenation result.

[0133] In this embodiment of the specification, after obtaining the defect data of the surface of the target object, a defect map corresponding to the defect data is constructed. This defect map can be used to characterize the correlation between different defects. Therefore, based on this defect map, the target object is subjected to conformity testing. This is because the conformity testing of the target object is based on the correlation between the defects of the target object in the defect map, which helps to improve the accuracy of the obtained conformity testing results.

[0134] Step 106: Perform statistics on the defect data to generate corresponding statistical results, and then perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0135] Specifically, since defect data can contain information such as the defect type, the location of the defect on the surface of the target object, the size of the defect, and the depth of the defect, the current process of using defect data to perform conformity testing on the target object is mostly implemented in conjunction with conformity testing rules. The conformity testing rules can be such that if the number of target type defects contained in the target object is greater than a preset threshold, then the target object is determined to be unqualified. The defect type can be such as scratches, cracks, folds, etc.

[0136] Therefore, in addition to constructing a defect map using defect data and using the defect map to characterize the correlation between defects, and performing defect detection on the target object based on the correlation, the embodiments of this specification can also perform statistical analysis on the defect data. Specifically, the defect data can be statistically analyzed according to the defect type to obtain the number of defects of different defect types among the defects existing in the target object. Then, the statistical results can be vectorized to generate the corresponding statistical vector.

[0137] The statistical vector described in the embodiments of this specification is the aforementioned X_ensemble. It is equivalent to inputting only the defect map into GCN when encoding the defect map, without inputting the X_ensemble. Therefore, after encoding the defect map using GCN to generate the corresponding encoding result, the statistical vector (X_ensemble) can be concatenated with the encoding result to perform conformity detection on the target object based on the concatenation result.

[0138] Step 108: Perform a qualification test on the target object based on the encoding result and the statistical vector, and generate the corresponding test result.

[0139] In practice, the target object is subjected to qualification detection based on the encoding result and the statistical vector to generate the corresponding detection result. Specifically, the encoding result and the statistical vector can be input into the object detection model to perform qualification detection and generate the detection result corresponding to the target object.

[0140] Specifically, the object detection model can be used to perform qualification checks on target objects. Specifically, the concatenation result of the encoding result and the statistical vector can be input into the object detection model to perform qualification checks and generate corresponding detection results.

[0141] The object detection model is trained in the following way:

[0142] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0143] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0144] A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results.

[0145] Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

[0146] Furthermore, based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model for performing qualification detection on the target object is generated. Specifically, the historical encoding results and the historical statistical vectors can be used as training samples, and the historical detection results can be used as sample labels. These samples are then input into the object detection model to be trained to obtain the object detection model.

[0147] Specifically, the object detection model can be trained using historical defect data of the target object. First, historical defect data of the target object can be obtained, the historical defect data can be statistically analyzed, and the generated historical statistical results can be vectorized to generate corresponding historical statistical vectors. Then, a historical defect map can be constructed based on the historical defect data, and the historical defect map can be encoded to generate corresponding historical encoding results.

[0148] The process of acquiring historical defect data is similar to that of acquiring defect data of the target object. The process of statistically analyzing historical defect data is similar to that of statistically analyzing defect data. The process of constructing a historical defect map based on historical defect data and encoding the historical defect map is similar to that of constructing a defect map based on defect data and encoding the defect map. All of these can be referred to the implementation methods described above, and will not be repeated here.

[0149] In addition, based on preset detection rules and historical defect data, the target object can be tested for conformity and corresponding historical test results can be generated. The preset detection rules can be similar to the aforementioned conformity test rules, and will not be described in detail here.

[0150] After generating historical encoding results, historical statistical vectors, and historical detection results, the historical encoding results and historical statistical vectors can be used as training samples, and the historical detection results can be used as sample labels. These samples are then input into the object detection model to be trained to obtain the object detection model.

[0151] In practical implementation, since the encoding module that encodes the defect map can be included as part of the object detection model, the encoding results and the statistical vectors are input into the object detection model for compliance testing. Specifically, the encoding results and the statistical vectors are input into the detection module of the object detection model for compliance testing. The detection module that performs compliance testing on the target object is also part of the object detection model.

[0152] In addition, the encoding module is trained in the following way:

[0153] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0154] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0155] A historical defect map is constructed based on the historical defect data, and the historical defect map, the historical statistical vector, and the historical detection results are used as training samples and input into the encoding module for training to generate the encoding module.

[0156] Specifically, the encoding module can be trained using historical defect data of the target object. This involves first acquiring historical defect data of the target object, statistically analyzing the historical defect data, and then vectorizing the generated historical statistical results to generate corresponding historical statistical vectors. Finally, a historical defect map can be constructed based on the historical defect data.

[0157] The process of acquiring historical defect data is similar to the process of acquiring defect data of the aforementioned target object. The process of statistically analyzing historical defect data is similar to the process of statistically analyzing defect data mentioned above. The process of constructing a historical defect map based on historical defect data is similar to the process of constructing a defect map based on defect data mentioned above. All of these can be referred to the implementation methods described above, and will not be repeated here.

[0158] In addition, based on preset detection rules and historical defect data, the target object can be tested for conformity and corresponding historical test results can be generated. The preset detection rules can be similar to the aforementioned conformity test rules, and will not be described in detail here.

[0159] After generating historical defect maps, historical statistical vectors, and historical detection results, the historical coding results, historical statistical vectors, and historical detection results can be used as training samples and input into the object detection model to be trained to obtain the object detection model.

[0160] A schematic diagram of an object detection process provided in the embodiments of this specification is shown below. Figure 2c As shown, firstly, historical defect data of the target object surface is obtained, then a historical defect map is constructed based on the historical defect data, and the historical defect data can be statistically analyzed to generate historical statistical results. The target object can also be qualified based on the historical defect data and preset detection rules to generate corresponding historical detection results. Then, the coding model can be trained based on the historical defect map, historical statistical results and historical detection results to generate the coding model.

[0161] Furthermore, the historical defect map can be encoded using an encoding model to generate corresponding historical encoding results. Based on these historical encoding results, historical statistical vectors, and historical detection results, the object detection model to be trained is then trained to obtain the object detection model. The generated object detection model can then be used to perform qualification detection on target objects to output the qualification detection results of the target objects.

[0162] One embodiment of this specification involves acquiring defect data of the surface of a target object, constructing a defect map based on the defect data, encoding the defect map to generate corresponding encoding results, statistically analyzing the defect data to generate corresponding statistical results, vectorizing the statistical results to generate corresponding statistical vectors, and performing a conformity test on the target object based on the encoding results and the statistical vectors to generate corresponding test results.

[0163] In this embodiment of the specification, after obtaining the defect data of the surface of the target object, a defect map corresponding to the defect data is constructed. This defect map can be used to characterize the correlation between different defects. Therefore, based on this defect map, the target object is subjected to conformity testing. This is because the conformity testing of the target object is based on the correlation between the defects of the target object in the defect map, which helps to improve the accuracy of the obtained conformity testing results.

[0164] The following is in conjunction with the appendix Figure 3 Taking the application of the object detection method provided in this specification in the steel conformity inspection scenario as an example, the object detection method will be further explained. Among other things, Figure 3 The present specification shows a flowchart of the processing procedure of an object detection method according to an embodiment, which specifically includes the following steps.

[0165] Step 302: Obtain historical defect data of the steel surface.

[0166] Step 304: Construct a historical defect map based on the historical defect data.

[0167] Step 306: Perform data statistics on the historical defect data, and vectorize the generated historical statistical results to generate corresponding historical statistical vectors.

[0168] Step 308: Determine the historical test results generated by performing conformity testing on steel based on the historical defect data and preset test rules.

[0169] Step 310: Use the historical defect map, the historical statistical vector, and the historical detection results as training samples to train the encoding module of the object detection model, thereby generating the encoding module.

[0170] Step 312: The historical defect map is encoded by the encoding module to generate the corresponding historical encoding result.

[0171] Step 314: Based on the historical encoding results, the historical statistical vectors, and the historical detection results, generate an object detection model for conducting conformity testing on steel.

[0172] Step 316: Obtain defect data of the steel surface.

[0173] Step 318: Construct a defect map based on the defect data, and input the defect map into the encoding module of the object detection model for encoding processing to generate the corresponding encoding result.

[0174] Step 320: Perform statistics on the defect data to generate corresponding statistical results, and then perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0175] Step 322: Input the encoding result and the statistical vector into the detection module of the object detection model for qualification detection and generate the corresponding detection result.

[0176] In this embodiment of the specification, after obtaining defect data of the steel surface, a defect map corresponding to the defect data is constructed. This defect map can be used to characterize the correlation between different defects. Therefore, based on this defect map, the steel can be tested for conformity. This is because the steel can be tested for conformity based on the correlation between the defects in the defect map, which helps to improve the accuracy of the obtained conformity test results.

[0177] Corresponding to the above method embodiments, this specification also provides embodiments of object detection devices. Figure 4 A schematic diagram of an object detection device according to one embodiment of this specification is shown. Figure 4 As shown, the device includes:

[0178] The acquisition module 402 is configured to acquire defect data on the surface of the target object;

[0179] The construction module 404 is configured to construct a defect map based on the defect data, and to encode the defect map to generate a corresponding encoding result;

[0180] The statistics module 406 is configured to perform statistics on the defect data, generate corresponding statistical results, and perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0181] The detection module 408 is configured to perform a qualification test on the target object based on the encoding result and the statistical vector, and generate a corresponding detection result.

[0182] Optionally, the detection module 408 is further configured to:

[0183] The encoded result and the statistical vector are input into the object detection model for qualification testing, and the detection result corresponding to the target object is generated.

[0184] Optionally, the object detection device further includes a training module, configured to:

[0185] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0186] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0187] A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results.

[0188] Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

[0189] Optionally, the training module is further configured to:

[0190] The historical encoding results and the historical statistical vectors are used as training samples, and the historical detection results are used as sample labels. These are then input into the object detection model to be trained to obtain the object detection model.

[0191] Optionally, the building module 404 is further configured to:

[0192] Based on the size information of the defects contained in the defect data, the defect node corresponding to the defect is determined;

[0193] Based on the first location information of the defect on the surface of the target object contained in the defect data, the second location information corresponding to the defect node is determined;

[0194] Based on the second location information corresponding to the defect node, the positional relationship between the defect nodes is determined, and a defect map is constructed according to the positional relationship.

[0195] Optionally, the building module 404 is further configured to:

[0196] Based on the horizontal and vertical coordinates of the defective nodes in the second location information corresponding to the defective nodes, the defective nodes are sorted.

[0197] Based on the sorting results, determine any two adjacent defect nodes and establish an edge between the two adjacent defect nodes;

[0198] The weight of the edge between any two adjacent defect nodes is determined based on the distance between them, so as to construct a defect graph.

[0199] Optionally, the building module 404 is further configured to:

[0200] Based on the second position information corresponding to any two adjacent defect nodes, determine the first coordinates of multiple vertices of the first defect node and the second coordinates of multiple vertices of the second defect node among the two adjacent defect nodes.

[0201] Based on the first coordinate and the second coordinate, the distance between any two adjacent defect nodes is determined, and the reciprocal of the distance is used as the weight of the edge between any two adjacent defect nodes.

[0202] Optionally, the building module 404 is further configured to:

[0203] The defect map is input into the encoding module of the object detection model for encoding processing;

[0204] The encoding module determines the second defect node in the defect map that is connected to the first defect node, and performs a convolution operation on the node vectors corresponding to the first defect node and the second defect node to generate the convolution result corresponding to the first defect node.

[0205] The convolution results corresponding to the first defect node are summed to generate the corresponding processing result, and the mean of the convolution results corresponding to the first defect node is determined.

[0206] The processing result and the mean are concatenated to generate the corresponding encoding result.

[0207] Optionally, the detection module 408 is further configured to:

[0208] The encoding results and the statistical vectors are input into the detection module of the object detection model for qualification detection.

[0209] Optionally, the encoding module is trained in the following manner:

[0210] Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0211] The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors.

[0212] A historical defect map is constructed based on the historical defect data, and the historical defect map, the historical statistical vector, and the historical detection results are used as training samples and input into the encoding module for training to generate the encoding module.

[0213] The above is a schematic scheme of an object detection device according to this embodiment. It should be noted that the technical solution of this object detection device and the technical solution of the object detection method described above belong to the same concept. For details not described in detail in the technical solution of the object detection device, please refer to the description of the technical solution of the object detection method described above.

[0214] Figure 5 A flowchart of an object detection model training method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0215] Step 502: Obtain historical defect data of the target object surface, and determine the historical test results generated by performing a qualification test on the target object based on the historical defect data and preset test rules.

[0216] Step 504: Perform data statistics on the historical defect data, and vectorize the generated historical statistical results to generate corresponding historical statistical vectors.

[0217] Step 506: Construct a historical defect map based on the historical defect data, and encode the historical defect map to generate corresponding historical coding results.

[0218] Step 508: Based on the historical encoding results, the historical statistical vectors, and the historical detection results, generate an object detection model for performing qualification detection on the target object.

[0219] Specifically, the object detection model can be trained using historical defect data of the target object. First, historical defect data of the target object can be obtained, the historical defect data can be statistically analyzed, and the generated historical statistical results can be vectorized to generate corresponding historical statistical vectors. Then, a historical defect map can be constructed based on the historical defect data, and the historical defect map can be encoded to generate corresponding historical encoding results.

[0220] The process of acquiring historical defect data is similar to that of acquiring defect data of the target object. The process of statistically analyzing historical defect data is similar to that of statistically analyzing defect data. The process of constructing a historical defect map based on historical defect data and encoding the historical defect map is similar to that of constructing a defect map based on defect data and encoding the defect map. All of these can be referred to the implementation methods described above, and will not be repeated here.

[0221] In addition, based on preset detection rules and historical defect data, the target object can be tested for conformity and corresponding historical test results can be generated. The preset detection rules can be similar to the aforementioned conformity test rules, and will not be described in detail here.

[0222] After generating historical encoding results, historical statistical vectors, and historical detection results, the historical encoding results and historical statistical vectors can be used as training samples, and the historical detection results can be used as sample labels. These samples are then input into the object detection model to be trained to obtain the object detection model.

[0223] In this embodiment of the specification, after obtaining historical defect data of the target object surface, a historical defect map corresponding to the historical defect data is constructed. This historical defect map can be used to characterize the correlation between different defects. Therefore, the object detection model is trained based on this historical defect map, so that the model can learn the correlation between different defects. In the subsequent process of using the object detection model to perform qualification detection on the target object, the qualification detection of the target object can be performed based on the learning results of the correlation between each defect, which helps to improve the accuracy of the obtained qualification detection results.

[0224] Corresponding to the above method embodiments, this specification also provides embodiments of an object detection model training device. Figure 6 A schematic diagram of an object detection model training device according to one embodiment of this specification is shown. Figure 6 As shown, the device includes:

[0225] The acquisition module 602 is configured to acquire historical defect data of the surface of the target object, and determine historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules;

[0226] The statistics module 604 is configured to perform data statistics on the historical defect data and to vectorize the generated historical statistical results to generate corresponding historical statistical vectors.

[0227] The encoding module 606 is configured to construct a historical defect map based on the historical defect data, and to encode the historical defect map to generate a corresponding historical encoding result.

[0228] The generation module 608 is configured to generate an object detection model for performing qualification detection on the target object based on the historical encoding results, the historical statistical vectors, and the historical detection results.

[0229] The above is a schematic scheme of an object detection model training device according to this embodiment. It should be noted that the technical solution of this object detection model training device and the technical solution of the object detection model training method described above belong to the same concept. For details not described in detail in the technical solution of the object detection model training device, please refer to the description of the technical solution of the object detection model training method described above.

[0230] Figure 7 A flowchart of another object detection method according to an embodiment of this specification is shown, which specifically includes the following steps.

[0231] Step 702: Obtain detection data of the target object surface.

[0232] Step 704: Construct a detection map based on the detection data, and encode the detection map to generate the corresponding encoding result.

[0233] Step 706: Perform statistics on the detection data to generate corresponding statistical results, and perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0234] Step 708: Detect the target object based on the encoding result and the statistical vector, and generate the corresponding detection result.

[0235] Specifically, the target object refers to the object whose surface needs to be inspected, and whose qualification is determined based on the inspection results. This includes, but is not limited to, steel strips, stainless steel, or other metals. Inspecting the target object's surface can specifically involve detecting surface defects, such as macroscopic defects that are directly observable with the naked eye, caused during production, processing, and transportation, such as folds, scratches, scars, and gas cracks. Therefore, the inspection data for the target object's surface can specifically be defect data. This defect data can include multiple defects on the target object's surface, along with information such as the defect type, location, size, and depth of each defect.

[0236] Currently, after acquiring detection data, the detection results used to determine the target object are typically the identification results of the surface inspection instrument, rather than the original image data. Because the identification results of the surface inspection instrument may contain errors, the detection results generated by using preset detection rules to detect the identification results of the surface inspection instrument are not accurate enough. Therefore, in this embodiment, after acquiring the detection data of the target object's surface, a detection map can be constructed based on this detection data. This detection map can then represent the correlation between different defects, and further detection of the target object can be performed based on these correlations. The process of constructing the detection map is similar to the defect map construction process in the aforementioned data processing method embodiments, and will not be repeated here.

[0237] After constructing a detection map based on the detection data, the detection map can be encoded to learn the correlation between each detection point of the target object in the detection map through the encoding results, and generate the corresponding encoding results.

[0238] Furthermore, the detection data can be statistically analyzed. Specifically, the data can be statistically analyzed according to the detection type of the target object to obtain the number of detection points on the target object surface for different detection types. The statistical results can then be vectorized to generate corresponding statistical vectors. Based on the encoded results and statistical vectors, the target object can be detected to generate corresponding detection results. Specifically, the detection of the target object can be a conformity test, which uses the encoded results and statistical vectors to comprehensively determine whether the target object is conforming. When the target object is strip steel, stainless steel, or other metals, the detection type can be the defect type, and the detection point can be any point on the target object surface where a defect exists.

[0239] In this embodiment of the specification, after obtaining the detection data of the target object surface, a detection map corresponding to the detection data is constructed. This detection map can be used to characterize the correlation between different detection points. Therefore, based on this detection map, the target object can be tested for conformity, which is beneficial to improving the accuracy of the obtained detection results.

[0240] The above is an illustrative scheme of another object detection method in this embodiment. It should be noted that the technical solution of this object detection method belongs to the same concept as the technical solution of the object detection method described above. For details not described in detail in the technical solution of this object detection method, please refer to the description of the technical solution of the object detection method described above.

[0241] Corresponding to the above method embodiments, this specification also provides another embodiment of an object detection device. Figure 8 A schematic diagram of another object detection device provided in one embodiment of this specification is shown. Figure 8 As shown, the device includes:

[0242] The acquisition module 802 is configured to acquire detection data of the surface of the target object;

[0243] The processing module 804 is configured to construct a detection map based on the detection data, and to encode the detection map to generate a corresponding encoding result;

[0244] The statistics module 806 is configured to perform statistics on the detection data, generate corresponding statistical results, and perform vectorization processing on the statistical results to generate corresponding statistical vectors.

[0245] The generation module 808 is configured to detect the target object based on the encoding result and the statistical vector, and generate a corresponding detection result.

[0246] The above is an illustrative scheme of another object detection device in this embodiment. It should be noted that the technical solution of this object detection device and the technical solution of the other object detection method described above belong to the same concept. For details not described in detail in the technical solution of the object detection device, please refer to the description of the technical solution of the other object detection method described above.

[0247] Figure 9 A structural block diagram of a computing device 900 according to one embodiment of this specification is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0248] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0249] In one embodiment of this specification, the above-described components of the computing device 900 and Figure 9 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 9 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0250] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 900 can also be a mobile or stationary server.

[0251] The processor 920 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the object detection method or the object detection model training method described above.

[0252] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the object detection method or the object detection model training method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the object detection method or the object detection model training method described above.

[0253] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the object detection method or the object detection model training method described above.

[0254] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the object detection method or the object detection model training method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the object detection method or the object detection model training method described above.

[0255] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described object detection method or the above-described object detection model training method.

[0256] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the object detection method or the object detection model training method described above. Details not described in detail in the computer program's technical solution can be found in the descriptions of the object detection method or the object detection model training method described above.

[0257] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0258] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may 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 may be appropriately added to or subtracted 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 may not include electrical carrier signals and telecommunication signals.

[0259] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0260] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0261] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. An object detection method, comprising: Obtain defect data on the surface of the target object; A defect map is constructed based on the defect data, and the defect map is encoded to generate corresponding encoding results. The process of constructing the defect map based on the defect data includes: Based on the size information of the defects contained in the defect data, the defect node corresponding to the defect is determined; Based on the first location information of the defect on the surface of the target object contained in the defect data, the second location information corresponding to the defect node is determined, wherein the second location information is the location coordinates of the target object surface scaled down proportionally based on the first location information; Based on the second location information corresponding to the defect nodes, the positional relationship between the defect nodes is determined, and a defect map is constructed according to the positional relationship; The defect data is statistically analyzed to generate corresponding statistical results, and the statistical results are vectorized to generate corresponding statistical vectors. Based on the encoding results and the statistical vector, the target object is subjected to a qualification test, and a corresponding test result is generated.

2. The object detection method according to claim 1, wherein performing qualification detection on the target object based on the encoding result and the statistical vector to generate a corresponding detection result includes: The encoded result and the statistical vector are input into the object detection model for qualification testing, and the detection result corresponding to the target object is generated.

3. The object detection method according to claim 2, wherein the object detection model is trained in the following manner: Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules; The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors. A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results. The construction of the historical defect map based on the historical defect data includes: determining defect nodes corresponding to the historical defects based on the size information of the historical defects contained in the historical defect data; determining second position information corresponding to the defect nodes based on the first position information of the historical defects on the surface of the target object contained in the historical defect data; determining the positional relationships between the defect nodes based on the second position information corresponding to the defect nodes; and constructing a historical defect map based on the positional relationships. Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

4. The object detection method according to claim 3, wherein generating an object detection model for performing qualification detection on the target object based on the historical encoding results, the historical statistical vector, and the historical detection results includes: The historical encoding results and the historical statistical vectors are used as training samples, and the historical detection results are used as sample labels. These are then input into the object detection model to be trained to obtain the object detection model.

5. The object detection method according to claim 1, wherein determining the positional relationship between the defect nodes based on the second position information corresponding to the defect nodes, and constructing a defect map according to the positional relationship, comprises: Based on the horizontal and vertical coordinates of the defective nodes in the second location information corresponding to the defective nodes, the defective nodes are sorted. Based on the sorting results, determine any two adjacent defect nodes and establish an edge between the two adjacent defect nodes; The weight of the edge between any two adjacent defect nodes is determined based on the distance between them, so as to construct a defect graph.

6. The object detection method according to claim 5, wherein determining the weight of the edge between any two adjacent defect nodes based on the distance between any two adjacent defect nodes includes: Based on the second position information corresponding to any two adjacent defect nodes, determine the first coordinates of multiple vertices of the first defect node and the second coordinates of multiple vertices of the second defect node among the two adjacent defect nodes. Based on the first coordinate and the second coordinate, the distance between any two adjacent defect nodes is determined, and the reciprocal of the distance is used as the weight of the edge between any two adjacent defect nodes.

7. The object detection method according to claim 2, wherein encoding the defect map to generate a corresponding encoding result includes: The defect map is input into the encoding module of the object detection model for encoding processing; The encoding module determines the second defect node in the defect map that is connected to the first defect node, and performs a convolution operation on the node vectors corresponding to the first defect node and the second defect node to generate the convolution result corresponding to the first defect node. The convolution results corresponding to the first defect node are summed to generate the corresponding processing result, and the mean of the convolution results corresponding to the first defect node is determined. The processing result and the mean are concatenated to generate the corresponding encoding result.

8. The object detection method according to claim 7, wherein inputting the encoding result and the statistical vector into the object detection model for qualification detection includes: The encoding results and the statistical vectors are input into the detection module of the object detection model for qualification detection.

9. The object detection method according to claim 7, wherein the encoding module is trained in the following manner: Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules; The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors. A historical defect map is constructed based on the historical defect data, and the historical defect map, the historical statistical vector, and the historical detection results are used as training samples and input into the encoding module for training to generate the encoding module. The construction of the historical defect map based on the historical defect data includes: determining defect nodes corresponding to the historical defects based on the size information of the historical defects contained in the historical defect data; determining second position information corresponding to the defect nodes based on the first position information of the historical defects on the surface of the target object contained in the historical defect data; determining the positional relationships between the defect nodes based on the second position information corresponding to the defect nodes; and constructing the historical defect map based on the positional relationships.

10. A method for training an object detection model, comprising: Acquire historical defect data of the target object surface, and determine the historical test results generated by performing a conformity test on the target object based on the historical defect data and preset test rules; The historical defect data is statistically analyzed, and the generated historical statistical results are vectorized to generate corresponding historical statistical vectors. A historical defect map is constructed based on the historical defect data, and the historical defect map is encoded to generate corresponding historical encoding results. The construction of the historical defect map based on the historical defect data includes: determining defect nodes corresponding to the historical defects based on the size information of the historical defects contained in the historical defect data; determining second position information corresponding to the defect nodes based on first position information of the historical defects on the surface of the target object contained in the historical defect data, wherein the second position information is the position coordinates of the target object surface scaled down proportionally based on the first position information; determining the positional relationships between the defect nodes based on the second position information corresponding to the defect nodes, and constructing a historical defect map based on the positional relationships. Based on the historical encoding results, the historical statistical vectors, and the historical detection results, an object detection model is generated for performing qualification detection on the target object.

11. An object detection method, comprising: Acquire detection data of the target object's surface; A detection map is constructed based on the detection data, and the detection map is encoded to generate corresponding encoding results. The construction of the detection map based on the detection data includes: determining detection points corresponding to the defects based on the size information of the defects contained in the detection data; determining second position information corresponding to the detection points based on first position information of the defects on the surface of the target object contained in the detection data; determining the positional relationship between the detection points based on the second position information corresponding to the detection points, wherein the second position information is a proportionally scaled-down coordinate of the target object surface based on the first position information; and constructing a detection map based on the positional relationship. The detection data is statistically analyzed to generate corresponding statistical results, and the statistical results are vectorized to generate corresponding statistical vectors. The target object is detected based on the encoding result and the statistical vector, and a corresponding detection result is generated.

12. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the object detection method according to any one of claims 1 to 9, the object detection model training method according to claim 10, or the object detection method according to claim 11.

13. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the object detection method of any one of claims 1 to 9, the object detection model training method of claim 10, or the object detection method of claim 11.

Citation Information

Patent Citations

  • A smart communications system for integration into a workflow-engaged clinical environment

    CA2595830A1

  • IT equipment operation and maintenance fault suggestion processing method based on semantic analysis algorithm

    CN113065356A