Logo generation method and system based on conditional generative adversarial network and electronic equipment

By using a conditional generative adversarial network-based approach, which classifies logos based on features and color labels and combines fully connected and generator modules to generate controllable logos, this approach solves the problem of generating random logos that do not meet customer needs in existing technologies, and achieves efficient and aesthetically pleasing logo generation.

CN116109718BActive Publication Date: 2025-10-21WUHAN UNIV OF TECH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211433987.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2025-10-21
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Existing technologies lack control when generating logos using generative adversarial networks, resulting in random images that do not meet client needs. This is especially problematic for clients without specific ideas and designers who cannot accurately understand the requirements, leading to a time-consuming and labor-intensive design process with unsatisfactory results.

Method used

A conditional generative adversarial network-based approach is adopted to classify logos by defining feature labels and color labels. A label fusion module, a fully connected module, and a generator module are used to generate controllable logo images. This includes randomly sampling the hidden vector Z and untangling the feature entanglement through 8 fully connected layers. The controllable logo is generated by combining upsampling and deconvolution operations.

Benefits of technology

It enables controllable logo generation, capable of generating logos that meet customer needs based on preset feature tags, improving design efficiency and aesthetic effects, and satisfying the needs of different categories and colors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109718B_ABST
    Figure CN116109718B_ABST
Patent Text Reader

Abstract

The application discloses a logo generation method and system based on a conditional generative adversarial network and electronic equipment, and first defines feature labels, including classification labels and color labels; then hidden vectors Z are obtained through random sampling; finally, a certain feature label and the hidden vectors Z are input into the conditional generative adversarial network to generate controllable logo images; wherein the conditional generative adversarial network comprises a label fusion module, a full connection module and a generator module; the application can improve the efficiency of designing logos and can realize batch generation of controllable logos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology and relates to a logo generation method, system and electronic device, and more particularly to a method, system and electronic device for generating a logo image that contains specified features and is practical and aesthetically pleasing using a conditional generative adversarial network. Background Art

[0002] The logo image design process usually includes: the designer creates a large number of logo sketches, and then the client selects some of the drafts. After multiple iterations of modification by the designer, the final logo is designed to meet the client's needs.

[0003] A complete logo is composed of the logo icon, logo name, logo slogan, logo font pairing rules, logo layout rules, and logo color matching rules. The current common technique used in the industry for logo design is as follows: designers create numerous logo sketches, then the client selects a few. After multiple iterations, the designer finally designs a logo that meets the client's needs.

[0004] At present, there is also a method that summarizes some steps of manual design by designers into rules, and then realizes semi-artificial design of manual + rules. For example, the "Logo Generation Method and Intelligent Logo Generator Based on Natural Patterns" has been patented, application publication number CN 108549530 A, application number: 202110966926.6.

[0005] However, for clients who don’t have a specific idea of ​​the final product and designers who cannot accurately understand the client’s needs, designing the final logo is not only time-consuming and labor-intensive, but the final result may also not meet the client’s needs.

[0006] Generative Adversarial Networks (GAN) are one of the most promising methods for unsupervised learning on complex distributions in recent years. The model produces fairly good output through the mutual game learning of two modules in the framework: the generative model and the discriminative model. GAN can generate data that does not exist in the real world and plays an important role in image generation, image denoising, and data enhancement. For example, the patent "A method for generating intelligent LOGO based on StyleGAN" with application publication number CN 114219875 A and application number 202111474576.8 adopts the StyleGAN algorithm and the logo icon generation model obtained by training based on a massive logo data set. The generation of logo icons through the generative model is more efficient than completely manual or semi-manual methods; the effect is more aesthetically pleasing than the logo generated by manual rules, and the style is more diverse.

[0007] Generative adversarial networks are currently used in the field of computer vision to generate a variety of images. A known distribution is used, and after processing and transformation by the generator, a large number of generated pseudo images are obtained. However, these generated images are random and uncontrolled. Summary of the Invention

[0008] To facilitate conditional logo generation, the present invention provides a logo generation method, system, and electronic device based on a conditional generative adversarial network. These methods control these potential input vectors in a way that can intuitively determine the output style, using data classification as a condition. This method can guide the network to produce outputs related to the characteristics of a specific class.

[0009] The technical solution adopted by the method of the present invention is: a logo generation method based on a conditional generative adversarial network, comprising the following steps:

[0010] Step 1: Define feature labels, including classification labels and color labels;

[0011] The classification labels classify logo images into three subsets based on their characteristics: figurative logos, abstract logos, and text logos. Each subset is further subdivided into four categories: figurative logos include people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters.

[0012] The color label checks the pixel values ​​of the logo image one by one, and finally summarizes the main color of the logo image as the color label;

[0013] Step 2: Randomly sample to obtain the hidden vector Z;

[0014] The hidden vector Z is sampled from the Gaussian distribution N(μ,σ2), and is a vector of size n×d, where n is a preset value; d is the length of the hidden vector Z;

[0015] Step 3: Input a certain feature label and hidden vector Z into the conditional generative adversarial network to generate a controllable logo image;

[0016] The conditional generative adversarial network includes a label fusion module, a fully connected module and a generator module;

[0017] The label fusion module is used to connect the hidden vector and the feature label; the feature label is multiplied by a random fixed vector R that obeys the normal distribution; the multiplication result is connected to the hidden vector;

[0018] The fully connected module is used to de-entangle features and passes through 8 layers of fully connected layers. The output after the fully connected layers is added to the original input to obtain the style matrix W.

[0019] The generator module consists of five groups of upsampling operations plus deconvolution operations, in which a specified constant is used as the initial input; after the specified constant is upsampled, the side length is doubled each time, and after the expansion, deconvolution is used for processing; the deconvolution kernel size is 3 and the step size is 1; after the upsampling operation and deconvolution operation, the AdaIn operation is performed with the style matrix W, and then the perturbation vector is added, and the final output result is input into the input of the next submodule.

[0020] The technical solution adopted by the system of the present invention is: a logo generation system based on conditional generative adversarial network, including the following modules:

[0021] Module 1 is used to define feature labels, including classification labels and color labels;

[0022] The feature labels classify logo images into three subsets based on their characteristics: figurative logos, abstract logos, and text logos. Each subset is further subdivided into four categories: figurative logos include people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters.

[0023] The color label checks the pixel values ​​of the logo image one by one, and finally summarizes the main color of the logo image as the color label;

[0024] Module 2 is used to randomly sample and obtain the hidden vector Z;

[0025] The hidden vector Z is sampled from the Gaussian distribution N(μ,σ2), and is a vector of size n×d, where n is a preset value; d is the length of the hidden vector Z;

[0026] Module 3 is used to input a feature label and hidden vector Z into a conditional generative adversarial network to generate a controllable logo image;

[0027] The conditional generative adversarial network includes a label fusion module, a fully connected module and a generator module;

[0028] The label fusion module is used to connect the hidden vector and the feature label; the feature label is multiplied by a random fixed vector R that obeys the normal distribution; the multiplication result is connected to the hidden vector;

[0029] The fully connected module is used to de-entangle features and passes through 8 layers of fully connected layers. The output after the fully connected layers is added to the original input to obtain the style matrix W.

[0030] The generator module consists of five groups of upsampling operations plus deconvolution operations, in which a specified constant is used as the initial input; after the specified constant is upsampled, the side length is doubled each time, and after the expansion, deconvolution is used for processing; the deconvolution kernel size is 3 and the step size is 1; after the upsampling operation and deconvolution operation, the AdaIn operation is performed with the style matrix W, and then the perturbation vector is added, and the final output result is input into the input of the next submodule.

[0031] The technical solution adopted by the electronic device of the present invention is: an electronic device comprising:

[0032] one or more processors;

[0033] A storage device is used to store one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the logo generation method based on the conditional generative adversarial network.

[0034] The present invention can generate a controllable logo image, and a logo with a preset feature tag can be generated by inputting the preset feature tag; the present invention reasonably classifies some features of the logo, and the classification basis is consistent with the intuitive perception of the naked eye, which is easier for people to understand. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a flow chart of a method according to an embodiment of the present invention;

[0036] Figure 2 This is a diagram of a conditional generative adversarial network structure according to an embodiment of the present invention;

[0037] Figure 3This is a diagram of the discriminator network structure according to an embodiment of the present invention;

[0038] Figure 4 Schematic diagram of experimental results of an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to facilitate ordinary technicians in this field to understand and implement the present invention, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.

[0040] Please see Figure 1 The present invention provides a logo generation method based on a conditional generative adversarial network, comprising the following steps:

[0041] Step 1: Define feature labels, including classification labels and color labels;

[0042] Classification labels classify logo images into three subsets based on their characteristics: figurative logos, abstract logos, and text logos. Each subset is further subdivided. Figurative logos include people, animals, plants, and objects; abstract logos include circles, triangles, quadrilaterals, polygons, and arrows; and text logos include numbers and letters.

[0043] Color labeling: Check the pixel values ​​of the logo image one by one, and finally summarize the main color of the logo image as the color label;

[0044] Step 2: Randomly sample to obtain the hidden vector Z;

[0045] The hidden vector Z is sampled from the Gaussian distribution N(μ,σ2) and is a vector of size n×d, where n is a preset value; d is the length of the hidden vector Z, which is fixed to 128;

[0046] Step 3: Input a certain feature label and hidden vector Z into the conditional generative adversarial network to generate a controllable logo image;

[0047] Please see Figure 2 ,The conditional generative adversarial network of this embodiment includes a label fusion module, a fully connected module and a generator module;

[0048] The label fusion module is used to connect the hidden vector and the feature label; the feature label is multiplied by a random fixed vector R that obeys the normal distribution; the multiplication result is connected to the hidden vector;

[0049] The fully connected module is used to disentangle features and passes through 8 layers of fully connected layers. The output after the fully connected layers is added to the original input to obtain the style matrix W.

[0050] The generator module consists of five sets of upsampling operations plus deconvolution operations, where a specified constant is used as the initial input; after upsampling, the specified constant is doubled in side length each time, and then deconvolution is used for processing; the deconvolution kernel size is 3 and the step size is 1; after the upsampling and deconvolution operations, the AdaIn operation is performed with the style matrix W, and then the perturbation vector is added, and the final output result is input into the input of the next submodule.

[0051] The conditional generative adversarial network of this embodiment is a trained conditional generative adversarial network; its training process includes the following sub-steps:

[0052] Step 3.1: Build a training dataset;

[0053] Preprocess the publicly available datasets, including removing real-life photos, stick figures, single-color images, and text-only images.

[0054] Existing logo datasets are of low quality. Most are suited for object detection rather than generative models, and generative networks require high-quality logo images. While the LLD-logo dataset contains a large number of logo images obtained using web crawlers, this approach is not sufficiently refined, and many images that cannot be used as logos are mixed into the dataset. These abnormal images are detrimental to logo generation, necessitating screening and cleaning of the LLD-logo dataset.

[0055] The real-life photos, simple drawings, single-color images, and text-only images in the LLD-logo dataset were manually removed.

[0056] Step 3.2: Obtain feature labels for the preprocessed training dataset, including classification labels and color labels;

[0057] Extract visual features of logo images as classification labels; based on the features of logo images, classify logo images into three subsets: figurative logos, abstract logos, and text logos; each subset is further subdivided. Figurative logos include four categories: people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters;

[0058] Check the pixel values ​​of the logo image one by one, and finally summarize the main color of the logo image as the color label of the logo; the specific steps are as follows:

[0059] (1) Get the image RGB of the logo image;

[0060] (2) RGB is converted to HSV space values;

[0061] (3) K-means iteration in HSV space, the initial point is randomly selected based on the pixel range of the image;

[0062] (4) Convert the clustered HSV values ​​into RGB and display them;

[0063] For each logo image, an RGB tuple (x, y, z) is detected. For all logo images extracted into RGB tuples, they are divided according to the preset range so that each logo dataset image has a color label;

[0064] Step 3.3: Input the training dataset into the conditional generative adversarial network for network training;

[0065] Connect a feature label with the hidden vector to obtain the hidden vector input into the network;

[0066]

[0067] The hidden vector Z is a vector of size n×d drawn from a Gaussian distribution Z~N(μ,σ2), where n is the batch size for single-iteration training and can be set at the beginning of training; d is the length of the hidden vector, which is fixed at 128.

[0068] For the feature label Y, each logo image corresponds to a category and is one-hot encoded. The label vector size is n×c, where n is the batch size, the same as the hidden vector batch size, and c is the number of categories; it depends on the pre-classification situation;

[0069] Calculate the style matrix W:

[0070] W=f([Y×R]∩Z)(2)

[0071] The feature label Y is multiplied by a fixed R~N(μ,σ2) distribution that uses a self-normal distribution and is fixed during training. The size of R is the same as that of Y, which is n×c. The multiplication result is concatenated with the hidden vector matrix. The f function represents a fully connected operation. The actual network structure is 8 fully connected layers. Finally, the style matrix W is obtained as the input vector of the conditional generative adversarial network.

[0072] Using FID as a measurement indicator, once the downward trend of the FID curve is observed to be less than the preset value, it indicates that the training is completed, and the training can be terminated to obtain the generated network.

[0073] This embodiment uses the style matrix W to control images at different resolutions;

[0074] The style matrix W is transformed into style y=(y s ,y b ), which is used to control the adaptive instance normalization operation AdaIN after each convolutional layer of the conditional generative adversarial network; where the transformation of the fully connected layer is the scaling factor y s , and the deviation factor y b

[0075] AdaIN is defined as:

[0076]

[0077] Among them, each feature map x i Normalize them separately and then scale and bias them using the corresponding scalar components in style y; s,i is the scaling factor obtained by W for the current feature map transformation, y b,i is the bias factor obtained by W for the current feature map transformation, μ(x i ) is the mean of the current feature map, σ(x i ) is the standard deviation of the current feature map.

[0078] When the style matrix W affects the image generation at each layer, it adds Gaussian random noise to make the generated image more diverse.

[0079] Please see Figure 3 ,The present invention uses a discriminator network to perform image credibility judgment on the generated controllable logo image;

[0080] The discriminator network of this embodiment uses 5 layers of convolution for downsampling, with a convolution kernel size of 3 and a stride of 2. Finally, a fully connected layer is used, and the result of multiplication with the feature label is used as the output score.

[0081] Please see Figure 4 , which are three types of logo images generated by the present invention. It can be seen that the present invention can improve the efficiency of logo design and can realize batch generation of controllable logos.

[0082] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of protection of the patent of the present invention. Under the guidance of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested by the present invention shall be based on the attached claims.

Claims

1. A logo generation method based on conditional generative adversarial network, characterized in that: The following steps are involved: Step 1: Define feature labels, including classification labels and color labels; The classification labels classify logo images into three subsets based on their characteristics: figurative logos, abstract logos, and text logos. Each subset is further subdivided into four categories: figurative logos include people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters. The color label checks the pixel values ​​of the logo image one by one, and finally summarizes the main color of the logo image as the color label; Step 2: Randomly sample to obtain the hidden vector Z; The hidden vector Z is sampled from the Gaussian distribution N(μ,σ 2 ), a vector of size n×d, where n is a preset value and d is the Z length of the hidden vector; Step 3: Input a feature label and hidden vector Z into the conditional generative adversarial network to generate a controllable logo image; The conditional generative adversarial network includes a label fusion module, a fully connected module and a generator module; The label fusion module is used to connect the hidden vector and the feature label; the feature label is multiplied by a random fixed vector R that obeys the normal distribution; and the multiplication result is connected to the hidden vector; The fully connected module is used to disentangle features and passes through 8 layers of fully connected layers. The output after the fully connected layers is added to the original input to obtain a style matrix W = f([Y×R]∩Z), where Y represents the feature label. The generator module consists of five groups of upsampling operations plus deconvolution operations, in which a specified constant is used as the initial input; after the specified constant is upsampled, the side length is doubled each time, and deconvolution is used for processing after the expansion; the deconvolution kernel size is 3 and the step size is 1; after the upsampling operation and deconvolution operation, the AdaIN operation is performed with the style matrix W, and then the perturbation vector is added, and the final output result is input into the input of the next submodule.

2. The logo generation method based on conditional generative adversarial network according to claim 1, characterized in that: The conditional generative adversarial network described in step 3 is a trained conditional generative adversarial network; The training process includes the following sub-steps: Step 3.1: Build a training dataset; Preprocess the publicly available datasets, including removing real-life photos, stick figures, single-color images, and text-only images. Step 3.2: Obtain feature labels for the preprocessed training dataset, including classification labels and color labels; Extract visual features of logo images as classification labels; based on the features of logo images, classify logo images into three subsets: figurative logos, abstract logos, and text logos; each subset is further subdivided. Figurative logos include four categories: people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters; Check the pixel values ​​of the logo image one by one, and finally summarize the main color of the logo image as the color label of the logo; the specific steps are as follows: (1) Get the image RGB of the logo image; (2) RGB is converted to HSV space values; (3) K-means iteration in HSV space, randomly selecting the value of the initial point according to the pixel range of the image; (4) Convert the clustered HSV values ​​into RGB and display them; For each logo image, an RGB tuple (x, y, z) is detected. For all logo images extracted into RGB tuples, they are divided according to the preset range so that each logo dataset image has a color label; Step 3.3: Input the training data set into the conditional generative adversarial network to perform network training; Connect a certain feature label with the hidden vector to obtain the hidden vector input into the network; Among them, the hidden vector Z adopts the Gaussian distribution Z~N(μ,σ 2 ), a vector of size n×d, where n is the batch size for single-iteration training; d is the length of the hidden vector; For the feature label Y, each logo image corresponds to a category and is one-hot encoded. The label vector size is n×c, where n is the batch size, the same as the hidden vector batch size, and c is the number of categories. Calculate the style matrix W: W=f([Y×R]∩Z)(2) Among them, the feature label Y is associated with a self-normal distribution and a fixed R~N(μ,σ 2 ) are multiplied, and the size of R is the same as that of Y, which is n×c. The multiplication result is connected with the hidden vector matrix; the f function represents a fully connected operation, and finally the style matrix W is obtained as the input vector of the conditional generative adversarial network; Using FID as a measurement indicator, when the downward trend value of the FID curve is observed to be less than the preset value, the training is completed and terminated to obtain the generated network.

3. The logo generation method based on conditional generative adversarial network according to claim 2, characterized in that: In step 3, based on the conditional generative adversarial network, the style matrix W is used to control images of different resolutions. The style matrix W is transformed into style y=(y s ,y b ), used to control the adaptive instance normalization operation AdaIN after each convolutional layer of the conditional generative adversarial network; where y s is the scaling factor, y b is the deviation factor; AdaIN is defined as: Among them, each feature map x i Normalize them separately and then scale and bias them using the corresponding scalar components in style y; s,i is the scaling factor obtained by W for the current feature map transformation, y b,i is the bias factor obtained by W for the current feature map transformation, μ(x i ) is the mean of the current feature map, σ(x i ) is the standard deviation of the current feature map.

4. The logo generation method based on a conditional generative adversarial network according to any one of claims 1 to 3, characterized in that: Use the discriminator network to judge the image credibility of the controllable logo image generated in step 3; The discriminator network uses 5 layers of convolution for downsampling, with a convolution kernel size of 3 and a stride of 2. Finally, a fully connected layer is used, and the result of multiplication with the feature label is used as the output score.

5. A logo generation system based on conditional generative adversarial networks, characterized by: Includes the following modules: Module 1 is used to define feature labels, including classification labels and color labels; The feature labels classify logo images into three subsets based on their characteristics: figurative logos, abstract logos, and text logos. Each subset is further subdivided into four categories: figurative logos include people, animals, plants, and objects; abstract logos include five categories: circles, triangles, quadrilaterals, polygons, and arrows; and text logos include two categories: numbers and letters. The color label checks the pixel values ​​of the logo image one by one, and finally summarizes the main color of the logo image as the color label; Module 2 is used to randomly sample and obtain the hidden vector Z; The hidden vector Z is sampled from the Gaussian distribution N(μ,σ 2 ), a vector of size n×d, where n is a preset value and d is the Z length of the hidden vector; Module 3 is used to input a feature label and hidden vector Z into a conditional generative adversarial network to generate a controllable logo image; The conditional generative adversarial network includes a label fusion module, a fully connected module and a generator module; The label fusion module is used to connect the hidden vector and the feature label; the feature label is multiplied by a random fixed vector R that obeys the normal distribution; and the multiplication result is connected to the hidden vector; The fully connected module is used to disentangle features and passes through 8 layers of fully connected layers. The output after the fully connected layers is added to the original input to obtain a style matrix W = f([Y×R]∩Z), where Y represents the feature label. The generator module consists of five groups of upsampling operations plus deconvolution operations, in which a specified constant is used as the initial input; after the specified constant is upsampled, the side length is doubled each time, and after the expansion, deconvolution is used for processing; the deconvolution kernel size is 3 and the step size is 1; after the upsampling operation and deconvolution operation, the AdaIN operation is performed with the style matrix W, and then the perturbation vector is added, and the final output result is input into the input of the next submodule.

6. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the logo generation method based on a conditional generative adversarial network as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Natural mode-based Logo generation method and intelligent Logo generator

    CN108549530A

  • Mobile terminal face age editing method based on StyleGAN

    CN113421185A

  • Intelligent LOGO generation method based on StyleGAN

    CN114219875A

  • Image Semantic Segmentation Method Based on Deep Full Convolutional Network and Conditional Random Field

    AU2020103901A4

  • An image generation method and an image generation system

    CN109933677A