A Text Style-Driven Method for Automatic Generation of Smart Color Icons
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]本发明的目的在于提供一种文本风格驱动的智能彩色图标自动生成方法,用于解决现有图标风格迁移方法在推理阶段依赖风格图像、难以精确控制颜色比例以及容易破坏图标边缘结构的问题
[0019]与现有技术相比,本发明有如下优点:在推理阶段无需风格图像,仅凭内容图标和用户自由定义风格文本即可生成目标图标,降低了风格迁移的使用门槛;将风格语义和颜色比例同时纳入建模,可显式控制图标的配色结构和材质观感;通过风格记忆序列与Transformer交叉注意力机制实现细粒度风格注入,提升文本到图标风格迁移的可控性;通过边缘保持和颜色比例约束,更适合对边缘清晰度和局部配色要求较高的图标场景;训练阶段使用风格图像与风格文本配对监督,而测试阶段仅使用文本作为风格输入,兼顾了监督充分性和部署便利性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and image generation technology. For the task of stylizing icon images, it generates color icon images that meet the requirements of target material, lighting, three-dimensionality, and color ratio by using style text as a style control condition while preserving the content icon structure and layout. Background Technology
[0002] With the rapid development of software interfaces, mobile applications, data visualization platforms, and digital content products, icons have become one of the core visual elements in modern human-computer interaction systems. Icons not only serve to indicate functions and convey semantics, but also directly impact brand consistency, visual order, and user experience. Traditional icon design primarily relies on manual drawing or modifying existing materials one by one, requiring long-term involvement from professional designers and incurring high costs in batch generation, style consistency, and color control. In modern scenarios such as finance, payment, logistics, equipment, healthcare, and blockchain, icons often need to maintain clear semantics while meeting unified three-dimensional texture and color scheme specifications, making the generation of high-quality color icons a technically valuable challenge.
[0003] Existing image style transfer methods typically use content and style images as joint inputs, extracting content and style features through convolutional neural networks or Transformer networks, and then transferring the style features back to the content image to output a stylized result. While these methods have achieved considerable success in natural image scenarios, they still face significant limitations when directly applied to icon scenarios. First, existing methods often rely on style image input during the inference phase. When users can only provide textual style descriptions such as "metallic texture," "plastic texture," "soft shadows," "prominent highlights," and "70% blue, 30% silver," without providing matching style images, existing methods struggle to directly generate new icons that meet the requirements. Second, icon images are highly sensitive to color composition and proportions. Compared to natural images, icons typically have more explicit design constraints on their primary, secondary, and accent colors; inaccurate color proportions significantly impact icon recognizability and brand consistency. Third, icons are characterized by clear outlines, well-defined edges, simple structures, and strong symbolic meaning. If excessive textures are injected or local blurring occurs during style transfer, it can easily damage the boundaries and shapes of icons, resulting in blurred outlines, color overflow, and structural distortion in the generated results.
[0004] Therefore, there is an urgent need to propose a new method for automatic generation of color icons, which enables the model to establish cross-modal style alignment during the training phase by using paired supervision of style images and style text, and to generate new icons in the inference phase using only content icons and target style text, while achieving style semantic control, color ratio constraints and preservation of icon edge structure. Summary of the Invention
[0005] The purpose of this invention is to provide a text style-driven intelligent automatic color icon generation method to solve the problems of existing icon style transfer methods relying on style images during the inference stage, difficulty in accurately controlling color ratios, and easy destruction of icon edge structures.
[0006] To achieve the above objectives, the technical solution adopted by this invention will be described in detail below. A text-style driven intelligent color icon automatic generation method includes the following steps:
[0007] (1) Construct the icon training and testing dataset (101)
[0008] Collect content icon samples, style icon samples, and corresponding style text. Style text contains at least two types of information: one is semantic information about style, such as material, lighting, three-dimensionality, design language, and aesthetic direction; the other is information about multiple colors and their proportions. Perform uniform scaling and cropping on the image samples, segment and encode the style text, and parse out the palette features corresponding to the color proportions.
[0009] (2) Build a text style-driven icon generation model (102)
[0010] The model includes a content image encoding module (201) for extracting content features from content icons; a text style encoding module (202) for extracting style semantic features from style text; a color ratio encoding module (203) for mapping the color ratio in style text to palette features; a style memory projection module (204) for mapping and fusing style semantic features and palette features into a style memory sequence; a Transformer fusion module (205) for performing cross-attention fusion with content features as queries and style memory sequences as conditional memories; an icon decoding module (206) for decoding the fused stylized features into color icon images; a VGG19 perceptual constraint module (207) for extracting multi-layer perceptual features from content images, style images, and generated images to construct content preservation loss and image style loss; and a content icon shallow feature extraction module (208) for extracting shallow features of content icons and applying them to the decoding module to enhance contour preservation capabilities.
[0011] The content image encoding module (201) uses a pre-trained Patch Embedding module to sequence the features of the content icons; the text style encoding module (202) uses a CLIP (Contrastive Language-Image Pre-Training) text encoder pre-trained based on a large-scale image-text contrast learning task; the color ratio encoding module (203) uses a multilayer perceptron (MLP); the style memory projection module (204) uses a two-branch fully connected projection structure; the Transformer fusion module (205) uses a cross-modal Transformer fusion structure with pre-trained parameters to fuse the content feature sequence and style memory; the icon decoding module (206) uses a convolutional image decoding network with pre-trained parameters and introduces color context-based modulation in the intermediate feature layer; the pre-trained parameters of the Transformer fusion module (205) and the icon decoding module (206) are derived from the content image dataset COCO. The 2014 and style image dataset WikiArt pre-trained model for image style transfer; the VGG19 perceptual constraint module (207) is used to extract multi-layer perceptual features of content image, style image and generated image to construct content preservation loss and image style loss, and participates in loss calculation only in the training stage; the content icon shallow feature extraction module (208) is used to extract shallow features of content icon, and acts on the intermediate stage and subsequent stage of the decoding module through two skip connections to enhance the contour preservation ability, and participates in feature transfer in both the training stage and the inference stage; the modules (207) and (208) share the same set of VGG19 parameters pre-trained based on the ImageNet image classification task.
[0012] (3) Training the text style-driven icon generation model and determining the loss function (103)
[0013] During training, content icon samples (301) and style text (303) are input into the main branch, and style icon samples (302) are input into the training supervision branch. Content icons are processed by the content image encoding module (201) to obtain content features; style text is processed by the text style encoding module (202) to obtain style semantic features, and by the color ratio encoding module (203) to obtain palette features. In the forward propagation process of each training iteration, the style semantic features and palette features are mapped into a style memory sequence by the style memory projection module (204). The Transformer fusion module (205) fuses the content features according to the style memory sequence, and the icon decoding module (206) outputs the generated icon.
[0014] An additional VGG19 perceptual constraint module (207) is introduced to extract multi-layer perceptual features of the content image, style image and generated image to construct content preservation loss and image style loss; a content icon shallow feature extraction module (208) is used to extract shallow features of the content icon and acts on the intermediate and subsequent stages of the decoding module through two skip connections to enhance the contour preservation capability. It participates in feature transfer in both the training and inference stages.
[0015] During training, pre-trained content encoding modules (201), Transformer fusion modules (205), and VGG19 related modules are loaded, and the text style encoding module (202), color ratio encoding module (203), and style memory projection module (204) are trained and tuned. For the original generation modules, frozen training or low learning rate fine-tuning can be used to improve training stability and reduce icon detail collapse.
[0016] The loss function used when training the model consists of a weighted sum of several losses, including content preservation loss L_content, image style loss L_style, text and image style alignment loss L_align, color proportion loss L_palette, and edge preservation loss L_edge. Content Preservation Loss (304) is used to constrain the consistency of generated icons and content icons in deep content features, so as to keep the main structure and semantics of the icons unchanged; Image Style Loss (305) is used to constrain the consistency of generated icons and style icons in multi-level style statistics, so that the output results in the training process have real visual style anchors; Text and Image Style Alignment Loss (306) is used to constrain the consistency of style text features and style image features. This loss includes a global style vector alignment term and a style memory distribution alignment term. The former is used to constrain the similarity between the global representation of text style and the global representation of style image, and the latter is used to constrain the consistency of text style memory sequence and style image style memory sequence in statistical distribution; Color Proportion Loss (307) is used to constrain the color distribution of generated icons to be consistent with the color proportion description in style text. Soft color allocation is performed on the pixels of generated icons to obtain a predicted color histogram, and then it is compared with the target color palette distribution obtained by parsing style text; Edge Preservation Loss (308) is used to constrain the consistency of generated icons and content icons in edge structure, so as to maintain the clarity of icon outline, structural recognizability and graphic symbol integrity.
[0017] (4) Generate new icons during the reasoning phase (104)
[0018] During inference, only the content icon A (401) and the target style text T (402) are input, without the need for any style images. The model outputs a new icon C (403), which is consistent with the content icon A in terms of main semantics and layout structure, and meets the requirements described by the target style text T in terms of material, lighting, three-dimensionality, main color distribution and overall aesthetics.
[0019] Compared with existing technologies, this invention has the following advantages: During the inference phase, no style image is required; the target icon can be generated solely from the content icon and user-defined style text, lowering the barrier to style transfer. Style semantics and color proportions are simultaneously incorporated into the modeling, allowing explicit control over the icon's color scheme and material appearance. Fine-grained style injection is achieved through style memory sequences and the Transformer cross-attention mechanism, improving the controllability of text-to-icon style transfer. Edge preservation and color proportion constraints make it more suitable for icon scenarios with high requirements for edge clarity and local color matching. During the training phase, style images and style text are paired for supervision, while during the testing phase, only text is used as style input, balancing sufficient supervision and ease of deployment. Attached Figure Description
[0020] Figure 1 This is a flowchart of a text style-driven intelligent color icon automatic generation method according to an embodiment of the present invention;
[0021] Figure 2 This is a diagram illustrating the overall structure of a text-style-driven intelligent color icon generation model according to an embodiment of the present invention.
[0022] Figure 3 This is a schematic diagram illustrating the training loss structure according to an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram illustrating the reasoning and result output according to an embodiment of the present invention. Detailed Implementation
[0024] To more specifically describe the objectives, technical solutions, and advantages of this invention, the invention will be further elaborated below with reference to the accompanying drawings and specific embodiments. The flow of one embodiment of the method is as follows: Figure 1 As shown in the figure. This invention proposes a method for automatically generating intelligent color icons based on text style and color ratio constraints. The method will be described in detail below with reference to specific embodiments.
[0025] (1) Prepare icon training data and style text data
[0026] In this embodiment, a sufficient number of color icon image samples are first prepared. These samples can come from open-source icon websites on the Internet, self-built icon datasets, or color icon resource libraries that have been manually selected. The icon samples preferably cover multiple semantic categories such as finance, payment, blockchain, logistics, equipment, people, business charts, healthcare, and services, in order to improve the model's generalization ability to different icon subjects.
[0027] In this embodiment, 40,000 icons are selected from the icon dataset as the content icon training set, and another 400 icons with representative visual styles are selected as the style icon training set. For each style icon, the large model automatically extracts a style text description. The style text includes two parts: a style semantic description and a color proportion description. For example, the style text can be written as: "Blue 60%, Orange 20%, White 15%, Gray 5%; Plastic-like material, smooth texture, soft lighting, 3D rendering, rounded shape language, modern aesthetics," or "Bright blue 70%, Silver 30%; Smooth metallic material, glossy highlights, soft shadows, 3D icon style." The first part describes the color proportions, and the second part describes the material, texture, lighting, and stylistic aesthetics.
[0028] Both the content icons and style icons were normalized before training. For text processing, the style text was first lowercase, spaces were normalized, and words were segmented. Then, color names and their percentages were extracted using color parsing rules to construct the target color palette distribution. .
[0029] (2) Constructing a text style-driven icon generation model
[0030] In this embodiment, the model consists of a content image encoding module, a text style encoding module, a color ratio encoding module, a style memory projection module, a Transformer fusion module, an icon decoding module, and a VGG19 perceptual constraint module for the training phase.
[0031] The content image encoding module consists of two parts: the first part is a pre-trained Patch Embedding module, whose parameters are trained on an image style transfer task using COCO2014 as the content image and WikiArt as the style image. This module directly maps the content icon image to a content token sequence for Transformer fusion; the second part is a VGG19 convolutional network pre-trained on the ImageNet image classification task as a feature extraction network, used to extract multi-layer perceptual features, which participate in the content preservation loss, image style loss and shallow skip connections in the decoding stage.
[0032] The text style encoding module uses the CLIP text encoder ViT-B / 32 as a pre-trained text backbone network to extract global style semantics and local style tokens from styled text. Alternatively, a text sequence encoding structure based on word embeddings, bidirectional GRU, and multi-head attention aggregation can be used. To align with the image style space, the text style encoding module outputs two types of results: one is a sequence of style semantic tokens used to construct text style memory; the other is a global text style vector used for alignment with the global image style vector.
[0033] The color ratio encoding module will analyze the target color distribution obtained from the style text parsing. The input is a multilayer perceptron, which outputs several palette tokens and a global color vector. In this embodiment, the color scaling encoding module outputs four palette tokens, which, together with eight style semantic tokens, constitute a text style memory sequence. The style memory projection module projects the style semantic tokens and palette tokens onto the same dimension, and adjusts the influence strength of the palette tokens using learnable gating parameters. Then, the two are concatenated along the token dimension to obtain the text style memory sequence. This design preserves text semantic style information while explicitly introducing color scaling control information.
[0034] The Transformer fusion module uses text style memory as the injected style. Specifically, content tokens are used as query terms, and text style memory is used as keys and values, with style injection achieved through cross-attention. In this embodiment, the hidden dimension is set to 512, the number of multi-head attention heads is set to 8, the number of Transformer encoder layers is set to 3, and the number of Transformer decoder layers is set to 3.
[0035] The icon decoding module introduces color context-based modulation modules in each of the three decoding stages. Let the intermediate feature map of a certain stage be... The color context vector is The modulated feature map It can be represented as:
[0036] (1)
[0037] in, and This represents the scale parameters and bias parameters generated by the fully connected network. This represents element-wise multiplication. Meanwhile, the icon decoding module also introduces two content icon shallow feature skip connections from the pre-trained content icon shallow feature extraction module, which are applied to the intermediate and subsequent stages of the decoding module, respectively, to enhance contour preservation capabilities.
[0038] The VGG19 perceptual constraint module extracts multi-layer perceptual features from the content image, style image, and generated image to construct content preservation loss and image style loss. This module only participates in style alignment and auxiliary supervision during the training phase; it no longer requires an input style image during the inference phase.
[0039] (3) Load pre-training parameters and set training strategy
[0040] In the initial training phase, the original generation module is trained using frozen training or fine-tuned with a low learning rate to avoid disrupting its original generation capabilities in the early stages of a new task. The focus is on training and tuning the network parameters of the text style encoding module, color ratio encoding module, and style memory projection module to quickly establish the mapping relationship between text style and image style. In a preferred embodiment, the base learning rate is set to... The training module uses the base learning rate, the style memory module uses 0.5 times the base learning rate, the original generation module uses 0.05 times the base learning rate, and the optimizer is Adam.
[0041] (4) Training a text style-driven icon generation model
[0042] During training, the content icon image is used. Style icon images and style text The common input model works as follows: First, the content image encoding module obtains content tokens and multi-layer content-aware features; then, the text style encoding module obtains style semantic tokens and global text style vectors, and the color ratio encoding module obtains palette tokens and global color vectors; next, the style memory projection module fuses the style semantic tokens and palette tokens into a text style memory sequence, and the Transformer fusion module stylizes the content tokens based on the text style memory; finally, the icon decoding module outputs the generated icon for the text-driven branch. .
[0043] At the same time, style icons will also be used during the training phase. Input the VGG19 perceptual constraint module to obtain the image style memory sequence. And construct image style branch output based on this sequence. The image style branch serves as an auxiliary supervision branch, used to stabilize the style mapping relationship during training.
[0044] The loss function used when training the model is content preservation loss. Image style loss Text and image style alignment loss Color proportion loss and edge preservation loss The weighted sum, as shown in the formula :
[0045] (2)
[0046] in, , , , , These are the weighting coefficients corresponding to each loss term.
[0047] Content preservation loss is used to constrain the consistency between generated icons and content icons in deep content features, as shown in the formula. :
[0048] (3)
[0049] Image style loss is used to constrain the consistency between generated icons and style icons across multiple levels of style statistics, as shown in the formula. :
[0050] (4)
[0051] Text-image style alignment loss is used to constrain the consistency between style text features and style image features, as shown in the equation. :
[0052] (5)
[0053] in, For stylistic text features, These are the features mapped from image features by a text encoder, used to constrain the consistency between text semantic style and visual style expression.
[0054] Color proportion loss is used to constrain the consistency between the color distribution of the generated icon and the color proportion description in the style text, as shown in the formula. :
[0055]
[0056] in, p To generate icon color distribution, q The target color distribution.
[0057] Edge preservation loss is used to constrain the consistency of the generated icon and the content icon in terms of edge structure, as shown in equation [equation missing]. :
[0058]
[0059] in, This represents the edge extraction operator.
[0060] (5) Generate new icons during the reasoning stage
[0061] During reasoning, you only need to input the content icon. and target style text The target style text is first parsed into a style semantic description and a color ratio description, and then processed by a text style encoding module and a color ratio encoding module to form a text style memory sequence. The Transformer fusion module stylizes the tokens of the content icon based on the text style memory sequence, and the icon decoding module outputs the final generated icon. .
[0062] For example, when the input target style text is "70% bright blue, 30% silver; smooth metallic texture, glossy highlights, soft shadows, 3D icon style," the model generates icons that, while maintaining the original icon structure, present a color scheme dominated by bright blue and silver, while simultaneously exhibiting a metallic texture, highlight reflections, and soft shadows. As another example, when the input target style text is "70% white, 30% yellow; smooth plastic texture, soft shadows, simple 3D icon style," the model can generate icons with white and yellow as the main colors, possessing a plastic texture and a simple 3D effect. This invention aims to generate target-styled icons based on freely defined text control, which will be further explained below with specific implementation examples.
[0063] Example 1
[0064] (1) Prepare training data
[0065] In this embodiment, the training set includes 40,000 content icon images, 400 style icon images, and their corresponding style texts; the test set includes 4,000 content icon images and 40 style texts. All images are converted to RGB three-channel images, uniformly scaled to 512×512 pixels during training, and then randomly cropped to 256×256 pixels. During testing, they are uniformly scaled to 256×256 pixels before being input into the model. The size, image resolution, and cropping parameters of the training and test sets can be adjusted according to actual needs.
[0066] (2) Training a Transformer-based icon style transfer model
[0067] The text style encoding module uses the CLIP text encoder ViT-B / 32, with 8 semantic tokens and 4 palette tokens. Both the Transformer encoder and decoder layers are set to 3. The model is loaded with pre-trained VGG19 parameters and the parameters for the decoder, embedding module, and Transformer module. The Adam optimizer is used to minimize the total loss function, and the entire model is trained end-to-end until the network converges.
[0068] (3) Text control for generating new icons in different styles
[0069] After training, the input consists of an icon image of the content to be stylized and text of the target style. The text style encoding module extracts style semantic features, and the color ratio encoding module extracts color ratio features. These features are then projected through style memory and fed into the Transformer fusion module, where they are fused with the content image features. Finally, the icon decoding module outputs the target stylized color icon. Test results show that this embodiment can achieve joint control of style semantics and color ratio while maintaining the main structure and outline edges of the content icon.
[0070] Example 2
[0071] (1) Prepare training data
[0072] In this embodiment, the training set includes 40,000 content icon images, 400 style icon images, and their corresponding style texts; the test set includes 4,000 content icon images and 40 style texts. For icon images of different sizes and resolutions, they are first converted to RGB three-channel images and then normalized to a preset input size through proportional scaling, edge patching, or cropping before being fed into the model. During the training phase, data augmentation operations such as flipping, brightness and color adjustment, noise addition, and compression are performed on the normalized images. During the testing phase, any icon to be processed is normalized to the corresponding input size and then generated. The generated result can be scaled and output to any target icon size according to different application requirements.
[0073] (2) Training a Transformer-based icon style transfer model
[0074] The difference between this embodiment and Embodiment 1 is that the text style encoding module does not use a pre-trained CLIP text encoder, but instead uses a text encoder based on word embedding layers and bidirectional GRUs to extract semantic features of the style text; the remaining parameters, such as the number of palette tokens, the number of Transformer encoder layers, the number of Transformer decoder layers, the pre-trained VGG19 parameters, the embedding module parameters, the Transformer module parameters, the icon decoding module parameters, and the training method, are the same as in Embodiment 1. During training, the Adam optimizer is also used to minimize the total loss function, and the entire model is trained end-to-end until the network converges.
[0075] (3) Text control generates new icons with the same style
[0076] After training, the input consists of an icon image of the content to be stylized and the target style text. The bidirectional GRU text encoder outputs style text features, and the color ratio encoding module outputs color ratio features. These features are then projected through style memory and fed into the Transformer fusion module, where they are fused with the content image features. Finally, the icon decoding module outputs the target stylized color icon. Alternatively, by replacing the pre-trained CLIP text encoder with a text encoder based on word embedding layers and bidirectional GRU, another method for implementing text style encoding can be formed.
[0077] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. It will be apparent to those skilled in the art that various modifications can be made to the above embodiments, and the general principles described herein can be applied to other embodiments without inventive effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.
Claims
1. A text-style-driven method for automatically generating intelligent color icons, comprising the following steps: (1) Construct a dataset for icon stylization training. The dataset includes at least content icon samples, style icon samples, and style text corresponding to the style icon samples. The style text is obtained by manually annotating the style icon samples or by automatically generating it from a visual language model. The style text includes at least a style semantic description and a color ratio description. (2) Preprocess the content icon samples and style icon samples, unify the image size, and use the large model to perform word segmentation encoding and color ratio analysis on the style text to obtain the text sequence representation and the color palette target representation; (3) Construct a text style-driven smart icon generation model based on Transformer, the model including content image encoding branch, text style encoding branch, color ratio encoding branch, style memory projection branch, Transformer fusion branch and icon image decoding branch; (4) The model is trained using the content icon samples, style icon samples and style text, so that the model learns the mapping relationship from content icons to target text style; (5) During the inference phase, only the content icon to be generated and the user-defined style text are input into the model, and the output is a colored icon that is consistent with the main body of the content icon and conforms to the description of the target style text; wherein, the user can freely combine style dimensions such as material, lighting, three-dimensionality, and color scheme; If the target style text does not contain a description of color proportions, the color proportion encoding branch uses either a default uniform distribution or a proportion inferred from style semantics as conditional input.
2. The text-style-driven intelligent color icon automatic generation method according to claim 1, characterized in that: Based on the characteristics of icon images, the style text consists of two parts: one part describes the material, lighting, three-dimensionality, design language, or aesthetic style, and the other part describes the various colors and their proportions. The color proportion description is parsed into a color distribution vector, which serves as the supervision target and inference condition for the color proportion coding branch.
3. The text-style-driven intelligent color icon automatic generation method according to claim 1, characterized in that: The content image encoding branch uses the Patch Embedding module to encode the feature sequence of the content icon, and inputs the encoded content feature sequence into the Transformer fusion module for cross-modal fusion; the text style encoding branch uses the CLIP text encoder to extract the global semantic representation and style semantic token of the style text; the color ratio encoding branch uses a multilayer perceptron to map the color ratio vector into a palette token; the style memory projection branch uses linear projection, normalization and splicing operations to fuse the style semantic token and the palette token into a style memory sequence.
4. The text-style-driven intelligent color icon automatic generation method according to claim 3, characterized in that: The Transformer fusion branch uses the content features output by the content image encoding branch as a query and the style memory sequence output by the style memory projection branch as a conditional memory, and adopts a cross-attention mechanism to inject the text style into the content icon. The icon image decoding branch includes a convolution-based image reconstruction network, which receives skip connections from the shallow features of the content image encoding branch and introduces color context features from the color ratio encoding during the decoding process to maintain the clarity of the icon outline and enhance the color ratio control capability.
5. The text-style-driven intelligent color icon automatic generation method according to claim 1, characterized in that: During training, the model loads a pre-trained content image encoding module and a Transformer fusion generation module, and focuses on training the text style encoding branch, color ratio encoding branch, and style memory projection branch. The pre-trained content image encoding module includes an image embedding part for mapping content images into content feature sequences, and the Transformer fusion generation module includes a Transformer fusion module and an icon decoding module. The pre-trained Transformer fusion generation module can be trained using frozen training or low learning rate fine-tuning.
6. The text-style-driven intelligent color icon automatic generation method according to claim 1, characterized in that: The loss function used when training the model is content preservation loss. Image style loss Text and image style alignment loss Color proportion loss and edge preservation loss The weighted sum of the losses consists of several parts: in, , , , , These are the weighting coefficients corresponding to each loss term; Content retention loss Used to constrain the consistency between generated icons and content icons in terms of deep content features: Image style loss Used to constrain the consistency of generated icons and style icons across multiple levels of style statistics: Text and image style alignment loss Used to constrain the consistency between style text features and style image features: in, As a stylistic text feature, These are the features mapped from style image features by a text encoder, used to constrain the consistency between text semantic style and visual style expression; Color proportion loss Used to ensure consistency between the color distribution of generated icons and the color proportions described in the style text: in, p To generate icon color distribution, q For the target color distribution; Edge preservation loss Used to ensure consistency between generated icons and content icons in terms of edge structure: in, This represents the edge extraction operator.
7. The text-style-driven intelligent color icon automatic generation method according to claim 1, characterized in that: The method is applicable to scenarios where the main structure needs to be kept unchanged and the material, lighting, color scheme and three-dimensionality of the colored icons need to be automatically generated only based on the target style text. The method supports zero-sample style generation, that is, a reasonable icon can still be generated in the inference stage even if the style text combination has not been seen in the training stage.