Method for generating mold texture for casting mold and corresponding device
By using the generation neural network to expand the size of seed texture to mold texture, the problem of inconsistent appearance and touch and poor seamlessness of mold textures in the prior art is solved, and high-quality and seamless mold texture generation is achieved, simplifying the generation process and reducing costs.
Patent Information
- Application Number
- JP2024186571
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-24
- Filing Date
- 2024-10-23
- Publication Date
- 2025-05-09
AI Technical Summary
The prior art is difficult to generate mold textures with the same appearance and feel of the seed texture, and the generated large mold textures usually have visible repetitive boundaries and periodic problems, and the hand-made process is cumbersome and costly.
By extending the size of the seed texture to the mold texture using the generated neural network, the neural network determines multiple neural network parameters during training and uses these parameters to extend the seed texture to the size of the mold texture.
The seamless and high-quality mold texture is achieved, which avoids visible repeated boundaries and periodic problems, simplifies the process of generating large mold textures and reduces costs.
Smart Images

Figure 2025072335000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for generating a mold texture for a casting mold, and further to an apparatus, a computer program and a computer readable medium for generating a mold texture for a casting mold. [Background technology]
[0002] From the prior art, for example, the prior art document EP Patent Application No. 3047932 is known. It discloses a laser ablation method for engraving the surface of a two-dimensional or three-dimensional workpiece with a texture by means of a laser beam of a laser processing head. The surface engraving is performed in one or more layers to be machined successively, each defined layer to be machined being subdivided into one or more patches intended to be machined one after the other with the laser beam. In this case, the border of at least one patch is determined to follow along a path on the layer (not affected by the laser beam engraving of the laser processing head).
[0003] Further, prior art document US Patent Publication No. 2022 / 0148299 describes a method, system, and apparatus, including a computer program encoded on a computer storage medium, for generating a realistic augmentation of an image. In one aspect, the method includes providing an input including a provided image to a generative neural network having a plurality of generative neural network parameters. The generative neural network processes the input according to training values of the plurality of generative neural network parameters to generate an augmented image. The augmented image is predicted to (i) have more rows, more columns, or both than the provided image, and (ii) be a realistic augmentation of the provided image. The generative neural network is trained using an adversarial loss objective function. However, the size of the augmented image is fixed in one direction and is limited by the structure of the generative neural network. Summary of the Invention [Problem to be solved by the invention]
[0004] It is an object of the present invention to provide a method for producing a mold texture for a foundry mold which has advantages over known methods, in particular providing a mold texture which has a similar look and feel to a seed texture, is substantially seamless and has a size which can be selected depending on the size of the mold. [Means for solving the problem]
[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 texture size larger in at least one dimension than the seed texture, the seed texture being provided as an input texture for a generative neural network having a number of neural network parameters determined during training of the generative neural network, the generative neural network being used to expand the seed texture to the texture size of the mold texture.
[0006] Advantageous embodiments with suitable further embodiments of the invention are indicated in the dependent claims. It is pointed out that the embodiments described herein are not limiting, rather any variant of the features disclosed in the description, the claims and the drawings is feasible.
[0007] The mold texture is preferably used to create a casting mold, which is used to create one or more workpieces during a molding process with a surface corresponding to the mold texture. 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. to the surface of the casting mold. Applying the mold texture to the casting mold is, for example, done by engraving the texture into the mold. Typically, the mold texture is a grayscale picture with texture data consisting of a plurality of pixels with pixel values in 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 having a pixel value. The pixel values are preferably 8-bit values ranging from 0 to 255 or from -127 to 127, or 16-bit values. For example, the color depth or pixel values of the pixels are selected according to the capabilities of the CAM software used to apply the mold texture to the casting mold. It is also possible not to use the full range of pixel values, so that for an 8 bit value, 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 must be. Providing a sufficiently large mold texture is usually not a problem if the texture is completely structured and consists of regularly spaced geometric shapes, for example as dots or lines. The opposite is true if an unstructured texture must be provided on the workpiece and thus the casting mold. Unstructured textures, for example, attempt to imitate the look and feel of organic structures, such as skin, especially snake skin, leather, etc.
[0009] Known methods for generating such unstructured mold textures typically rely on the scanning of an existing surface, for example by laser scanning. This method is limited to the size of the existing surface in that the mold texture cannot exceed this size without repeating the pattern. Pattern repetition can result in visible artifacts in the texture or the finished product, since the resulting mold texture is not continuous across the boundaries between the original scanned pattern and its repetitions. Also, mere repetition of the scanned pattern results in visible periodicity problems, since the same unaltered pattern is repeatedly recognizable in the mold texture and in the finished product. To mitigate at least some of these problems, the mold texture may be post-processed, for example by smoothing the texture. Alternatively, the mold texture may be made manually by a designer. However, this process is time-consuming, labor-intensive, and costly. However, the results may not be as expected, since repetitions may still be seen.
[0010] To generate a mold texture of any size, in a first step a seed texture is provided that has all the necessary characteristics of the mold texture, but is smaller in size in at least one dimension. For example, the size of the seed texture is at most 30%, at most 20%, or at most 10% of the size of the mold texture in one or more dimensions in a Cartesian coordinate system, and is preferably applied to the casting mold later. For example, the seed texture has a size in one dimension of at most 1024, at most 512, or at most 256 pixels. In another example, the seed texture is quadratic, i.e. the size in different dimensions is the same. In this case, the seed texture has a dimension of at most 1024x1024, at most 512x512, or at most 256x256, for example. Preferably, the size of the mold texture is at least one dimension, ideally two dimensions, an integer multiple of the size of the seed texture. That is, 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 a whole number, i.e. an integer. However, it is also possible to use a non-integer ratio between the size of the mold texture and the size of the seed texture, in which case extra pixels are generated and cropped.
[0011] In a normal process for creating a mold texture, this potentially means many repetitions and therefore many visible boundaries of the entire mold texture. To avoid these, the mold texture is created using a generative neural network trained for this purpose. The generative neural network has a number of neural network parameters that are determined during the training of the neural network. After the training is completed, the generative neural network with its neural network parameters is used to extend the seed texture into the mold texture, i.e., to generate the (large) mold texture from the (small) seed texture. To this effect, at least a part 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, as well as 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 number of independent convolutional filter groups is used as the generative neural network or as part of the generative neural network. The filter groups represent different channels of the network and are preferably adapted such that they reproduce different feature scales of the seed or input texture.
[0012] Every layer of the neural network has its own input tensor and output tensor. Subsequent layers take the output tensor of the preceding layer as input tensor and provide their own output tensor based on the input tensor. This means that the input layer receives the input tensor of the neural network and provides the output tensor of at least one hidden layer. The output tensor of the input layer may be identical to 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 thereon. Again, the output tensor of the output layer may be identical to its input tensor, at least for illustrative purposes. In summary, the input layer receives an input tensor and the generative neural network provides an output tensor at the output layer based on that input tensor via at least one hidden layer. 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 generative neural network can be envisaged.
[0013] For example, the output texture of the generating neural network can have the same size as the template texture. This allows the template texture based on the seed texture to be provided in a single step. Such a process is quite possible for sufficiently small template textures. However, as the size of the template texture increases, the number of neural network parameters increases, for example due to an increase in the number of layers of the neural network and / or nodes per layer. In this case, several steps may be necessary to complete the template texture. For example, the generating neural network is repeatedly provided with input textures, preferably different input textures, and creates an output texture for each of one or more input textures. This means, in other words, that the generating neural network takes an input texture or, generally speaking, texture data and expands it in at least one direction. The size of the input texture is preferably identical to the size of the seed texture, in particular in all dimensions of the texture, or vice versa. The resulting output texture is then used to complete the template texture, for example by tiling, with or without overlap. In this connection, it is particularly preferred to use a part of the preceding output texture as the input texture of the generating neural network.
[0014] By creating the mold texture by using a generative neural network to use a seed texture as an input texture, problems normally associated with the creation of large-scale mold textures are reduced or completely eliminated. Particularly visible repetition of the seed texture in the mold texture is effectively avoided. Moreover, it is possible to create a completely seamless mold texture, especially if the mold texture is created in a single step from the seed texture by the generative neural network. This requires that the generative neural network is large enough to provide such an approach. Alternatively, a seamless mold texture is achieved in several steps. In each step, a generative neural network is used to create an output texture directly or indirectly based on the seed texture used to generate the mold texture. Using this approach, the mold texture includes multiple output textures, each of which is generated by the generative neural network based on a respective input texture. The input texture corresponds to either the seed texture, a previous output texture, or a part of the mold texture that includes at least a part of the seed texture and / or at least a part of one or more previous output textures. Such a procedure results in exceptionally high quality mold textures, meaning particularly seamless and consistent mold textures.
[0015] According to a further embodiment of the invention, the generative neural network is part of a generative adversarial network together with a discriminative neural network, the generative neural network and the discriminative neural network being trained with a training data set comprising a number of sample textures, for example extracted from training textures. The generative adversarial network comprises a generative part, the generative neural network, and a discriminative part, the discriminative neural network. The discriminative neural network is trained using a training data set. The training data set comprises several sample textures, preferably having the same size in all dimensions, but differing in their content. For example, the sample textures are variations of a seed texture or variations of a seed texture that may be more extensively formulated, on the basis of which a mold texture is created. Preferably, the sample textures are extracted from the training textures, in particular at different positions. The sample textures may be modified after extracting them from the training textures. For example, all sample textures are extracted from the training textures and only a part of the sample textures is modified, for example with random data. In summary, this means that for training, some sample textures are used in an unmodified state and some sample textures are used in a modified state.
[0016] The generative neural network is used to create an output texture from an input texture. Either the output texture or one of the sample textures is fed to the discriminative neural network as an input texture that tries to identify whether that 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 for a given number of iterations, keeping the generative neural network and the discriminative neural network in equilibrium, in particular with respect to their cost functions. The discriminative neural network is obviously only used during training, i.e. until the stage is reached where the generative neural network and its neural network parameters generate output textures of sufficient quality. Only the generative neural network is used to determine the template texture, i.e. to expand the seed texture to the texture size of the template texture. The mechanism of the generative neural network is known in principle and therefore will not be described further.
[0017] According to a further embodiment of the present invention, during the training of the generative adversarial network, the generative neural network and the discriminative neural network shall be trained alternately. According to the usual 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 on the basis of a training data set that can be complemented by random textures. Thus, the discriminative neural network learns to distinguish between wanted textures, i.e. textures similar to the sample textures of the training data set, and unwanted textures, i.e. textures that differ too strongly 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, a generative neural network is trained. In this process, the generative neural network is used to generate at least one output texture, i.e. one or more output textures, followed by the input textures for the discriminative neural network. The latter determines a score on the likelihood that 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 such that the score changes towards a value indicating that the discriminative neural network is unable to 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, for example based on a reconstruction loss function. The two steps are then repeated, with the random texture being replaced by the output texture of the generative neural network. Again, this basic principle of generative neural networks is known and will not be elaborated further.
[0019] According to a further embodiment of the present invention, in order to generate the mold texture, the mold texture is cleared from the texture data and the seed texture is written as texture data in a suitable area of the mold texture. Before generating the output texture with the generative neural network, the mold texture is prepared. For example, all pixels of the mold texture are set to a default value or a random value. During the latter process, the mold texture is initialized such that each of its pixels is set to a respective random value. For each pixel, the random value is determined anew, so that each two pixels of the mold texture may, but do not necessarily, have a different pixel value. The preparation of the mold texture also includes writing the seed texture as texture data in the mold texture. This is done in a suitable area, for example starting from 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. Thus, the texture data corresponds to the part of the mold texture where the mold texture contains data usable for the mold form. This method provides a suitable starting point for the generative neural network and results in a high quality of the mold texture.
[0020] According to a further embodiment of the invention, a source texture is sampled from the mold texture and used as an input texture for the generating neural network, and the resulting output texture of the generating neural network is written as texture data in the appropriate areas of the mold texture. The input data of the generating neural network corresponding to the input texture is obtained from the mold texture itself. Preferably, a seed texture is written into the mold texture at the time of preparation. The area where the seed texture is written is specifically selected so 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 so that only a part of it contains the texture data already written into the mold texture. This input texture is used as input for the generating neural network that creates the output texture based on the input texture. The output texture is then written as texture data into the mold texture, specifically in the same position where the input texture was read. Preferably, the process is repeated while changing the positions where the input texture is read and 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 template texture, a mask can further be determined. The mask indicates the portions of the input texture that do not contain texture data but that correspond to the initialized portions of the template texture. The mask is used by the generative neural network to determine which portions of the input texture contain data that cannot be modified to generate the output texture and which portions are filled with texture data. Using such a mask, the size of the output texture can be selected to be the same as the size of the input texture.
[0022] According to a further embodiment of the present invention, the seed texture and / or the source texture and / or the template texture and / or the input texture shall be normalized before using the generative neural network to extend the seed texture. Normalizing each texture comprises determining a range of values using the texture data of the texture and calculating a new value for each pixel in the texture according to a mathematical function based on the range of values. Preferably, each texture is normalized to a predefined range between 0 and 1 or between -1 and +1. For example, the template texture is initialized with a predefined range of pixel values and the seed texture is written to the template texture in a normalized form, i.e. the seed texture is normalized and then written to the template texture. Alternatively, the template texture is not normalized, but after sampling the input texture from the template texture, the input texture is normalized and used as an input of the generative neural network and the output texture is written to the template texture in a non-normalized form. Using normalization, the computational stability of the generative neural network is improved.
[0023] According to a further embodiment of the invention, the source texture shall be sampled from a region of the mold texture that contains texture data, in particular from a region of the mold texture that only partially contains texture data. This strategy has already been mentioned. The source texture is obtained from the mold texture, the size of the source texture being smaller than the size of the mold 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 all dimensions. For example, the size of the source texture corresponds to the size of the seed texture, again in particular in all dimensions.
[0024] In a preferred embodiment, a sample window having the size of the input texture is moved over the mold texture, starting at a starting position. The source texture is sampled from the mold texture within the sample window and used as the input texture. The output texture obtained from the generating neural network is written to the mold texture as texture data within the window. The sample window is then moved, for example only in the first direction, by a distance that is smaller than the size of the source texture in this particular dimension. For example, the distance is up to 25%, up to 20%, or up to 15% of the size of the source texture. 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 a second direction perpendicular to the first direction, and the process is repeated again. In this way, good results of the mold texture are achieved.
[0025] According to a further embodiment of the present invention, the texture size of the source texture shall correspond to the input texture size of the generating neural network. In the context of this specification, when the size of a texture is referred to, the size in all dimensions is referred to, unless otherwise indicated. In this particular case, this means that the size of the source texture is identical to the size of the input texture in all dimensions, i.e. in two dimensions perpendicular to each other. Specifically, the textures, for example the source texture and the input texture, each contain pixels organized in a number of rows and a number of columns, the number being identical for both textures.
[0026] According to a further embodiment of the present invention, a convolutional neural network shall be used as the generative neural network. The generative neural network therefore comprises at least one convolutional layer. The convolutional layer is a hidden layer between the input layer and the output layer of the generative neural network. The input layer receives the input texture and the output texture is obtained from the output layer. The convolutional layer comprises one or more filters. The convolutional layer may further comprise an activation function, for example a rectifier or a rectified linear input (ReLU). The convolutional layer convolves its input and passes the result of the convolution to a next layer, for example another convolutional layer or an output layer. Convolutional neural networks and their principles are presumed to be known in the art and will not be described 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 details of the sample texture are learned during training, so that the generative neural network is configured to reproduce details present in the seed texture. Furthermore, spatial coherence remains intact in the sense that pixel neighborhood information is preserved in the convolutional layers and is not flattened as in dense layers.
[0027] According to a further embodiment of the present invention, a convolutional neural network having multiple independent convolutional filter groups shall be used as the generating neural network. Each of the convolutional filter groups includes at least one convolutional layer in the context of this specification. They are independent of each other, which means in particular that backpropagation during training is performed completely independently for the filter groups and there are no skip connections between them. In other words, the convolutional layers of the filter groups are separate and are calculated separately both during training and during the creation of the mold texture.
[0028] The use of independent filter groups is usually avoided for complex structures as the template texture, at least in the general case, since it leads to stability and efficiency problems. However, the applicant has surprisingly found that independent feature groups lead to superior quality template textures, since at least one convolutional layer of each convolutional filter group is specifically parameterized to replicate features used in the template texture. For example, each convolutional filter group is parameterized to reproduce features of different size scales. For example, three independent convolutional 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 large features of the seed texture. For example, reshaping of tensors is only performed within the independent convolutional filter groups, and no such reshaping is performed throughout the generative neural network outside the convolutional filter groups. However, alternatively, only decompression is performed inside the filter groups, and compression and / or processing is also performed outside the filter groups, or only outside the filter groups.
[0029] Preferably, each of the independent filter groups includes several convolution layers. Ideally, the majority of all layers of the generating 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 generating neural network are part of the independent filter groups. The independent filter groups are calculated in parallel. This means that the input tensors of the independent filter groups are calculated from the output tensors of the layers preceding the independent filter groups. The output tensors of the independent filter groups are merged and used as input tensors of the layers following the independent filter groups. For example, the number of layers of the generating neural network between the input layer and the independent filter groups corresponds to a first number, and the number of layers of the generating neural network between the independent filter groups and the output layer corresponds to a second number. Preferably, the first number and / or the second number are at most 20%, at most 10%, or at most 5% of the total number of the generating neural network, respectively. Here, the input layer is the layer that receives the input texture, and the output layer is the layer from which the output texture is obtained. It turns out that the most preferred architecture for the generative neural network separates the layers of filter groups across most of the neural network, providing the advantages already mentioned.
[0030] According to a further embodiment of the invention, all neural network parameters shall be used to determine the output tensors of the convolution filter groups, such that at least a part of the output texture corresponds directly to a recombination of the output tensors of the convolution filter groups. The neural network parameters determine the output tensors of the filter groups, and optionally the recombination of their outputs. This means that after the output tensors of the filter groups are recombined into a single output tensor, only predefined operations are performed on the recombined single output tensor to determine the output texture. This determination does not depend on the neural network parameters and is invariant over training. The predefined operations and / or their parameters are constant and do not change during the training of the generating neural network. For example, the operations include normalization or renormalization of the recombined output tensors of the filter groups. Thus, the output texture depends at least partially or completely directly on the recombined output tensor, which is done via predefined operations with fixed parameters.
[0031] Alternatively, after recombination of the output tensors of the filter groups, the recombined output tensor is used as input of one or more convolution layers of the generating neural network. The number of convolution layers between the recombined output tensor and the output layer is preferably at most three, at most two, or particularly preferably at most one. For example, the recombined output tensor is used directly as input tensor of at least one convolution layer, whose output tensor is used directly as input tensor of the output layer via a predetermined operation, as already explained. Using this technique, a very large part of the generating neural network is split into several parallel-computed convolution filter groups, whose outputs are recombined only immediately before the output layer, i.e. just before the output texture is generated by the generating neural network. This results in a special function of the convolution filter groups trained to reproduce different scaled features of the source texture. Preferably, filter groups that are independent at only one point are used for the generating neural network. This means that the generating neural network is split only once into filter groups with parallel convolution layers. After recombining the output tensors of the filter groups into a single output tensor, no further independent filter groups are generated until the output layer.
[0032] According to a further embodiment of the present invention, filter groups with different filter parameters, for example filter size, stride and dilation rate, shall be used for the convolution filter group. Each convolution layer in the filter group uses a predefined value for the parameter of its convolution layer. As the parameter, preferably one of the parameters of filter size, stride and dilation rate is used. For example, the first filter group uses a first value for the filter size, stride and / or dilation rate, the second filter group uses a second value for the filter size, stride and / or dilation rate, and the third filter group uses a third value for the filter size, stride and / or dilation rate. For at least one parameter, some parameters or all parameters, the values are different from each other. The filter parameters of the filter groups are configured to capture structures at different scales during training and to reproduce these structures at different scales during the operation of the generative neural network to dilate the seed texture to the size of the mold texture, i.e. to determine an output texture for completing the mold texture.
[0033] For example, the convolutional layers of each filter group can be grouped into different stages: a first stage performing compression, a second stage performing processing, and a third stage performing decompression. The compression stage is also called an encoding stage, and the decompression stage is also called a decoding stage. Each stage includes at least one convolutional layer. If each stage has several convolutional layers, they are preferably connected in series, i.e. the output tensor of each convolutional layer is used as the input tensor of the following convolutional layer. During the compression stage, the size of the input tensor is always, or preferably only sometimes, reduced from one convolutional layer to the next, such that the output tensor of the compression stage is smaller than its input stage. Preferably, the output tensor of a compression stage has a larger number of channels than its input tensor. In other words, over a compression stage having at least one convolutional layer, the tensor size decreases and preferably the number of channels increases.
[0034] During the processing stage, the size of the input tensor remains the same. This means that the output tensor of a processing stage has the same size as its input tensor. In other words, over a processing stage with at least one convolutional layer, the tensor size remains the same and preferably the number of channels remains the same. During the decompression stage, the size of the output tensor is increased from one convolutional layer to the next. This means that the output tensor of the decompression stage is larger than its input tensor. In other words, over a decompression stage with at least one convolutional layer, the tensor size increases and preferably the number of channels decreases.
[0035] For example, in the compression stage of the first filter group, at least one convolutional layer uses a first value of the stride and a first value of the expansion rate. In the compression stage of the second filter group, at least one convolutional layer uses a second value of the stride and a second value of the expansion rate. And in the compression stage of the third filter group, at least one convolutional layer uses a third value of the stride and a third value of the expansion rate. For example, the first value of the stride is greater than 1, and the second and third values of the stride are smaller, preferably equal to 1. Additionally or alternatively, the first value of the expansion rate is equal to 1, while the second and third values of the expansion rate are greater. For example, the third value of the expansion rate is greater than the second value of the expansion rate, which is also greater than the first value of the expansion rate. Ideally, the filter size is the same for all convolutional layers in the compression stage of the filter group. For example, a filter size of at least 3×3, at least 5×5, or at least 7×7 is used.
[0036] Additionally or alternatively, in the processing stage of the first filter group, at least one convolutional layer uses a first value of the stride and a first value of the expansion rate. In the processing stage of the second filter group, at least one convolutional layer uses a second value of the stride and a second value of the expansion rate. And in the processing stage of the third filter group, at least one convolutional layer uses a third value of the stride and a third value of the expansion rate. For example, the first value, the second value and the third value of the stride are identical, for example equal to 1. However, the first value, the second value and the third value of the expansion rate are in particular increased with respect to the values used in the compression stage of the respective filter group. For example, the first value of the expansion rate in the processing stage is greater than the first value of the expansion rate in the compression stage, and / or the second value of the expansion rate in the processing stage is greater than the second value of the expansion rate in the compression stage, and / or the third value of the expansion rate in the processing stage is greater than the third value of the expansion rate in the compression stage. Ideally, the filter size is the same for all convolutional layers in the compression stage of a filter group. 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 group, at least one convolutional layer uses a first value of the stride and a first value of the expansion rate. In the decompression stage of the second filter group, at least one convolutional layer uses a second value of the stride and a second value of the expansion rate. And in the decompression stage of the third filter group, at least one convolutional layer uses a third value of the stride and a third value of the expansion rate. For example, the first value of the stride, the second value, and the third value are identical, for example equal to 1. Preferably, the first value of the expansion rate is also equal to 1, while the second value and the third value of the expansion rate are greater than 1. Ideally, the filter size is identical for all convolutional layers in the compression stage of the filter group. For example, a filter size of at least 3x3, at least 5x5, or at least 7x7 is used. Using such a configuration of the filter groups and the convolutional layers in those stages results in reliable reproduction of the features of the seed texture in the mold texture, even if they have different scales.
[0038] According to a further embodiment of the present invention, the convolutional neural network has some first convolutional layers outside the independent convolutional filter groups and some second convolutional layers outside the independent convolutional filter groups. All convolutional layers in the generating neural network are grouped into first convolutional layers and second convolutional layers. The number of first layers and the number of second layers are at least one each. However, all layers of each of the aforementioned groups are either entirely part of the first convolutional layer or entirely part of the second convolutional layer. This means that each of the following steps, namely compression, processing, and decompression, is performed entirely inside or entirely outside the independent convolutional filter groups. For example, all steps are performed in the independent convolutional filter groups. In this case, preferably, no tensor reshaping is performed outside these groups. Alternatively, compression is performed outside the independent convolutional filter groups and at least decompression is performed in the independent convolutional filter groups. A general compression outside the filter groups may be beneficial to reduce training times.
[0039] According to a further embodiment of the invention, convolutional layers of the same rank within a convolutional filter group shall differ between the convolutional filter groups with respect to at least one of the filter parameters. The rank represents the ordinal number of the convolutional layers in the filter group or their stages. For example, a rank of 1 is associated with the first convolutional layer in the respective filter group or stage, a rank of 2 is associated with the second convolutional layer, and so on. Convolutional layers of different filter groups or stages thus have the same rank if the same number of convolutional layers precede the convolutional layers of their respective filter group or stage. The convolutional layers in at least some filter groups, preferably all filter groups, differ in at least one of the filter parameters. This means that these convolutional layers have different values for the filter size and / or the stride and / or the dilation rate. Different values of the filter parameters have already been shown exemplarily. By using different values for 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 invention, parallel layers are used in at least one of the convolution layers, and the output tensors of the parallel layers are recombined in the subsequent layers. The parallel layers are applied to the same input tensor, i.e. the input tensor of at least one convolution layer. Each of the parallel layers has an output tensor based on this input tensor, and the output tensors of the parallel layers are recombined in the layer following at least one convolution layer. For example, the output tensors are recombined by multiplication or addition, in particular weighted addition, for example uniform weighted addition. Such a structure allows high flexibility.
[0041] According to a further embodiment of the invention, a gated convolution shall be performed in at least one of the convolution filter groups. The gated convolution is a computation block that includes two parallel layers, a recombination layer and an activation layer. Both parallel layers take as input tensors the input tensors of the gated convolution block. One of the layers is a convolution layer without activation function, i.e. the output tensor of the layer is derived directly from its input tensor without being modified by an activation function. The other of the layers is a convolution layer with sigmoid activation, therefore the output tensor of this layer is normalized to the range 0 to 1. The recombination layer recombines its input tensors into an output tensor, i.e. the output tensor of the parallel layer, for example by computing a tensor product performed element-wise. The activation layer uses the output tensor of the recombination layer as input tensor and determines its output tensor from its input tensor using an activation function. The activation function is preferably an exponential linear unit activation function (ELU). Using gated convolution, high accuracy is achieved in reproducing the features of the seed texture within the mold texture.
[0042] According to a further embodiment of the invention, the texture data of the mold texture is completed in a first direction in a first row, then the texture data of the mold texture is completed in the first direction in at least one subsequent row. As mentioned above, the texture data of the mold texture is completed in at least one step by using a generative neural network, in that a source texture is sampled from the mold texture and an output texture is written back to the mold texture. The above-mentioned window is moved in a first direction between steps, the first direction being parallel to the first axis. This process is carried out until the mold texture is completed in the first direction, i.e. the window reaches the end of the mold texture in that direction. As a result, the mold texture now contains a first row of texture data that can be used to complete the mold texture. To this effect, the described process is repeated for at least one subsequent row of the mold texture, preferably several subsequent rows, until the mold texture is completely filled with texture data. At this point, the mold texture may be directly used to create a casting mold. This method allows for a simple and efficient expansion of the seed texture relative to the texture size of the mold texture.
[0043] According to a further embodiment of the invention, after completing the mold texture, the texture data of the mold texture shall be rescaled. The rescaling is preferably used to increase the contrast of the texture data. For this purpose, a range of pixel values across the entire mold texture is determined. If the range does not use the full range determined by the data type of the pixel values, for example a numeric data type using 8 bits, the pixel values of the mold texture are recalculated so that they then use the full range. This mitigates the tendency of the grayscale values to change towards the average value. This method helps to increase the overall quality of the resulting mold texture.
[0044] According to a further embodiment of the invention, the seed texture and / or the sample texture shall be scanned from the surface, i.e. using an optical sensor, i.e. a camera, in particular in combination with a microscope. Scanning the surface to obtain the seed texture or the sample texture from a real-world surface results in very realistic input data for the generative neural network. As a result, the mould texture generated by the generative neural network has a similar level of realism, resulting in a casting mould of very high quality. The scanning is carried out, for example, using an optical sensor. Of course, other methods are also suitable for this task. For example, a sufficiently fine tactile sensor may be used for the surface scanning.
[0045] According to a further embodiment of the present invention, a mold texture is provided on the casting mold, i.e., provided using laser ablation. After generating the mold texture, the casting mold is machined based on the mold texture. This means that a casting mold with a surface corresponding to the mold texture is formed either in a positive or negative form. For example, the casting mold is provided as a negative or positive mold for the mold texture. Providing the casting mold with the mold texture is performed, for example, by laser ablation of the mold's surface. The surface is thus machined to correspond to the mold texture. The workpiece created by molding using the casting mold is of high quality and features a seamless texture with a natural look and feel over a large area.
[0046] The invention further relates to an apparatus for generating a mold texture for a casting mold, in particular for carrying out the method detailed herein, the apparatus being configured to generate a mold texture from a seed texture, the mold texture having a texture size larger in at least one dimension than the seed texture, the seed texture being provided as an input texture for a generative neural network having a number of neural network parameters determined during training of the generative neural network, the generative neural network being used to expand the seed texture to the texture size of the mold texture.
[0047] The advantages of such a design of the device and of such a method have already been pointed out. Both the device and its operation method can be further developed according to the description within the present specification, and therefore reference is made in this respect to the latter. The device may itself carry out the method as described or may comprise means for carrying out the method, for example a computer.
[0048] Furthermore, the invention relates to a computer program product comprising instructions for causing an apparatus to carry out the methods described in accordance with the description herein.With regard to advantages and possible advantageous further embodiments, reference is made to the full description thereof.
[0049] Additionally, the present invention relates to a computer readable medium containing instructions that, when executed by a computer, cause the computer to perform the methods described herein.
[0050] The features and combinations of features described in the description, and in particular those described in the description of the figures below and / or shown in the figures, can be used not only in the respective combinations shown, but also in other combinations or alone without departing from the scope of the invention. Thus, embodiments not explicitly shown or described in the specification and / or drawings, but which may arise or be derived from the described embodiments, should also be considered as encompassed by the present invention. The invention will be explained in more detail below with reference to embodiments shown in the drawings, without limiting the invention. [Brief description of the drawings]
[0051] [Figure 1] FIG. 1 is a schematic diagram of a surface of a casting mold formed with a mold texture. [Diagram 2] FIG. 2 is a schematic diagram of a generative neural network in the first embodiment. [Diagram 3] FIG. 6 is a schematic diagram of a generative neural network in the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0052] 1 shows a part of a casting mould 1, 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 noteworthy that the size of the seed texture 4 is much smaller in all directions than the size of the mould texture 3.
[0053] In the following, the method used to generate the mold texture 3 from the 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 in areas of the mold texture 3 such that the seed texture 4 or its texture data become part of the mold texture 3. The initialization data is overwritten with texture data. After that, a virtual sample window is positioned in the mold texture 3 so that it overlaps with the texture data already written in the mold texture 3. In the course of the mold texture generation, the sample window is placed in different positions that are different in the first direction but identical in the second direction. In the first position, the sample window only partially overlaps 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.
[0054] A source texture is sampled from the mold texture 3 in the area covered by the sample window. A mask is preferably used to indicate which parts of the sample window contain texture data and which initialization data of the mold texture 3. The source texture and preferably the mask are used as inputs to a generative neural network 7 described below. The generative neural network 7 preferably uses the mask to determine an output texture from the source texture. The output texture is written as texture data to the mold texture 3 in the area covered by the sample window. This fills the mold texture 3 with the texture data of that area. The sample window is then 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.
[0055] At this point, the seed texture 4 has been used to complete the mold texture 3 in a first direction. Thus, a first row with texture data corresponding to several pixel rows has been generated to span the full width of the mold texture 3. The above process is repeated using several different positions of the sample window. Preferably, the process is repeated over the full height of the mold texture 3. This means that after completing the mold texture 3 of the first row, the process is repeated for the subsequent rows by first moving the sample window in a second direction perpendicular to the first direction and then completing the subsequent row again in the first direction. The best results are achieved if the rows overlap each other, i.e. if the sample window has a height greater than the row and contains the texture data from the previous row. The mask is preferably adapted to reflect this.
[0056] FIG. 2 shows a generative neural network 7 in a first embodiment. The neural network 7 includes 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 numbers. Preferably, each of the illustrated bars 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 groups 13, 14, and 15. The layers 12 of the filter groups 13, 14, and 15 use the output tensor of the input layer 10 as input tensor or their input tensor is derived from the output tensor, for example, using one or more hidden layers 12 (not shown). The output tensors of the filter groups 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.
[0057] 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 groups 13, 14 and 15. It is also clear that, preferably, no further independent filter groups are used after the recombination of the output tensors of the filter groups 13, 14 and 15. This means that no further division of the hidden layers in the filter groups is performed after the recombination. The hidden layers 12 of the filter groups 13, 14 and 15 are convolutional layers. They are grouped into several stages: a first stage 17 which performs compression, a second stage 18 which performs processing and a third stage 19 which performs decompression. The hidden layers 12 differ in their filter parameters between the filter groups 13, 14 and 15. This means that the hidden layers 12 of the first filter group 13 use a first filter parameter, the hidden layers 12 of the second filter group 14 use a second filter parameter and the hidden layers 12 of the third filter group 15 use a first third parameter. As parameters, for example, the stride and the expansion rate are used. The first, second and third parameters are configured such that the hidden layers 12 of the filter groups 13, 14 and 15 reconstruct features of the mold texture 3 and the seed texture 4 at different scales.
[0058] It is important to note that in this first embodiment, there may be at least one hidden layer 12 between the input layer 10 and the filter groups 13, 14, and 15, but this hidden layer 12 is configured to maintain the size of the tensors. This means that for each hidden layer 12 between the input layer 10 and the filter groups 13, 14, and 15, its output tensor has the same size as its input tensor. No reshaping is performed by this at least one hidden layer 12. Reshaping is performed only in the filter groups 13, 14, and 15, more precisely in the first stage 17 (compression) and the third stage 19 (decompression). The tensor dimensions are reduced in the hidden layer 12 in the first stage 17, and increased in the hidden layer 12 in the third stage 19.
[0059] FIG. 3 shows a second embodiment of the generative neural network 7. The overall characteristics are the same as in the first embodiment. For this reason, we refer to the respective description and in the following we will only highlight the differences. These are based on the fact that only the hidden layer 12 of the third stage 19 is part of the filter groups 13, 14 and 15. This means that the filter groups 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 each tensor is performed outside the filter groups 13, 14 and 15, while the decompression is performed in the filter groups 13, 14 and 15, which work independently of each other. Using the second embodiment, the mold texture 3 has almost as good a quality as the one resulting from the first embodiment, while avoiding the numerical stability problems that may result from performing compression, processing and decompression in completely independent filter groups 13, 14 and 15.
[0060] The method described herein helps to generate a mold texture 3 with very high quality. In particular, the problem of visible periodicity or visible tiling boundaries of 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 manufacture a workpiece using a molding process, such as an injection molding process or a die casting process. [Explanation of symbols]
[0061] 1 Casting mold 2 surface 3 Mold Texture 4 Seed Texture 7. Generative Neural Networks 10 Input Layer 11 Output layer 12 Hidden Layer 13 Filter Groups 14 Filter Groups 15 Filter Groups 16 Hidden Layer 17 First Stage 18 Second Stage 19 Third Stage
Claims
1. 1. A method for generating a mold texture (3) for a casting mold (1), characterized in that the mold texture (3) is generated from a seed texture (4), the mold texture (3) having a texture size larger in at least one dimension than the seed texture (4), the seed texture (4) being provided as an input texture for a generative neural network (7) having a number of neural network parameters determined during training of the generative neural network (7), the generative neural network (7) being used to expand the seed texture (4) to the texture size of the mold texture (3).
2. 2. The method of claim 1, wherein the generative neural network (7) is part of a generative adversarial network together with a discriminative neural network, and the generative neural network (7) and the discriminative neural network are trained using a training dataset comprising a plurality of sample textures.
3. 3. The method according to claim 1 or 2, characterized in that a source texture is sampled from the template texture (3) and used as the input texture of the generative neural network (7), and the resulting output texture of the generative neural network (7) is written as texture data into appropriate areas of the template texture (3).
4. 4. The method according to claim 1, wherein a convolutional neural network having a plurality of independent convolutional filter groups (13, 14, 15) is used as the generating neural network (7).
5. 5. The method according to claim 1, wherein all neural network parameters are used to determine the output tensors of the convolution filter groups (13, 14, 15) such that at least a part of the output texture corresponds directly to a recombination of the output tensors of the convolution filter groups (13, 14, 15).
6. 6. A method according to claim 1, characterized in that filter groups (13, 14, 15) having different filter parameters are used for the convolution filter groups (13, 14, 15).
7. 7. The method according to claim 1, wherein convolutional layers (12) of the same rank within the convolutional filter group (13, 14, 15) differ between the convolutional filter groups (13, 14, 15) with respect to at least one of the filter parameters.
8. 8. A method according to any one of the preceding claims, characterized in that in at least one of the convolution filter groups (13, 14, 15) a gated convolution is performed.
9. 9. The method according to claim 1, wherein the texture data of the mold texture (3) is completed in a first direction in a first row and then the texture data of the mold texture (3) is completed in the first direction in at least one subsequent row.
10. 10. The method according to claim 1, characterized in that after completing the mold texture (3), the texture data of the mold texture (3) is rescaled.
11. 11. The method according to any one of the preceding claims, characterized in that the seed texture (4) and / or the sample texture are scanned from a surface.
12. 12. The method according to any one of the preceding claims, characterized in that the mould texture (3) is provided on the casting mould (1).
13. 13. An apparatus for generating a mold texture (3) for a casting mold (1), in particular for carrying out the method according to any one of claims 1 to 12, characterized in that the apparatus is configured for generating the mold texture (3) from a seed texture (4), the mold texture (3) having a texture size larger in at least one dimension than the seed texture (4), the seed texture (4) being provided as an input texture for the generative neural network (7) having a number of neural network parameters determined during training of the generative neural network (7), the generative neural network (7) being used to expand the seed texture (4) to the texture size of the mold texture (3).
14. A computer program 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.
15. A computer readable medium comprising instructions which, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 12.