Method for generating a mold texture of a mold mold and
Through the generation neural network, the seed texture is extended to the texture size of the mold texture, which solves the problem of difficulty in generating seamless mold textures in the prior art, and achieves high-quality and seamless mold texture production, simplifies the workpiece surface texture production process and reduces costs.
Patent Information
- Application Number
- CN202411482765.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-24
- Filing Date
- 2024-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art is difficult to generate seamless mold textures of any size, especially when applied on workpieces and castings, resulting in repetitive and periodic problems of texture, and the hand-made process is cumbersome and costly.
Generate seamless mold textures with a similar appearance and feel to the seed texture by extending the seed texture to the texture size of the mold texture using a generative neural network. The method includes providing seed textures as input to generate neural networks, creating seamless mold textures by training the generated neural networks.
The high-quality seamless mold texture is achieved, avoiding texture repetition and periodic problems, simplifying the workpiece surface texture production process, reducing costs, and improving the appearance and feel quality of the mold.
Smart Images

Figure CN119887869A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for generating a mold texture of a casting mold, and further relates to an apparatus for generating a mold texture of a casting mold, a computer program and a computer readable medium. Background Art
[0002] From the prior art, for example, prior art document EP 3047932 A1 is known. It discloses a laser ablation method for engraving a textured surface of a two-dimensional or three-dimensional workpiece by means of a laser beam of a laser processing head. The surface engraving is carried out in one or more layers that are machined successively, wherein each defined layer to be machined is subdivided into one or more slices that are intended to be machined one after another with the laser beam. In the present case, the boundary line of at least one slice is determined in such a way that a path on the layer is followed (which will not be affected by the engraving of the laser beam of the laser processing head).
[0003] In addition, prior art document US2022 / 0148299 A1 describes a method, system, and apparatus for generating a realistic extension of an image, including a computer program encoded on a computer storage medium. In one aspect, the method includes providing an input including a provided image to a generative neural network having multiple generative neural network parameters. The generative neural network processes the input according to the training values of the multiple generative neural network parameters to generate an extended image. The extended image (i) has more rows, more columns, or more rows and more columns than the provided image, and (ii) is predicted to be a realistic extension of the provided image. The generative neural network is trained using an adversarial loss objective function. However, the size of the extended image is fixed in one direction and is limited by the structure of the generative neural network. Summary of the invention
[0004] The object of the present invention is to provide a method for generating a mould texture for a casting mould, which method has advantages over known methods, in particular to provide a mould texture having a look and feel similar to a seed texture, which mould texture is virtually seamless and has a size that can be selected according to the size of the mould.
[0005] This is achieved by using a method for generating a mold texture for a casting mold according to claim 1. The method is characterized in that the mold texture is generated from a seed texture, the mold texture having a larger texture size than the seed texture in at least one dimension, wherein the seed texture is provided as an input texture to a generative neural network having a plurality of neural network parameters determined during training of the generative neural network, and the generative neural network is used to expand the seed texture to the texture size of the mold texture.
[0006] Advantageous embodiments and expedient further embodiments of the invention are indicated in the dependent claims.It is to be pointed out that the embodiments explained in the description are not limiting; on the contrary, any variation of the features disclosed in the description, the claims and the drawings is implementable.
[0007] The mold texture is preferably used to create a casting mold, which is then used to create one or more workpieces having a surface corresponding to the mold texture during a molding process. The molding process is, for example, an injection molding process or a die casting process. The casting mold is machined, in particular using laser ablation, during which the mold texture is applied to the casting mold, i.e., the surface of the casting mold. For example, the mold texture is applied to the casting mold by engraving the texture into the mold. Typically, the mold texture is a grayscale picture with texture data, which consists of a number of pixels with pixel values within a predetermined range. For example, the mold texture is a grayscale picture with a single color channel. It is a two-dimensional array of pixels, each pixel having a pixel value. The pixel value is preferably an eight-bit value ranging from 0 to 255 or from -127 to 127, or a sixteen-bit value. For example, the color depth of the pixel or the pixel value depends on the capabilities of the CAM software used to apply the mold texture to the casting mold. It is also possible that the entire range of pixel values is not used, so that for eight-bit values, the pixel values range from 0 to less than 255, less than 200 or less than 160, preferably the pixel values range from 0 to 155.
[0008] The larger the workpiece, the larger the casting mold and therefore the larger the mold texture needs to be. Providing a sufficiently large mold texture is usually not a problem if the texture is completely structured and, for example, consists of regularly spaced geometric shapes such as dots or lines. The opposite is true if an unstructured texture has to be provided on the workpiece and therefore the casting mold. For example, an unstructured texture attempts to imitate the look and feel of an organic structure such as skin, especially snakeskin, leather, etc.
[0009] Known methods for generating such unstructured mold textures typically rely on scanning an existing surface, for example by laser scanning. This method is limited by the size of the existing surface, since the mold texture cannot exceed this size without repeating the pattern. The repetition of the pattern may lead to visible artifacts in the texture or on the finished product, since the resulting mold texture is discontinuous across the boundary between the original scanned pattern and its repetition. In addition, merely repeating the scanned pattern leads to visible periodicity problems, since the same unchanged pattern can be repeatedly identified on the mold texture and the finished product. In order to alleviate at least some of these problems, the mold texture can be post-processed, for example by smoothing the texture. As an alternative, the mold texture can be hand-made by the designer. However, this process is time-consuming and requires a huge amount of work, resulting in high costs. However, the result may again not be as expected, since repetitions may still be visible.
[0010] In order to generate a mold texture with an arbitrary size, in a first step, a seed texture is provided, which has all the required features of a mold texture, but is smaller in size in at least one dimension. For example, in one or more dimensions in a Cartesian coordinate system, the size of the seed texture is preferably at most 30%, at most 20% or at most 10% of the size of the mold texture applied to the mold later. For example, the seed texture has a size of at most 1024, at most 512 or at most 256 pixels in one dimension. In another example, the seed texture is square, i.e., its size in different dimensions is the same. In this case, as an example, the seed texture has a size of at most 1024×1024, at most 512×512 or at most 256×256. Preferably, the size of the mold texture is an integer multiple of the size of the seed texture in at least one dimension, ideally in two dimensions. This means that the size of the mold texture in at least one direction is equal to the size of the seed texture in that direction multiplied by an integer (whole number), i.e. an integer (integer). However, it is also possible to use a ratio between the size of the mold texture and the size of the seed texture, which is not an integer. In this case, extra pixels are generated and clipped.
[0011] In the ordinary process for creating the mold texture, this would probably mean many repetitions and therefore many visible boundaries throughout the mold texture. To avoid this, the mold texture is created using a generative neural network that has been trained for this purpose. The generative neural network has a plurality of neural network parameters determined during the neural network training. After the training is completed, the generative neural network with its neural network parameters is used to expand the seed texture to the mold texture, i.e. to generate a (larger) mold texture from a (smaller) seed texture. To this end, at least a portion of the seed texture is used directly or indirectly as an input texture for the generative neural network, which provides an output texture based on the input texture. The output texture is used to create the mold texture. In general, the generative neural network has an input layer, an output layer and at least one hidden layer (i.e. one or more hidden layers), and the output layer is connected to the input layer via at least one hidden layer. For example, a convolutional neural network with a plurality of independent convolutional filter groups is used as a generative neural network or a part of a generative neural network. The filter groups represent different channels of the network and are preferably adapted in such a way that they reproduce different characteristic scales of the seed texture or the input texture.
[0012] Each layer of the neural network has its own input tensor and output tensor. Subsequent layers take the output tensor of the previous layer as input tensor and provide their own output tensors based on the input tensor. This means that the input layer receives the input tensor of the neural network and provides an output tensor for at least one hidden layer. The output tensor of the input layer can be the same as its input tensor. The output layer receives the output tensor of at least one hidden layer as its input tensor and provides an output tensor based on it. Similarly, the output tensor of the output layer can be the same as its input tensor, at least for illustration purposes. In summary, the input layer receives the input tensor, and the generating neural network provides an output tensor at the output layer via at least one hidden layer based on the input tensor. The input tensor of the input layer corresponds to or is derived from the source texture. The output texture corresponds to or is derived from the output tensor of the output layer. Of course, other structures of the generating neural network can also be envisioned.
[0013] For example, it is possible that the output texture of the generating neural network has the same size as the mold texture. This makes it possible to provide a mold texture based on the seed texture in a single step. For sufficiently small mold textures, such a process is entirely possible. However, as the size of the mold texture increases, the number of neural network parameters increases, for example because the number of layers in the neural network and / or the number of nodes per layer increases. In this case, several steps may be necessary to complete the mold texture. For example, the generating neural network is repeatedly provided with input textures, preferably different input textures, and an output texture is created for each of one or more input textures. In other words, this means that it takes the input texture (or, in general, texture data) and expands it in at least one direction. Preferably, the size of the input texture is the same as the size of the seed texture, or vice versa, in particular in each dimension of the texture. The generated output texture is then used to complete the mold texture, for example by tiling, with or without overlap. In this context, it is particularly preferred to use a portion of a previous output texture as an input texture for the generating neural network.
[0014] The use of a generative neural network to create a mold texture using a seed texture as an input texture reduces or completely eliminates the problems typically associated with creating large-scale mold textures. In particular, visible repetitions of seed textures in the mold texture are effectively avoided. In addition, it is possible to create a completely seamless mold texture, especially if the mold texture is created in a single step from a seed texture by a generative neural network. This requires that the generative neural network is large enough to provide such a method. Alternatively, the seamless mold texture is implemented in several steps. In each step, the generative neural network is used to create an output texture based directly or indirectly on the seed texture, which is used to generate the mold texture. Using this method, the mold texture includes a plurality of output textures, each of which is generated by a generative neural network based on a corresponding input texture. The input texture either corresponds to a seed texture, or to a previous output texture, or to a portion of a mold texture that contains at least a portion of a seed texture and / or at least a portion of one or more previous output textures. Such a procedure results in an exceptionally high quality of the mold texture, which in particular means a seamless and coherent mold texture.
[0015] According to a further embodiment of the present invention, it is provided that the generative neural network is part of a generative adversarial network together with the discriminative neural network, and the generative neural network and the discriminative neural network are trained with a training data set, which includes a plurality of sample textures extracted, for example, from a training texture. The generative adversarial network comprises: a generative part, i.e. a generative neural network; and a discriminative part, i.e. a discriminative neural network. The discriminative neural network is trained using the training data set. The training data set comprises several sample textures, which preferably have the same size in each dimension, but their contents are different. For example, the sample textures are variants of the seed texture, or more generally, variants of possible seed textures, based on which the mold texture will be created. Preferably, the sample textures are extracted from the training texture, in particular at different positions. After the sample textures are extracted from the training texture, the sample textures can be modified. For example, all sample textures are extracted from the training texture, and only some sample textures are modified, for example with random data. In summary, this means that for training, some sample textures are used under unmodified conditions, while some sample textures are used under modified conditions.
[0016] The generative neural network is used to create an output texture from an input texture. One of the sample textures or the output texture is fed as input texture to the discriminative neural network, which tries to discriminate whether its input texture was created by the generative neural network or is part of the training data set. Based on the output of the discriminative neural network, the generative neural network is trained by adapting its neural network parameters. This process is repeated until a given number of iterations, while keeping the generative neural network and the discriminative neural network in equilibrium, in particular with regard to their cost functions. Obviously, the discriminative neural network is used only during training, i.e. until the generative neural network and its neural network parameters have reached a stage where output textures of sufficient quality are produced. For determining the mold texture, i.e. for expanding the seed texture to the texture size of the mold texture, only the generative neural network is used. The mechanism of the generative neural network is known in principle and is therefore not discussed further.
[0017] According to a further embodiment of the invention, it is provided that during the training of the generative adversarial network, the generative neural network and the discriminative neural network are trained alternately. Following the general principles of generative adversarial networks, the two parts of the network (i.e. the generative part and the discriminative part) are preferably trained in turn. In a first step, the discriminative neural network is trained based on a training data set, which can be supplemented by random textures. Thus, the discriminative neural network learns to distinguish between desired textures (i.e. textures similar to the sample textures of the training data set) and unwanted textures (i.e. textures that differ too much from the sample textures). During the first step, the generative neural network is frozen, i.e. its neural network parameters are not updated.
[0018] After the first step, the generative neural network is trained. In the process, it is used to generate at least one output texture (i.e. one or more output textures), which are then used as input textures for the discriminative neural network. The latter determines a score regarding the likelihood that the at least one output texture is part of the training data set. Based on this score, the neural network parameters of the generative neural network are adapted in such a way that the score changes towards a value indicating that the discriminative neural network cannot distinguish the output texture from the sample textures in the training data set, i.e. the output texture is structurally similar to the sample textures of the training data set, e.g. based on a reconstruction loss function. Thereafter, these two steps are repeated, replacing the random texture with the output texture of the generative neural network. Again, this basic principle of the generative neural network is known and will not be described in further detail.
[0019] According to another embodiment of the present invention, it is provided that, in order to generate a mold texture, the mold texture is cleared from the texture data and a seed texture is written as texture data into a suitable area of the mold texture. Before using a generative neural network to generate an output texture, the mold texture is prepared. For example, all pixels of the mold texture are set to default values or random values. During the latter process, the mold texture is initialized in such a way that each of its pixels is set to a corresponding random value. For each pixel, the random value is re-determined so that every two pixels of the mold texture may but not necessarily have different pixel values. The preparation of the mold texture also includes writing the seed texture as texture data into the mold texture. This is done in a suitable area, for example starting with the edge of the mold texture so that the texture data corresponding to the seed texture extends along the two edges of the mold texture. The texture data therefore corresponds to a portion of the mold texture, where the mold texture contains data that can be used for the mold form. The method provides a suitable starting point for the generative neural network, resulting in a high-quality mold texture.
[0020] According to a further embodiment of the invention, it is provided that a source texture is sampled from a mold texture and used as an input texture for a generative neural network, wherein the resulting output texture of the generative neural network is written as texture data into a suitable area of the mold texture. The input data of the generative neural network corresponding to the input texture is taken from the mold texture itself. Preferably, a seed texture is written into the mold texture when it is prepared. The area in which the seed texture is written is specially selected in such a way that the texture data of the mold texture corresponding to the seed texture is at least partially used for the input texture. For example, the input texture is sampled from the mold texture in such a way that only a part of it contains texture data that has been written into the mold texture. The input texture is used as an input for a generative neural network, which creates an output texture based on the input texture. The output texture is then written into the mold texture as texture data, especially in the same position where the input texture has been read. Preferably, the process is repeated by changing the position where the input texture is read and the position where the output texture is written as texture data until the mold texture is completely filled with texture data. Using this method a high-quality mold texture is achieved.
[0021] When sampling the input texture from the stencil texture, a mask may furthermore be determined. The mask indicates the parts of the input texture that do not contain texture data but correspond to the initialized parts of the stencil texture. The generative neural network uses the mask to determine which part of the input texture contains data, based on which the output texture will be generated and may not be modified, and which part will be filled with texture data. Using such a mask, the size of the output texture can be chosen to be the same as the size of the input texture.
[0022] According to another embodiment of the present invention, it is provided that before using a generative neural network to expand the seed texture, the seed texture and / or the source texture and / or the mold texture and / or the input texture are normalized. Normalizing the corresponding texture includes determining the range of values within the texture data of the texture and calculating the new value of each pixel in the texture according to a mathematical function based on the range of values. Preferably, the corresponding texture is normalized to a predetermined range between 0 and 1 or between -1 and +1. For example, the mold texture is initialized with pixel values within a predetermined range, and the seed texture is written to the mold texture in a normalized form, that is, the seed texture is normalized and then written to the mold texture. As an alternative, the mold texture is not normalized, but after sampling the input texture from the mold texture, the input texture is normalized, used as the input of the generative neural network, and the output texture is written to the mold texture in an inverse normalized form. Using normalization, the computational stability of the generative neural network is improved.
[0023] According to a further embodiment of the invention, it is provided that the source texture is sampled from an area of the mould texture containing texture data, in particular from an area of the mould texture containing only part of the texture data. This strategy has already been mentioned. The source texture is taken from the mould texture, wherein the size of the source texture is smaller than the size of the mould texture in at least one dimension. Preferably, the size of the source texture corresponds to the size of the input texture of the generative neural network, in particular in each dimension. For example, the size of the source texture corresponds to the size of the seed texture, also in particular in each dimension.
[0024] In a preferred embodiment, starting from a starting position, a sample window with the size of the input texture is moved on the mold texture. The source texture is sampled from the mold texture in the sample window and used as the input texture. The output texture generated by the generative neural network is written to the mold texture as texture data in the window. Thereafter, the sample window is moved, for example, only in the first direction, in particular by a distance that is less than the size of the source texture in this dimension. For example, the distance is at most 25%, 20% or 15% of the source texture size. The process is repeated until the sample window reaches the end of the mold texture in the first direction. In this case, the position of the sample window is reset to the starting position in the first direction and advanced in the second direction, which is preferably perpendicular to the first direction, and the process is repeated again. With this method, good results are obtained for the mold texture.
[0025] According to a further embodiment of the invention, it is provided that the texture size of the source texture corresponds to the input texture size of the generating neural network. If the size of the texture is mentioned in the context of this specification, it refers to the size in all dimensions unless otherwise indicated. In this specific case, this means that the size of the source texture is the same as the size of the input texture in all dimensions (i.e. in two dimensions that are perpendicular to each other). Specifically, the textures (e.g. the source texture and the input texture) each contain pixels organized in a plurality of rows and a plurality of columns, wherein the number is the same for both textures.
[0026] According to a further embodiment of the present invention, it is provided that a convolutional neural network is used as a generative neural network. Therefore, the generative neural network comprises at least one convolutional layer. A convolutional layer is a hidden layer between an input layer and an output layer of the generative neural network. The input layer receives an input texture, and the output texture is taken from the output layer. The convolutional layer comprises one or more filters. It may further comprise an activation function, such as a rectifier or a rectified linear input (ReLU). It convolves its input and passes the result of the convolution to the next layer, such as another convolutional layer or an output layer. It is assumed that convolutional neural networks and their principles are known in the art and will not be discussed in detail. If the generative neural network is part of a generative adversarial network, the latter is preferably a deep convolutional network. Using a convolutional neural network with at least one convolutional layer has the advantage that the details of the sample texture are learned during training so that the generative neural network is configured to reproduce the details present in the seed texture. In addition, spatial coherence remains intact in the sense that pixel neighborhood information is retained in the convolutional layer instead of being flattened as in the dense layer.
[0027] According to a further embodiment of the invention, it is provided that a convolutional neural network with a plurality of independent convolutional filter banks is used as a generating neural network. In the context of the present specification, each convolutional filter bank comprises at least one convolutional layer. They are independent of each other, in particular meaning that backpropagation during training is performed completely independently of the filter bank and there are no jump connections between them. In other words, the convolutional layers of the filter banks are separated and are calculated separately during training and during the creation of the stencil texture.
[0028] For complex structures such as mold textures, independent filter groups are usually avoided because they cause stability and efficiency problems, at least for general cases. However, the applicant has surprisingly found that independent feature groups lead to high-quality mold textures because at least one convolution layer of each convolution filter group is specifically parameterized to replicate the features used in the mold texture. For example, each convolution filter group is parameterized to reproduce features of different size scales. For example, three independent convolution filter groups are used. The first group is parameterized to reproduce small features, the second group is parameterized to reproduce medium-sized features, and the third group is parameterized to reproduce the large features of the seed texture. For example, the shaping of the tensor is only performed within the independent convolution filter group, and the generation neural network outside the convolution filter group is not performed such shaping. However, as an alternative, decompression is performed only within the filter group, and compression and / or processing is also or only performed outside the filter group.
[0029] Preferably, each independent filter group comprises several convolutional layers. Ideally, most of the total layers of the generative neural network are part of the independent filter groups. For example, at least 70%, at least 80% or at least 90% of the layers of the generative neural network are part of the independent filter groups. The independent filter groups are calculated in parallel. This means that the input tensor of the independent filter group is calculated from the output tensor of the layer before the independent filter group. The output tensor of the independent filter group is merged and used as the input tensor of the layer after the independent filter group. For example, the number of layers of the generative neural network between the input layer and the independent filter group corresponds to the first number, and the number of layers of the generative neural network between the independent filter group and the output layer corresponds to the second number. Preferably, the first number and / or the second number are each at most 20%, at most 10% or at most 5% of the total number of generative neural networks. The input layer in this article is the layer that receives the input texture, and the output layer is the layer from which the output texture is obtained. It becomes clear that the most preferred architecture of the generative neural network separates the layers of the filter group on most of the neural network, resulting in the advantages already mentioned.
[0030] According to a further embodiment of the invention, it is provided that all neural network parameters are used to determine the output tensor of the convolution filter bank so that at least a part of the output texture directly corresponds to the recombination of the output tensor of the convolution filter bank. The neural network parameters determine the output tensor of the filter bank, and optionally the recombination of its output. This means that after the output tensors of the filter bank are recombined into a single output tensor, only the predetermined operation is performed on the single recombined output tensor in order to determine the output texture. This determination does not depend on the neural network parameters and is constant during training. The predetermined operations and / or their parameters are constant and are not changed during the training of the generating neural network. For example, the operation includes normalization or renormalization of the recombined output tensor of the filter bank. Therefore, the output texture depends directly at least partially or completely on the recombined output tensor, and this is via a predetermined operation with fixed parameters.
[0031] Alternatively, after the output tensors of the filter bank are recombined, the recombined output tensor is used as input to one or more convolutional layers of the generative neural network. Preferably, the number of convolutional layers between the recombined output tensor and the output layer is at most three layers, at most two layers or - particularly preferably - at most one layer. For example, the recombined output tensor is directly used as the input tensor of at least one convolutional layer, and its output tensor is directly used as the input tensor of the output layer, at most via the predetermined operation already described. Using this method, a large part of the generative neural network is divided into several parallel calculated convolutional filter banks, whose outputs are recombined only shortly before the output layer (i.e. shortly before the generative neural network generates the output texture). This leads to the special function of the convolutional filter banks, which are trained to reproduce the features of different scales of the source texture. Preferably, for the generative neural network, independent filter banks are used only at one point. This means that the generative neural network is split into filter banks with parallel convolutional layers only once. After the output tensors of the filter banks are recombined into a single output tensor, no further independent filter banks appear until the output layer.
[0032] According to another embodiment of the present invention, it is provided that a filter bank with different filter parameters is used for the convolution filter bank, and the filter parameters are such as filter size, stride and dilation rate. Each convolution layer in the filter bank uses a predetermined value of its convolution layer parameter. As a parameter, preferably, one of the parameter filter size, stride and dilation rate is used. For example, the first filter bank uses a first value of filter size, stride and / or dilation rate, the second filter bank uses a second value of filter size, stride and / or dilation rate, and the third filter bank uses a third value of filter size, stride and / or dilation rate. For at least one parameter, several parameters or all parameters, these values are different from each other. The filter parameters of the filter bank are configured to capture structures of different scales during training, and reproduce these structures at different scales during the operation of the generative neural network to expand the seed texture to the size of the mold texture, that is, to determine the output texture for completing the mold texture.
[0033] For example, the convolutional layers in each filter bank can be grouped into different stages, namely a first stage that performs compression, a second stage that performs processing, and a third stage that performs decompression. The compression stage can also be called an encoding stage, and the decompression stage is called a decoding stage. Each stage includes at least one convolutional layer. If the corresponding stage has several convolutional layers, they are preferably connected in series, that is, the output tensor of each convolutional layer is used as the input tensor of the convolutional layer behind it. During the compression stage, the size of the input tensor always or preferably only sometimes decreases from one convolutional layer to the next convolutional layer, so that the output tensor of the compression stage is smaller than its input stage. Preferably, the output tensor of the compression stage has a higher number of channels than its input tensor. In other words, within a compression stage with at least one convolutional layer, the tensor size decreases and preferably the number of channels increases.
[0034] During the processing phase, the size of the input tensor remains the same. This means that the output tensor of a processing phase has the same size as its input tensor. In other words, within a processing phase with at least one convolutional layer thereof, the tensor size remains the same, and preferably the number of channels also remains the same. During the decompression phase, the size of the output tensor increases from one convolutional layer to the next. This means that the output tensor of the decompression phase is larger than its input tensor. In other words, within a decompression phase with at least one convolutional layer thereof, the tensor size increases, and preferably the number of channels decreases.
[0035] For example, in the compression phase of the first filter bank, at least one convolutional layer uses a first value of the stride and uses a first value of the dilation rate. In the compression phase of the second filter bank, at least one convolutional layer uses a second value of the stride and uses a second value of the dilation rate. And in the compression phase of the third filter bank, at least one convolutional layer uses a third value of the stride and uses a third value of the dilation rate. For example, the first value of the stride is greater than one, while the second and third values of the stride are smaller, preferably equal to one. Additionally or alternatively, the first value of the dilation rate is equal to one, while the second and third values of the dilation rate are greater. For example, the third value of the dilation rate is greater than the second value of the dilation rate, which in turn is greater than the first value of the dilation rate. Ideally, in the compression phase of the filter bank, the filter sizes of all convolutional layers are the same. For example, filter sizes of at least 3×3, at least 5×5, or at least 7×7 are used.
[0036] Additionally or alternatively, in the processing stage of the first filter bank, at least one convolutional layer uses a first value of the stride and uses a first value of the dilation rate. In the processing stage of the second filter bank, at least one convolutional layer uses a second value of the stride and uses a second value of the dilation rate. And in the processing stage of the third filter bank, at least one convolutional layer uses a third value of the stride and uses a third value of the dilation rate. For example, the first value, the second value and the third value of the stride are the same, for example equal to one. However, the first value, the second value and the third value of the dilation rate are increased, in particular relative to the values used in the compression stage of the corresponding filter bank. For example, the first value of the dilation rate in the processing stage is greater than the first value of the dilation rate in the compression stage; and / or the second value of the dilation rate in the processing stage is greater than the second value of the dilation rate in the compression stage; and / or the third value of the dilation rate in the processing stage is greater than the third value of the dilation rate in the compression stage. Ideally, in the compression stage of the filter bank, the filter sizes of all convolutional layers are the same. For example, filter sizes of at least 3×3, at least 5×5 or at least 7×7 are used.
[0037] Additionally or alternatively, in the decompression stage of the first filter bank, at least one convolutional layer uses a first value of the stride and uses a first value of the dilation rate. In the decompression stage of the second filter bank, at least one convolutional layer uses a second value of the stride and uses a second value of the dilation rate. And in the decompression stage of the third filter bank, at least one convolutional layer uses a third value of the stride and uses a third value of the dilation rate. For example, the first value, the second value and the third value of the stride are the same, for example equal to one. Preferably, the first value of the dilation rate is also equal to one, while the second value and the third value of the dilation rate are greater than one. Ideally, in the compression stage of the filter bank, the filter sizes of all convolutional layers are the same. For example, a filter size of at least 3×3, at least 5×5 or at least 7×7 is used. Such a configuration of using convolutional layers in filter banks and their stages leads to a reliable reproduction of features of the seed texture in the mold texture, even if they have different scales.
[0038] According to another embodiment of the present invention, the convolutional neural network has a plurality of first convolutional layers outside the independent convolutional filter group and a plurality of second convolutional layers outside the independent convolutional filter group. The total convolutional layers within the generative neural network are grouped into first convolutional layers and second convolutional layers. The number of first layers and the number of second layers are each at least one layer. However, all layers of each of the aforementioned groups are completely part of the first convolutional layer or part of the second convolutional layer. This means that each of the following steps is either completely performed within the independent convolutional filter group or completely performed outside the independent convolutional filter group: compression, processing and decompression. For example, all steps are performed in the independent convolutional filter group. In this case, preferably, tensor shaping is not performed outside these groups. As an alternative, compression is performed outside the independent convolutional filter group, and decompression is performed at least in the independent convolutional filter group. Common compression outside the filter group can help reduce training time.
[0039] According to a further embodiment of the present invention, it is provided that convolutional layers of the same rank in a convolutional filter bank differ between the convolutional filter banks with respect to at least one of the filter parameters. Rank is named for the order of the convolutional layer in a filter bank or its stage. For example, rank one is associated with the first convolutional layer in the corresponding filter bank or stage, rank two is associated with the second convolutional layer, and so on. Therefore, convolutional layers in different filter banks or stages have the same rank if the same number of convolutional layers precede them in their corresponding filter banks or stages. The convolutional layers in at least some filter banks (preferably all filter banks) differ in at least one of the filter parameters. This means that these convolutional layers have different values for filter size and / or stride and / or dilation rate. Different values of the filter parameters have been exemplarily shown. By using different values of the filter parameters, different scales of the seed texture can be transferred to the mold texture with high accuracy.
[0040] According to a further embodiment of the present invention, it is provided that in at least one of the convolutional layers, parallel layers are used and the output tensors of the parallel layers are recombined in the next layer. The parallel layers are applied to the same input tensor, i.e. the input tensor of at least one convolutional layer. Each parallel layer has an output tensor based on the input tensor, and the output tensors of the parallel layers are recombined in the layer after at least one convolutional layer. For example, the output tensors are recombined by multiplication or addition (in particular weighted addition, such as uniformly weighted addition). Such a structure allows a high degree of flexibility.
[0041] According to another embodiment of the present invention, it is provided that a gated convolution is performed in at least one of the convolution filter banks. The gated convolution is a computational block comprising two parallel layers, a recombining layer and an activation layer. Both parallel layers use the input tensor of the gated convolution block as an input tensor. One of these layers is a convolutional layer without an activation function, i.e. the output tensor of the layer is derived directly from its input tensor and is not changed by the activation function. Another of these layers is a convolutional layer with a sigmoid activation; the output tensor of the layer is therefore normalized to a range of 0 to 1. The recombining layer recombines its input tensor (i.e. the output tensor of the parallel layer) into an output tensor, for example by calculating a tensor product, which is performed element by element. The activation layer uses the output tensor of the recombining layer as an input tensor and determines its output tensor from the input tensor using an activation function. The activation function is preferably an exponential linear unit activation function (ELU). Highly accurate reproduction of seed texture features in mold texture is achieved using gated convolution.
[0042] According to another embodiment of the present invention, it is provided that the texture data of the mold texture is completed in the first direction in the first row, and then the texture data of the mold texture is completed in the first direction in at least one subsequent row. As already explained above, by using a generative neural network, the texture data of the mold texture is supplemented in at least one step, because the source texture is sampled from the mold texture and the output texture is written back to the mold texture. The aforementioned window moves in the first direction between steps, the first direction being parallel to the first axis. This process is performed until the mold texture is completed in the first direction, i.e. the window reaches the end of the mold texture in this direction. As a result, the mold texture contains the first row of texture data that can now be used to complete the mold texture. To this end, for at least one subsequent row of the mold texture, preferably for several subsequent rows, the described process is repeated until the mold texture is completely filled with texture data. At this point, the mold texture can be used directly to create a casting mold. This method allows the seed texture to be simply and efficiently expanded to the texture size of the mold texture.
[0043] According to another embodiment of the present invention, it is provided that, after the mold texture is completed, the texture data of the mold texture is rescaled. Rescaling is preferably used to increase the contrast of the texture data. For this purpose, a range of pixel values throughout the entire mold texture is determined. If the range does not use the full range determined by the data type of the pixel value (e.g., using an eight-bit digital data type), the pixel values of the mold texture are recalculated in such a way that they then use the full range. The trend of grayscale values changing toward the average value is alleviated. This method is used to improve the overall quality of the resulting mold texture.
[0044] According to a further embodiment of the invention, it is provided that the seed texture and / or the sample texture is scanned from the surface, i.e. using an optical sensor, i.e. a camera, in particular in combination with a microscope. Scanning the surface in order to obtain the seed texture or the sample texture from a surface in the real world results in highly realistic input data for the generative neural network. Therefore, the mold texture generated by the generative neural network will have a similar level of realism, resulting in a very high quality casting. The scanning is performed, for example, with an optical sensor. Other methods are of course also applicable to this task. For example, a sufficiently fine tactile sensor can be used for surface scanning.
[0045] According to a further embodiment of the invention, it is provided that a mould texture is provided on the casting mould, i.e. using laser ablation. After the mould texture is generated, the casting mould is machined based on the mould texture. This means that the casting mould is created with a surface corresponding to the mould texture, either in a positive form or in a negative form. For example, the casting mould is provided as a negative mould or a positive mould for the mould texture. For example, the casting mould is provided with the mould texture by laser ablation of the surface of the mould. Thus, the surface is machined so as to correspond to the mould texture. The workpiece created by moulding using the casting mould has a high quality and is characterized by a seamless texture, having a natural look and feel over a large area.
[0046] The invention further relates to an apparatus for generating a mould texture for a casting mould, in particular for carrying out a method as detailed in this specification. The apparatus is configured to generate a mould texture from a seed texture, the mould texture having a larger texture size than the seed texture in at least one dimension, wherein the seed texture is provided as an input texture to a generative neural network having a plurality of neural network parameters determined during training of the generative neural network, and the generative neural network is used to expand the seed texture to the texture size of the mould texture.
[0047] The advantages of such an apparatus design and such a method have been pointed out. Both the apparatus and its method of operation can be further developed according to the explanation within the scope of this specification, so that reference can be made to the latter in this respect. The apparatus can carry out the method as described by itself, or it can include components for carrying out the method, such as a computer.
[0048] Furthermore, the invention relates to a computer program product comprising instructions which cause the device to carry out the method explained in accordance with the explanations in this description. With regard to advantages and possibly advantageous further embodiments, reference is made to this description in its entirety.
[0049] Furthermore, the present invention relates to a computer-readable medium comprising instructions which, when executed by a computer, cause the computer to carry out the method as described in the specification.
[0050] The features and combinations of features described in the description, in particular the features and combinations of features described in the following description of the figures and / or shown in the figures, can be used not only in the respective combination indicated but also in other combinations or alone without departing from the scope of the present invention. Therefore, embodiments which are not explicitly shown or explained in the description and / or in the figures, but which result from the explained embodiments or can be derived from them, are also to be regarded as being covered by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The invention is explained in more detail below with reference to the embodiments shown in the accompanying drawings, but without limiting the invention. Here it is shown:
[0052] Figure 1 is a schematic illustration of the surface of a casting mold created with a mold texture,
[0053] Figure 2 is a schematic diagram of a generating neural network in the first embodiment, and
[0054] Figure 3 is a schematic diagram of a generation neural network in the second embodiment. DETAILED DESCRIPTION
[0055] Figure 1 A portion of a casting mould 1 is shown, namely a surface 2 of the casting mould 1. The surface 2 is provided with a mould texture 3. The mould texture 3 is derived from a seed texture 4 which is also shown. It is worth noting that the size of the seed texture 4 is much smaller than the size of the mould texture 3 in every direction.
[0056] In the following, a method for generating a mold texture 3 from a seed texture 4 is described. First, the mold texture 3 is completed in a first direction, in which the seed texture 4 is smaller than the mold texture 3. For this purpose, the mold texture 3 is initialized, for example filled with initialization data, and the seed texture 4 is written as texture data into an area of the mold texture 3, so that the seed texture 4 or its texture data becomes part of the mold texture 3. The initialization data is overwritten by the texture data. Afterwards, a virtual sample window is positioned in the mold texture 3 so that it overlaps with the texture data already written into the mold texture 3. During the mold texture generation, the sample window will be located in different positions that are different in the first direction but the same in the second direction. In the first position, the sample window only partially overlaps with the texture data, for example, only one third of the sample window is filled with texture data, while the rest of the sample window contains the initialized part of the mold texture 3.
[0057] In the area covered by the sample window, a source texture is sampled from the mold texture 3. Preferably, a mask is used to indicate which part of the sample window contains texture data and which initialization data of the mold texture 3. The source texture and preferably the mask are used as input to the generative neural network 7, which will be described later. The generative neural network 7 determines the output texture from the source texture, preferably using a mask. The output texture is written as texture data into the mold texture 3 in the area covered by the sample window. Thus, the mold texture 3 is filled with texture data in this area. Thereafter, the sample window is moved to another position in the first direction, and the process is repeated. This is done until the sample window reaches the end of the mold texture 3 in the first direction.
[0058] At this point, the seed texture 4 has been used to complete the mold texture 3 in the first direction. Thus, a first row with texture data has been generated, which corresponds to several rows of pixels, spanning the entire width of the mold texture 3. The process described above is repeated using several different positions of the sample window. Preferably, the process is repeated over the entire height of the mold texture 3. This means that after completing the mold texture 3 in the first row, the process is repeated for subsequent rows by first moving the sample window in a second direction perpendicular to the first direction, and then completing the subsequent rows in the first direction again. The best results are achieved if the rows overlap each other, i.e. if the height of the sample window is larger than the rows and contains texture data from the previous row. The mask is preferably adapted to reflect this.
[0059] Figure 2The generating neural network 7 in a first embodiment is illustrated. The neural network 7 comprises an input layer 10 and an output layer 11. Between the input layer 10 and the output layer 11, there are several hidden layers 12, only some of which are specifically indicated by reference numerals. Preferably, each shown bar represents one of the hidden layers 12. The hidden layers 12 are at least partially convolutional layers. They are grouped into several independent convolution filter banks 13, 14 and 15. The layers 12 of the filter banks 13, 14 and 15 use the output tensor of the input layer 10 as input tensor, or their input tensors are derived from the output tensor, for example using one or more hidden layers 12 (not depicted). The output tensors of the filter banks 13, 14 and 15 are recombined using a hidden layer 16. The hidden layer 16 is directly or indirectly connected to the output layer 11. The output texture is reconstructed from the output tensor of the output layer 11.
[0060] It becomes clear that most, if not all, of the hidden layers 12 and 16 of the neural network 7 are part of the filter banks 13, 14 and 15. It is also clear that preferably, after the output tensors of the filter banks 13, 14 and 15 are recombined, no further independent filter banks are used. This means that, after the recombining, no further segmentation is performed on the hidden layers in the filter banks. The hidden layers 12 of the filter banks 13, 14 and 15 are convolutional layers. They are grouped into several stages, namely a first stage 17 that performs compression, a second stage 18 that performs processing and a third stage 19 that performs decompression. The hidden layers 12 differ in their filter parameters between the filter banks 13, 14 and 15. This means that the hidden layers 12 of the first filter bank 13 use first filter parameters, the hidden layers 12 of the second filter bank 14 use second filter parameters, and the hidden layers 12 of the third filter bank 15 use third filter parameters. As parameters, for example, stride and dilation rate are used. The first parameter, the second parameter and the third parameter are configured so that the hidden layer 12 of the filter banks 13, 14 and 15 reconstructs features in the mold texture 3 and the seed texture 4 at different scales.
[0061] It is important to note that, although for this first embodiment, there may be at least one hidden layer 12 between the input layer 10 and the filter banks 13, 14 and 15, the hidden layer 12 is configured to preserve the size of the tensor. This means that, for each hidden layer 12 between the input layer 10 and the filter banks 13, 14 and 15, its output tensor has the same size as its input tensor. The at least one hidden layer 12 does not perform shaping. Shaping only occurs in the filter banks 13, 14 and 15, more precisely, in the first stage 17 (compression) and the third stage 19 (decompression). In the hidden layer 12 of the first stage 17, the tensor dimensionality is reduced, while in the hidden layer 12 of the third stage 19, the tensor dimensionality is increased.
[0062] Figure 3A second embodiment of a generative neural network 7 is shown. The general features are the same as in the first embodiment. Therefore, reference is made to the corresponding explanations and, in the following, only the differences are emphasized. Those are based on the fact that only the hidden layer 12 of the third stage 19 is part of the filter banks 13, 14 and 15. This means that the filter banks 13, 14 and 15 are connected to the input layer 10 via the hidden layers 12 of the first stage 17 and the second stage 18. This means that the compression and processing of the tensors are performed outside the filter banks 13, 14 and 15, while the decompression is performed in the filter banks 13, 14 and 15 working independently of each other. Using the second embodiment, the mold texture 3 has a quality that is almost as good as that produced by the first embodiment, while avoiding the numerical stability problems that may arise from performing compression, processing and decompression in completely independent filter banks 13, 14 and 15.
[0063] The method explained in this specification is used to generate a mold texture 3 with very high quality. In particular, the problem of visible periodicity or visible tiling boundaries in the mold texture 3 is effectively avoided. The obtained mold texture 3 is used to machine a casting mold 1, which is then used to produce a workpiece by a molding process, such as an injection molding process or a die casting process.
[0064] Reference numerals list
[0065] 1. Casting
[0066] 2 Surface
[0067] 3. Mold Texture
[0068] 4 seed textures
[0069] 7. Generative Neural Network
[0070] 10 Input layer
[0071] 11 Output layer
[0072] 12 hidden layers
[0073] 13 filter banks
[0074] 14 filter banks
[0075] 15 filter banks
[0076] 16 hidden layers
[0077] 17 Phase 1
[0078] 18 Second Stage
[0079] 19Third Stage
Claims
1. A method for generating a mold texture (3) for a casting mold (1), characterized in that A mold texture (3) is generated from a seed texture (4), the mold texture (3) having a larger texture size than the seed texture (4) in at least one dimension, wherein the seed texture (4) is provided as an input texture to a generative neural network (7) having a plurality of neural network parameters determined during training of the generative neural network (7), and the generative neural network (7) is used to expand the seed texture (4) to the texture size of the mold texture (3).
2. The method according to claim 1, characterized in that The generative neural network (7) and the discriminative neural network are part of a generative adversarial network, and the generative neural network (7) and the discriminative neural network are trained using a training data set including a plurality of sample textures.
3. The method according to any one of the preceding claims, characterized in that The source texture is sampled from the mold texture (3) and used as an input texture to the generative neural network (7), wherein the resulting output texture of the generative neural network (7) is written as texture data into the appropriate area of the mold texture (3).
4. The method according to any one of the preceding claims, characterized in that A convolutional neural network having a plurality of independent convolutional filter banks (13, 14, 15) is used as a generating neural network (7).
5. The method according to any one of the preceding claims, characterized in that All neural network parameters are used to determine the output tensor of the convolution filter bank (13, 14, 15) so that at least a portion of the output texture directly corresponds to a recombination of the output tensor of the convolution filter bank (13, 14, 15).
6. The method according to any one of the preceding claims, characterized in that Filter banks (13, 14, 15) with different filter parameters are used for the convolution filter banks (13, 14, 15).
7. The method according to any one of the preceding claims, characterized in that Convolutional layers (12) of the same rank in a convolutional filter bank (13, 14, 15) differ between the convolutional filter banks (13, 14, 15) with respect to at least one of the filter parameters.
8. The method according to any one of the preceding claims, characterized in that In at least one of the convolution filter banks (13, 14, 15), a gated convolution is performed.
9. The method according to any one of the preceding claims, characterized in that The texture data of the mold texture (3) is completed in a first row in a first direction, and then the texture data of the mold texture (3) is completed in at least one subsequent row in the first direction.
10. The method according to any one of the preceding claims, characterized in that After the mold texture (3) is completed, the texture data of the mold texture (3) is rescaled.
11. The method according to any one of the preceding claims, characterized in that A seed texture (4) and / or a sample texture is scanned from the surface.
12. The method according to any one of the preceding claims, characterized in that The mold texture (3) is arranged on the casting mold (1).
13. Device for generating a mold texture (3) for a casting mold (1), in particular for carrying out a method according to any one of claims 1 to 12, characterized in that The apparatus is configured to generate a mold texture (3) from a seed texture (4), the mold texture (3) having a larger texture size than the seed texture (4) in at least one dimension, wherein the seed texture (4) is provided as an input texture to a generative neural network (7) having a plurality of neural network parameters determined during training of the generative neural network (7), and the generative neural network (7) is used to expand the seed texture (4) to the texture size of the mold texture (3).
14. Computer program comprising instructions which, when said program is executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 12.
15. A computer-readable medium comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method of laser ablation for engraving of a surface with patch optimization
EP3047932A1
Image extension neural networks
US20220148299A1