Method, apparatus, server and storage medium for generating profiles
By using dynamic adaptive technology of profile generation sub-model and profile discrimination sub-model, the profile generation method is dynamically adjusted, which solves the problems of low trajectory reliability and low accuracy in casting grinding and achieves a more efficient grinding effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN MOWEI TECHNOLOGY CO LTD
- Filing Date
- 2025-12-27
- Publication Date
- 2026-05-26
AI Technical Summary
In the existing technology, the grinding trajectory has low reliability and low grinding accuracy because the grinding process of castings cannot provide a dynamically adaptive profile.
By acquiring 3D point cloud data of the workpiece to be polished, the target profile is dynamically and adaptively generated using pre-trained profile generation and profile discrimination sub-models. The polishing trajectory is optimized by combining the feedback and adjustment mechanisms of the profile generation and profile discrimination sub-models.
It improves grinding accuracy and trajectory reliability, making the generated grinding trajectory more closely match the actual shape of the workpiece surface, thus enhancing the grinding effect.
Smart Images

Figure CN121437501B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of machining technology, and in particular relates to a method, apparatus, server and storage medium for generating profiles. Background Technology
[0002] During the casting production process, burrs and sharp corners are inevitably produced, requiring grinding. The most common method for grinding workpieces is manual grinding, but this method is inefficient, time-consuming, and labor-intensive.
[0003] In related technologies, with the development of computer vision, methods based on controlling robotic arms to grasp workpieces for grinding have emerged. Currently, most applications use vision for positioning and matching to obtain the profile of the casting, and then execute a fixed contour grinding trajectory based on the profile. However, if the target workpiece to be ground is deformed, it cannot provide a dynamically adaptive profile, resulting in low reliability of the generated grinding trajectory and low grinding accuracy. Summary of the Invention
[0004] This application provides a profile generation method, apparatus, server, and storage medium, which can solve the technical problem in related technologies that the inability to provide dynamically adaptive profiles leads to low reliability of the generated grinding trajectory and low grinding accuracy.
[0005] The first aspect of this application provides a method for generating profile lines, including:
[0006] Acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into the preset profile model, and generate the target profile of the workpiece to be polished.
[0007] The preset profile model includes a profile generation sub-model and a profile discrimination sub-model. The preset profile model is obtained by performing the following generation training steps and discrimination training steps:
[0008] The training generation steps include: fixing the profile discrimination sub-model, acquiring noisy 3D point cloud data containing random noise, inputting the noisy 3D point cloud data into the profile generation sub-model, generating initial 3D point cloud data, and generating initial profiles based on the initial 3D point cloud data.
[0009] The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weight of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates the target 3D point cloud data and the target profile according to the noisy 3D point cloud data, until the profile discrimination sub-model determines that the target 3D point cloud data and the target profile meet the preset generation conditions.
[0010] The discrimination training steps include: fixing the profile generation sub-model, and inputting the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model;
[0011] The profile discrimination sub-model learns features from noisy 3D point cloud data for real and target profiles, and then uses the learned features to classify the types of points in the real and target profiles.
[0012] The weights of the shape line discrimination sub-model are adjusted based on the shape line discrimination results until the shape line discrimination results meet the preset discrimination conditions.
[0013] A second aspect of this application provides a profile generating apparatus, comprising:
[0014] The profile generation unit is used to acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into the preset profile model, and generate the target profile of the workpiece to be polished; wherein, the preset profile model includes a profile generation sub-model and a profile discrimination sub-model, and the preset profile model is obtained by performing the following generation training steps and discrimination training steps;
[0015] A training unit is generated to perform the generation training steps, which include: fixing the profile discrimination sub-model, acquiring noisy 3D point cloud data containing random noise, inputting the noisy 3D point cloud data into the profile generation sub-model, generating initial 3D point cloud data, and generating initial profiles based on the initial 3D point cloud data.
[0016] The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weight of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates the target 3D point cloud data and the target profile according to the noisy 3D point cloud data, until the profile discrimination sub-model determines that the target 3D point cloud data and the target profile meet the preset generation conditions.
[0017] The profile discrimination unit is used to execute the discrimination training steps, which include: fixing the profile generation sub-model, and inputting the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model.
[0018] The profile discrimination sub-model learns features from noisy 3D point cloud data for real and target profiles, and then uses the learned features to classify the types of points in the real and target profiles.
[0019] The weights of the shape line discrimination sub-model are adjusted based on the shape line discrimination results until the shape line discrimination results meet the preset discrimination conditions.
[0020] A third aspect of this application provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the profile generation method provided in the first aspect.
[0021] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the profile generation method provided in the first aspect.
[0022] The profile generation method, apparatus, server, and storage medium provided in this application have the following beneficial effects: By acquiring 3D point cloud data of the workpiece to be polished and inputting it into a preset profile model, the preset profile model can generate a corresponding target profile. Specifically, by combining the profile generation sub-model and the profile discrimination sub-model, the target profile is generated in a dynamic and adaptive manner. Based on the target profile, an accurate polishing trajectory is generated, which can effectively solve the problems of insufficient polishing accuracy and low trajectory reliability caused by the inability to provide dynamic adjustment profiles. Through the dynamic feedback and adaptive adjustment mechanism of the profile generation sub-model and the profile discrimination sub-model, the generated target profile can be continuously optimized according to real-time data, so that the final generated polishing trajectory is more in line with the actual shape of the workpiece surface, which helps to improve polishing accuracy and enhance the reliability of the polishing trajectory. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating the implementation of the training generation steps provided in an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating the implementation of the discrimination training steps provided in an embodiment of this application;
[0026] Figure 3 This is a flowchart illustrating the implementation of a profile generation method provided in an embodiment of this application;
[0027] Figure 4 This is a flowchart illustrating the implementation of an optimized preset profile model provided in an embodiment of this application;
[0028] Figure 5 This is a flowchart illustrating the implementation of a profile generation method provided in another embodiment of this application;
[0029] Figure 6 This is a flowchart illustrating the implementation of a profile generation method provided in another embodiment of this application;
[0030] Figure 7 This is a structural block diagram of a profile generation apparatus provided in an embodiment of this application;
[0031] Figure 8 This is a structural block diagram of a server provided in one embodiment of this application. Detailed Implementation
[0032] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0033] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0034] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0035] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0036] To illustrate the technical solution of this application, the following embodiments will be used for explanation.
[0037] This application provides a method for generating profile lines, including:
[0038] Acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into the preset profile model, and generate the target profile of the workpiece to be polished.
[0039] Among them, the workpieces to be polished are parts with burrs or flash on the surface.
[0040] The aforementioned 3D point cloud data is a spatially distributed set of points, where each point has three-dimensional coordinates representing its position in three-dimensional space.
[0041] The aforementioned preset profile model is typically a pre-trained model. This preset profile model can be obtained by training an initial model (such as a Convolutional Neural Network (CNN)) using machine learning methods based on training samples.
[0042] In this context, the profile line refers to the continuous edge or contour line that characterizes the external shape of an object. The target profile line of the workpiece to be ground refers to the continuous edge or contour line that characterizes the external shape of the workpiece to be ground.
[0043] In practice, due to reasons such as the inability of the mold parting lines between molds to fully mesh, the surface of the workpiece to be ground may have protruding parts such as flash and burrs. Moreover, the flash and burrs are usually located on the target profile of the workpiece to be ground. Grinding based on the target profile to generate a grinding trajectory can effectively eliminate the flash and burrs on the surface of the workpiece to be ground.
[0044] In this embodiment, the execution entity of the above-described profile generation method is typically a server, specifically the server of the reference node. It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, or as a single software program or software module; no specific limitations are made here.
[0045] In practice, the aforementioned execution entity can first use technologies such as lidar, stereo vision, and depth cameras to acquire 3D point cloud data of the workpiece to be polished, and then input the acquired 3D point cloud data as input data into the preset profile model, from which the preset profile model outputs the target profile of the workpiece to be polished.
[0046] The preset profile model includes a profile generation sub-model and a profile discrimination sub-model. The preset profile model is obtained by performing the following generation training steps and discrimination training steps.
[0047] Please see Figure 1 , Figure 1 This is a flowchart of the implementation of the training generation steps provided in an embodiment of this application. The flowchart may include the following steps 101 to 102.
[0048] Step 101: Fix the profile discrimination sub-model, obtain noisy 3D point cloud data containing random noise, input the noisy 3D point cloud data into the profile generation sub-model, generate initial 3D point cloud data, and generate initial profile based on the initial 3D point cloud data.
[0049] The aforementioned profile discrimination sub-model is used to determine whether input data is a genuine sample. Genuine samples are typically workpiece profiles with burrs (i.e., label data) obtained from actual production, while generated samples are workpiece profiles generated by the profile generation sub-model. The goal of the profile discrimination sub-model is to accurately distinguish these samples through progressive training. Specifically, the profile discrimination sub-model receives workpiece profile data as input and outputs a probability value indicating whether the input data is "genuine" or "fake."
[0050] The aforementioned profile generation sub-model receives an input containing random noise, generates 3D point cloud data related to the flash workpiece, and then generates the corresponding profile model based on this point cloud data.
[0051] Here, the initial 3D point cloud data is the 3D point cloud data generated by the profile generation sub-model during the initial training, and the initial profile is the profile generated by the profile generation sub-model based on the initial 3D point cloud data during the initial training.
[0052] Step 102: The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weight of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates target 3D point cloud data and target profile based on the noisy 3D point cloud data until the profile discrimination sub-model determines that the target 3D point cloud data and target profile meet the preset generation conditions.
[0053] Among them, the above-mentioned preset generation conditions are usually pre-set conditions. The preset generation conditions may include the profile discrimination sub-model judging the target profile corresponding to the target 3D point cloud data as real. That is, the profile corresponding to the 3D point cloud data generated by the profile generation sub-model can make the profile discrimination sub-model think that the 3D point cloud data of the flash workpiece given by the profile generation sub-model and the profile it generates are the real profile of the workpiece itself.
[0054] In practice, the aforementioned execution entity can first fix the profile discrimination sub-model without updating its parameters. Then, it uses the profile discrimination sub-model to discriminate the initial 3D point cloud data and initial profile generated by the profile generation sub-model, obtaining the probability that each point in the initial profile is true for the profile discrimination sub-model. Next, it adjusts the weight parameters of the profile generation sub-model and uses the adjusted sub-model to regenerate new 3D point cloud data and its corresponding profile for the noisy 3D point cloud data. Afterward, the profile discrimination sub-model is used to discriminate the newly generated 3D point cloud data and its corresponding profile until the discrimination result of the profile discrimination sub-model for the newly generated 3D point cloud data and its corresponding profile meets the preset generation conditions.
[0055] Please see Figure 2 , Figure 2 This is a flowchart of the implementation of the discrimination training steps provided in an embodiment of this application. The flowchart may include the following steps 201 to 203.
[0056] Step 201: Fix the profile generation sub-model and input the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model.
[0057] Here, the purpose of the discrimination training step is mainly to optimize the parameters of the profile discrimination sub-model, so that the profile discrimination sub-model is better at distinguishing between the real and fake 3D point cloud data of the flash workpiece and its corresponding profile. That is, to improve the discrimination ability of the profile discrimination sub-model so that it can correctly distinguish between the data generated by the profile generation sub-model and the real data.
[0058] In practice, when training the profile discrimination sub-model, it is necessary to first fix the profile generation sub-model and not update its parameters.
[0059] In practice, the aforementioned execution entity can use noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model as input data, and input the profile discrimination sub-model.
[0060] Step 202: The profile discrimination sub-model performs feature learning on the real profile and the target profile based on noisy 3D point cloud data, and performs profile discrimination on the category of each point in the real profile and the target profile based on the learned features.
[0061] In practice, the profile discrimination sub-model can have multiple receptive fields, each focusing on features at different scales. This allows for comprehensive feature learning from noisy 3D point cloud data, the true profile, and the target profile at different scales, enhancing the evaluation capability of the generated results. Here, the receptive field refers to the size of the input region that a neuron in a neural network can see. For convolutional layers, it represents how a change in a pixel in the input image affects the activation of that neuron. The larger the receptive field, the more contextual information the network can capture. In multi-level profile discrimination sub-models, different receptive fields allow the network to evaluate the details of the generated results at different scales, thereby improving the ability to evaluate image quality.
[0062] For example, the profile discrimination sub-model can have three different convolutional neural networks to identify the profile corresponding to the 3D point cloud data of the workpiece with burrs generated by the profile generation sub-model.
[0063] In practice, the profile discrimination sub-model can include multiple convolutional layers and fully connected layers to classify each point in the real profile and the target profile, and finally output the probability value of each point, representing the probability that each input point is the real profile of the workpiece.
[0064] Step 203: Adjust the weights of the profile discrimination sub-model based on the profile discrimination results until the profile discrimination results meet the preset discrimination conditions.
[0065] The aforementioned preset discrimination conditions are pre-set conditions, such as the accuracy of the shape line discrimination result being greater than a pre-set accuracy threshold.
[0066] In practice, the aforementioned implementing entity can statistically analyze the discrimination results after the profile discrimination sub-model has completed the discrimination of all points, determine the actual accuracy of the profile discrimination sub-model, and compare the actual accuracy with a pre-set accuracy threshold. If the actual accuracy is greater than or equal to the pre-set accuracy threshold, the adjustment of the profile discrimination sub-model's weights is stopped; if the actual accuracy is less than the pre-set accuracy threshold, the weights of the profile discrimination sub-model are adjusted, and the adjusted profile discrimination sub-model is used to re-discriminate the categories of each point in the real profile and the target profile. Then, based on the discrimination results, a new actual accuracy is determined, and the new actual accuracy is compared with the pre-set accuracy threshold. Based on the comparison results, it is determined whether the weights of the profile discrimination sub-model need to be adjusted again.
[0067] Please see Figure 3 , Figure 3 This is a flowchart of the implementation of a profile generation method provided in an embodiment of this application. The flowchart may include the following steps 301 to 307.
[0068] Steps 301 to 302 are the same as steps 101 to 102 above. For details, please refer to steps 101 to 102. They will not be repeated here.
[0069] Steps 303 to 305 are the same as steps 201 to 203 above, and can be found in steps 201 to 203 for details. They will not be repeated here.
[0070] Step 306: Determine whether the preset profile model meets the preset training conditions.
[0071] The aforementioned preset training conditions are pre-set conditions. Preset training conditions may include at least one of the following: the training duration reaches a preset duration; the number of training iterations reaches a preset number; the adjustment range of the profile generation sub-model and the profile discrimination sub-model is less than or equal to the adjustment threshold.
[0072] Here, training duration refers to the total time consumed in the training process of the preset profile model; preset duration is a pre-set duration; training count refers to the total number of training times of the preset profile model (completing one generation training step and one discrimination training step is counted as one training count); preset training count is a pre-set number of times; adjustment range refers to the difference between the adjusted weight parameters and the weight parameters before adjustment; adjustment threshold is a pre-set value. If it is greater than or equal to the adjustment threshold, it means that the adjustment range of the weight parameters before and after adjustment is large, the model has not yet reached the optimal state, and the model needs to continue training. If it is less than the adjustment threshold, it means that the adjustment range of the weight parameters before and after adjustment is small, the model is close to the optimal state, and training can be stopped.
[0073] If the preset profile model does not meet the preset training conditions, new noisy 3D point cloud data is used to alternately train the profile generation sub-model and the profile discrimination sub-model. If the preset profile model meets the preset training conditions, the preset profile model is output, and step 307 is executed to obtain the 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into the preset profile model, and generate the target profile of the workpiece to be polished.
[0074] In practice, the aforementioned execution entity can store a training dataset comprising multiple noisy 3D point cloud data. New noisy 3D point cloud data refers to other noisy 3D point cloud data that is different from previously used noisy 3D point cloud data. After completing steps 301 to 305 with one noisy 3D point cloud data, the aforementioned execution entity can obtain new noisy 3D point cloud data from the training dataset, and then repeat steps 301 to 305 to alternately train the profile generation sub-model and the profile discrimination sub-model until the preset profile model meets the preset training conditions.
[0075] The profile generation method provided in this application acquires 3D point cloud data of the workpiece to be polished and inputs it into a preset profile model. The preset profile model can generate the corresponding target profile. Specifically, by combining the profile generation sub-model and the profile discrimination sub-model, the target profile is generated in a dynamic and adaptive manner. Based on the target profile, an accurate polishing trajectory is generated, which can effectively solve the problems of insufficient polishing accuracy and low trajectory reliability caused by the inability to provide dynamic adjustment profiles. Through the dynamic feedback and adaptive adjustment mechanism of the profile generation sub-model and the profile discrimination sub-model, the generated target profile can be continuously optimized according to real-time data, so that the final generated polishing trajectory is more in line with the actual shape of the workpiece surface, which helps to improve polishing accuracy and enhance the reliability of the polishing trajectory.
[0076] In some embodiments, the profile generation method may further include the following steps one to two.
[0077] Step 1: Obtain test set data for testing the preset profile model. Input the test set data into the preset profile model to obtain the target profile generated by the profile generation sub-model and the discrimination result output by the profile discrimination sub-model, as well as the visual output of the target profile and the discrimination result.
[0078] The aforementioned test dataset consists of pre-stored 3D point cloud data used to test preset profile models.
[0079] In practice, the aforementioned execution entity can read test set data from the storage area, then input the test set data into the preset profile model. The profile generation sub-model in the preset profile model processes the test set data and generates the target profile corresponding to the test dataset based on the test set data. The profile discrimination sub-model discriminates the target profile and obtains the discrimination result.
[0080] After obtaining the target profile and discrimination results corresponding to the test set data, the aforementioned execution entity can visualize the target profile and discrimination results, allowing users to directly view the target profile and corresponding discrimination results generated by the preset profile model. For example, the execution entity can input the target profile into a profile visualization template to visualize the target profile, and input the discrimination results into a result visualization template to visualize the discrimination results.
[0081] Step 2: Determine the evaluation parameters of the preset profile model based on the test set data, the target profile, and the discrimination results.
[0082] The evaluation parameters include at least one of the following: accuracy, recall, and pre-defined harmonic mean.
[0083] Here, accuracy represents the ratio of the number of points correctly identified by the preset profile model to the number of points identified by the preset profile model as points in the actual profile. For example, if the preset profile model identifies 100 points as points in the actual profile, and 80 of them are correctly identified, the accuracy is 0.8.
[0084] Recall rate refers to the ratio of the number of points correctly identified by the pre-defined profile model to the number of points on the actual profile. For example, if there are 100 points on the actual profile and the pre-defined profile model correctly identifies 90, the recall rate is 0.9.
[0085] The preset harmonic mean is the harmonic mean of precision and recall. The preset harmonic mean is obtained using the following formula:
[0086]
[0087] In this embodiment, through visualization output, users can intuitively see the relationship between the target profile and the discrimination result, which facilitates users to perform visual analysis of the preset profile model and to adjust and optimize the preset profile model.
[0088] In some embodiments, the profile generation sub-model includes several deconvolution layers. The above-mentioned input of noisy 3D point cloud data into the profile generation sub-model to generate initial 3D point cloud data includes the following first and second steps.
[0089] The first step is to downsample the noisy 3D point cloud data to obtain downsampled data.
[0090] The aforementioned downsampling process involves reducing or compressing noisy 3D point cloud data.
[0091] In practice, the aforementioned execution entity can perform downsampling operations on noisy 3D point cloud data to remove noise from the noisy 3D point cloud data and reduce interference from redundant information in the noisy 3D point cloud data.
[0092] The second step involves upsampling the downsampled data using the deconvolution layer to obtain upsampled data, which is then used to generate initial 3D point cloud data.
[0093] The deconvolutional layer is a deconvolution process used to generate a high-resolution output from low-resolution input data. Specifically, the deconvolutional layer restores the low-resolution information in the downsampled data to a higher resolution, using the resulting data as the initial 3D point cloud data.
[0094] In practice, the aforementioned implementing entities use upsampling to restore the simplified downsampled point cloud data to more detailed and accurate initial 3D point cloud data.
[0095] In this embodiment, the downsampling process removes some noise and redundant information, allowing subsequent deconvolution operations to focus more on the generation of important features; the upsampling process restores the details of the original data through the learning ability of the deconvolution layer, making the final generated initial 3D point cloud data clearer and more accurate; the combination of downsampling and deconvolution upsampling enables the entire process to retain important information while significantly reducing the amount of computation and improving processing speed.
[0096] In some embodiments, the profile discrimination sub-model includes a loss function, which has a preset gradient penalty term, including a first regularization and a second regularization.
[0097] The preset gradient penalty term is a pre-defined gradient penalty term. This gradient penalty term is used to mitigate the overfitting problem of the profile discriminant sub-model during training.
[0098] The first regularization involves adding the sum of the absolute values of the weights to the loss function, making some parameters of the profile discriminant sub-model sparse, or even setting them to zero. This allows the profile discriminant sub-model to automatically perform feature selection, removing irrelevant or unimportant features to simplify the model and reduce the interference of irrelevant features.
[0099] The second regularization involves adding the sum of squares of the weights to the loss function. This controls the magnitude of the weights in the linear discriminant sub-model, penalizing large weight values and forcing the linear discriminant sub-model to tend towards a smoother solution. This avoids excessively large weights and helps reduce sensitivity to outliers.
[0100] In this embodiment, by combining the first regularization and the second regularization, problems such as overfitting, gradient explosion, and gradient vanishing can be avoided in the training process of the profile discriminant sub-model, thereby improving the stability of the profile discriminant sub-model.
[0101] Please see Figure 4 , Figure 4 This is a flowchart of the implementation of an optimized preset profile model provided in an embodiment of this application. The flowchart may include the following steps 401 to 402.
[0102] Step 401: Determine the performance parameters of the profile generation sub-model and the profile discrimination sub-model according to the preset loss function.
[0103] The aforementioned preset loss function is a pre-defined loss function. The performance parameters described above are parameters that indicate the performance of the profile generation sub-model or the profile discrimination sub-model; here, the performance parameters are the values of the preset loss function.
[0104] For example, the default loss function is the cross-entropy loss function. The goal of the curve generation sub-model is to generate data that is as "real" as possible, so that the curve discriminator sub-model cannot distinguish between real and fake data. The loss function of the curve generation sub-model is the cross-entropy, which measures the probability that the generated fake data is judged as real data by the curve discriminator sub-model. The goal of the curve discriminator sub-model is to distinguish between real data and generated data. The loss function of the curve discriminator sub-model is the cross-entropy, which measures the probability that it predicts real data as true and generated data as false.
[0105] Here, the performance of the curve generation sub-model and the curve discrimination sub-model can be quantified separately using the cross-entropy loss function. Specifically, for the curve generation sub-model, a lower cross-entropy loss means that the generated fake data is difficult for the curve discrimination sub-model to identify as fake. For the curve discrimination sub-model, a lower cross-entropy loss means that the curve discrimination sub-model can accurately distinguish between real data and generated data.
[0106] Step 402: Update the network parameters of the profile generation sub-model and the profile discrimination sub-model according to the performance parameters and the preset optimizer.
[0107] The aforementioned preset optimizer is a pre-defined optimizer that optimizes the network parameters of the profile generation sub-model and the profile discrimination sub-model. For example, the Adam optimizer.
[0108] In practice, the optimization objectives of the curve generation sub-model and the curve discrimination sub-model are opposite. The optimization objective of the curve generation sub-model is to minimize the cross-entropy loss so that the generated samples approximate the real data distribution as closely as possible. The optimization objective of the curve discrimination sub-model is to maximize the cross-entropy loss so that it can effectively distinguish between generated fake data and real data.
[0109] In practice, since the optimization objectives of the profile generation sub-model and the profile discrimination sub-model are different, the preset optimizer will update the network parameters of both in each round of training, so that the profile generation sub-model continuously generates more realistic data, while the profile discrimination sub-model continuously improves its ability to identify fake data.
[0110] During training, performance parameters (i.e., the gradient of the loss function) are calculated, and the network weights are adjusted by a preset optimizer.
[0111] In this embodiment, the network parameters of the profile generation sub-model and the profile discrimination sub-model are updated based on the feedback from the optimizer after each round of training. The update of the profile generation sub-model helps to generate data that is more likely to be considered "real" by the profile discrimination sub-model, while the profile discrimination sub-model enhances its ability to distinguish between real and fake data by updating.
[0112] Please see Figure 5 , Figure 5This is a flowchart of the implementation of a profile generation method provided in an embodiment of this application. The flowchart may include the following steps 501 to 502.
[0113] Step 501: Obtain the first resolution data from the noisy 3D point cloud data, and convert the first resolution data into second resolution data.
[0114] The aforementioned first-resolution data refers to low-resolution data within noisy 3D point cloud data. This is typically due to insufficient sampling density or limitations of the acquisition equipment, resulting in missing details or insufficient resolution in the data.
[0115] The resolution of the second resolution data is higher than that of the first resolution data.
[0116] In practice, the aforementioned execution entity can use a pre-defined super-resolution model to convert the first-resolution data into second-resolution data. For example, the execution entity can use a convolutional neural network-based super-resolution model to reconstruct the input first-resolution data, obtain the second-resolution data, and then use both the first-resolution data and the second-resolution data together as input to subsequent networks.
[0117] Step 502: Input the first resolution data and the second resolution data into the profile generation sub-model and the profile discrimination sub-model, respectively.
[0118] In practice, after obtaining the second-resolution data, the first-resolution and second-resolution data can be used together as input to a subsequent network. Here, the subsequent network typically includes a detection network that tests a pre-defined profile model.
[0119] In this embodiment, by converting the lower-resolution first-resolution data, a higher-resolution second-resolution data is obtained. The lower-resolution first-resolution data and the higher-resolution second-resolution data are used together as input to the subsequent network, so that the preset profile model can calculate both blurry and clear data. This helps to improve the preset profile model's recognition effect on fly edges, and improves the accuracy and anti-interference ability of the profile generated by the preset profile model.
[0120] Please see Figure 6 , Figure 6 This is a flowchart of the implementation of a profile generation method provided in an embodiment of this application. The flowchart may include the following steps 601 to 602.
[0121] Step 601: Obtain the workpiece category information and workpiece material information corresponding to the noise 3D point cloud data.
[0122] The workpiece category information mentioned above typically refers to the classification of workpieces based on their geometric features, functional requirements, surface smoothness, etc. Different categories of workpieces may have different surface morphologies, structural requirements, and specific requirements for profiles.
[0123] Workpiece material information typically refers to the material of the workpiece. This information directly affects the workpiece's physical properties, such as hardness, elasticity, and surface gloss. These properties influence the profile requirements during the grinding process. Workpieces made of different materials may exhibit different surface wear patterns and thermal expansion characteristics.
[0124] In practice, noise 3D point cloud data can be stored together with the corresponding workpiece category information and workpiece material information. When the aforementioned execution entity obtains noise 3D point cloud data in the storage area, it can also obtain the workpiece category information and workpiece material information corresponding to the noise 3D point cloud data in the same storage area.
[0125] Step 602: The profile discrimination sub-model adjusts the profile discrimination results based on the workpiece category information and workpiece material information.
[0126] In practice, the aforementioned executing entity can use workpiece category information and workpiece material information to find the adjustment value corresponding to the workpiece category information and workpiece material information from a pre-established workpiece information-adjustment value correspondence table. This workpiece information-adjustment value correspondence table can be a pre-established correspondence table by the executing entity that stores multiple correspondences between workpiece information and adjustment values.
[0127] Subsequently, the aforementioned implementing entity can use adjustment values to adjust the results of the profile discrimination.
[0128] In this embodiment, by introducing workpiece category information and workpiece material information during the profile discrimination process, the preset profile model can achieve more accurate profile generation under conditions such as noise interference and complex workpiece shapes. This helps to optimize subsequent processing and surface treatment effects and can effectively improve the reliability of the preset profile model.
[0129] Please see Figure 7 , Figure 7 This is a structural block diagram of a profile generation apparatus 700 provided in an embodiment of this application, comprising:
[0130] The profile generation unit 701 is used to acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into a preset profile model, and generate the target profile of the workpiece to be polished; wherein, the preset profile model includes a profile generation sub-model and a profile discrimination sub-model, and the preset profile model is obtained by performing the following generation training steps and discrimination training steps;
[0131] The generation training unit 702 is used to execute the generation training steps, which include: fixing the profile discrimination sub-model, acquiring noisy 3D point cloud data containing random noise, inputting the noisy 3D point cloud data into the profile generation sub-model, generating initial 3D point cloud data, and generating initial profiles based on the initial 3D point cloud data.
[0132] The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weight of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates the target 3D point cloud data and the target profile according to the noisy 3D point cloud data, until the profile discrimination sub-model determines that the target 3D point cloud data and the target profile meet the preset generation conditions.
[0133] The profile discrimination unit 703 is used to execute the discrimination training step, which includes: fixing the profile generation sub-model, and inputting the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model.
[0134] The profile discrimination sub-model learns features from noisy 3D point cloud data for real and target profiles, and then uses the learned features to classify the types of points in the real and target profiles.
[0135] The weights of the shape line discrimination sub-model are adjusted based on the shape line discrimination results until the shape line discrimination results meet the preset discrimination conditions.
[0136] In some embodiments, the apparatus further includes a data acquisition unit and a parameter determination unit (not shown in the figure).
[0137] The data acquisition unit is used to: acquire test set data for testing the preset profile model, input the test set data into the preset profile model, obtain the target profile generated by the profile generation sub-model and the discrimination result output by the profile discrimination sub-model, and visualize the target profile and the discrimination result.
[0138] The parameter determination unit is used to: determine the evaluation parameters of the preset profile model based on the test set data, the target profile, and the discrimination results. The evaluation parameters include at least one of the following: accuracy, recall, and preset harmonic mean.
[0139] In some embodiments, the profile generation sub-model includes several deconvolution layers, and the generation training unit 702 is further configured to: downsample the noisy 3D point cloud data to obtain downsampled data;
[0140] The deconvolutional layer upsamples the downsampled data to obtain upsampled data, and then generates the initial 3D point cloud data based on the upsampled data.
[0141] In some embodiments, the profile discrimination sub-model includes a loss function, which has a preset gradient penalty term, including a first regularization and a second regularization.
[0142] In some embodiments, the apparatus may further include a performance determination unit and a parameter update unit (not shown in the figure).
[0143] The performance determination unit is used to determine the performance parameters of the profile generation sub-model and the profile discrimination sub-model based on a preset loss function.
[0144] The parameter update unit is used to update the network parameters of the profile generation sub-model and the profile discrimination sub-model based on the performance parameters and the preset optimizer.
[0145] In some embodiments, the apparatus may further include a data conversion unit and a data input unit (not shown in the figure).
[0146] The data conversion unit is used to acquire first-resolution data from noisy 3D point cloud data and convert the first-resolution data into second-resolution data.
[0147] The data input unit is used to input the first resolution data and the second resolution data into the profile generation sub-model and the profile discrimination sub-model, respectively.
[0148] In some embodiments, the profile discrimination unit 703 is specifically used to: acquire workpiece category information and workpiece material information corresponding to the noisy 3D point cloud data; and adjust the profile discrimination result based on the workpiece category information and workpiece material information.
[0149] The profile generation device provided in this embodiment acquires 3D point cloud data of the workpiece to be ground and inputs it into a preset profile model. The preset profile model can generate a corresponding target profile. Specifically, by combining the profile generation sub-model and the profile discrimination sub-model, the target profile is generated in a dynamic and adaptive manner. Based on the target profile, an accurate grinding trajectory is generated, which can effectively solve the problems of insufficient grinding accuracy and low trajectory reliability caused by the inability to provide dynamic adjustment profiles. Through the dynamic feedback and adaptive adjustment mechanism of the profile generation sub-model and the profile discrimination sub-model, the generated target profile can be continuously optimized according to real-time data, so that the final generated grinding trajectory is more in line with the actual shape of the workpiece surface, which helps to improve grinding accuracy and enhance the reliability of the grinding trajectory.
[0150] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the profile generation method embodiment in this application. For details on their specific functions and technical effects, please refer to the embodiment section of the profile generation method. They will not be repeated here.
[0151] Please see Figure 8 , Figure 8 This is a structural block diagram of a server 800 provided in an embodiment of this application. The server 800 in this embodiment includes: at least one processor 801 ( Figure 8 Only one processor is shown, along with a memory 802 and a computer program 803 stored in the memory 802 and executable on at least one processor 801, such as a time synchronization program for a wireless network. When the processor 801 executes the computer program 803, it implements the steps in the embodiments of the various profile generation methods described above. When the processor 801 executes the computer program 803, the functions of each module / unit in the above-described device embodiments are as follows: Figure 7 The functions of the profile generation unit 701 to the profile discrimination unit 703 shown are as follows.
[0152] For example, computer program 803 can be divided into one or more units, one or more of which are stored in memory 802 and executed by processor 801 to complete this application. One or more units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 803 in server 800. For example, computer program 803 can be divided into a pattern generation unit, a training generation unit, and a discrimination training unit. The specific functions of each unit have been described in the above embodiments and will not be repeated here.
[0153] Server 800 can be a computing device such as a server, desktop computer, tablet computer, cloud server, and mobile terminal. Server 800 may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will understand that... Figure 8 This is merely an example of server 800 and does not constitute a limitation on server 800. It may include more or fewer components than shown, or combine certain components, or different components. For example, a server may also include input / output devices, network access devices, buses, etc.
[0154] The processor 801 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0155] The memory 802 can be an internal storage unit of the server 800, such as the server 800's hard drive or memory. The memory 802 can also be an external storage device of the server 800, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the server 800. Optionally, the memory 802 can include both internal and external storage units of the server 800. The memory 802 is used to store computer programs and other programs and data required by the server 800. The memory 802 can also be used to temporarily store data that has been output or will be output.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0157] If an integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can also be implemented by a computer program instructing related hardware, and a computer program can be stored in a computer-readable storage medium. When executed by a processor, this computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0158] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0159] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for generating profile lines, characterized in that, The method includes: Acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into a preset profile model, and generate the target profile of the workpiece to be polished. The target profile of the workpiece to be polished refers to a continuous edge or contour line that characterizes the external shape features of the workpiece to be polished. The preset profile model includes a profile generation sub-model and a profile discrimination sub-model, which is obtained by performing the following generation training steps and discrimination training steps: The generation training step includes: fixing the profile discrimination sub-model, obtaining noisy 3D point cloud data containing random noise, inputting the noisy 3D point cloud data into the profile generation sub-model, generating initial 3D point cloud data, and generating initial profiles based on the initial 3D point cloud data. The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weights of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates target 3D point cloud data and target profile according to the noisy 3D point cloud data until the profile discrimination sub-model determines that the target 3D point cloud data and the target profile meet the preset generation conditions. The discrimination training step includes: fixing the profile generation sub-model, and inputting the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model; The profile discrimination sub-model learns features of the real profile and the target profile based on the noisy 3D point cloud data, and makes profile discrimination based on the learned features for each point in the real profile and the target profile. The weights of the shape line discrimination sub-model are adjusted based on the shape line discrimination result until the shape line discrimination result meets the preset discrimination condition.
2. The method for generating profile lines according to claim 1, characterized in that, The method further includes: Obtain test set data for testing the preset profile model, input the test set data into the preset profile model, obtain the target profile generated by the profile generation sub-model and the discrimination result output by the profile discrimination sub-model, and visualize the target profile and the discrimination result. Based on the test set data, the target profile, and the discrimination result, the evaluation parameters of the preset profile model are determined, wherein the evaluation parameters include at least one of the following: accuracy, recall, and preset harmonic mean.
3. The method for generating profiles according to claim 1, characterized in that, The profile generation sub-model includes several deconvolution layers. The step of inputting the noisy 3D point cloud data into the profile generation sub-model to generate initial 3D point cloud data includes: The noisy 3D point cloud data is downsampled to obtain downsampled data; The deconvolutional layer upsamples the downsampled data to obtain upsampled data, and generates the initial 3D point cloud data based on the upsampled data.
4. The method for generating profiles according to claim 1, characterized in that, The profile discrimination sub-model includes a loss function, which has a preset gradient penalty term, including a first regularization and a second regularization.
5. The method for generating profiles according to claim 4, characterized in that, After performing the generation training step and the discrimination training step, the method further includes: The performance parameters of the profile generation sub-model and the profile discrimination sub-model are determined according to a preset loss function; The network parameters of the profile generation sub-model and the profile discrimination sub-model are updated based on the performance parameters and the preset optimizer.
6. The method for generating profile lines according to claim 5, characterized in that, The method further includes: Obtain first resolution data from the noisy 3D point cloud data, and convert the first resolution data into second resolution data; The first resolution data and the second resolution data are respectively input into the profile generation sub-model and the profile discrimination sub-model.
7. The method for generating profiles according to any one of claims 1-6, characterized in that, After classifying the categories of points in the real profile and the target profile based on the learned features, the method further includes: Obtain the workpiece category information and workpiece material information corresponding to the noise 3D point cloud data; The profile discrimination sub-model adjusts the profile discrimination result based on the workpiece category information and the workpiece material information.
8. A profile generating device, characterized in that, The device includes: A profile generation unit is used to acquire 3D point cloud data of the workpiece to be polished, input the 3D point cloud data into a preset profile model, and generate the target profile of the workpiece to be polished; wherein, the target profile of the workpiece to be polished refers to a continuous edge or contour line characterizing the external shape features of the workpiece to be polished, and the preset profile model includes a profile generation sub-model and a profile discrimination sub-model, and the preset profile model is obtained by performing the following generation training steps and discrimination training steps; A training unit is generated to execute the generation training step, which includes: fixing the profile discrimination sub-model, acquiring noisy 3D point cloud data containing random noise, inputting the noisy 3D point cloud data into the profile generation sub-model, generating initial 3D point cloud data, and generating an initial profile based on the initial 3D point cloud data. The profile discrimination sub-model discriminates the initial 3D point cloud data and the initial profile, and adjusts the weights of the profile generation sub-model according to the discrimination result. The adjusted profile generation sub-model generates target 3D point cloud data and target profile according to the noisy 3D point cloud data until the profile discrimination sub-model determines that the target 3D point cloud data and the target profile meet the preset generation conditions. A profile discrimination unit is used to execute the discrimination training step, which includes: fixing the profile generation sub-model, and inputting the noisy 3D point cloud data, the real profile corresponding to the noisy 3D point cloud data, and the target profile generated by the profile generation sub-model into the profile discrimination sub-model. The profile discrimination sub-model learns features of the real profile and the target profile based on the noisy 3D point cloud data, and makes profile discrimination based on the learned features for each point in the real profile and the target profile. The weights of the shape line discrimination sub-model are adjusted based on the shape line discrimination result until the shape line discrimination result meets the preset discrimination condition.
9. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the profile generation method as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the profile generation method as described in any one of claims 1-7.