Transparent printing material generation method
By using the CLIP and MLP models score predictor and BLIP3 big model generation method in the printing material generation algorithm, combined with the improved transparent printing material generation model, the problems of insufficient high-quality data, inability to generate transparent materials and low resolution in the existing technology are solved, and high-quality and transparent printing material generation with design requirements are achieved.
Patent Information
- Application Number
- CN202411972300.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
AI Technical Summary
The existing printing material generation algorithm has problems such as insufficient high-quality data, inability to automatically generate transparent materials, low image resolution and inability to layer design, which is difficult to meet the production needs of textile factories.
The scoring predictor and BLIP3 big model generation method based on CLIP and MLP models are used to automatically filter and text feature enhancement to build an improved transparent printing material generation model. The model includes a feature codec module and a DDPM module to generate high-quality images through the diffusion process and accurately reconstruct transparent channels.
The quality and usability of the printed material data set are improved, the generated images meet design requirements in terms of transparency and detail, and the diversity of image features is not disturbed, adapting to the needs of specific fields.
Smart Images

Figure CN119887987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of general image data processing or generation, and in particular to a method for generating transparent printing materials in the field of digital printing intelligent auxiliary design. Background Art
[0002] Printing patterns are created by designers using professional drawing software to combine and splice various materials and process them using image techniques. Therefore, printing materials are the basis of creation. In order to improve efficiency and quality, designers usually re-create existing materials, extract the main elements and modify them to generate differentiated and diversified printing materials. Traditional printing materials mainly come from hand-painted materials or online pictures, but hand-painted materials are time-consuming and laborious. With the continuous improvement of textile production scale and fast fashion pattern design speed, automatic generation of printing materials has become an urgent need in the industry.
[0003] In recent years, image generation algorithms based on deep learning have achieved great success, making it possible to generate high-quality material patterns. The current mainstream image generation networks include VAE, GAN, and the latest Diffusion diffusion model. CycleGAN can achieve image translation without paired training samples, and LinkGAN improves local control capabilities by training regularizers. Although the GAN network performs well in generating images, it is not as good as the Diffusion model in terms of effect and diversity. The Diffusion model achieves excellent synthesis effects through denoising probability diffusion, such as DDPM (Ho J, Jain A, Abbeel P. Denoising diffusion probabilistic models [J]. Advances in Neural Information Processing Systems, 2020, 33: 6840-6851) and IDDPM (Nichol AQ, Dhariwal P. Improved denoising diffusion probabilistic models [C] / / International Conference on Machine Learning, 2021: 8162-8171). With the rapid development of artificial intelligence content generation technology, multimodal large models have made breakthrough progress in the field of image generation. The DALL·E model proposed by Aditya et al. (Ramesh A, Pavlov M, Goh G, et al. Zero-shot text-to-image generation [C] / / International Conference on Machine Learning, 2021: 8821-8831.) uses text and image tokens for autoregressive modeling and achieves good results. The Stable Diffusion model (SD) proposed by Robin et al. (Rombach R, Blattmann A, Lorenz D, et al. High-resolution image synthesis with latent diffusion models [C] / / IEEE / CVFConference on Computer Vision and Pattern Recognition. 2022: 10684-10695) optimizes computing resources and high-resolution synthesis based on DDPM, and solves the problem of controlling image generation, which promotes the application of multimodal large models in the field of image generation.
[0004] However, the existing printing material generation algorithms, whether based on traditional methods or deep learning methods, still require additional processing by designers and cannot be directly applied to textile factory production. There are mainly the following problems:
[0005] (1) There is a limited amount of high-quality printing material data, which results in poor results from deep learning methods;
[0006] (2) Existing printing pattern generation methods cannot automatically generate transparent materials, and most printing material designs rely on transparent layered elements, which makes it impossible to meet design requirements;
[0007] (3) Although the current deep learning-based printing material generation model has certain effects, the generated printing materials have low resolution and cannot be designed in layers, which affects the practical application of printing materials. Summary of the invention
[0008] In order to solve the above technical problems, the present invention provides a method for generating a transparent printing material.
[0009] The technical solution adopted by the present invention is a method for generating transparent printing materials, which screens a printing material data set and generates a pattern-text pair data set; constructs an improved transparent printing material generation model, inputs the image branch of the model with the pattern in the data set, and aligns it with the corresponding text information in the data set; trains the model until it is stable, inputs the corresponding pattern text data, and generates transparent printing materials.
[0010] Preferably, generating the pattern-text pair data set comprises the following steps:
[0011] S1.1 build a score predictor based on the CLIP model and the MLP model, and use the score predictor to screen the stamp material dataset;
[0012] S1.2 generates text descriptions for the screened print material data using BLIP3 and encodes the text descriptions into a feature matrix using the CLIP model to construct a pattern-text pair dataset.
[0013] Preferably, the score predictor comprises a CLIP model and an MLP model connected in series;
[0014] Extracting features from images with initial scores using the CLIP model, inputting normalized feature vectors and the initial scores into the MLP model, and training the score predictor;
[0015] The images of the stamp material dataset are input into the trained score predictor, and the stamp material data is filtered based on a preset threshold.
[0016] Preferably, the improved transparent printing material generation model comprises a feature encoding and decoding module, which comprises an improved encoding module and an improved decoding module, and an improved image generation module is provided between the improved encoding module and the improved decoding module.
[0017] Preferably, the input end of the improved encoding module includes an image input channel and an Alpha channel, and the fusion of the foreground information of the image and the mask information of the Alpha channel is obtained after processing the image input channel and the Alpha channel; the improved encoding module includes N downsampling blocks, a global context fusion module, a group normalization layer, an activation function layer, a convolution layer and an output layer sequentially connected to the input end;
[0018] The improved decoding module includes an input layer, a global context fusion module, N upsampling blocks, a group normalization layer, an activation function layer and an output layer arranged in sequence; the output end of the improved decoding module includes an image output channel and an Alpha channel, and the mask information of the Alpha channel is removed by using the fused image of the output layer.
[0019] In the present invention, the mask information of the Alpha channel refers to binarizing the transparent background, that is, a single-channel image with only black and white colors. Fusion actually refers to performing a multiplication weighted operation on the transparent background and the foreground without affecting the foreground information.
[0020] Preferably, the global context fusion module includes two residual blocks, a self-attention module is provided between the two residual blocks, and the outputs of the first residual block and the self-attention module are added and sent to the second residual block.
[0021] Preferably, the improved image generation module includes a DDPM module, the DDPM module includes a forward denoising unit and a backward denoising unit, and the backward denoising unit is provided with a UNet; wherein the forward denoising module is used to add noise, and the UNet module in the backward denoising module is used to predict noise, so as to restore an image from a noisy image in the backward denoising process;
[0022] The UNet includes a plurality of downsampling units and a corresponding plurality of upsampling units connected in sequence, and the corresponding downsampling units are connected to the upsampling units; a Transformer block and a residual convolution block are arranged between all adjacent downsampling units and / or upsampling units.
[0023] Preferably, the Transformer block comprises a self-attention layer, a cross-attention layer and a feed-forward layer arranged in sequence, and a residual connection and a layer normalization module are respectively arranged after the self-attention layer, the cross-attention layer and the feed-forward layer;
[0024] The forward-noised image and text information are input into the self-attention layer and the cross-attention layer respectively.
[0025] Preferably, for each training sample, a time step t and text information T matching the image are associated, and the Gaussian noise Z corresponding to t is applied to the image encoded by the improved encoding module to generate a noisy image x0; with T and x0 as input, UNet outputs predicted noise, and a loss function is constructed to quantify the difference between the predicted noise and the true Gaussian noise Z, thereby optimizing the parameters of UNet.
[0026] In the present invention, the Gaussian noise corresponding to each time step t is related to the noise added in the previous step.
[0027] Preferably, the text and image x0 are input to the trained improved transparent printing material generation model, the text description obtained after BLIP3 processing the text is encoded into a feature matrix, and after the image x0 is encoded, it is denoised in the improved image generation module to form a noise image x0. t , based on the noisy image x t , the text feature vector and the time step t predict the noise of step t-1, and from the noise image x t Subtract from it, repeat until the image x0 is restored, and decode it to get the transparent printing material.
[0028] The present invention provides a method for generating transparent printing materials, which includes screening a printing material data set and generating a pattern-text pair data set; constructing an improved transparent printing material generation model, inputting the image branch of the model with the pattern in the data set, and aligning with the corresponding text information in the data set; training the model until it is stable, inputting the corresponding pattern text data, and generating transparent printing materials.
[0029] The beneficial effects of the present invention are:
[0030] (1) To solve the problem that the existing stamp material datasets are limited in number, of uneven quality, and lack of paired text and image data, which makes it difficult to generate controllable stamp materials, a scoring predictor based on CLIP and MLP models and a large model generation method based on BLIP3 are used to automatically screen the dataset and enhance text features, thereby improving the quality and availability of the dataset;
[0031] (2) Based on the improved transparent print material generation model, not only can high-quality images be generated through the diffusion process, but also the print material of the transparent channel can be accurately reconstructed to ensure that the generated image meets the design requirements in terms of transparency and details. At the same time, in order to ensure that the generated print material pattern maintains diversity while the image features are not disturbed, the DDPM module based on the stable diffusion model is used for image generation. The self-attention mechanism is used to aggregate the information within the image features, and the cross-attention mechanism is used to ensure the alignment between the generated image and the text description. They work together to improve the quality of image generation and the fit with the text description.
[0032] (3) Use professional field datasets for targeted fine-tuning, so that the generated images can adapt to the needs of specific fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a flow chart of the method of the present invention;
[0034] Figure 2 is a schematic diagram of the network structure of the score predictor of the present invention;
[0035] Figure 3 A schematic diagram of the process of generating text information using the BLIP3 model in the present invention;
[0036] Figure 4 A schematic diagram of the network architecture of the improved transparent printing material generation model in the present invention;
[0037] Figure 5 Schematic diagram of the improved VAE network structure in the present invention, wherein (a) is a schematic diagram of the improved encoding module, and (b) is a schematic diagram of the improved decoding module;
[0038] Figure 6 Schematic diagram of the UNet model based on the attention mechanism in the present invention;
[0039] Figure 7 It is a schematic diagram of the structure of the Transformer block in the present invention;
[0040] Figure 8 Schematic diagram of transparent printed patterns generated under different noise intensities according to the present invention, where the numerical value is the noise intensity;
[0041] Fig. 9 The present invention generates a transparent printed pattern for the same original image by inputting different text descriptions. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below in conjunction with embodiments, but the protection scope of the present invention is not limited thereto.
[0043] The present invention relates to a method for generating transparent printing materials. The method screens a printing material data set and generates a pattern-text pair data set; constructs an improved transparent printing material generation model, inputs the image branch of the model with the pattern in the data set, and aligns with the corresponding text information in the data set; trains the model until it is stable, inputs the corresponding pattern text data, and generates transparent printing materials.
[0044] In deep learning, since the CPU plays a very limited role in training and reasoning, the experimental environment is mainly built on the GPU server. The computer hardware configuration selected in this invention is as follows:
[0045] Training uses NVIDIA H800 GPU with 80GB video memory;
[0046] Reasoning NVIDIA RTX 4090 GPU, 24G video memory.
[0047] The software platform is Ubuntu22.04 64-bit system and is implemented based on Pytorch2.0.
[0048] like Figure 1 As shown, the method of the present invention mainly includes four steps:
[0049] (1) Preprocessing of print material dataset;
[0050] (2) Construction of a model for generating transparent printing materials;
[0051] (3) Network model training;
[0052] (4) Input graphic data to generate transparent printing material patterns.
[0053] The following describes the steps in detail.
[0054] (1) Preprocessing of Print Material Dataset
[0055] The preprocessing of the stamp material dataset is mainly divided into two parts. First, a score predictor based on the CLIP model and the MLP model is constructed, such as Figure 2 As shown, the stamp material data set is filtered using a scoring predictor, and then BLIP3 is used to generate text descriptions for the filtered stamp material data to construct a pattern-text pair data set.
[0056] (1-1) Screening of Stamp Material Dataset
[0057] 250,000 images were obtained from the AVA dataset of LAION. Each image has an initial score based on a ten-point scale, which is called an aesthetic score. Most of the aesthetic scores are 2 to 7. Each image is first feature extracted using the CLIP model to obtain a 768-dimensional feature vector, which is then normalized. The normalized feature vector and the corresponding initial score are then input into the MLP model for training. The MLP model learns to predict the aesthetic score of the image by adjusting the weights of each layer. During the training process, the mean square error (MSE) of formula (1) is used as the loss function:
[0058]
[0059] Where N is the number of samples, i is the i-th sample, and y i is the true score of the i-th sample, is the model's predicted score for the i-th sample. MLP adjusts the weights of each layer through training so that the model can accurately predict the initial score of the image.
[0060] The trained rating predictor is used to screen the print material dataset. The Mihui print material dataset used here has about 240,000 print material images. Due to the uneven data quality, poor quality images will affect the generation effect of the trained model. Therefore, the image quality is first screened and high-quality images are selected as the training dataset. All images in the dataset are scored on a 10-point scale using the rating predictor. The higher the score, the better the aesthetic quality of the pattern. Patterns smaller than the threshold TD are eliminated. The value range of TD is [4,6]. The average aesthetic score of all images is calculated to roughly evaluate the overall quality of the dataset during training. In the implementation, the specific value of TD is 5. Patterns smaller than the threshold TD are eliminated through manual screening, and low-quality print material patterns are gradually identified. Finally, 158,549 high-quality print materials are selected as the training dataset.
[0061] (1-2) Pattern-text pair generation from stamp material dataset
[0062] The 158,549 high-quality images selected were used to generate a pattern-text pair dataset through BLIP3, such as Figure 3 As shown in the figure, the model can input images and text at the same time, solving the problem of multimodal image and text interleaving input. The model can accurately describe the image content through text, generate text that meets the requirements, and encode the text description into a feature matrix using the CLIP model, completing a dataset of 158,549 high-quality pattern-text pairs.
[0063] (2) Construction of transparent printing material generation model
[0064] like Figure 4 As shown, the improved transparent printing material generation model includes a feature encoding and decoding module, which includes an improved encoding module and an improved decoding module, and an improved image generation module is provided between the improved encoding module and the improved decoding module.
[0065] After the feature encoding and decoding module efficiently encodes the image, it encodes the image from the pixel space to the latent space. After the DDPM diffusion process, a picture similar to the original image is reconstructed from the latent space; the image generation module includes the text encoding module and the DDPM module. The text encoding module converts the text into a text embedding vector for the DDPM module to generate the image. The DDPM module continuously adds noise to the image in the latent space, and generates transparent printing materials by combining text features and time steps for multiple sampling denoising processes.
[0066] (2-1) Feature encoding and decoding module
[0067] The feature encoding and decoding module adopts the variational autoencoder structure (VAE), which is mainly divided into an improved encoding module (Encoder) and an improved decoding module (Decoder). The Encoder is used to compress the image into the latent space, and the Decoder is used to restore the original image from the latent space.
[0068] In order to allow the VAE model to reconstruct transparent print materials, the original VAE model was improved and additional conditional variables were introduced. Specifically, an Alpha channel for receiving transparent information was added to the latent space. The Encoder receives information from both the RGB channel and the Alpha channel, and uses the Alpha channel information as a noise offset to save transparent information, so as to ensure that the generated image has a transparent channel. Figure 5 As shown in (a); first, the RGBA image of size [4,768,768] is pre-processed, the Alpha channel of the RGBA image is converted into a mask image through binarization, and the foreground information of the image is extracted. The foreground information and the mask information are fused, and the feature size is [1,128,768,768]. The feature vector is then sequentially downsampled through multiple downsampling blocks DownEncoderBlock2D, and the feature dimension is gradually compressed from [1,128,768,768] to [1,512,96,96]. In order to ensure that a high feature resolution is retained after encoding and that the potential representation contains more detail information, but in the last DownEncoderBlock2D Only the residual block is retained in the network, and no downsampling operation is performed. The features are fused with the global context through the global context fusion module UNetMidBlock2D composed of two residual blocks and the self-attention module, thereby further improving the integrity and expression ability of the encoded features, so that the image can retain more details and context information when represented in the latent space; finally, the processed feature vector is combined with the group normalization layer GroupNorm, the SiLU activation function and the 3×3 convolution layer to obtain a low-dimensional latent feature vector of size [1,8,96,96], which realizes the dimensionality reduction of the high-dimensional image space mapping to the low-dimensional latent space, significantly reducing the amount of calculation and memory consumption. Specifically, the memory and operation amount are reduced by 64 times.
[0069] The decoding module is symmetrical to the encoding module and is used to reconstruct the latent space feature vector after diffusion by the SD model into an image. In the decoding process of the decoding module, the size of the input latent feature vector is [1,8,96,96]. The feature is globally fused in the context through the global context fusion module UNetMidBlock2D block to ensure the integrity and consistency of the decoded image. The latent features are then gradually upsampled through multiple upsampling blocks UpDecoderBlock2D to restore the spatial resolution of the image. Through the combination of the group normalization layer GroupNorm, SiLU activation function and 3×3 convolutional layer, the decoding process finally outputs an RGB image with the same resolution size as the input image, [1,3,768,768].
[0070] The mask information of the image is used as offset noise to generate a transparent image, ensuring that the transparent channel can be accurately restored while restoring the image. In the process of generating the transparent channel, the decoding module removes the offset noise of the transparent mask information through subtraction operations, thereby optimizing the generation quality of the transparent channel and finally outputting a high-quality RGBA image with a transparent background of feature dimensions [1,4,768,768].
[0071] (2-2) Image generation module
[0072] In order to diversify the generated print material images while keeping the image features undisturbed, the present invention generates images based on the DDPM module of the stable diffusion model, wherein the UNet model downsamples and upsamples the image features, and combines the cross attention mechanism of the Transformer model to align the two different modalities of text and image, so that the features encoded by CLIP text can guide image generation. The UNet module and the Transformer block are respectively as follows: Figure 6 , Figure 7 shown.
[0073] First, the DDPM forward denoising process is performed to add Gaussian noise to the image in the latent space. Then the UNet network further encodes the noisy image in the latent space, and each sampling process uses residual convolution blocks and Transformer blocks that fuse different modal information to prevent feature information loss. Subsequently, the Gaussian noise matrix is iteratively denoised in the latent space. Each denoising prediction is guided by the text and time step t. The predicted noise is gradually removed from the random Gaussian noise matrix, and finally the noise matrix is converted into a latent feature representation of the image.
[0074] In SD's UNet, the self-attention mechanism is used to aggregate information within image features, allowing the model to focus on the relationship between different regions in the image; the cross-attention mechanism is used to ensure alignment between the generated image and the text description, so that the image content conforms to the input text information. These two mechanisms work together to improve the quality of image generation and its fit with the text description.
[0075] (3) Network model training
[0076] Existing SD fine-tuning methods such as text inversion, DreamBooth and LoRA can train specific objects or styles with a small number of samples, but they are less effective for complex and changeable printing materials, and retraining the model requires a lot of computing resources and data. Therefore, the present invention uses professional field data sets for targeted fine-tuning, so that the generated images can meet the needs of specific fields.
[0077] In order to obtain more complete features of printed materials during training, a multi-scale training strategy based on bucketing is adopted during fine-tuning. That is, pictures of different resolutions are bucketed with the same aspect ratio. During training, pictures of the size of BatchSize are randomly taken out of the bucket to increase the generalization ability of the model.
[0078] Fine-tuning training mainly targets UNet, changing its prediction of the noise distribution of the printed material, so that high-quality printed material patterns can be generated. In each round of training, for each training sample, a randomly selected time step t and text information T matching the image are associated, and the Gaussian noise Z corresponding to t is applied to the image x0 encoded by the improved encoding module, thereby generating a noisy image x t , x t It can be expressed using formula (2):
[0079]
[0080] Among them, t obeys the uniform sampling of [1,N], It is used to represent the product of the noise parameters of the previous t steps, simplifying the noise process, α t =1-β t , where β t ∈(0,1) and β t It increases linearly with t, which is used to ensure that the noise added at different time steps is different, x0 = x a +x " , x0 represents the original input image, x a Indicates the transparent channel of the printing material, x " Indicates the foreground of the printed material, and replaces T and x t Send them to UNet network training together, UNet outputs predicted noise Compared with the actual Gaussian noise Z, a loss function is constructed to quantify the difference between the predicted noise and the real noise, which gradually guides the optimization of UNet parameters. The loss function is as shown in formula (3):
[0081]
[0082] The entire training used 100K fine-tuning steps and introduced a multi-scale resolution strategy to enhance the adaptability of the model. In the training parameters, the Batch Size was set to 4, the gradient accumulation steps were 4, and a constant learning rate of 0.000001 was used to keep the model training process relatively stable.
[0083] (4) Input graphic data to generate transparent printing patterns
[0084] After the training is completed, the corresponding printing material pattern can be generated by inputting text and images.
[0085] Input text and image x0, encode the text description obtained after BLIP3 processing into a feature matrix through the text encoding part in the CLIP model, and encode the image into the latent space through the improved encoding module and gradually add noise to the noise image x through DDPM. t , the noise image x t , the text feature vector and the time step t are used to predict the noise of the t-1 step through the UNet network, and it is subtracted from the image. The subtracted noise is related to the time step t and the text information. The process is repeated until a clear image x0 is restored. Finally, the x0 in the latent space is decoded into a transparent printing material pattern through the improved decoding module.
[0086] The text description is "realistic style flower", that is, a flower of real style, and the experimental results are as follows Figure 8 As shown, when the noise intensity is below 50%, the image changes little, and when the noise intensity is above 70%, the generated image has a realistic style, gradually changing from a watercolor style to a realistic style described by text;
[0087] At the same time, by inputting different text descriptions, you can also generate printing materials. The generated results are as follows: Fig. 9 shown.
[0088] The present invention also relates to a computer-readable storage medium in its application, on which a transparent printing material generation program is stored, and when the program is executed by a processor, the above-mentioned transparent printing material generation method is implemented.
[0089] The present invention also relates to a computer device in its application, including a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the above-mentioned transparent printing material generation method is implemented.
[0090] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0092] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0094] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0095] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for generating transparent printing material, characterized in that: The method screens a stamp material data set and generates a pattern-text pair data set; constructs an improved transparent stamp material generation model, inputs the image branch of the model with the pattern in the data set, and aligns it with the corresponding text information in the data set; Train the model until it is stable, input the corresponding pattern text data, and generate transparent printing materials.
2. A method for generating transparent printing material according to claim 1, characterized in that: Generating the pattern-text pair dataset comprises the following steps: S1.1 build a score predictor based on the CLIP model and the MLP model, and use the score predictor to screen the stamp material dataset; S1.2 generates text descriptions for the screened print material data using BLIP3 and encodes the text descriptions into a feature matrix using the CLIP model to construct a pattern-text pair dataset.
3. A method for generating transparent printing material according to claim 2, characterized in that: The score predictor includes a CLIP model and an MLP model in series; Extracting features from images with initial scores using the CLIP model, inputting normalized feature vectors and the initial scores into the MLP model, and training the score predictor; The images of the stamp material dataset are input into the trained score predictor, and the stamp material data is filtered based on a preset threshold.
4. A method for generating transparent printing material according to claim 1, characterized in that: The improved transparent printing material generation model includes a feature encoding and decoding module, which includes an improved encoding module and an improved decoding module. An improved image generation module is provided between the improved encoding module and the improved decoding module.
5. A method for generating transparent printing material according to claim 4, characterized in that: The input end of the improved encoding module includes an image input channel and an Alpha channel, and the image foreground information and the mask information of the Alpha channel are fused after processing the image input channel and the Alpha channel; the improved encoding module includes N downsampling blocks, a global context fusion module, a group normalization layer, an activation function layer, a convolution layer and an output layer sequentially connected to the input end; The improved decoding module includes an input layer, a global context fusion module, N upsampling blocks, a group normalization layer, an activation function layer and an output layer arranged in sequence; the output end of the improved decoding module includes an image output channel and an Alpha channel, and the mask information of the Alpha channel is removed by using the fused image of the output layer.
6. A method for generating transparent printing material according to claim 5, characterized in that: The global context fusion module includes two residual blocks, a self-attention module is arranged between the two residual blocks, and the outputs of the first residual block and the self-attention module are added and sent to the second residual block.
7. A method for generating transparent printing material according to claim 4, characterized in that: The improved image generation module includes a DDPM module, wherein the DDPM module includes a forward denoising unit and a backward denoising unit, wherein the backward denoising unit is provided with a UNet; The UNet includes a plurality of downsampling units and a corresponding plurality of upsampling units connected in sequence, and the corresponding downsampling units are connected to the upsampling units; a Transformer block and a residual convolution block are arranged between all adjacent downsampling units and / or upsampling units.
8. A method for generating transparent printing material according to claim 7, characterized in that: The Transformer block includes a self-attention layer, a cross-attention layer and a feed-forward layer arranged in sequence, and a residual connection and a layer normalization module are respectively arranged after the self-attention layer, the cross-attention layer and the feed-forward layer; The forward-noised image and text information are input into the self-attention layer and the cross-attention layer respectively.
9. A method for generating transparent printing material according to claim 7, characterized in that: For each training sample, a time step t and text information T matching the image are associated, and the Gaussian noise Z corresponding to t is applied to the image encoded by the improved encoding module to generate a noisy image x0; with T and x0 as input, UNet outputs predicted noise, and a loss function is constructed to quantify the difference between the predicted noise and the true Gaussian noise Z, thereby optimizing the parameters of UNet.
10. A method for generating transparent printing material according to claim 4, characterized in that: The text and image x0 are input to the trained improved transparent print material generation model, the text description obtained after BLIP3 processing the text is encoded into a feature matrix, and the image x0 is encoded and then noised into a noise image x0 in the improved image generation module. t , based on the noisy image x t , the text feature vector and the time step t predict the noise of step t-1, and from the noise image x t Subtract from it, repeat until the image x0 is restored, and decode it to get the transparent printing material.