Online detection device for surface quality of building 3D printing piece
Through three-dimensional scanning equipment and graph structure data processing, a defect detection model is built, which solves the problems of low efficiency and high cost of surface quality detection of 3D printed parts, and achieves efficient and accurate defect detection.
Patent Information
- Application Number
- CN202510139981.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN120107173A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of defect detection, and in particular relates to an online detection device for the surface quality of a 3D printed building part. Background Art
[0002] With the rapid development of 3D printing technology, its application in manufacturing, medical, aerospace and other fields is becoming more and more extensive. The surface quality of 3D printed parts directly affects their functions and service life. Therefore, the importance of surface defect detection is becoming more and more prominent. High-quality 3D printed parts need to have good surface smoothness, geometric accuracy and structural integrity. Any tiny defect may lead to a decline in product performance and even affect safety.
[0003] Currently, the detection of surface defects mainly relies on manual visual inspection. Although manual inspection can identify obvious defects, this method has several significant disadvantages. First, manual inspection is inefficient, especially in the face of mass production, and is prone to detection bottlenecks; second, manual inspection is highly dependent on the experience and skills of the inspectors, and is easily affected by subjective factors, resulting in missed inspections or false inspections; third, manual inspection is costly, requiring the employment of specialized inspectors, and is prone to fatigue during long hours of work, which in turn affects the quality of inspection.
[0004] Therefore, there is an urgent need for an online detection device for the surface quality of 3D printed parts to solve the above problems. Summary of the invention
[0005] The present invention provides an online detection device for the surface quality of a building 3D printed part, which solves the problems of low efficiency, strong subjectivity and high cost of manual detection.
[0006] The present invention provides an online detection device for the surface quality of a building 3D printed part, comprising:
[0007] The data acquisition module is used to collect the 3D point cloud data of the 3D printed part using a 3D scanning device, wherein each point in the 3D point cloud data represents a position on the 3D printed part, and the coordinates are ( x, y, z ) express;
[0008] A data preprocessing module, which is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence, wherein a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data;
[0009] A graph structure construction module, which is used to construct graph structure data according to the first feature sequence, the graph structure data including: nodes, initial features of nodes and edges, the nodes establish a mapping relationship with the points in the preprocessed three-dimensional point cloud data, the sequence units of the first feature sequence serve as the initial features of the nodes with which the mapping relationship is established, and the edges represent the relationship between the nodes;
[0010] A defect detection module, which is used to build a defect detection model according to the graph structure data and output a probability value of a defect occurring at each node in the graph structure data;
[0011] The response measure generation module is used to generate response measures according to the probability value of defects occurring at each node of the graph structure data.
[0012] Furthermore, the step of preprocessing the three-dimensional point cloud data includes:
[0013] Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation;
[0014] Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix;
[0015] Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data;
[0016] Step S204: Process the three-dimensional point cloud data using voxel grid downsampling technology.
[0017] Furthermore, the specific steps of step S201 include:
[0018] Step S2011, using a k-nearest neighbor algorithm and taking Euclidean distance as a metric to determine k nearest neighbor points of each point in the three-dimensional point cloud data;
[0019] Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0;
[0020] Step S2013, obtaining the normal vector of the plane according to the plane equation ( a, b, c ) .
[0021] Furthermore, the specific steps of step S202 include:
[0022] Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij ( x ij ,y ij, z ij ) are the coordinates of the neighboring points;
[0023] Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are:
[0024] Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix;
[0025] Step S2024, decompose the covariance matrix to obtain its eigenvalues and eigenvectors, and the calculation formula is: C*v=λ*v, where λ is the eigenvalue, and the eigenvalues λ in three orthogonal directions are calculated. 1 , 2 and λ 3 Indicates that v is the eigenvector;
[0026] Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: where λ 1 represents the minimum eigenvalue, λ 1 +λ 2 +λ 3 Indicates overall change.
[0027] Furthermore, the method for constructing the edge of the graph structure data includes:
[0028] Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points;
[0029] Building edges based on the similarity of node normal vectors. The specific operations are as follows: calculating the cosine similarity of the normal vectors of two nodes, setting a similarity threshold, and building edges between two nodes whose cosine similarity exceeds the threshold;
[0030] The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the three-dimensional point cloud data into several triangles so that the line between any two adjacent points will not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.
[0031] Further, the defect detection model includes: a hidden layer and a classifier;
[0032] The input of the hidden layer is graph structure data, and the output is the updated features of the nodes;
[0033] The updated features of the nodes output by the hidden layer are input into the classifier, and the classification space of the classifier represents the probability value of defects occurring in each node of the graph structure data.
[0034] Furthermore, the calculation formula of the hidden layer includes:
[0035]
[0036] in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input graph structure data, the elements of the adjacency matrix represent the connection relationship between the nodes, and the element value is represented by 0 or 1, 0 means that there is no connection relationship between the nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is assigned to 1, and the remaining element values are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.
[0037] Furthermore, the three-dimensional point cloud data collected by the three-dimensional scanning equipment is rotated and translated to enhance the data, a training data set for the defect detection model is constructed, and the three-dimensional point cloud data is annotated by manual annotation.
[0038] Furthermore, the weighted cross entropy loss function is used as the loss function of the defect detection model. The calculation formula of the weighted cross entropy loss function is:
[0039]
[0040] Where N represents the total number of samples, y i represents the true label of the i-th sample, p ( y i |x i Indicates that the defect detection model predicts the label y for the i-th sample i The probability of Represents the weight for each label category.
[0041] Furthermore, K-fold cross validation is used to evaluate the accuracy of the defect detection model. The specific steps include:
[0042] Step S301, evenly divide the training data set into K subsets, each subset is equal in size;
[0043] Step S302, each time one subset is selected from the K subsets as a validation set, and the remaining K-1 subsets are used as training sets;
[0044] Step S303, repeat the above process K times, each time selecting a different subset as the validation set;
[0045] Step S304, compare the defect probability prediction results of K times of verification with the defect probability manually annotated, and calculate the mean square error between the two to evaluate the accuracy of the model.
[0046] The beneficial effects of the present invention are as follows: the present invention constructs a defect detection model based on graph structure data, which can accurately predict the defect probability of each node and provide an important basis for subsequent quality control;
[0047] The present invention adopts weighted cross entropy loss function for model training and evaluates the accuracy and generalization ability of the model through K-fold cross validation to ensure the robustness of the model on different data sets;
[0048] The present invention adopts the Bayesian optimization method to tune the model hyperparameters, thereby improving the performance and training efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 It is a module schematic diagram of an online detection device for the surface quality of a building 3D printed part according to the present invention;
[0050] Figure 2 It is a flow chart of preprocessing three-dimensional point cloud data according to the present invention.
[0051] In the figure: data acquisition module 101, data preprocessing module 102, graph structure construction module 103, defect detection module 104 and response measure generation module 105. DETAILED DESCRIPTION
[0052] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0053] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in one or more embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0054] like Figure 1-Figure 2 As shown, an online detection device for the surface quality of a building 3D printed part comprises:
[0055] The data acquisition module 101 is used to collect 3D point cloud data of a 3D printed part using a 3D scanning device, wherein each point in the 3D point cloud data represents a position on the 3D printed part, and the coordinates are ( x, y, z ) express;
[0056] A data preprocessing module 102 is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence, wherein a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data;
[0057] A graph structure construction module 103 is used to construct graph structure data according to the first feature sequence, wherein the graph structure data includes: nodes, initial features of nodes and edges, wherein a mapping relationship is established between nodes and points in the preprocessed three-dimensional point cloud data, sequence units of the first feature sequence are used as initial features of nodes with which a mapping relationship is established, and edges represent relationships between nodes;
[0058] A defect detection module 104, which is used to build a defect detection model according to the graph structure data and output a probability value of a defect occurring at each node in the graph structure data;
[0059] The response measure generation module 105 is used to generate response measures according to the probability value of a defect occurring at each node of the graph structure data.
[0060] In one embodiment of the present invention, a laser scanner is used to collect 3D point cloud data of a 3D printed part. The working principle of the laser scanner is to emit a laser beam to the surface of an object, then receive the reflected light, and calculate the 3D coordinates of the surface of the object according to the flight time and angle change of the laser. This method can generate high-density point cloud data, accurately reflect the geometric features of the surface of the 3D printed part, and then detect surface defects.
[0061] In one embodiment of the present invention, the step of preprocessing the three-dimensional point cloud data includes:
[0062] Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation;
[0063] Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix;
[0064] Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data, the specific operation is: setting a radius threshold, for each point, counting the number of neighboring points within the radius r, if the number of neighboring points is less than the set minimum number, the point is a noise point, and it is deleted;
[0065] Step S204, use voxel grid downsampling technology to process the three-dimensional point cloud data, reduce the amount of point cloud data, and retain the main geometric features. The specific operation is: divide the entire three-dimensional point cloud into a cubic grid of a fixed size, and calculate the average value of the points in the grid as the representative points of the grid, and use these representative points to form a new downsampled point cloud.
[0066] In one embodiment of the present invention, the specific steps of step S201 include:
[0067] Step S2011, using the k nearest neighbor algorithm, taking the Euclidean distance as the metric, to determine the k nearest neighbor points of each point in the three-dimensional point cloud data. Preferably, k is set to 10, and the formula of the Euclidean distance is: Where D ( P i , P j ) Indicates point P i and P j The Euclidean distance between
[0068] Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0;
[0069] Step S2013, obtaining the normal vector of the plane according to the plane equation (a, b, c ) .
[0070] In one embodiment of the present invention, the specific steps of step S202 include:
[0071] Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij ( x ij ,y ij , z ij ) are the coordinates of the neighboring points;
[0072] Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are:
[0073] Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix;
[0074] Step S2024, decompose the covariance matrix to obtain its eigenvalues and eigenvectors, and the calculation formula is: C*v=λ*v, where λ is the eigenvalue, and the eigenvalues λ in three orthogonal directions are calculated. 1 , 2 and λ 3 Indicates that v is the eigenvector;
[0075] Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: where λ 1 Indicates the minimum eigenvalue, the change in the corresponding direction is the smallest, indicating that the surface in this direction is the flattest, λ 1 +λ 2 +λ 3 It indicates the overall change and provides the scale of the entire local area. A smaller curvature value indicates that the point is located in a flat area, and a larger curvature value indicates that the area where the point is located is highly curved, and the area may have defects such as abnormal depressions or bulges.
[0076] In one embodiment of the present invention, the method for constructing the edge of the graph structure data includes:
[0077] Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points;
[0078] Building edges based on the similarity of node normal vectors. The specific operations are as follows: calculating the cosine similarity of the normal vectors of two nodes, setting a similarity threshold, and building edges between two nodes whose cosine similarity exceeds the threshold;
[0079] The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the three-dimensional point cloud data into several triangles so that the line between any two adjacent points will not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.
[0080] In one embodiment of the present invention, the defect detection model includes: a hidden layer and a classifier;
[0081] The input of the hidden layer is graph structure data, and the output is the updated features of the nodes;
[0082] The updated features of the nodes output by the hidden layer are input into the classifier, and the classification space of the classifier represents the probability value of defects occurring in each node of the graph structure data.
[0083] In one embodiment of the present invention, the calculation formula of the hidden layer includes:
[0084]
[0085] in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input graph structure data, the elements of the adjacency matrix represent the connection relationship between the nodes, and the element value is represented by 0 or 1, 0 means that there is no connection relationship between the nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is assigned to 1, and the remaining element values are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.
[0086] In one embodiment of the present invention, the three-dimensional point cloud data collected by using a three-dimensional scanning device is rotated and translated to enhance the data, a training data set for a defect detection model is constructed, and the three-dimensional point cloud data is annotated by manual annotation.
[0087] In one embodiment of the present invention, a weighted cross entropy loss function is used as the loss function of the defect detection model. The calculation formula of the weighted cross entropy loss function is:
[0088]
[0089] Where N represents the total number of samples, yi represents the true label of the i-th sample. The label can indicate whether there is a defect at this point. ( y i |x i) Indicates that the defect detection model predicts the label y for the i-th sample i The probability of It indicates that the weight for each label category can be set according to the frequency of samples appearing in the training set.
[0090] In one embodiment of the present invention, K-fold cross validation is used to evaluate the accuracy of the defect detection model, and the specific steps include:
[0091] Step S301, evenly divide the training data set into K subsets, each subset is equal in size;
[0092] Step S302, each time one subset is selected from the K subsets as a validation set, and the remaining K-1 subsets are used as training sets;
[0093] Step S303, repeat the above process K times, each time selecting a different subset as the validation set;
[0094] Step S304 , compare the defect probability prediction results of K times of verification with the manually labeled defect probability, and calculate the mean square error between the two to evaluate the accuracy of the model.
[0095] In one embodiment of the present invention, the learning rate and the number of convolutional layers of the defect detection model are optimized using a Bayesian optimization method, and the optimization steps include:
[0096] Step S401, randomly selecting J groups of parameter combinations consisting of learning rate and number of convolutional layers, training them to obtain accuracy, and constructing a Gaussian process model;
[0097] Step S402: using the expected improvement strategy, select the parameter combination that maximizes the expected improvement as the next set of parameter combinations. The formula for the expected improvement is: EL = E[max(f(x)-f(x max ), 0)], where EL represents the expected improvement, E[*] represents the mathematical expectation operator, f(x) represents the objective function, and refers to the accuracy of the validation set. max Indicates the current best parameter combination, max(f(x)-f(x max ), 0) indicates that the new parameter combination x is relative to the current best parameter combination x max If the new parameter combination has a higher accuracy, the improvement is f(x)-f(x max ), otherwise, the improvement is 0;
[0098] Step S403, training the model using the selected parameter combination with the maximum expected improvement;
[0099] Step S404, feeding back the newly obtained parameter combination and its accuracy to the updated Gaussian process model to update the model parameters;
[0100] Step S405, repeating steps S402 to S404 until a preset number of iterations is reached. Preferably, the preset number of iterations is set to 100.
[0101] In one embodiment of the present invention, the probability value of each node output by the defect detection model is divided into three different risk levels. For nodes with probability values between 0 and 0.3, they are defined as low risk levels, and their response measures are no special actions, only routine monitoring and data recording; for nodes with probability values between 0.3 and 0.7, they are defined as medium risk levels, and their response measures include additional monitoring and re-scanning to ensure the accuracy of the defect detection results; for nodes with probability values between 0.7 and 1, they are defined as high risk levels, and their response measures are to automatically trigger an alarm and record the location and characteristics of the abnormal nodes in detail so that engineers can conduct further detailed inspections and processing.
[0102] The above describes an embodiment of the present embodiment, but the present embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.
Claims
1. An online detection device for the surface quality of a building 3D printed part, characterized in that: include: A data acquisition module, which is used to collect three-dimensional point cloud data of a 3D printed part using a three-dimensional scanning device, wherein each point in the three-dimensional point cloud data represents a position on the 3D printed part, represented by coordinates (x, y, z); A data preprocessing module, which is used to preprocess the three-dimensional point cloud data to obtain a first feature sequence, wherein a sequence unit of the first feature sequence represents a first feature vector of a point in the three-dimensional point cloud data; A graph structure construction module, which is used to construct graph structure data according to the first feature sequence, the graph structure data including: nodes, initial features of nodes and edges, the nodes establish a mapping relationship with the points in the preprocessed three-dimensional point cloud data, the sequence units of the first feature sequence serve as the initial features of the nodes with which the mapping relationship is established, and the edges represent the relationship between the nodes; A defect detection module, which is used to build a defect detection model according to the graph structure data and output a probability value of a defect occurring at each node in the graph structure data; The response measure generation module is used to generate response measures according to the probability value of defects occurring at each node of the graph structure data.
2. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: The step of preprocessing the three-dimensional point cloud data includes: Step S201, calculating the normal vector of each point of the three-dimensional point cloud data by constructing a plane equation; Step S202, using eigenvalue decomposition technology to obtain the covariance matrix of the point neighborhood, and obtain the principal curvature through eigenvalue calculation of the matrix; Step S203, using a radius filtering algorithm to perform denoising on the three-dimensional point cloud data; Step S204: Process the three-dimensional point cloud data using voxel grid downsampling technology.
3. The online detection device for the surface quality of a building 3D printed part according to claim 2 is characterized in that: The specific steps of step S201 include: Step S2011, using a k-nearest neighbor algorithm and taking Euclidean distance as a metric to determine k nearest neighbor points of each point in the three-dimensional point cloud data; Step S2012, fitting the neighboring points obtained in step S2011 by the least square method to obtain a local plane, the plane equation is: ax+by+cz+d=0; Step S2013, obtaining the normal vector (a, b, c) of the plane according to the plane equation.
4. The online detection device for the surface quality of a building 3D printed part according to claim 2, characterized in that: The specific steps of step S202 include: Step S2021, calculate the average coordinates of neighboring points, the calculation formula is: Where P ij )x ij ,y ij , z ij ) are the coordinates of the neighboring points; Step S2022, calculating the offset of the neighboring point relative to the average coordinate according to the neighboring point coordinates, the calculation formula is: Where ΔP ij is the offset, and the average coordinates of the neighboring points are: Step S2023, constructing a covariance matrix according to the offset, the mathematical expression of which is: Where T is the transpose operation, and the covariance matrix C is a 3*3 symmetric matrix; Step S2024, decomposing the covariance matrix to obtain its eigenvalues and eigenvectors, the calculation formula is: C*v=λ*v, where λ is the eigenvalue, represented by the eigenvalues λ1, λ2 and λ3 in three orthogonal directions, and v is the eigenvector; Step S2025, calculating the curvature according to the characteristic value, the calculation formula is: Where λ1 represents the minimum eigenvalue and λ1+λ2+λ3 represents the overall variation.
5. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: The method for constructing the edge of the graph structure data includes: Construct edges based on distance thresholds. The specific operation is as follows: for each point, calculate all points whose distance to it is less than the set threshold, and establish edges between these points; The edges are constructed based on the similarity of the node normal vectors. The specific operation is as follows: the cosine similarity of the normal vectors of two nodes is calculated, a similarity threshold is set, and for two nodes whose cosine similarity exceeds the threshold, an edge is established between them; The edges are constructed based on the triangulation algorithm. The specific operation is as follows: the Delaunay triangulation algorithm is used to divide the three-dimensional point cloud data into several triangles so that the line between any two adjacent points will not pass through other points, and then the edges between the nodes are constructed based on the edges of the triangles.
6. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: The defect detection model includes: a hidden layer and a classifier; The input of the hidden layer is graph structure data, and the output is the updated features of the nodes; The updated features of the nodes output by the hidden layer are input into the classifier, and the classification space of the classifier represents the probability value of defects occurring in each node of the graph structure data.
7. The online detection device for the surface quality of a 3D printed building part according to claim 6, characterized in that: The calculation formula of the hidden layer includes: in represents the updated features of the node, H represents the initial features of the node, W represents the weight parameter of the node, represents the first adjacency matrix, A represents the adjacency matrix of the hidden layer input graph structure data, the elements of the adjacency matrix represent the connection relationship between the nodes, and the element value is represented by 0 or 1, 0 means that there is no connection relationship between the nodes, otherwise there is a connection relationship, I represents the unit matrix, the element value on the diagonal of the unit matrix is assigned to 1, and the remaining element values are assigned to 0, Represents the normalized degree matrix, the elements of the degree matrix represent the number of edge connections with the node, and ReLU represents the ReLU activation function.
8. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: The 3D point cloud data collected by the 3D scanning equipment is rotated and translated to enhance the data, a training data set for the defect detection model is constructed, and the 3D point cloud data is annotated by manual annotation.
9. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: The weighted cross entropy loss function is used as the loss function of the defect detection model. The calculation formula of the weighted cross entropy loss function is: Where N represents the total number of samples, y i represents the true label of the i-th sample, p(y i |x i Indicates that the defect detection model predicts the label y for the i-th sample i The probability of Represents the weight for each label category.
10. The online detection device for the surface quality of a building 3D printed part according to claim 1, characterized in that: K-fold cross validation is used to evaluate the accuracy of the defect detection model. The specific steps include: Step S301, evenly divide the training data set into K subsets, each subset is equal in size; Step S302, each time one subset is selected from the K subsets as a validation set, and the remaining K-1 subsets are used as training sets; Step S303, repeat the above process K times, each time selecting a different subset as the validation set; Step S304 , compare the defect probability prediction results of K times of verification with the manually labeled defect probability, and calculate the mean square error between the two to evaluate the accuracy of the model.
Citation Information
Cited By
Paper cup three-dimensional surface defect online detection method and system
CN121504848A