Three-dimensional modeling and simulation method and system for mold processing based on computer vision

Using computer vision technology to build a three-dimensional mold model and conduct simulation optimization, it solves the problems of long design cycle and high cost in traditional mold design methods, and realizes the automation and quality improvement of mold processing.

CN118570400BActive Publication Date: 2024-10-29SHENZHEN JINLING ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411043668.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-29
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Traditional mold design methods rely on engineers’ experience and manual drawings, resulting in long design cycles, high costs, difficulty in ensuring quality, and high costs in the mold processing optimization process.

Method used

By obtaining mold drawings from different perspectives, a three-dimensional model of the mold is built based on computer vision technology, simulation optimization of mold processing parameters is performed, and digital twin technology is used for simulation to achieve automation and optimization of mold processing.

Benefits of technology

It realizes the automatic construction of three-dimensional mold models and optimization of processing parameters, reduces design costs, improves production efficiency, and provides assistance for mold processing through computer vision technology, improving processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570400B_ABST
    Figure CN118570400B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of three-dimensional modeling, and specifically to a three-dimensional modeling and simulation method and system for mold processing based on computer vision. The three-dimensional modeling and simulation system for mold processing based on computer vision includes: a mold drawing image acquisition module, a mold three-dimensional modeling module, an attribute data acquisition module, a parameter optimization module and a mold processing simulation module. The present invention obtains the probability distribution of the mold three-dimensional model at different perspectives based on the mold drawings at different perspectives, and outputs the mold three-dimensional modeling data under the probability distribution of the mold three-dimensional model at different perspectives, which can realize the automatic construction of the mold three-dimensional model; on the basis of the mold three-dimensional model, the mold processing parameter set is simulated and optimized, which can realize the adaptation and optimization of the processing parameters; finally, the mold processing is simulated through the digital twin technology, so as to provide assistance for the mold processing with the help of computer vision technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional modeling, and in particular to a three-dimensional modeling and simulation method and system for mold processing based on computer vision. Background Art

[0002] In modern manufacturing, mold design and processing are crucial links that directly affect the quality of the final product, production efficiency and cost control. The traditional mold design method mainly relies on the rich experience and manual drawing skills of engineers. However, this traditional method has many shortcomings, such as long design cycle, high cost and difficulty in ensuring design quality; and in the optimization process of mold processing, actual operation is required, which is costly. Summary of the invention

[0003] In the present invention, by obtaining mold drawings at different viewing angles, and obtaining the probability distribution of the mold 3D model at different viewing angles based on the mold drawings at different viewing angles, the mold 3D modeling data is output under the probability distribution of the mold 3D model at different viewing angles, thereby realizing automatic construction of the mold 3D model; on the basis of the mold 3D model, the mold processing parameter set is simulated and optimized, so as to realize the adaptive optimization of the processing parameters; finally, the mold processing is simulated through the digital twin technology, so as to provide assistance for the mold processing with the help of computer vision technology.

[0004] The three-dimensional modeling and simulation method of mold processing based on computer vision includes:

[0005] Acquire N mold drawing images of the molds to be processed, and the mold drawing images of the N molds to be processed are from different perspectives;

[0006] Sending the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and outputting the mold 3D modeling data;

[0007] Acquire the attribute data corresponding to the mold, and simulate and optimize the mold processing parameter set based on the mold 3D modeling data and the attribute data corresponding to the mold to construct the optimal mold processing parameter set, and simulate the mold processing process through digital twin technology based on the mold 3D modeling data and the optimal mold processing parameter set;

[0008] The mold three-dimensional modeling model includes a variable distribution construction layer, a self-attention mechanism reinforcement layer, a three-dimensional data feature fusion layer and a mold three-dimensional modeling data output layer, wherein the variable distribution construction layer is used to process the mold drawing images of N molds to be processed in sequence to construct the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image; the self-attention mechanism reinforcement layer is used to perform a self-attention mechanism reinforcement operation on the N mold three-dimensional model covariance matrices to construct a confidence covariance matrix; the three-dimensional data feature fusion layer is used to fuse the three-dimensional data features based on the N mold three-dimensional model mean vectors and the confidence covariance matrix to construct the mold three-dimensional modeling data; the mold three-dimensional modeling data output layer is used to output the mold three-dimensional modeling data.

[0009] Preferably, the mold drawing images of N molds to be processed are sent to the mold 3D modeling model for processing, and the mold 3D modeling data is output, which specifically includes the following steps:

[0010] In the variable distribution construction layer, there are N variable distribution construction units and N fully connected units, and the N variable distribution construction units share parameters. The variable distribution construction unit is established based on the ResNet50 model. Unlike the ResNet50 model, the spatial attention mechanism is implemented in the residual connection process. The mold drawing images of the N molds to be processed are sequentially sent to the N variable distribution construction units and the N fully connected units for processing, and the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image are output;

[0011] In the self-attention mechanism reinforcement layer, cluster analysis is performed on the covariance matrices of the N mold 3D models, and the mold 3D model covariance matrix corresponding to the center of the largest cluster is recorded as the center covariance matrix, and the center covariance matrix is ​​stored in the self-attention mechanism reinforcement set, and then the remaining N-1 mold 3D model covariance matrices are arranged from large to small according to the distance from the center covariance matrix and stored in the self-attention mechanism reinforcement set; the self-attention mechanism reinforcement operation is performed based on the self-attention mechanism reinforcement set;

[0012] In the three-dimensional data feature fusion layer, the mean vector of the mold three-dimensional model is selected in turn. For the selected mean vector of the mold three-dimensional model, the three-dimensional data feature is constructed through the confidence covariance matrix. All three-dimensional data features are stored in the feature fusion set. j is traversed from 2 to N, where j is the number of the element in the feature fusion set. For each j, if j is 2, the first three-dimensional data feature in the feature fusion set and the jth three-dimensional data feature in the feature fusion set are spliced ​​according to the channel, and then a three-dimensional convolution operation is performed to construct the three-dimensional data intermediate feature R j ; If j is not 2, the intermediate feature R of the three-dimensional data j-1The j-th 3D data feature in the feature fusion set is spliced ​​according to the channel, and then a 3D convolution operation is performed to construct the 3D data intermediate feature R j ; When j is N-1, the output 3D data intermediate feature R j As mold 3D modeling data;

[0013] In the mold 3D modeling data output layer, the mold 3D modeling data is output.

[0014] Preferably, the self-attention mechanism reinforcement operation is performed based on the self-attention mechanism reinforcement set, specifically comprising the following steps:

[0015] Traverse m from 2 to N, where m is the number of the element in the self-attention mechanism reinforcement set. For each m, if m is 2, the query matrix Q is constructed based on the covariance matrix of the mth mold 3D model in the self-attention mechanism reinforcement set through the query weight matrix. Based on the center covariance matrix, the value matrix V and the key matrix K are constructed through the value weight matrix and the key weight matrix, and then the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), d is the dimension of the covariance matrix of the mold 3D model, and the enhanced output matrix F is obtained by multiplying the attention weight matrix ATT with the center covariance matrix. m ; If m is not 2, the query matrix Q is constructed by querying the weight matrix based on the covariance matrix of the mth mold 3D model in the self-attention mechanism reinforcement set to strengthen the output matrix F m-1 Based on the value weight matrix and the key weight matrix, the value matrix V and the key matrix K are constructed, and then the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), through the attention weight matrix ATT and the enhanced output matrix F m-1 Multiply them together to get the enhanced output matrix F m ; When m is N-1, the output of the enhanced output matrix F m Output is as a confidence covariance matrix.

[0016] Preferably, training is performed on the mold three-dimensional model, specifically including the following steps:

[0017] A number of mold 3D modeling training samples are obtained, wherein the mold 3D modeling training samples include mold 3D modeling data and corresponding N mold drawing images, and all mold 3D modeling training samples are combined into a mold 3D modeling training set, and then the mold 3D modeling training set is sent to the mold 3D modeling model with parameter initialization for training. During the training process, the N mold drawing images in the mold 3D modeling training samples are used as input, and the mold 3D modeling data in the mold 3D modeling training samples are used as target output. A first loss value is calculated, and it is determined whether the first loss value is within a first preset range. If the first loss value is within the first preset range, the trained mold 3D modeling model is output; otherwise, the mold 3D modeling model is continuously trained through the mold 3D modeling training set.

[0018] Preferably, based on the mold three-dimensional modeling data and the attribute data corresponding to the mold, the mold processing parameter set is simulated and optimized to construct an optimal mold processing parameter set, which specifically includes the following steps:

[0019] Construct several optimized individuals, and form a population set of all optimized individuals, and set the maximum number of iterations;

[0020] Calculate the fitness of all optimized individuals;

[0021] Based on the fitness of all optimized individuals, the population set is iteratively optimized through the sparrow search algorithm;

[0022] When the number of iterations reaches the maximum number of iterations, the optimized individual with the largest fitness is output as the optimal mold processing parameter set.

[0023] Preferably, calculating the fitness corresponding to the optimized individual specifically includes the following steps:

[0024] The optimized individual and the three-dimensional modeling data of the mold and the attribute data corresponding to the mold are sent to the parameter evaluation model for processing, and the parameter evaluation value is output, which is the fitness corresponding to the optimized individual;

[0025] The parameter evaluation model includes a feature extraction layer, a data splicing layer and a parameter evaluation value output layer. The feature extraction layer is established based on the PointNet model, and is used to receive the mold three-dimensional modeling data for feature extraction to construct a mold feature vector; the data splicing layer is used to splice the mold feature vector, the attribute data corresponding to the mold, and the optimized individuals to construct a mold processing parameter evaluation data set; the parameter evaluation value output layer is established based on the BP neural network, and is used to process the mold processing parameter evaluation data set and output the parameter evaluation value.

[0026] Preferably, training is performed on the parameter evaluation model, specifically comprising the following steps:

[0027] Obtain several positive samples and negative samples for parameter evaluation training, wherein the positive samples for parameter evaluation training include a mold processing parameter set, mold three-dimensional modeling data, and attribute data corresponding to the mold during normal processing, and the negative samples for parameter evaluation training include a mold processing parameter set, mold three-dimensional modeling data, and attribute data corresponding to the mold during abnormal processing. Label the positive samples and negative samples for parameter evaluation training with target parameter evaluation values, and combine all labeled positive samples and negative samples for parameter evaluation training into a parameter evaluation training set. Send the parameter evaluation training set to a parameter evaluation model with parameter initialization for training, and use the target parameter evaluation value as a target to calculate a second loss value, and determine whether the second loss value is within a second preset range. If the second loss value is within the second preset range, output the trained parameter evaluation model; otherwise, continue to train the parameter evaluation model using the parameter evaluation training set.

[0028] The present invention also provides a three-dimensional modeling and simulation system for mold processing based on computer vision, comprising:

[0029] A mold drawing image acquisition module is used to acquire mold drawing images of N molds to be processed;

[0030] A mold 3D modeling module is used to send the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and output the mold 3D modeling data;

[0031] An attribute data acquisition module is used to acquire attribute data corresponding to the mold;

[0032] The parameter optimization module is used to simulate and optimize the mold processing parameter set based on the mold 3D modeling data and the attribute data corresponding to the mold, so as to construct the optimal mold processing parameter set;

[0033] The mold processing simulation module is used to simulate the mold processing process through digital twin technology based on the mold 3D modeling data and the optimal mold processing parameter set.

[0034] The present invention has the following advantages:

[0035] The present invention obtains mold drawings at different viewing angles, obtains the probability distribution of the mold 3D model at different viewing angles based on the mold drawings at different viewing angles, and outputs the mold 3D modeling data under the probability distribution of the mold 3D model at different viewing angles, thereby realizing the automatic construction of the mold 3D model; based on the mold 3D model, the mold processing parameter set is simulated and optimized to realize the adaptive optimization of the processing parameters; finally, the mold processing is simulated through the digital twin technology, thereby providing assistance for the mold processing with the help of computer vision technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a structural schematic diagram of the computer vision-based mold processing three-dimensional modeling and simulation system adopted in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to enable persons skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0038] Embodiment 1, a three-dimensional modeling and simulation method for mold processing based on computer vision, comprising:

[0039] Obtain N mold drawing images of the molds to be processed. It should be noted that in the process of mold processing, the mold drawings are generally designed based on the requirements, and N is generally 3. The mold drawings generally include three views, namely, the front view, the side view and the top view;

[0040] Sending the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and outputting the mold 3D modeling data, the mold 3D modeling data including the pixel distribution of the mold in the 3D space;

[0041] Acquire the attribute data corresponding to the mold, which specifically includes information such as the material of the mold and the roughness of different positions of the mold. Based on the 3D modeling data of the mold and the attribute data corresponding to the mold, simulate and optimize the mold processing parameter set, which includes cutting speed, feed speed, and cutting depth, to construct the optimal mold processing parameter set. Simulate the mold processing process through digital twin technology based on the 3D modeling data of the mold and the optimal mold processing parameter set.

[0042] The mold three-dimensional modeling model includes a variable distribution construction layer, a self-attention mechanism reinforcement layer, a three-dimensional data feature fusion layer and a mold three-dimensional modeling data output layer, wherein the variable distribution construction layer is used to process the mold drawing images of N to-be-processed molds in sequence to construct the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image. It should be noted that the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix represent the pixel probability distribution of the mold three-dimensional model under the corresponding perspective of any mold drawing image. This is because an accurate mold three-dimensional model cannot be obtained under any perspective, and different perspectives need to be combined to construct a complete mold three-dimensional model; the self-attention mechanism reinforcement layer is used to perform a self-attention mechanism reinforcement operation on the N mold three-dimensional model covariance matrices to construct a confidence covariance matrix. It should be noted that the confidence covariance matrix can describe the pixel distribution under different dimensions and fit the three-dimensional data confidence judgment process under different perspectives; the three-dimensional data feature fusion layer is used to fuse the three-dimensional data features based on the N mold three-dimensional model mean vectors and the confidence covariance matrix to construct the mold three-dimensional modeling data; the mold three-dimensional modeling data output layer is used to output the mold three-dimensional modeling data.

[0043] The present application obtains mold drawings at different perspectives, obtains the probability distribution of mold 3D models at different perspectives based on the mold drawings at different perspectives, and outputs mold 3D modeling data under the probability distribution of mold 3D models at different perspectives, thereby realizing the automatic construction of mold 3D models; based on the mold 3D model, the mold processing parameter set is simulated and optimized to realize the adaptive optimization of the processing parameters; finally, the mold processing is simulated through digital twin technology to provide assistance for mold processing with the help of computer vision technology.

[0044] Sending the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and outputting the mold 3D modeling data, specifically includes the following steps:

[0045] In the variable distribution construction layer, there are N variable distribution construction units and N fully connected units, and the N variable distribution construction units share parameters. The variable distribution construction unit is established based on the ResNet50 model. Unlike the ResNet50 model, the spatial attention mechanism is implemented in the residual connection process. The spatial attention mechanism can enhance the size features in the mold drawing image. The mold drawing images of the N molds to be processed are sequentially sent to the N variable distribution construction units and N fully connected units for processing, and the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image are output; the size of the mold three-dimensional model covariance matrix is ​​3×3, which represents the change relationship and intensity between each dimension and within each dimension;

[0046] The spatial attention mechanism is to perform global maximum pooling and global average pooling on the input feature map in the residual block in the channel dimension to obtain two weighted feature maps, and then concatenate and convolve the two weighted feature maps to obtain a spatial attention weight matrix. The input feature map is adjusted by the spatial attention weight matrix, and then the adjusted feature map is connected with the feature map output by the residual block.

[0047] In the self-attention mechanism reinforcement layer, cluster analysis is performed on the covariance matrices of the N mold three-dimensional models. It should be noted that the clustering method can use the k-means algorithm, and the similarity calculation in the cluster analysis process uses the Euclidean distance. The mold three-dimensional model covariance matrix corresponding to the center of the largest cluster is recorded as the center covariance matrix, and the center covariance matrix is ​​stored in the self-attention mechanism reinforcement set, and then the remaining N-1 mold three-dimensional model covariance matrices are arranged from large to small according to the distance from the center covariance matrix and stored in the self-attention mechanism reinforcement set; the self-attention mechanism reinforcement operation is performed based on the self-attention mechanism reinforcement set;

[0048] In the three-dimensional data feature fusion layer, the mean vector of the mold three-dimensional model is selected in turn. For the selected mean vector of the mold three-dimensional model, the three-dimensional data feature is constructed through the confidence covariance matrix. The specific construction method is to calculate the three-dimensional data sample that meets the mean vector and confidence covariance matrix of the mold three-dimensional model through Gaussian distribution based on the mean vector and confidence covariance matrix of the mold three-dimensional model, store all three-dimensional data features in the feature fusion set, traverse j from 2 to N, j is the number of the element in the feature fusion set, for each j, if j is 2, the first three-dimensional data feature in the feature fusion set and the jth three-dimensional data feature in the feature fusion set are spliced ​​according to the channel, and then the three-dimensional convolution operation is performed to construct the three-dimensional data intermediate feature R j It should be noted that the intermediate feature R j The size of the j-th 3D data feature in the feature fusion set is consistent; if j is not 2, the 3D data intermediate feature R j-1 The j-th 3D data feature in the feature fusion set is spliced ​​according to the channel, and then a 3D convolution operation is performed to construct the 3D data intermediate feature R j ; When j is N-1, the output 3D data intermediate feature R j As mold 3D modeling data;

[0049] In the mold 3D modeling data output layer, the mold 3D modeling data is output.

[0050] The self-attention mechanism reinforcement operation is performed based on the self-attention mechanism reinforcement set, which specifically includes the following steps:

[0051] Traverse m from 2 to N, where m is the number of the elements in the self-attention mechanism enhanced set. It should be noted that in actual operation, the element numbering in the set generally starts from 0. Here, for the convenience of explanation, it is chosen to start from 1. For each m, if m is 2, the covariance matrix of the mth mold three-dimensional model in the self-attention mechanism enhanced set is used as the basis, and the query matrix Q is constructed by querying the weight matrix. The specific construction method is to multiply the covariance matrix of the mth mold three-dimensional model in the self-attention mechanism enhanced set with the query weight matrix. Based on the center covariance matrix, the value matrix V and the key matrix K are constructed through the value weight matrix and the key weight matrix. The specific construction method is to multiply the center covariance matrix with the value weight matrix and the key weight matrix. It should be noted that the self-attention mechanism here refers to the Transformer model, and then calculates the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), d is the dimension of the covariance matrix of the mold 3D model, which is generally 3. The enhanced output matrix F is obtained by multiplying the attention weight matrix ATT with the center covariance matrix. m ; If m is not 2, the query matrix Q is constructed by querying the weight matrix based on the covariance matrix of the mth mold 3D model in the self-attention mechanism reinforcement set to strengthen the output matrix F m-1 Based on the value weight matrix and the key weight matrix, the value matrix V and the key matrix K are constructed, and then the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), through the attention weight matrix ATT and the enhanced output matrix F m-1 Multiply them together to get the enhanced output matrix F m ; When m is N-1, the output of the enhanced output matrix F m Output is as a confidence covariance matrix.

[0052] Training the mold 3D model includes the following steps:

[0053] A number of mold 3D modeling training samples are obtained, and the mold 3D modeling training samples include mold 3D modeling data and corresponding N mold drawing images. It should be noted that the mold 3D data here is artificially designed based on N mold drawing images. All mold 3D modeling training samples are composed of a mold 3D modeling training set, and then the mold 3D modeling training set is sent to the mold 3D modeling model with parameter initialization for training. During the training process, the N mold drawing images in the mold 3D modeling training samples are used as input, and the mold 3D modeling data in the mold 3D modeling training samples are used as target output. A first loss value is calculated, and it is determined whether the first loss value is within a first preset range. The first preset range is determined by the developer. If the first loss value is within the first preset range, the trained mold 3D modeling model is output; otherwise, the mold 3D modeling model is continuously trained through the mold 3D modeling training set.

[0054] Based on the mold 3D modeling data and the corresponding attribute data of the mold, the mold processing parameter set is simulated and optimized to construct the optimal mold processing parameter set, which specifically includes the following steps:

[0055] Construct several optimization individuals, and form all the optimization individuals into a population set, set the maximum number of iterations, and construct the optimization individuals in the following way: for any mold processing parameter set item, select a random number within the range corresponding to the mold processing parameter item as the mold processing parameter in the optimization individual. When all the mold processing parameter set items are assigned values, the construction of the optimization individual is completed;

[0056] The fitness of all optimized individuals is calculated, and the fitness of the optimized individuals can reflect the quality of the mold processing parameters corresponding to the optimized individuals.

[0057] Based on the fitness corresponding to all optimized individuals, the population set is iteratively optimized through the sparrow search algorithm; the specific operation of the sparrow search algorithm refers to the existing technology and will not be described in detail here;

[0058] When the number of iterations reaches the maximum number of iterations, the optimized individual with the largest fitness is output as the optimal mold processing parameter set.

[0059] Calculate the fitness corresponding to the optimized individual, which specifically includes the following steps:

[0060] The optimized individual and the three-dimensional modeling data of the mold and the attribute data corresponding to the mold are sent to the parameter evaluation model for processing, and the parameter evaluation value is output, which is the fitness corresponding to the optimized individual;

[0061] The parameter evaluation model includes a feature extraction layer, a data splicing layer and a parameter evaluation value output layer. The feature extraction layer is established based on the PointNet model, and is used to receive the mold three-dimensional modeling data for feature extraction to construct a mold feature vector. It should be noted that the mold feature vector can reflect the spatial size information of the mold and provide constraints for subsequent processing parameter evaluation; the data splicing layer is used to splice the mold feature vector, the attribute data corresponding to the mold, and the optimized individuals to construct a mold processing parameter evaluation data set; the parameter evaluation value output layer is established based on the BP neural network, and is used to process the mold processing parameter evaluation data set and output the parameter evaluation value.

[0062] Training the parameter evaluation model includes the following steps:

[0063] Obtain several positive samples and negative samples for parameter evaluation training. The positive samples for parameter evaluation training include the mold processing parameter set, mold 3D modeling data and the corresponding attribute data of the mold during normal processing. The negative samples for parameter evaluation training include the mold processing parameter set, mold 3D modeling data and the corresponding attribute data of the mold during abnormal processing. It should be noted that the positive samples and negative samples for parameter evaluation training can be obtained through actual processing operations or through processing simulation using digital twin technology. The positive samples and negative samples for parameter evaluation training are labeled with target parameter evaluation values. Generally, , the target parameter evaluation value corresponding to the positive sample of parameter evaluation training is 1, and the target parameter evaluation value corresponding to the negative sample of parameter evaluation training is 0. All labeled positive samples of parameter evaluation training and negative samples of parameter evaluation training form a parameter evaluation training set, and the parameter evaluation training set is sent to the parameter evaluation model with parameter initialization for training. The target parameter evaluation value is used as the target, and the second loss value is calculated to determine whether the second loss value is within the second preset range. The second preset range is determined by the developer. If the second loss value is within the second preset range, the trained parameter evaluation model is output; otherwise, the parameter evaluation model is continued to be trained by using the parameter evaluation training set.

[0064] Embodiment 2, a three-dimensional modeling and simulation system for mold processing based on computer vision, such as Figure 1 As shown, including:

[0065] The mold drawing image acquisition module is used to acquire mold drawing images of N molds to be processed. It should be noted that in the process of mold processing, the mold drawings are generally designed based on the requirements, and N is generally 3. The representation mold drawings generally include three views, namely, the front view, the side view and the top view;

[0066] A mold 3D modeling module is used to send the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and output the mold 3D modeling data, which includes the pixel distribution of the mold in the 3D space;

[0067] The attribute data acquisition module is used to acquire the attribute data corresponding to the mold, and the attribute data corresponding to the mold specifically includes information such as the material of the mold and the roughness of different positions of the mold;

[0068] The parameter optimization module is used to simulate and optimize the mold processing parameter set based on the mold 3D modeling data and the corresponding attribute data of the mold. The mold processing parameter set includes cutting speed, feed speed and cutting depth, so as to construct the optimal mold processing parameter set;

[0069] The mold processing simulation module is used to simulate the mold processing process through digital twin technology based on the mold 3D modeling data and the optimal mold processing parameter set.

[0070] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims

1. A three-dimensional modeling and simulation method for mold processing based on computer vision, characterized in that: include: Acquire N mold drawing images of the molds to be processed, and the mold drawing images of the N molds to be processed are from different perspectives; Sending the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and outputting the mold 3D modeling data; Acquire the attribute data corresponding to the mold, and simulate and optimize the mold processing parameter set based on the mold 3D modeling data and the attribute data corresponding to the mold to construct the optimal mold processing parameter set, and simulate the mold processing process through digital twin technology based on the mold 3D modeling data and the optimal mold processing parameter set; The mold three-dimensional modeling model includes a variable distribution construction layer, a self-attention mechanism reinforcement layer, a three-dimensional data feature fusion layer and a mold three-dimensional modeling data output layer, wherein the variable distribution construction layer is used to process the mold drawing images of N molds to be processed in sequence to construct the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image; the self-attention mechanism reinforcement layer is used to perform a self-attention mechanism reinforcement operation on the N mold three-dimensional model covariance matrices to construct a confidence covariance matrix; the three-dimensional data feature fusion layer is used to fuse the three-dimensional data features based on the N mold three-dimensional model mean vectors and the confidence covariance matrix to construct the mold three-dimensional modeling data; The mold 3D modeling data output layer is used to output the mold 3D modeling data.

2. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 1, characterized in that: Sending the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and outputting the mold 3D modeling data, specifically includes the following steps: In the variable distribution construction layer, there are N variable distribution construction units and N fully connected units, and the N variable distribution construction units share parameters. The variable distribution construction unit is established based on the ResNet50 model. Unlike the ResNet50 model, the spatial attention mechanism is implemented in the residual connection process. The mold drawing images of the N molds to be processed are sequentially sent to the N variable distribution construction units and the N fully connected units for processing, and the mold three-dimensional model mean vector and the mold three-dimensional model covariance matrix corresponding to each mold drawing image are output; In the self-attention mechanism reinforcement layer, cluster analysis is performed on the N mold 3D model covariance matrices, and the mold 3D model covariance matrix corresponding to the center of the largest cluster is recorded as the center covariance matrix, and the center covariance matrix is ​​stored in the self-attention mechanism reinforcement set, and then the remaining N-1 mold 3D model covariance matrices are arranged from large to small according to the distance from the center covariance matrix and stored in the self-attention mechanism reinforcement set; Perform self-attention mechanism reinforcement operation based on the self-attention mechanism reinforcement set; In the three-dimensional data feature fusion layer, the mean vector of the mold three-dimensional model is selected in turn. For the selected mean vector of the mold three-dimensional model, the three-dimensional data feature is constructed through the confidence covariance matrix. All three-dimensional data features are stored in the feature fusion set. j is traversed from 2 to N, where j is the number of the element in the feature fusion set. For each j, if j is 2, the first three-dimensional data feature in the feature fusion set and the jth three-dimensional data feature in the feature fusion set are spliced ​​according to the channel, and then a three-dimensional convolution operation is performed to construct the three-dimensional data intermediate feature R j ; If j is not 2, the intermediate feature R of the three-dimensional data j-1 The j-th 3D data feature in the feature fusion set is spliced ​​according to the channel, and then a 3D convolution operation is performed to construct the 3D data intermediate feature R j ; When j is N-1, the output 3D data intermediate feature R j As mold 3D modeling data; In the mold 3D modeling data output layer, the mold 3D modeling data is output.

3. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 2, characterized in that: The self-attention mechanism reinforcement operation is performed based on the self-attention mechanism reinforcement set, which specifically includes the following steps: Traverse m from 2 to N, where m is the number of the element in the self-attention mechanism reinforcement set. For each m, if m is 2, the query matrix Q is constructed based on the covariance matrix of the mth mold 3D model in the self-attention mechanism reinforcement set through the query weight matrix. Based on the center covariance matrix, the value matrix V and the key matrix K are constructed through the value weight matrix and the key weight matrix, and then the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), d is the dimension of the covariance matrix of the mold 3D model, and the enhanced output matrix F is obtained by multiplying the attention weight matrix ATT with the center covariance matrix. m ; If m is not 2, the query matrix Q is constructed by querying the weight matrix based on the covariance matrix of the mth mold 3D model in the self-attention mechanism reinforcement set to strengthen the output matrix F m-1 Based on the value weight matrix and the key weight matrix, the value matrix V and the key matrix K are constructed, and then the attention weight matrix ATT=softmax(QK T / (d) 0.5 ), through the attention weight matrix ATT and the enhanced output matrix F m-1 Multiply them together to get the enhanced output matrix F m ; When m is N-1, the output of the enhanced output matrix F m Output is as a confidence covariance matrix.

4. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 3 is characterized in that: Training the mold 3D model includes the following steps: A plurality of mold 3D modeling training samples are obtained, wherein the mold 3D modeling training samples include mold 3D modeling data and corresponding N mold drawing images, all mold 3D modeling training samples are combined into a mold 3D modeling training set, and then the mold 3D modeling training set is sent to the mold 3D modeling model with parameter initialization for training. During the training process, the N mold drawing images in the mold 3D modeling training samples are used as input, and the mold 3D modeling data in the mold 3D modeling training samples are used as target output, a first loss value is calculated, and it is determined whether the first loss value is within a first preset range. If the first loss value is within the first preset range, the trained mold 3D modeling model is output; Otherwise, continue to train the mold 3D modeling model through the mold 3D modeling training set.

5. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 4, characterized in that: Based on the mold 3D modeling data and the corresponding attribute data of the mold, the mold processing parameter set is simulated and optimized to construct the optimal mold processing parameter set, which specifically includes the following steps: Construct several optimized individuals, and form a population set of all optimized individuals, and set the maximum number of iterations; Calculate the fitness of all optimized individuals; Based on the fitness of all optimized individuals, the population set is iteratively optimized through the sparrow search algorithm; When the number of iterations reaches the maximum number of iterations, the optimized individual with the largest fitness is output as the optimal mold processing parameter set.

6. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 5, characterized in that: Calculate the fitness corresponding to the optimized individual, which specifically includes the following steps: The optimized individual and the three-dimensional modeling data of the mold and the attribute data corresponding to the mold are sent to the parameter evaluation model for processing, and the parameter evaluation value is output. The parameter evaluation value is the fitness corresponding to the optimized individual; The parameter evaluation model includes a feature extraction layer, a data splicing layer and a parameter evaluation value output layer, wherein the feature extraction layer is established based on the PointNet model and is used to receive the mold 3D modeling data for feature extraction to construct a mold feature vector; The data splicing layer is used to splice the mold feature vector, the attribute data corresponding to the mold and the optimized individual to construct a mold processing parameter evaluation data set; the parameter evaluation value output layer is established based on the BP neural network, which is used to process the mold processing parameter evaluation data set and output the parameter evaluation value.

7. The method for three-dimensional modeling and simulation of mold processing based on computer vision according to claim 6, characterized in that: Training the parameter evaluation model includes the following steps: Obtain several positive samples and negative samples for parameter evaluation training, wherein the positive samples for parameter evaluation training include a mold processing parameter set, mold three-dimensional modeling data, and attribute data corresponding to the mold during normal processing, and the negative samples for parameter evaluation training include a mold processing parameter set, mold three-dimensional modeling data, and attribute data corresponding to the mold during abnormal processing. Label the positive samples and negative samples for parameter evaluation training with target parameter evaluation values, and combine all labeled positive samples and negative samples for parameter evaluation training into a parameter evaluation training set. Send the parameter evaluation training set to a parameter evaluation model with parameter initialization for training, and use the target parameter evaluation value as a target to calculate a second loss value, and determine whether the second loss value is within a second preset range. If the second loss value is within the second preset range, output the trained parameter evaluation model; otherwise, continue to train the parameter evaluation model using the parameter evaluation training set.

8. The three-dimensional modeling and simulation system of mold processing based on computer vision is characterized by: The system applies the computer vision-based three-dimensional modeling and simulation method for mold processing according to any one of claims 1 to 7, including: A mold drawing image acquisition module is used to acquire mold drawing images of N molds to be processed; A mold 3D modeling module is used to send the mold drawing images of N molds to be processed into the mold 3D modeling model for processing, and output the mold 3D modeling data; An attribute data acquisition module is used to acquire attribute data corresponding to the mold; The parameter optimization module is used to simulate and optimize the mold processing parameter set based on the mold 3D modeling data and the attribute data corresponding to the mold, so as to construct the optimal mold processing parameter set; The mold processing simulation module is used to simulate the mold processing process through digital twin technology based on the mold 3D modeling data and the optimal mold processing parameter set.

Citation Information

Patent Citations

  • Method for changing casting into forging of guide wheel of heading machine

    CN113976855A

  • Modeling method of digital twin data driving model in autonomous spading process of loading machine

    CN116933441A