Workpiece machining quality detection method and system based on artificial intelligence

Through the workpiece processing quality inspection method based on artificial intelligence, using multi-angle images and three-dimensional voxel models, the problem of low manual inspection efficiency and difficulty in forming quantifiable quality standards is solved, and more efficient and accurate inspection results are achieved.

CN119338777AActive Publication Date: 2025-01-21LANWO (SHANGHAI) INTELLIGENT DIGITAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411418200.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-21
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

Manual inspection of workpiece processing quality efficiency is low, making it difficult to form quantifiable quality standards, making it difficult to compare and analyze the test results.

Method used

The workpiece processing quality inspection method based on artificial intelligence is used to obtain multi-angle images of the workpiece, establish a three-dimensional voxel model, obtain attribute information for Gaussian sputtering, divide the image, and calculate point cloud similarity to determine the qualification of the workpiece.

Benefits of technology

It significantly improves the detection speed and consistency, can effectively identify the defects of the workpiece, reduce the error of the detection results, and provide more accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338777A_ABST
    Figure CN119338777A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of artificial intelligence, and discloses a workpiece machining quality detection method based on artificial intelligence. The method comprises the following steps: acquiring workpiece images of at least two angles of a current workpiece, determining a camera pose and image depth information, and establishing a three-dimensional voxel model of the current workpiece; acquiring attribute information of the current workpiece, distributing the attribute information to each voxel of the three-dimensional voxel model, and performing Gaussian sputtering on each voxel; determining a mask of each workpiece image in the workpiece image set, and dividing the workpiece images into workpiece structure images and background images according to the masks; the workpiece point cloud of the current workpiece is determined, the similarity between the workpiece point cloud and a preset workpiece standard point cloud is calculated, and if the similarity exceeds a preset similarity threshold value, it is determined that the current workpiece is a qualified workpiece. The problems of low efficiency and poor precision of manual workpiece detection can be at least solved. And a quantifiable quality standard is lacked, so that a detection result is difficult to accurately compare and analyze.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a workpiece processing quality detection method and system based on artificial intelligence. Background Art

[0002] The quality of workpiece processing directly affects the final performance and service life of the product. Through testing, we can ensure that the size, shape, position accuracy and other parameters of the workpiece meet the design requirements and technical standards, thereby ensuring the overall quality of the product. Nowadays, staff manually conduct a comprehensive inspection of the workpiece, from appearance to size, to functional performance, strictly against the standards to ensure that every detail meets the quality requirements, thereby ensuring the overall quality of the product.

[0003] However, the inventors found that there are at least the following technical problems in the related art:

[0004] Manual inspection requires operators to check workpieces one by one, and complex or subtle defects may require longer observation and judgment, so the inspection efficiency is relatively low. In addition, manual inspection is usually difficult to form quantifiable quality standards, making it difficult to accurately compare and analyze the inspection results. Summary of the invention

[0005] One purpose of the present application is to provide a workpiece processing quality inspection method based on artificial intelligence, at least to solve the problem that manual inspection of whether a workpiece is qualified requires operators to check the workpieces one by one, and complex or subtle defects may require longer observation and judgment, so the inspection efficiency is relatively low. In addition, manual inspection is usually difficult to form quantifiable quality standards, making it difficult to accurately compare and analyze the inspection results.

[0006] To achieve the above objectives, some embodiments of the present application provide the following aspects:

[0007] In a first aspect, some embodiments of the present application further provide a workpiece processing quality detection method based on artificial intelligence, the method comprising:

[0008] Acquire workpiece images of the current workpiece at at least two angles, generate a workpiece image set according to the workpiece images, and determine the camera pose and image depth information according to the workpiece image set;

[0009] Establishing a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information;

[0010] Obtain the attribute information of the current workpiece, assign the attribute information to each voxel of the three-dimensional voxel model, and perform Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function; wherein the attribute information includes density, color and transparency;

[0011] Determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and divide the workpiece image into a workpiece structure image and a background image according to the mask;

[0012] The workpiece point cloud of the current workpiece is determined according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and the similarity between the workpiece point cloud and the preset workpiece standard point cloud is calculated. If the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece.

[0013] According to a second aspect of the present application, there is provided a workpiece processing quality detection system based on artificial intelligence, the system comprising:

[0014] An image acquisition module, used to obtain workpiece images of the current workpiece at at least two angles, generate a workpiece image set according to the workpiece images, and determine the camera posture and image depth information according to the workpiece image set;

[0015] A model building module, used to build a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information;

[0016] The Gaussian sputtering module is used to obtain the attribute information of the current workpiece, distribute the attribute information to each voxel of the three-dimensional voxel model, and perform Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function; wherein the attribute information includes density, color and transparency;

[0017] A mask determination module, used to determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and divide the workpiece image into a workpiece structure image and a background image according to the mask;

[0018] The workpiece detection module is used to determine the workpiece point cloud of the current workpiece based on the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and calculate the similarity between the workpiece point cloud and the preset workpiece standard point cloud. If the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece.

[0019] Compared with the related art, in the solution provided by the embodiment of the present application, workpiece images of at least two angles of the current workpiece are obtained, a workpiece image set is generated according to the workpiece images, and a camera pose and image depth information are determined according to the workpiece image set; a three-dimensional voxel model of the current workpiece is established according to the workpiece image set, the camera pose and the image depth information; the attribute information of the current workpiece is obtained, the attribute information is assigned to each voxel of the three-dimensional voxel model, and Gaussian sputtering is performed on each voxel according to the attribute information of each voxel, the camera pose and a preset Gaussian function; wherein the attribute information includes density, color and transparency; the mask of each workpiece image in the workpiece image set is determined according to a preset mask extraction model, and the workpiece image is divided into a workpiece structure image and a background image according to the mask; the workpiece point cloud of the current workpiece is determined according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and the similarity between the workpiece point cloud and the preset workpiece standard point cloud is calculated, and if the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece. Through the above-mentioned AI-based workpiece processing quality inspection method, the automated process can significantly reduce manual intervention and improve the speed and consistency of inspection. By comparing the similarity of point clouds, defects in workpieces can be effectively identified and the error of inspection results can be reduced. Combining image depth information, camera pose and voxel model, the system can comprehensively consider information from different data sources to provide more accurate inspection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0021] Figure 1 is an exemplary flow chart of a workpiece processing quality detection method based on artificial intelligence provided in Example 1 of the present application;

[0022] Figure 2 is an exemplary flow chart of a workpiece processing quality detection method based on artificial intelligence provided in Embodiment 2 of the present application;

[0023] Figure 3 is an exemplary flow chart of a workpiece processing quality detection method based on artificial intelligence provided in Embodiment 3 of the present application;

[0024] Figure 4 This is an exemplary structural diagram of an artificial intelligence-based workpiece processing quality inspection system provided in Example 4 of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] First embodiment

[0027] The first embodiment of the present application relates to a workpiece processing quality detection method based on artificial intelligence. Figure 1 As shown, the method may include the following steps:

[0028] S101, obtaining workpiece images of a current workpiece at at least two angles, generating a workpiece image set according to the workpiece images, and determining a camera pose and image depth information according to the workpiece image set.

[0029] First, the application scenario of this solution can be to obtain a workpiece image and establish a three-dimensional voxel model of the workpiece, and then determine the workpiece point cloud, and determine whether the workpiece is qualified by comparing the workpiece point cloud with a standard workpiece point cloud.

[0030] Based on the above usage scenarios, it can be understood that the executor of the present application can be an artificial intelligence-based workpiece processing quality inspection system, and no excessive limitations are made here.

[0031] In this solution, the current workpiece can refer to an object or part being inspected and processed. It refers to a specific workpiece that is in the inspection, analysis or processing stage on a production line or in a detection system.

[0032] Workpiece images can refer to two-dimensional pictures of the current workpiece taken from different angles. Each image captures a certain perspective of the workpiece and shows part or all of the surface features of the workpiece.

[0033] The workpiece image set can be a set of multiple workpiece images, which can be taken from different angles to ensure that the three-dimensional structure information of the workpiece is fully captured.

[0034] The camera pose can be the specific position and direction of the camera when taking each workpiece image. It includes the spatial position (i.e., three-dimensional coordinates) and orientation (i.e., rotation angle) of the camera.

[0035] Image depth information refers to the distance information from each pixel to the camera in the image. Depth information transforms the image from two-dimensional to three-dimensional data with spatial distance.

[0036] After the current workpiece enters the detection area and triggers the grating, the rotating platform starts to rotate at a constant speed, and the workpiece is photographed by a high-resolution camera from multiple angles during the rotation. The camera uses advanced optical technology to ensure that clear images can be obtained even at high-speed rotation. These images include at least two different angles of the workpiece. The multi-angle images taken by the camera will be saved to form an image set containing multiple workpiece views. This image set contains images of the workpiece taken from different angles to ensure that all-round information of the workpiece is covered. The generated workpiece image set can then be imported into the COLMAP software. COLMAP is a powerful computer vision tool that can obtain 3D reconstruction information by processing multi-view images. COLMAP first extracts features from the images in the image set and matches feature points in different images. Through these matched feature points, COLMAP calculates the pose information (including position and orientation) of the camera when taking each image. COLMAP further analyzes the geometric relationship of each image and generates the corresponding image depth information in combination with the camera pose. The depth information represents the distance from each pixel in the image to the camera, thereby helping to build a 3D model of the workpiece. After COLMAP completes the calculation, it outputs the camera pose information of each image (including the camera's external parameters, such as position and orientation) and the corresponding image depth information.

[0037] S102: Establish a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information.

[0038] A 3D voxel model can refer to a representation of the 3D structure of an object by dividing its space into uniform small cubes called voxels. Each voxel represents a volume unit in space and has specific properties such as density, color, transparency, etc. A 3D voxel model is a discrete representation of an object in 3D space, similar to a pixel in a 2D image, but it has depth information in 3D space.

[0039] For the depth map of each image, each pixel (and its depth value) in the depth map can be projected into 3D space using the camera intrinsic parameters (focal length, optical center, etc.) and the camera pose to form a point in a point cloud, where each point is represented by its X, Y, and Z coordinates in 3D space. The point clouds generated by all images are merged into a global coordinate system. This involves transforming each point cloud from its respective camera coordinate system to the global coordinate system based on the camera pose. Statistical filters (such as radius filters and voxel grid filters) are then used to remove noise and outliers from the point cloud. The radius filter removes noise by removing points with too few points within a certain radius around each point. The voxel grid filter reduces the size and noise of the point cloud by dividing the point cloud into small 3D voxels (voxel grid) and approximating all the points in each voxel with the centroid of all the points in the voxel. A surface reconstruction algorithm (such as Poisson surface reconstruction, moving least squares method, ball rotation algorithm, etc.) is then used to generate a 3D surface model of the workpiece from the processed point cloud. These algorithms estimate the geometry of the workpiece surface based on the points in the point cloud and their neighborhood relationships. Then select a suitable voxel size (i.e. the size of the three-dimensional space represented by each voxel) and define a voxel grid containing the workpiece according to the size of the workpiece. Traverse each point (or face) on the three-dimensional surface model and check whether they intersect with the voxels in the voxel grid. If they intersect, the voxel is marked as occupied (or more complex interpolation processing is performed as needed). Finally, the voxel model is optimized, such as removing isolated voxels, merging adjacent occupied voxels, etc., to improve the accuracy of the model.

[0040] S103, acquiring the attribute information of the current workpiece, assigning the attribute information to each voxel of the three-dimensional voxel model, and performing Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and a preset Gaussian function; wherein the attribute information includes density, color and transparency.

[0041] Attribute information can be the physical and visual characteristics of the artifact, such as density, color, transparency, etc.

[0042] Density can be used to describe the compactness of a material in a voxel, which is usually related to the material and structure of the workpiece. It can be obtained from known properties of the material or inferred from scan data.

[0043] Color can be a color attribute representing a voxel, which is usually extracted from the color information of the image.

[0044] Transparency can be a measure of the ability of light to penetrate a voxel. Transparency can be based on material properties or obtained through measurement tools such as optical sensors.

[0045] The preset Gaussian function may be a probability density function, which is usually used to represent the scattering of light in space. The preset Gaussian function is used to simulate the interaction between light and voxels.

[0046] The properties can be read from the CAD model or design file of the workpiece. Since the voxel model has been generated by point cloud data, it represents the position and structure of the workpiece in three-dimensional space. Each voxel can be associated with a corresponding attribute value (such as density, color, transparency). Specifically, color information can be extracted from images taken from multiple angles and mapped to voxels according to the camera pose. Density can be assigned to the corresponding voxels based on the material of the workpiece or density information obtained through technologies such as CT scanning. Transparency can assign transparency information to each voxel based on material properties or optical measurement results. For example: if a part of the workpiece is red, the voxel at the corresponding position will be assigned a red attribute. According to the density distribution of the material, the density value is assigned to the voxel. Then, according to the attribute information of each voxel (such as density, color, transparency), the value of the Gaussian function is calculated. When light passes through the voxel space, it interacts with the voxel attributes. The propagation of light is affected by the density and transparency of the voxel. According to the value of the Gaussian function, the influence of light in the camera's view is splashed to the surrounding area of ​​the voxel. The range and intensity of the splashing are determined by the attribute information of the voxel and the parameters of the Gaussian function. The Gaussian distributions of different voxels are accumulated during the rendering process, eventually forming a three-dimensional voxel model that simulates the light propagation and scattering effects.

[0047] Based on the above technical solution, optionally, the preset Gaussian function is:

[0048]

[0049] Among them, G(x, D, C, T) is the voxel contribution value; x is the distance variable, which indicates the distance between the voxel center and the camera; D is the voxel density, that is, the material concentration of the voxel in three-dimensional space; C is the voxel color, which can represent color intensity or color information; T is the voxel transparency, that is, the transparency of the voxel; σ is the standard deviation of the Gaussian function, which determines the degree of sputtering diffusion; W D is the voxel density weight, which reflects the influence of the voxel density on the Gaussian function; W C is the voxel color weight, reflecting the influence of voxel color on the Gaussian function; W T is the voxel transparency weight, which reflects the influence of voxel transparency on the Gaussian function; The degree of influence of voxels on light is calculated; is the normalization factor of the Gaussian function, ensuring that the integral of the entire function is 1.

[0050] In this scheme, for each voxel, the straight-line distance x from its center point to the camera (or viewpoint) can be calculated. This can be done using the distance formula in a three-dimensional coordinate system. Substituting the distance x into The influence of the voxel on the light is calculated based on the distance between the voxel center and the camera. Then the voxel contribution value of each voxel is calculated by combining the density, color and transparency weights of the voxel, as well as the normalization factor, and the voxel contribution value is applied to the path of light propagation. This means that during the rendering process, the influence of the voxel will simulate the scattering of light in the voxel space according to the Gaussian distribution. The voxel contribution value is superimposed on the propagation path of the light through the weighted effect of the Gaussian function to form the final rendered 3D voxel model.

[0051] On the basis of the above technical solution, optionally, before Gaussian sputtering is performed on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function, the method further includes:

[0052] Obtaining a preset weight distribution rule, an initial Gaussian function standard deviation, and a preset standard deviation update formula;

[0053] Accordingly, Gaussian sputtering is performed on each voxel according to the attribute information of each voxel, the camera position and the preset Gaussian function, including:

[0054] According to the preset weight distribution rule and the attribute information of each voxel, the voxel density weight value, the voxel color weight value and the voxel transparency weight value of each voxel in the preset Gaussian function are determined;

[0055] Update the Gaussian function standard deviation according to the voxel density weight value, the initial Gaussian function standard deviation and the preset standard deviation update formula;

[0056] Get the center point position of each voxel, and determine the distance variable value of each voxel according to the center point position of each voxel and the camera posture;

[0057] Gaussian sputtering is performed on each voxel according to the voxel density weight value, voxel color weight value, voxel transparency weight value, updated Gaussian function standard deviation, distance variable value and preset Gaussian function.

[0058] In this solution, the preset weight distribution rules can be used to distribute the weights of voxel attributes (such as density, color, transparency). Usually these rules are determined through experiments or standardization processes to ensure that the effects of different attributes on Gaussian sputtering are as expected. Specifically, they can include: the calculation method of voxel density weight: such as linear scaling of voxel density values, the higher the density, the greater the weight, which can be calculated by the following formula:

[0059] W D =Density×Scale D ;

[0060] Density is the voxel density value, which can be confirmed from the attribute information; Scale DIt is the adjustment factor of voxel density, which is used to control the influence of density on weight.

[0061] Calculation method of voxel color weight: If the color value is mapped to the weight range, it can be calculated by the following formula:

[0062]

[0063] Among them, R, G, and B are the intensity values ​​of the red, green, and blue channels, respectively, which can be obtained from the attribute information; Scale C is the adjustment factor of voxel color;

[0064] The calculation method of voxel transparency weight: For example, the normalization of transparency value can be calculated by the following formula:

[0065]

[0066] Transparency is the voxel transparency value, which can be obtained from the attribute information; ∈ is a constant to prevent division by zero.

[0067] The initial Gaussian function standard deviation can be the initial setting value of the Gaussian function, which determines the diffusion range of the Gaussian function. It can be determined by experiment, usually a fixed value or an initial estimate based on the characteristics of the voxel. For example, the standard deviation can be set to 5, 10, etc., depending on application requirements and voxel characteristics.

[0068] The preset standard deviation update formula can be:

[0069]

[0070] Among them, σ is the standard deviation of the updated Gaussian function; σ0 is the standard deviation of the initial Gaussian function; W D is the voxel density weight value. The higher the density, the smaller the standard deviation and the narrower the function.

[0071] According to the preset weight distribution rules and the attribute information of each voxel, the specific voxel density weight value, voxel color weight value and voxel transparency weight value of each voxel in the preset Gaussian function can be calculated. Then the initial Gaussian function standard deviation is obtained from the database, combined with the voxel density weight value, and the preset standard deviation update formula is applied to calculate the updated Gaussian function standard deviation. Then the center point position of each voxel is obtained, and the distance x between the voxel center point and the camera is determined according to the camera posture. Finally, Gaussian sputtering is performed according to the updated standard deviation, voxel attribute weight, distance variable value and preset Gaussian function, that is, the contribution value of the voxel to the light is calculated, and this contribution value is applied to the light propagation path, and the influence of the voxel is superimposed on the final rendered three-dimensional voxel model through Gaussian distribution.

[0072] In this scheme, it is ensured that the Gaussian sputtering process can accurately reflect the attribute information of the voxel, and simulate the scattering and absorption of light in the rendering to generate a realistic three-dimensional voxel model after three-dimensional rendering.

[0073] S104, determining a mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and dividing the workpiece image into a workpiece structure image and a background image according to the mask.

[0074] The preset mask extraction model can be a trained deep learning model for automatically extracting the mask of the region of interest from the image. Specifically, it can be trained using a convolutional neural network or other image segmentation algorithms, and can identify the artifact part in the image and distinguish it from the background.

[0075] The mask can be a binary image, where the area with pixel value 1 represents the artifact part of interest, and the area with pixel value 0 represents the background part. The mask image is used to separate the artifact from the image so that subsequent analysis and processing can only focus on the artifact part.

[0076] The artifact structure image can be an image that contains only the artifact part, and the background has been removed. By applying a mask, the background pixels in the original image are shielded or removed, leaving only the artifact's structural information, such as shape, color, and texture.

[0077] The background image can be an image containing only the background part, which is obtained by removing the workpiece part through a mask. The background image is usually used to analyze the background lighting conditions, noise level, etc.

[0078] Each image in the artifact image set can be processed using a preset mask extraction model. The model automatically identifies the artifact area and generates a corresponding mask image. Each image will generate a corresponding mask that separates the artifact from the background. The generated mask is then multiplied pixel by pixel with the original image to obtain the artifact structure image and the background image. The artifact area in the mask will be retained, and the background area will be shielded (the pixel value is set to 0 or transparent). The obtained artifact structure image and background image are used for subsequent artifact analysis and background noise processing, respectively.

[0079] S105, determining a workpiece point cloud of the current workpiece according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, calculating the similarity between the workpiece point cloud and a preset workpiece standard point cloud, and determining that the current workpiece is a qualified workpiece if the similarity exceeds a preset similarity threshold.

[0080] Workpiece point cloud can refer to a three-dimensional data structure composed of a large number of point sets. Each point has its specific coordinates (x, y, z) in three-dimensional space, which can be used to represent the surface shape and structure of the object. Workpiece point cloud can represent the collection of all points on the workpiece surface.

[0081] The preset workpiece standard point cloud can be a pre-generated point cloud model of a standard workpiece, which represents the shape and structure of the workpiece under ideal conditions. It is used to compare with the detected workpiece point cloud to evaluate the quality of the current workpiece.

[0082] Similarity can be a numerical value that measures the degree of similarity between two point clouds. Commonly used methods may include methods based on statistical discrete metrics, such as structural similarity score, mean absolute deviation (μADA), median absolute deviation (mADA), etc. These methods can be used to evaluate the similarity of two point clouds in terms of geometric morphology and surface features.

[0083] The preset similarity threshold can be a pre-set value used to determine whether the similarity between the workpiece point cloud and the standard point cloud is high enough. If the similarity exceeds this threshold, it is considered that the quality of the current workpiece meets the requirements, that is, it is a qualified workpiece; otherwise, it is an unqualified workpiece.

[0084] For each voxel, its coordinates in three-dimensional space can be determined. After Gaussian sputtering, the attributes of the voxels have been weighted and diffused, but their position coordinates remain unchanged. Then, the center point coordinates of valid voxels (i.e., those with non-zero attributes) are extracted from the three-dimensional voxel model. These coordinates form the point cloud of the workpiece. Specifically, all voxels in the three-dimensional voxel model can be traversed, and for each valid voxel (voxel with non-zero density or other attributes), the three-dimensional coordinates of its center point are recorded. These coordinate points are collected to form the point cloud data of the workpiece. Then, the information in the workpiece structure image of the workpiece image (such as contours, surface features) is used to further correct and improve the point cloud data. Specifically, the point cloud in the voxel model can be compared with the edges and features in the workpiece structure image to ensure that the point cloud data accurately reflects the actual shape of the workpiece. The image is segmented and edge detected, and important feature points in the image are extracted, and these feature points are mapped to the point cloud to increase the detailed information of the point cloud. Then, the standard point cloud model corresponding to the current workpiece type is called from the database. This model is generated in the production process design stage and represents the three-dimensional shape of the workpiece in an ideal state. Preprocess the two point clouds to ensure the accuracy of the comparison. Duplicate points can be eliminated by point fusion, and surface properties such as normals and curvature can be estimated. Using k-nearest neighbor or range search, local regions are formed around each point of the point cloud and statistical features are calculated. Use a variety of statistical discrete measurement methods, such as median (mA), variance (σ^2A), mean absolute deviation (μADA), etc. to compare the local region features between the workpiece point cloud and the standard point cloud. The structural similarity score between the point clouds is calculated based on the relative difference of these feature values. The calculated similarity score is compared with the preset similarity threshold. If the similarity exceeds the threshold, the current workpiece is determined to be a qualified workpiece; otherwise, it is an unqualified workpiece.

[0085] It is not difficult to find that, compared with the related art, in the solution provided in the embodiment of the present application, workpiece images of at least two angles of the current workpiece are obtained, a workpiece image set is generated according to the workpiece image, and the camera pose and image depth information are determined according to the workpiece image set; a three-dimensional voxel model of the current workpiece is established according to the workpiece image set, the camera pose and the image depth information; the attribute information of the current workpiece is obtained, the attribute information is assigned to each voxel of the three-dimensional voxel model, and Gaussian sputtering is performed on each voxel according to the attribute information of each voxel, the camera pose and a preset Gaussian function; wherein the attribute information includes density, color and transparency; the mask of each workpiece image in the workpiece image set is determined according to a preset mask extraction model, and the workpiece image is divided into a workpiece structure image and a background image according to the mask; the workpiece point cloud of the current workpiece is determined according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and the similarity between the workpiece point cloud and the preset workpiece standard point cloud is calculated, and if the similarity exceeds the preset similarity threshold, the current workpiece is determined to be a qualified workpiece. Through the above-mentioned AI-based workpiece processing quality inspection method, the automated process can significantly reduce manual intervention and improve the speed and consistency of inspection. By comparing the similarity of point clouds, defects in workpieces can be effectively identified and the error of inspection results can be reduced. Combining image depth information, camera pose and voxel model, the system can comprehensively consider information from different data sources to provide more accurate inspection results.

[0086] Second embodiment

[0087] The second embodiment of the present application relates to a workpiece processing quality detection method based on artificial intelligence. The second embodiment is an improvement on the first embodiment. The second embodiment is substantially the same as the first embodiment, and the main difference is that it specifically includes the following steps:

[0088] S201, obtaining workpiece images of a current workpiece at at least two angles, generating a workpiece image set according to the workpiece images, and determining a camera pose and image depth information according to the workpiece image set.

[0089] S202: Establish a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information.

[0090] S203, acquiring the attribute information of the current workpiece, assigning the attribute information to each voxel of the three-dimensional voxel model, and performing Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and a preset Gaussian function; wherein the attribute information includes density, color and transparency.

[0091] S204, determining a mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and dividing the workpiece image into a workpiece structure image and a background image according to the mask.

[0092] S205, determining a workpiece point cloud of the current workpiece according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, calculating the similarity between the workpiece point cloud and a preset workpiece standard point cloud, and determining that the current workpiece is an unqualified workpiece if the similarity does not exceed a preset similarity threshold.

[0093] S206, inputting the workpiece point cloud and the preset workpiece standard point cloud into a preset defect detection model, determining the defect type and repair method of the current workpiece, and sending the defect type and repair method to the staff's handheld terminal.

[0094] In this solution, the preset defect detection model can be a trained machine learning model for identifying defects in workpieces and suggesting corresponding repair methods. The model is trained based on point cloud data of historical unqualified workpieces and standard point cloud data.

[0095] Defect types can be a classification of problems that may occur during the production, processing or use of a workpiece. Specifically, they can include: Surface defects: Scratches: There are obvious scratches or dents on the surface. Cracks: There are tiny cracks on the surface or inside the material. Bubbles: There are bubbles inside or on the surface of the material. Deformation: The shape of the workpiece deviates from the design specifications, such as bending or twisting.

[0096] Dimensional deviation: Too large or too small: The size of the workpiece exceeds or does not meet the design specifications. Uneven: The sizes of different parts are inconsistent.

[0097] Material defects:

[0098] Impurities: Impurities or foreign matter that should not be in the material. Uneven hardness: The hardness of the workpiece is unevenly distributed, resulting in some parts being too hard or too soft.

[0099] Assembly defects: Misalignment: Components are not properly aligned or assembled with each other. Looseness: Fasteners are not firmly fixed, causing parts to loosen.

[0100] Coating problems: Peeling: The coating is peeling or peeling off. Uneven color: The coating color is unevenly distributed.

[0101] The repair method can be a repair or remedial measure provided for the detected defects to make the workpiece meet the design or use standards. Specifically, it can include: Grinding and polishing: Grinding the surface scratches, cracks, etc., and then polishing to restore the flatness and finish.

[0102] Welding repair: Welding repairs to cracked or broken parts, followed by grinding and heat treatment.

[0103] Dimension adjustment: For dimensional deviation, the dimensions are corrected through mechanical processing (such as turning, grinding).

[0104] Heat Treatment: Adjusting the hardness of a material or removing internal stresses by heating or cooling.

[0105] Recoating: Removal of problematic coatings and re-application to meet standard requirements.

[0106] Replacement Parts: If the defect cannot be repaired, you may consider replacing the problematic component.

[0107] Reassembly: For assembly defects, realignment and fixing are performed to ensure correct assembly.

[0108] The handheld terminal can be a device carried by the worker (such as a smartphone or a dedicated industrial handheld device) to receive information about the defect type and repair method of the workpiece. The device can be connected to the company's internal network or cloud system to receive and process feedback from the defect detection model.

[0109] If the similarity between the point cloud of the current workpiece and the standard point cloud is detected to be less than the preset threshold, the workpiece is considered unqualified. The point cloud data of the unqualified workpiece and the standard point cloud data are input into the preset defect detection model. The model analyzes the point cloud data and identifies the defect type of the workpiece. The model generates the corresponding repair method based on the identified defect type. This information (defect type and repair method) is then sent to the staff's handheld terminal via wireless communication technology to help them make quick decisions. For example, if the similarity does not meet the requirements, the system inputs the point cloud data of the current workpiece and the standard point cloud data into the preset defect detection model. The model analyzes the local differences of these point cloud data, and combined with the pre-annotated defect type and repair method labels, draws the following conclusions:

[0110] Defect type: There is a surface scratch on the upper surface of the workpiece near the right edge

[0111] Based on the output of the defect detection model, grinding and polishing are recommended to repair the surface scratch. The model can also recommend specific grinding tools and process parameters such as abrasive size and polishing time based on the depth and length of the scratch.

[0112] It is not difficult to find that in the embodiment of the present application, the model automatically identifies the surface scratch defects of the workpiece by comparing the point cloud data with the standard point cloud, and provides a specific repair method, thereby improving the efficiency and accuracy of quality inspection and reducing the errors of manual judgment.

[0113] Based on the above technical solution, optionally, after sending the defect type and the repair method to the handheld terminal of the staff, the method further includes:

[0114] Acquire the number of unqualified workpieces in real time, and if the number of workpieces exceeds a preset unqualified workpiece threshold, acquire the workpiece image, structural parameters, attribute information, and current production parameters of each unqualified workpiece;

[0115] Inputting the workpiece image, structural parameters, attribute information and current production parameters of each unqualified workpiece into a preset production parameter optimization model to determine production parameter adjustment information;

[0116] Update current production parameters according to production parameter adjustment information.

[0117] In this solution, the number of workpieces can be the number of workpieces detected and determined to be unqualified on the production line. The system counts the number of these unqualified workpieces in real time and compares it with a preset threshold.

[0118] Structural parameters can be the geometric and physical structure information of the workpiece, such as size, shape, surface roughness, pore size, wall thickness, etc. These parameters directly affect the manufacturing accuracy and final quality of the workpiece.

[0119] The current production parameters may be various control parameters in the current production process, such as temperature, pressure, feed speed, tool speed, material ratio, etc. The setting of these parameters will affect the final quality and performance of the workpiece.

[0120] The preset production parameter optimization model can be a model trained by machine learning, which is used to predict and optimize production parameters based on the images, structural parameters, attribute information of unqualified workpieces, and actual parameters in the production process. By learning the characteristics of unqualified workpieces in historical data and their corresponding production parameters, the model can automatically generate new production parameter adjustment suggestions to reduce or avoid the production of unqualified workpieces.

[0121] The production parameter adjustment information can be the recommended information output by the model, including the adjustment suggestions for the current production parameters. For example, the model may recommend lowering the temperature, adjusting the feed speed, or changing the ratio of certain materials to improve the product quality.

[0122] The number of unqualified workpieces detected on the production line can be recorded in real time through sensors and detection devices. Whenever a workpiece is marked as unqualified, the system will update the current number of unqualified workpieces. If the number of unqualified workpieces exceeds the preset threshold, the system will collect detailed data of each unqualified workpiece, including workpiece images, structural parameters, attribute information, and the current production parameters of the production line. The collection of these data can be achieved through automated detection and sensor networks to ensure the real-time and accuracy of the data. The system inputs the collected data of unqualified workpieces into the preset production parameter optimization model. The model is trained based on historical data and can identify factors that may cause unqualified products under current production conditions. The model generates production parameter adjustment information by analyzing the input workpiece images, structural parameters, attribute information and production parameters. The model then outputs a set of new production parameter recommendations, which are designed to optimize the production process and reduce the generation of unqualified workpieces. The production parameter adjustment information can include adjusting temperature, speed, pressure, material ratio, etc. to ensure that the produced workpieces meet quality standards. Finally, the system automatically updates the current production parameters of the production line based on the production parameter adjustment information provided by the model. Specifically, it can be automatically executed by the control system or manually confirmed and implemented by the operator. For example, a workpiece on a production line has surface defects due to overheating. After detecting more than a certain number of unqualified workpieces, the system collects information such as images, dimensional data, and current production temperature of the relevant workpieces. After analysis by the preset production parameter optimization model, it is recommended to reduce the furnace temperature by 5 degrees Celsius and slow down the feed speed. The system automatically adjusts the production parameters based on these suggestions, and then continues to monitor the quality of the workpiece to ensure that the problem is resolved.

[0123] In this solution, real-time detection and response to the occurrence of unqualified workpieces and timely adjustment of production parameters can avoid the large-scale generation of unqualified workpieces, thereby reducing the scrap rate and improving production efficiency.

[0124] Based on the above technical solution, an optional, preset defect detection model training process includes:

[0125] Acquire defect point clouds and standard point clouds of historical unqualified workpieces, annotate defect type labels and repair method labels of the defect point clouds, and create a second data set based on the defect point clouds, standard point clouds, defect type labels, and repair method labels;

[0126] A defect detection model is constructed, and the defect detection model is trained according to the second data set until the defect detection model reaches a preset defect detection model training standard.

[0127] In this solution, the defect point cloud of the historical unqualified workpiece can be the point cloud data of the historical unqualified workpiece obtained by 3D scanning or other measurement technology, which represents the three-dimensional structure of the surface or interior of the workpiece, including the defect area. Each point cloud point usually contains position information (x, y, z) and other attributes (such as color, density, etc.).

[0128] The standard point cloud of a historical unqualified workpiece can be the point cloud data of the same workpiece in an ideal state, usually generated by a design model or a qualified workpiece that has passed quality inspection. The standard point cloud is used as a benchmark for comparison to measure the degree of defects of the unqualified workpiece.

[0129] Defect type labels can be labels for classifying each defect area in the defect point cloud. Each label represents a specific defect type, such as cracks, pores, deformation, etc. These labels need to be annotated by professionals or automatic annotation tools based on the characteristics of the defects.

[0130] The repair method label can be a repair strategy label corresponding to the defect type label. Each defect type has a corresponding repair method, such as welding repair, surface grinding, supplementary materials, etc. The repair method label is used to guide the repair operation of unqualified workpieces during production or maintenance.

[0131] The second data set can be composed of four parts: defect point cloud, standard point cloud, defect type label, and repair method label. It is the basic data for defect detection model training, which contains the defect information of the workpiece and its corresponding repair strategy. Each sample in the data set corresponds to one or more defects and their repair methods.

[0132] The preset defect detection model training standard can be the target standard set during the training process, which can include evaluation indicators such as accuracy, recall, precision, F1-score, etc. These standards are used to measure the performance of the model to ensure that the model achieves the expected effect in defect detection and repair suggestions.

[0133] Point cloud data of historical unqualified workpieces can be collected to ensure the accuracy and integrity of the point cloud data, and standard point cloud data can be obtained from the design model or qualified workpieces. Then the point cloud of the historical unqualified workpiece is annotated with the defect type, and each defect area is marked and attached with the corresponding defect type label. According to the defect type, the corresponding repair method label is assigned to each defect point cloud area. The defect point cloud, standard point cloud, defect type label, and repair method label are integrated to create a second data set, clean and normalize the data, and ensure the consistency and accuracy of the training data. Then use deep learning or machine learning methods to build a defect detection model. The model input is the defect point cloud and the standard point cloud, and the output is the defect type and the corresponding repair method. The second data set is input into the model for iterative training, and the model parameters are adjusted to improve performance. The model is evaluated using the preset defect detection model training standard. Based on the performance of the model on the validation set, decide whether to continue training or adjust the model structure. If the standard is met, stop training.

[0134] In this solution, the preset defect detection model can accurately identify the defect types in the workpiece and provide repair suggestions, thereby improving production quality and efficiency.

[0135] Based on the above technical solution, the optional training process of the preset production parameter optimization model includes:

[0136] Acquire historical unqualified workpiece images, annotate the historical unqualified workpiece images with structural parameter labels, attribute information labels, and production parameter labels, and create a third data set based on the historical unqualified workpiece images, the structural parameter labels, the attribute information labels, and the production parameter labels;

[0137] A production parameter optimization model is constructed, and the production parameter optimization model is trained according to the third data set until the production parameter optimization model reaches a preset production parameter optimization model training standard.

[0138] In this solution, historical unqualified workpiece images can refer to images of unqualified workpieces taken by visual inspection systems, industrial cameras, or other imaging devices during the production process. These images record the appearance, surface defects, shape anomalies, etc. of the workpieces for subsequent analysis and model training.

[0139] Structural parameter tags can describe the workpiece's geometric shape, size, morphological characteristics and other structural information. For example, the workpiece's length, width, height, angle, curvature, etc. Structural parameter tags help understand the shape changes of the workpiece during the manufacturing process and their association with non-conforming conditions.

[0140] Attribute information tags can include physical or chemical characteristics such as material properties, color, surface smoothness, hardness, etc. For example, a workpiece may have a specific material composition, color uniformity, or a specific surface roughness level. These attribute information tags help identify the physical characteristics of the workpiece and the relationship between these characteristics and non-conformance.

[0141] The production parameter label can record the process parameters of the workpiece during the production process. For example, the temperature, pressure, processing speed, tool wear status, etc. These parameters are directly related to the production equipment and process, and can help analyze which production parameters may cause the workpiece to fail.

[0142] The third data set can be a comprehensive data set formed by combining the historical unqualified workpiece images with the corresponding structural parameter labels, attribute information labels and production parameter labels. This data set is used to train the production parameter optimization model, in which each data point (sample) contains the image and its related label information. The third data set reflects the performance of different workpieces under different production conditions and is the basis for training the production parameter optimization model.

[0143] The preset production parameter optimization model training standards include the performance indicators that the model needs to achieve during the training and verification stages. Specifically, they may include: Accuracy: the proportion of production parameter adjustment recommendations that the model correctly predicts.

[0144] Loss function value (Loss): The loss function value of the model during training should be lower than a certain set threshold.

[0145] Model convergence: The model converges to stable performance within several training cycles and no longer exhibits significant performance fluctuations.

[0146] Validation set performance: The performance of the model on the validation set should meet specific requirements, such as accuracy, recall and other indicators meet expectations.

[0147] Image data of historical unqualified workpieces can be extracted from the production line or inspection system. Based on the image or CAD model, experts or automated tools annotate the geometric structure parameters of the workpiece, such as size and shape. Annotate physical property information based on the material, surface features, etc. of the workpiece. Collect relevant process parameters of the workpiece during the production process, match them with the corresponding image, and annotate them. Integrate the image data with various types of label data to form a third data set. Process missing values ​​and outliers in the data set, standardize the data format, and perform data standardization or normalization. Then use neural networks, decision trees, random forests and other algorithms to build a production parameter optimization model. The model input is image and label data, and the output is optimized production parameter recommendations. Use the third data set to train the model, adjust the model parameters, and improve the model performance. Use the validation set to evaluate the model performance and check whether the preset training standards are met. If the standards are met, the trained and qualified model is deployed to the production system to analyze new data in real time and provide production parameter adjustment recommendations.

[0148] In this solution, the production parameter optimization model can effectively identify and analyze the production parameters that lead to unqualified workpieces and provide optimization suggestions, thereby improving the overall efficiency of the production line and product quality.

[0149] Third embodiment

[0150] The third embodiment of the present application relates to a workpiece processing quality detection method based on artificial intelligence. The third implementation method is an improvement on the first embodiment, and the specific improvement is that it includes the following steps:

[0151] The training process of the preset mask extraction model includes:

[0152] S301 : Acquire a historical artifact image, annotate a mask label of the historical artifact image, and create a first data set according to the historical artifact image and the mask label.

[0153] Historical workpiece images can refer to digital images of workpieces saved during past production or inspection processes. These images are usually captured by high-resolution cameras or industrial camera systems, covering different angles and appearance features of the workpiece.

[0154] The mask label can be the annotation data corresponding to the historical artifact image, which defines which pixels in the image belong to the artifact itself (foreground) and which pixels belong to the background. The mask can be represented in the form of a binary image, with the foreground (artifact part) represented by one color (such as white) and the background represented by another color (such as black).

[0155] The first data set may be a training data set consisting of historical artifact images and corresponding mask labels, which may be used to train a mask extraction model to automatically identify and segment the foreground and background in artifact images.

[0156] A large number of workpiece images can be collected from the factory's production or inspection history to ensure that the images cover different types, shapes, colors, and angles of workpieces. Preprocess the collected images to remove noise, adjust brightness and contrast, and ensure that the image quality is suitable for subsequent annotation and model training. Then use professional image annotation tools such as LabelMe, Labelbox, or CVAT to manually or semi-automatically annotate the workpiece area in the image. Create corresponding mask labels on each image based on the contour and shape of the workpiece. The annotation should be as accurate as possible to ensure that the model can learn effective information. And pair each historical workpiece image with its corresponding mask label to ensure that the image and mask correspond one-to-one. The paired data set is then divided into training set, validation set, and test set for model training, validation, and testing. Typically, the training set accounts for 70-80% of the data, and the validation set and test set each account for 10-15%.

[0157] S302: construct a mask extraction model, and train the mask extraction model according to the first data set until the mask extraction model reaches a preset mask extraction model training standard.

[0158] The preset training standards can define the indicators and conditions required for the model to reach a qualified state during the training process. Specifically, they can include: Accuracy: The degree of match between the mask prediction results of the mask extraction model for the test set and the actual labels. Usually a high accuracy (for example, more than 90%) is required.

[0159] IoU: The intersection over union ratio between the mask prediction and the actual mask label, which is used to measure the segmentation effect of the model. The preset standard can require that the IoU reaches a certain threshold (for example, 0.85 or higher).

[0160] Loss function: During model training, a specific loss function (such as cross entropy loss or Dice coefficient loss) is used to measure the error of the model. The training criterion can require the loss value to fall within a preset range (for example, less than 0.1).

[0161] Recall and precision: measure the model's ability to identify the positive class (foreground) and the correct recognition rate. Usually, these indicators are required to meet certain standards (for example, above 90%).

[0162] Training rounds: Based on the training results, training can be stopped when the model performance reaches stability and no longer improves significantly within a certain number of rounds. The preset standard is usually set to stop training when the performance of the model on the validation set does not improve for a certain number of consecutive rounds.

[0163] You can choose a suitable model architecture based on the application scenario and the characteristics of the dataset. Specifically, it can include U-Net, Mask R-CNN, SegNet, etc. Use a deep learning framework (such as TensorFlow, PyTorch) to build the model. Define the input layer, encoder (extract features), decoder (restore spatial information) and output layer (generate mask). Then assign initial values ​​to the parameters of each layer of the model. You can use random initialization or pre-trained models for transfer learning. Load the first dataset into the model and divide it into training and validation sets. Ensure the diversity and balance of the dataset to avoid overfitting of the model. In order to improve the generalization ability of the model, you can perform data enhancement on the training data (such as rotation, scaling, flipping, lighting adjustment, etc.). Choose a suitable loss function, such as Cross-Entropy Loss or Dice Loss, to measure the difference between the model prediction and the actual mask. Choose an optimizer, such as Adam or SGD, to update the model parameters and minimize the loss function. Then start training the model, and continuously adjust the model parameters during the training process to gradually reduce the loss function. After each training round (Epoch), use the validation set to evaluate the model performance. At the end of each Epoch, use the validation set to evaluate the model's accuracy, IoU, recall and other indicators, and compare them with the preset standards. According to the evaluation results, adjust the model's hyperparameters (such as learning rate, batch size, etc.), or improve the model performance by adding regularization techniques (such as Dropout, weight decay). During the training process, monitor the loss and indicator performance on the validation set in real time. When the validation loss decreases and stabilizes, and the validation indicator reaches or exceeds the preset standard, stop training.

[0164] It is not difficult to find that in the embodiments of the present application, by setting strict training standards, it can be ensured that the model can accurately extract masks in practical applications and improve the reliability of workpiece recognition and segmentation.

[0165] On the basis of the above technical solution, optionally, a mask of each workpiece image in the workpiece image set is determined according to a preset mask extraction model, and the workpiece image is divided into a workpiece structure image and a background image according to the mask, including:

[0166] Determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and if the masks of each workpiece image are consistent, divide the workpiece image into a workpiece structure image and a background image according to the mask;

[0167] Accordingly, after determining the mask of each workpiece image in the workpiece image set according to the preset mask extraction model, the method further includes:

[0168] If the masks of the workpiece images are inconsistent, label the workpiece images in the workpiece image set with mask labels, and add the workpiece images and the corresponding mask labels to the first data set;

[0169] Retraining the mask extraction model according to the first data set until the mask extraction model reaches a preset mask extraction model training standard;

[0170] The mask of each workpiece image in the workpiece image set is re-determined according to the retrained mask extraction model. If the masks of each workpiece image are consistent, the workpiece image is divided into a workpiece structure image and a background image according to the mask.

[0171] In this solution, each workpiece image in the workpiece image set can be input into a preset mask extraction model. The model generates a mask based on the image features, and the mask represents the foreground and background parts of the workpiece in the image. Then compare whether the masks of each workpiece image are consistent in shape, position and structure. If the masks match at these key points, the masks are considered consistent; otherwise, the masks are inconsistent. If the masks generated by the model are consistent, these masks are used to divide the workpiece image into a workpiece structure image and a background image. The workpiece structure image represents the foreground part of the workpiece, and the background image represents the background part outside the workpiece. Specifically, the mask can be used to segment the image to obtain two image regions. Usually, the mask is a binary image, with the foreground (workpiece) part being 1 and the background part being 0. According to the mask, the part of the original image corresponding to the mask of 1 is extracted as the workpiece structure image, and the part with the mask of 0 is extracted as the background image. For workpiece images with inconsistent masks, mask labels can be manually or automatically annotated, and these workpiece images annotated with mask labels and their corresponding mask labels are added to the first data set to enrich the training data of the model. Specifically, if the output of the mask extraction model does not match the expected result, the mask needs to be manually corrected or other algorithms need to be used to generate more accurate mask labels. The annotation process can be carried out with the help of image annotation tools to ensure that the mask label accurately reflects the boundary between the workpiece and the background. Then the mask extraction model is retrained using the updated first data set (including the newly annotated mask labels), and the model is continuously trained until its performance reaches the preset training standard. Finally, the retrained mask extraction model is used to perform mask extraction again on each image in the workpiece image set to check whether the newly generated mask is consistent. If it is consistent, the workpiece image is divided into a workpiece structure image and a background image again according to the mask. If the mask is still inconsistent after one retraining, it is necessary to continue to repeat the annotation, training, and segmentation process until the model can consistently generate the correct mask and complete the segmentation of the workpiece image.

[0172] In this solution, the segmentation effect will be gradually improved through continuous annotation and model optimization, and finally a stable and high-precision mask extraction effect will be achieved to meet the subsequent workpiece analysis and processing requirements.

[0173] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0174] Fourth embodiment

[0175] The fourth embodiment of the present application relates to a workpiece processing quality detection system based on artificial intelligence, which specifically includes the following:

[0176] An image acquisition module 401 is used to acquire workpiece images of the current workpiece at at least two angles, generate a workpiece image set according to the workpiece images, and determine a camera pose and image depth information according to the workpiece image set;

[0177] A model building module 402 is used to build a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information;

[0178] The Gaussian sputtering module 403 is used to obtain the attribute information of the current workpiece, distribute the attribute information to each voxel of the three-dimensional voxel model, and perform Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function; wherein the attribute information includes density, color and transparency;

[0179] A mask determination module 404 is used to determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and divide the workpiece image into a workpiece structure image and a background image according to the mask;

[0180] The workpiece detection module 405 is used to determine the workpiece point cloud of the current workpiece based on the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and calculate the similarity between the workpiece point cloud and the preset workpiece standard point cloud. If the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece.

[0181] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.

[0182] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0183] The scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim may also be implemented by one unit or device through software or hardware. The words "first", "second", etc. are only used to distinguish the description, and do not indicate any particular order, nor can they be understood as indicating or implying relative importance.

[0184] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily mention changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims, and the above embodiments should be regarded as exemplary and non-restrictive.

Claims

1. A workpiece processing quality detection method based on artificial intelligence, characterized in that: The method comprises: Acquire workpiece images of the current workpiece at at least two angles, generate a workpiece image set according to the workpiece images, and determine the camera pose and image depth information according to the workpiece image set; Establishing a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information; Obtain the attribute information of the current workpiece, assign the attribute information to each voxel of the three-dimensional voxel model, and perform Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function; wherein the attribute information includes density, color and transparency; Determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and divide the workpiece image into a workpiece structure image and a background image according to the mask; The workpiece point cloud of the current workpiece is determined according to the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and the similarity between the workpiece point cloud and the preset workpiece standard point cloud is calculated. If the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece.

2. The workpiece processing quality detection method based on artificial intelligence according to claim 1 is characterized in that: The default Gaussian function is: Among them, G(x, D, C, T) is the voxel contribution value; x is the distance variable, which indicates the distance between the voxel center and the camera; D is the voxel density, that is, the material concentration of the voxel in three-dimensional space; C is the voxel color, which can represent color intensity or color information; T is the voxel transparency, that is, the transparency of the voxel; σ is the standard deviation of the Gaussian function, which determines the degree of sputtering diffusion; W D is the voxel density weight, which reflects the influence of the voxel density on the Gaussian function; W C is the voxel color weight, which reflects the influence of voxel color on the Gaussian function; W T is the voxel transparency weight, which reflects the influence of voxel transparency on the Gaussian function; The degree of influence of voxels on light is calculated; is the normalization factor of the Gaussian function, ensuring that the integral of the entire function is 1.

3. The workpiece processing quality detection method based on artificial intelligence according to claim 1 is characterized in that: Before performing Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera position and the preset Gaussian function, the method further includes: Obtaining a preset weight distribution rule, an initial Gaussian function standard deviation, and a preset standard deviation update formula; Accordingly, Gaussian sputtering is performed on each voxel according to the attribute information of each voxel, the camera position and the preset Gaussian function, including: According to the preset weight distribution rule and the attribute information of each voxel, the voxel density weight value, the voxel color weight value and the voxel transparency weight value of each voxel in the preset Gaussian function are determined; Update the Gaussian function standard deviation according to the voxel density weight value, the initial Gaussian function standard deviation and the preset standard deviation update formula; Get the center point position of each voxel, and determine the distance variable value of each voxel according to the center point position of each voxel and the camera posture; Gaussian sputtering is performed on each voxel according to the voxel density weight value, voxel color weight value, voxel transparency weight value, updated Gaussian function standard deviation, distance variable value and preset Gaussian function.

4. The workpiece processing quality detection method based on artificial intelligence according to claim 1 is characterized in that: After calculating the similarity between the workpiece point cloud and the preset workpiece standard point cloud, the method further includes: If the similarity does not exceed a preset similarity threshold, the current workpiece is determined to be an unqualified workpiece; The workpiece point cloud and the preset workpiece standard point cloud are input into the preset defect detection model to determine the defect type and repair method of the current workpiece, and the defect type and repair method are sent to the staff's handheld terminal.

5. The workpiece processing quality detection method based on artificial intelligence according to claim 4 is characterized in that: After sending the defect type and the repair method to the handheld terminal of the staff, the method further includes: Acquire the number of unqualified workpieces in real time, and if the number of workpieces exceeds a preset unqualified workpiece threshold, acquire the workpiece image, structural parameters, attribute information, and current production parameters of each unqualified workpiece; Inputting the workpiece image, structural parameters, attribute information and current production parameters of each unqualified workpiece into a preset production parameter optimization model to determine production parameter adjustment information; Update current production parameters according to production parameter adjustment information.

6. The workpiece processing quality detection method based on artificial intelligence according to claim 1 is characterized in that: The training process of the preset mask extraction model includes: Acquire a historical artifact image, annotate a mask label of the historical artifact image, and create a first data set according to the historical artifact image and the mask label; A mask extraction model is constructed, and the mask extraction model is trained according to the first data set until the mask extraction model reaches a preset mask extraction model training standard.

7. The workpiece processing quality detection method based on artificial intelligence according to claim 6 is characterized in that: Determining the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and dividing the workpiece image into a workpiece structure image and a background image according to the mask, including: Determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and if the masks of each workpiece image are consistent, divide the workpiece image into a workpiece structure image and a background image according to the mask; Accordingly, after determining the mask of each workpiece image in the workpiece image set according to the preset mask extraction model, the method further includes: If the masks of the workpiece images are inconsistent, label the workpiece images in the workpiece image set with mask labels, and add the workpiece images and the corresponding mask labels to the first data set; Retraining the mask extraction model according to the first data set until the mask extraction model reaches a preset mask extraction model training standard; The mask of each workpiece image in the workpiece image set is re-determined according to the retrained mask extraction model. If the masks of each workpiece image are consistent, the workpiece image is divided into a workpiece structure image and a background image according to the mask.

8. The workpiece processing quality detection method based on artificial intelligence according to claim 4 is characterized in that: The training process of the preset defect detection model includes: Acquire defect point clouds and standard point clouds of historical unqualified workpieces, annotate defect type labels and repair method labels of the defect point clouds, and create a second data set based on the defect point clouds, standard point clouds, defect type labels, and repair method labels; A defect detection model is constructed, and the defect detection model is trained according to the second data set until the defect detection model reaches a preset defect detection model training standard.

9. The workpiece processing quality detection method based on artificial intelligence according to claim 5 is characterized in that: The training process of the preset production parameter optimization model includes: Acquire historical unqualified workpiece images, annotate the historical unqualified workpiece images with structural parameter labels, attribute information labels, and production parameter labels, and create a third data set based on the historical unqualified workpiece images, the structural parameter labels, the attribute information labels, and the production parameter labels; A production parameter optimization model is constructed, and the production parameter optimization model is trained according to the third data set until the production parameter optimization model reaches a preset production parameter optimization model training standard.

10. A workpiece processing quality detection system based on artificial intelligence, characterized in that: The system comprises: An image acquisition module, used to obtain workpiece images of the current workpiece at at least two angles, generate a workpiece image set according to the workpiece images, and determine the camera posture and image depth information according to the workpiece image set; A model building module, used to build a three-dimensional voxel model of the current workpiece according to the workpiece image set, the camera pose and the image depth information; The Gaussian sputtering module is used to obtain the attribute information of the current workpiece, distribute the attribute information to each voxel of the three-dimensional voxel model, and perform Gaussian sputtering on each voxel according to the attribute information of each voxel, the camera posture and the preset Gaussian function; wherein the attribute information includes density, color and transparency; A mask determination module, used to determine the mask of each workpiece image in the workpiece image set according to a preset mask extraction model, and divide the workpiece image into a workpiece structure image and a background image according to the mask; The workpiece detection module is used to determine the workpiece point cloud of the current workpiece based on the three-dimensional voxel model after Gaussian sputtering and the divided workpiece image, and calculate the similarity between the workpiece point cloud and the preset workpiece standard point cloud. If the similarity exceeds a preset similarity threshold, the current workpiece is determined to be a qualified workpiece.

Citation Information

Patent Citations

  • Stacked workpiece pose estimation method based on combination of two-dimensional image and three-dimensional point cloud

    CN116309847A

  • Point cloud target detection method based on key points

    CN118334617A

  • Part surface quality detection method and system based on machine vision

    CN118608504A

  • Workpiece shape correction process quality detection and analysis method and device

    CN118690617A

  • Systems and methods for defect detection and quality control

    US20230360196A1

Cited By

  • Method for detecting defects of three-dimensional model and non-volatile storage medium

    CN120953216A

  • Mini-LED repair method and device based on automatic optical detection

    CN121095149A

  • Mini-led repair method and device based on automatic optical detection

    CN121095149B

  • Workpiece machining quality inspection method and system based on artificial intelligence

    WO2026077103A1