An art color design and style automatic matching method and system based on machine learning
By using machine learning-based multilayer perceptual neural networks and feature fusion technology, the problem of low efficiency in matching game styles and colors has been solved, enabling fast and accurate color design and improving design efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies have low efficiency in matching game styles and colors, leading to extended design cycles.
By employing a multilayer perceptual neural network based on machine learning, a style color matching model is trained by acquiring and annotating game scene image data. The model is then optimized using residual connections and multiple loss functions. Finally, feature fusion is performed by combining plot and cultural background information to generate a fast and accurate color design scheme.
It significantly shortened the design cycle, improved the efficiency of matching color design with game style, and ensured the accuracy and diversity of color design.
Smart Images

Figure CN120510236B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of game design, and particularly relates to an art color design and style automatic matching method and system based on machine learning. BACKGROUND
[0002] In games, style and color matching is an important element in building the game world. It makes players feel as if they are in a real adventure world, greatly enhancing the immersion of the game. Excellent style and color matching can significantly improve the attractiveness of the game.
[0003] Many game companies rely on professional designers for style and color matching. Designers design color schemes for various elements of the game based on their own aesthetics and experience. However, this approach has many limitations. For example, manual design is inefficient, and as the size and complexity of the game continue to grow, the design workload increases significantly, leading to a prolonged project cycle. SUMMARY
[0004] Therefore, the purpose of the present application is to provide an art color design and style automatic matching method and system based on machine learning, which aims to solve the problem of low efficiency in color design and game style matching in the prior art.
[0005] The present application is implemented as follows:
[0006] An art color design and style automatic matching method based on machine learning, the method comprising:
[0007] Obtaining scene images in games of a preset number of different styles, performing size normalization on the scene images, and performing data labeling on the scene images to form a training data set, wherein the data labeling at least includes style categories and color design information;
[0008] Establishing a multi-layer perception neural network and inputting the training data set into the multi-layer perception neural network for model training until the loss function tends to be stable to obtain a style color matching model;
[0009] Obtaining a to-be-matched scene image that needs to be color matched, inputting the to-be-matched scene image into the style color matching model to obtain target color design information that matches the style of the to-be-matched scene image.
[0010] Furthermore, in the aforementioned machine learning-based art color design and style automatic matching method, the multilayer perceptual neural network includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an output layer. The first convolutional layer is used to extract preliminary features of the image, the first pooling layer is used to receive the output of the first convolutional layer to reduce data dimensionality and extract main features, and the second convolutional layer is used to receive the output of the first pooling layer to extract more complex features. A residual connection is added between the first and second convolutional layers.
[0011] Furthermore, in the aforementioned machine learning-based art color design and style automatic matching method, the data annotation also includes plot tag annotation and cultural background tag annotation, and the multilayer perceptron also includes a first fusion module, a second fusion module, and a third fusion module set between the second pooling layer and the fully connected layer.
[0012] Furthermore, in the aforementioned machine learning-based art color design and style automatic matching method, the first fusion module is used to receive the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, and the feature vector about the plot summary passed in from the input layer. The two are concatenated and then fused through a fully connected network to output a fused feature vector.
[0013] The second fusion module is used to concatenate the output of the first fusion module with the feature vector about cultural background passed in from the input layer to output a fused feature vector;
[0014] The third fusion module is used to concatenate and fuse the output of the second fusion module with the output of the second pooling layer and then input it into the fully connected layer.
[0015] Furthermore, in the aforementioned machine learning-based automatic color design and style matching method for art, the loss function of the multilayer perceptron neural network is:
[0016] L=L1+λL2
[0017]
[0018] Where L1 is the style classification loss function, L2 is the color matching loss function, and n is the number of style categories. These are genuine style category tags. It is the probability distribution of style categories predicted by the network. It is a true color design label. λ is the color design predicted by the prediction network, m is the dimension of the color design vector, and λ is the weight parameter.
[0019] Furthermore, in the aforementioned machine learning-based art color design and style automatic matching method, the first fusion module receives the output of the first pooling layer after adjusting the number of channels via a 1x1 convolutional layer, and the feature vector about the plot summary passed from the input layer. The steps of concatenating the two and fusing them through a fully connected network to output the fused feature vector include:
[0020] The output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer and the feature vector of the plot summary are concatenated and then passed through a fully connected network and an activation function to generate a gated signal G.
[0021] The gated signal is split into a first part G1 and a second part G2, which correspond to the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer and the feature vector related to the plot summary.
[0022] The fused feature vector is obtained based on the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, the feature vector of the plot summary, and the corresponding first part G1 and second part G2.
[0023] The expression for the gating signal is:
[0024] G = σ(WF0 + b);
[0025] The formula for calculating the fused feature vector is:
[0026] F = G1⊙F1 + G2⊙F2;
[0027] Where W is the weight matrix, b is the bias vector, σ is the Sigmoid function, ⊙ is element-wise multiplication, F0 is the output of the first pooling layer after adjusting the number of channels by a 1x1 convolutional layer and the concatenation of the feature vectors related to the plot summary, F1 is the output of the first pooling layer after adjusting the number of channels by a 1x1 convolutional layer, and F2 is the feature vector related to the plot summary.
[0028] Furthermore, in the aforementioned machine learning-based method for automatic matching of art color design and style, the color design information includes the main color tone, color scheme, and color proportion.
[0029] Another objective of this invention is to provide a machine learning-based automatic color design and style matching system for art, the system comprising:
[0030] The acquisition module is used to acquire a preset number of scene images from games of different styles, normalize the size of the scene images, and label the scene images to form a training dataset. The data labeling includes at least style category and color design information.
[0031] The training module is used to build a multilayer perceptron and input the training dataset into the multilayer perceptron for model training until the loss function tends to stabilize to obtain the style color matching model.
[0032] The matching module is used to acquire the scene image to be matched, and input the scene image to be matched into the style color matching model to obtain the target color design information that matches the style of the scene image to be matched.
[0033] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the method as described in any one of the foregoing descriptions.
[0034] Another object of the present invention is to provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of any of the methods described above.
[0035] This invention acquires a preset number of scene images from games of different styles, performs size normalization on the scene images, and labels the scene images to form a training dataset. The data labeling includes at least style category and color design information. A multilayer perceptron neural network is established, and the training dataset is input into the multilayer perceptron neural network for model training until the loss function stabilizes, resulting in a style-color matching model. Scene images to be matched are acquired, and these scene images are input into the style-color matching model to obtain target color design information matching the style of the scene images. The style-color matching model is obtained by learning and training a massive number of scene images using machine learning algorithms. This model grasps the inherent logic of color design and style matching, thus enabling rapid and accurate generation of color design schemes. Compared with manual design, this significantly shortens the design cycle and improves design efficiency. It solves the problem of low efficiency in color design and game style matching in existing technologies. Attached Figure Description
[0036] Figure 1 This is a flowchart of the art color design and style automatic matching method based on machine learning in the first embodiment of the present invention;
[0037] Figure 2 This is a structural block diagram of the art color design and style automatic matching system based on machine learning in the third embodiment of the present invention.
[0038] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0039] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0040] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed types.
[0042] The following will describe in detail how to improve the efficiency of designing game style matching, with reference to specific embodiments and accompanying drawings.
[0043] Example One
[0044] Please see Figure 1 The figure shows the automatic matching method for art color design and style based on machine learning in the first embodiment of the present invention, the method including steps S10 to S12.
[0045] Step S10: Obtain a preset number of scene images from games of different styles, normalize the size of the scene images, and annotate the scene images to form a training dataset. The data annotation includes at least style category and color design information.
[0046] The process involves acquiring scene images from multiple games of varying styles, aiming to cover a diverse range of game genres, such as realistic, cartoonish, and fantasy. Specifically, images can be collected through various methods, including but not limited to in-game screenshots, accessing official game websites to download high-quality official images such as promotional images and concept art, as well as screenshots and user-generated content shared on game forums and communities. Images meeting the required criteria will then be selected. Since the acquired game scene images may vary in size, all images need to be uniformly resized to facilitate subsequent model training.
[0047] Data annotation involves adding style categories and color design information labels to images to provide accurate guidance for model training. Specifically, based on the visual style of the game scene, images are labeled with corresponding style categories, such as realistic, cartoon, cyberpunk, or traditional Chinese style. This annotation can be performed by professional game artists or individuals with in-depth knowledge of game styles to ensure accuracy. Color design information mainly involves analyzing and annotating the color information in the image. This includes the dominant color tone, color scheme (such as complementary colors or adjacent colors), and color proportions. For example, if the dominant color tone of an image is blue, a blue-white color scheme might be used, with blue accounting for approximately 60% and white approximately 40%. In practice, professional image analysis tools can be used to assist annotators in accurately extracting color information. Through these steps, a high-quality training dataset can be constructed for training a game style and color matching model.
[0048] Step S11: Establish a multilayer perceptron and input the training dataset into the multilayer perceptron for model training until the loss function stabilizes to obtain the style color matching model.
[0049] In this process, after building a multilayer perceptron, the model is trained on the multilayer perceptron using a training dataset. This allows the trained model to grasp the inherent logic of style and color matching. In practice, the training dataset can be divided into training, testing, and validation sets according to a certain ratio. A loss function and optimizer are defined. When the loss function tends to stabilize and no longer decreases significantly, the model training is considered to have reached a good state, and the final style and color matching model is obtained.
[0050] Specifically, a multilayer perceptron includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an output layer. The first convolutional layer extracts preliminary features from the image. The first pooling layer receives the output of the first convolutional layer to reduce data dimensionality and extract key features. The second convolutional layer receives the output of the first pooling layer to extract more complex features. In essence, the input layer receives preprocessed image data; the convolutional layers extract image features through convolutional kernels; the pooling layers downsample the output of the convolutional layers, reducing data dimensionality while retaining key features; the fully connected layer integrates the previously extracted features; and the output layer outputs the prediction results for style and color matching. A residual connection is added between the first and second convolutional layers. In game color and style matching tasks, images typically contain rich and diverse details and complex structures. Traditional deep neural networks are prone to the vanishing gradient problem when processing such complex images, making network training difficult and affecting the extraction of style and color features. The residual connection provides a direct backpropagation path for the gradient by adding the output of the previous layer to the output of the next layer before activation, enabling the model to better handle the complex style and color information in the game.
[0051] In practical implementation, to comprehensively consider the accuracy of both style and color, loss functions are set separately for style classification and color matching. Specifically, the loss function for the multilayer perceptron is:
[0052] L=L1+λL2
[0053]
[0054] Where L1 is the style classification loss function, L2 is the color matching loss function, and n is the number of style categories. These are genuine style category tags. It is the probability distribution of style categories predicted by the network. It is a true color design label. λ is the color design predicted by the prediction network, m is the dimension of the color design vector, and λ is the weight parameter.
[0055] By combining the cross-entropy loss of style classification with the mean squared error loss of color matching, the model can better balance the matching effect of style and color during training, avoiding the problem of focusing on one aspect while ignoring the other.
[0056] Step S12: Obtain the scene image to be matched for color matching, and input the scene image to be matched into the style color matching model to obtain the target color design information that matches the style of the scene image to be matched.
[0057] In this process, game scene images that need to be color matched are collected. The acquired scene images to be matched can be preprocessed to meet the input requirements of the style color matching model. The trained style color matching model is then used for prediction. Since the style color matching model has mastered the internal logic of the color design corresponding to the style, it can quickly and accurately output the corresponding color design information.
[0058] In summary, the machine learning-based art color design and style automatic matching method in the above embodiments of the present invention obtains a preset number of scene images from games of different styles, performs size normalization on the scene images, and labels the scene images to form a training dataset. The data labeling includes at least style category and color design information. A multilayer perceptron neural network is established, and the training dataset is input into the multilayer perceptron neural network for model training until the loss function stabilizes to obtain a style color matching model. Scene images to be matched are obtained, and these scene images are input into the style color matching model to obtain target color design information matching the style of the scene images. The style color matching model is obtained by learning and training a massive number of scene images using machine learning algorithms. This style color matching model grasps the inherent logic of color design and style matching, thus enabling rapid and accurate generation of color design schemes. Compared with manual design, this significantly shortens the design cycle and improves design efficiency. It solves the problem of low efficiency in color design and game style matching in existing technologies.
[0059] Example Two
[0060] This embodiment also proposes a machine learning-based method for automatic matching of artistic color design and style. The difference between the machine learning-based method for automatic matching of artistic color design and style proposed in this embodiment and the method proposed in Embodiment 1 is as follows:
[0061] The data annotation also includes plot tag annotation and cultural background tag annotation. The multilayer perceptron also includes a first fusion module, a second fusion module and a third fusion module set between the second pooling layer and the fully connected layer.
[0062] To fully learn the complex relationship between style and color, more information is introduced as input, specifically including plot tags (e.g., battle scenes) and cultural background tags (e.g., Chinese fantasy). The labeled plot and cultural background tags can be converted into corresponding vector representations and used as input data for the model. Furthermore, the multilayer perceptual neural network architecture is extended.
[0063] Specifically, it undertakes the task of fusing image features and plot features. In the image data processing flow, the feature map output from the first pooling layer is first adjusted for the number of channels by a 1x1 convolutional layer to match the dimension of the plot summary feature vector. Subsequently, these two parts of data are concatenated in the first fusion module and then fused through a fully connected network to output a fused feature vector. In this way, the model can combine the visual information in the image with the semantic information of the plot text, providing a richer basis for subsequent matching decisions;
[0064] The second fusion module receives the output of the first fusion module and the cultural background feature vector from the input layer. It also integrates the two through concatenation, and then fuses them through a fully connected network. This design allows the model to incorporate cultural background information, consider the unique requirements of different cultures for color and style, and further optimize the matching strategy. The third fusion module concatenates the output of the second fusion module with the output of the second pooling layer. The output of the second pooling layer contains highly abstract features extracted from the image after multiple convolutions and pooling, which are integrated with the features fused with plot and cultural background information, and finally input into the fully connected layer. The fully connected layer comprehensively processes these fused features, providing a basis for the model's final decision. By introducing plot and cultural background information, the model can understand the game scene from multiple dimensions, avoiding the limitations of judging solely based on image visual features, thus matching colors and styles more accurately. The fusion of multiple types of features allows the model to learn richer patterns and rules, enhancing its adaptability to different game styles and scenes. Whether it's a fantasy adventure game or a historical simulation game, the model can make reasonable color and style matching decisions based on rich input information.
[0065] In addition, in some optional embodiments of the present invention, the first fusion module is used to receive the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, and the feature vector of the plot summary passed from the input layer, and to concatenate the two and fuse them through a fully connected network to output the fused feature vector. The steps include:
[0066] The output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer and the feature vector of the plot summary are concatenated and then passed through a fully connected network and an activation function to generate a gated signal G.
[0067] The gated signal is split into a first part G1 and a second part G2, which correspond to the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer and the feature vector related to the plot summary.
[0068] The fused feature vector is obtained based on the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, the feature vector of the plot summary, and the corresponding first part G1 and second part G2.
[0069] The expression for the gating signal is:
[0070] G = σ(WF0 + b);
[0071] The formula for calculating the fused feature vector is:
[0072] F = G1⊙F1 + G2⊙F2;
[0073] Where W is the weight matrix, b is the bias vector, σ is the Sigmoid function, ⊙ is element-wise multiplication, F0 is the output of the first pooling layer after adjusting the number of channels by a 1x1 convolutional layer and the concatenation of the feature vectors related to the plot summary, F1 is the output of the first pooling layer after adjusting the number of channels by a 1x1 convolutional layer, and F2 is the feature vector related to the plot summary.
[0074] In feature fusion, although multiple fusion modules were used, the fusion method was relatively fixed, mainly involving simple concatenation and fully connected network processing. For complex and varied game scenes and semantic information, it might be impossible to fully explore the deep relationships between different features, limiting the accuracy of color and style matching. Therefore, a gating unit was used for adaptive feature fusion to generate a gating signal. This signal dynamically controls the weights of different features during the fusion process. The output of the first pooling layer, after adjusting the number of channels through a 1x1 convolutional layer, was concatenated with the feature vector related to the plot summary along the channel dimension to obtain a new vector. This concatenated vector was then input into a fully connected network. The fully connected network performed a linear transformation using the weight matrix and bias vector, and then passed it through a Sigmoid activation function to generate the gating signal. The Sigmoid function compressed the output value to between 0 and 1, ensuring that the gating signal could effectively control the features as weights. To separately weight image features and plot features, the generated gating signal was split and then fused with the corresponding features using weighted fusion.
[0075] In summary, the machine learning-based art color design and style automatic matching method in the above embodiments of the present invention obtains a preset number of scene images from games of different styles, performs size normalization on the scene images, and labels the scene images to form a training dataset. The data labeling includes at least style category and color design information. A multilayer perceptron neural network is established, and the training dataset is input into the multilayer perceptron neural network for model training until the loss function stabilizes to obtain a style color matching model. Scene images to be matched are obtained, and these scene images are input into the style color matching model to obtain target color design information matching the style of the scene images. The style color matching model is obtained by learning and training a massive number of scene images using machine learning algorithms. This style color matching model grasps the inherent logic of color design and style matching, thus enabling rapid and accurate generation of color design schemes. Compared with manual design, this significantly shortens the design cycle and improves design efficiency. It solves the problem of low efficiency in color design and game style matching in existing technologies.
[0076] Example Three
[0077] Please see Figure 2 The figure shows an art color design and style automatic matching system based on machine learning proposed in the third embodiment of the present invention. The system includes:
[0078] The acquisition module 100 is used to acquire a preset number of scene images from games of different styles, normalize the size of the scene images, and label the scene images to form a training dataset. The data labeling includes at least style category and color design information.
[0079] Training module 200 is used to build a multilayer perceptron and input the training dataset into the multilayer perceptron for model training until the loss function tends to stabilize to obtain the style color matching model;
[0080] The matching module 300 is used to acquire the scene image to be matched that needs to be matched in terms of color, and input the scene image to be matched into the style color matching model to obtain the target color design information that matches the style of the scene image to be matched.
[0081] The functions or operation steps implemented by the above modules are largely the same as those in the above method embodiments, and will not be repeated here.
[0082] Example Four
[0083] In another aspect, the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method described in any one of the above embodiments one to two.
[0084] Example Five
[0085] In another aspect, the present invention provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any one of the methods described in embodiments one to two above.
[0086] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0088] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0089] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0090] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0091] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A machine learning-based method for automatic color design and style matching in art, characterized in that, The method includes: A training dataset is formed by acquiring a preset number of scene images from games of different styles, normalizing the size of the scene images, and annotating the scene images with data. The data annotation includes at least style category and color design information. A multilayer perceptron is established and the training dataset is input into the multilayer perceptron for model training until the loss function tends to stabilize, thus obtaining a style color matching model. Obtain the scene image to be matched that needs to be color matched, and input the scene image to be matched into the style color matching model to obtain the target color design information that matches the style of the scene image to be matched; The multilayer perceptron includes an input layer, a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a fully connected layer, and an output layer. The first convolutional layer is used to extract preliminary features of the image, the first pooling layer is used to receive the output of the first convolutional layer, and the second convolutional layer is used to receive the output of the first pooling layer. A residual connection is added between the first convolutional layer and the second convolutional layer. The data annotation also includes plot tag annotation and cultural background tag annotation. The multilayer perceptron also includes a first fusion module, a second fusion module and a third fusion module set between the second pooling layer and the fully connected layer. The first fusion module receives the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, and the feature vector about the plot summary passed from the input layer. It concatenates the two and then fuses them through a fully connected network to output a fused feature vector. The second fusion module is used to concatenate the output of the first fusion module with the feature vector about cultural background passed in from the input layer to output a fused feature vector; The third fusion module is used to concatenate and fuse the output of the second fusion module with the output of the second pooling layer and then input the result to the fully connected layer. The first fusion module receives the output of the first pooling layer after adjusting the number of channels via a 1x1 convolutional layer, and the feature vector of the plot summary passed from the input layer. The steps of concatenating the two and fusing them through a fully connected network to output the fused feature vector include: The output of the first pooling layer, after adjusting the number of channels by a 1x1 convolutional layer, and the feature vector related to the plot summary are concatenated and then passed through a fully connected network and an activation function to generate a gating signal. G ; The gated signal is split into the first part, which corresponds to the output of the first pooling layer after adjusting the number of channels through a 1x1 convolutional layer, and the feature vector related to the plot summary. G Part 1 and Part 2 G 2; Based on the output of the first pooling layer after adjusting the number of channels by a 1x1 convolutional layer, the feature vector of the plot summary, and the corresponding first part... G Part 1 and Part 2 G 2. Obtain the fused feature vector; The expression for the gating signal is: G=σ ( WF 0+ b ); The formula for calculating the fused feature vector is: F=G 1 F 1 +G 2 F 2; in, W This is the weight matrix. b For bias vectors, σ for Sigmoid function, This is element-wise multiplication. F 0 represents the output of the first pooling layer after adjusting the number of channels using a 1x1 convolutional layer, and the vector concatenated with the feature vectors related to the plot summary. F 1 represents the output of the first pooling layer after adjusting the number of channels using a 1x1 convolutional layer. F 2 represents the feature vector related to the plot summary.
2. The method for automatic color design and style matching based on machine learning according to claim 1, characterized in that, The loss function of the multilayer perceptron is: in, L 1 represents the style classification loss function. L 2 represents the color matching loss function. n It is the number of style categories. These are genuine style category tags. It is the probability distribution of style categories predicted by the network. It is a true color design label. It is the color design predicted by the predictive network. m λ is the dimension of the color design vector, and λ is the weight parameter.
3. The method for automatic color design and style matching based on machine learning according to claim 1, characterized in that, The color design information includes the main color tone, color scheme, and color proportions.
4. A machine learning-based automatic color design and style matching system for art, characterized in that, The system is used to implement the machine learning-based art color design and style automatic matching method according to any one of claims 1 to 3, the system comprising: The acquisition module is used to acquire a preset number of scene images from games of different styles, normalize the size of the scene images, and label the scene images to form a training dataset. The data labeling includes at least style category and color design information. The training module is used to build a multilayer perceptron and input the training dataset into the multilayer perceptron for model training until the loss function tends to stabilize to obtain the style color matching model. The matching module is used to obtain the scene image to be matched for color matching, and input the scene image to be matched into the style color matching model to obtain the target color design information that matches the style of the scene image to be matched.
5. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 3.
6. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Image coloring method based on multi-modal content coding
CN113888660A