Art color design and style automatic matching method and system based on machine learning

Through the automatic matching method of art color design and style based on machine learning, the style color matching model is trained using multi-layer perceptual neural network, the problem of low efficiency in matching game color design and style is solved, and fast and accurate color design is achieved.

CN120510236AActive Publication Date: 2025-08-19JIANGXI YUNYOU NETWORK TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510374870.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-08-19
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

In the prior art, the matching efficiency of game color design and style is low, resulting in an extended project cycle.

Method used

The automatic matching method of art color design and style based on machine learning is adopted. By obtaining game scene images of different styles for data annotation and size normalization, a multi-layer perceptual neural network is established for model training, and the style color matching model is used to quickly generate target color design information.

Benefits of technology

It greatly shortens the design cycle, improves design efficiency, and achieves fast and accurate color and style matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510236A_ABST
    Figure CN120510236A_ABST
Patent Text Reader

Abstract

The invention discloses an art color design and style automatic matching method and system based on machine learning, and the method comprises the steps: obtaining a preset number of scene images in games of different styles, carrying out the size normalization processing of the scene images, carrying out the data marking of the scene images, and forming a training data set, the data annotation at least comprises style categories and color design information; establishing a multi-layer perception neural network and inputting the training data set into the multi-layer perception neural network for model training until a loss function tends to be stable to obtain a style color matching model; and obtaining a to-be-matched scene image needing color matching, and inputting the to-be-matched scene image into the style color matching model to obtain target color design information matched with the style of the to-be-matched scene image. The problem of low efficiency during color design and game style matching in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game design technology, and in particular to a method and system for automatic matching of art color design and style based on machine learning. Background Art

[0002] In games, style and color matching are crucial elements in building the game world. They make players feel as if they are immersed in a real-life adventure world, greatly enhancing the game's immersion. Excellent style and color matching can significantly enhance a game's appeal.

[0003] Many gaming companies rely on professional designers for style and color matching. Designers draw on their own aesthetics and experience to create color schemes for various game elements. However, this approach has many limitations. For example, manual design is inefficient, and as games grow in size and complexity, the design workload increases significantly, leading to longer project cycles. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method and system for automatic matching of art color design and style based on machine learning, aiming to solve the problem of low efficiency in matching color design and game style in the existing technology.

[0005] The present invention is achieved in that:

[0006] A method for automatically matching art color design and style based on machine learning, the method comprising:

[0007] Obtaining a preset number of scene images from games of different styles, normalizing the size of the scene images, and annotating the scene images to form a training dataset, wherein the data annotations include at least style category and color design information;

[0008] Establish a multi-layer perceptron neural network and input the training data set into the multi-layer perceptron neural network to train the model until the loss function tends to be stable to obtain a style color matching model;

[0009] The image of the scene to be matched that needs to be color matched is obtained, and the image of the scene to be matched is input into the style color matching model to obtain the target color design information that matches the style of the image of the scene to be matched.

[0010] Furthermore, in the above-mentioned method for automatic matching of art color design and style based on machine learning, the multi-layer 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, wherein 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 the data dimension and extract the main features, and the second convolutional layer is used to receive the output of the first pooling layer to extract more complex features, wherein a residual connection is added between the first convolutional layer and the second convolutional layer.

[0011] Furthermore, in the above-mentioned method for automatic matching of art color design and style based on machine learning, the data annotation also includes plot label annotation and cultural background label annotation, and the multi-layer perception neural network also includes a first fusion module, a second fusion module and a third fusion module arranged between the second pooling layer and the fully connected layer.

[0012] Furthermore, in the above-mentioned method for automatic matching of artistic color design and style based on machine learning, the first fusion module is used to receive the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and the feature vector of the plot summary input by the input layer, concatenate the two, and fuse them through a fully connected network to output a fused feature vector;

[0013] The second fusion module is used to concatenate and fuse the output of the first fusion module with the feature vector about the cultural background inputted 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 input them into the fully connected layer.

[0015] Furthermore, in the above-mentioned method for automatic matching of art color design and style based on machine learning, the loss function of the multi-layer perception neural network is:

[0016] L=L1+λL2

[0017]

[0018] Among them, L1 is the style classification loss function, L2 is the color matching loss function, n is the number of style categories, is the true style category label, is the probability distribution of style categories predicted by the network, Is a real color design label, is the color scheme predicted by the prediction network, m is the dimension of the color scheme vector, and λ is the weight parameter.

[0019] Furthermore, in the above-mentioned method for automatic matching of artistic color design and style based on machine learning, the first fusion module is used to receive the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and the feature vector of the plot summary input by the input layer, and concatenate the two and fuse them through a fully connected network to output the fused feature vector, including the following steps:

[0020] The output of the first pooling layer after adjusting the number of channels through the 1x1 convolution layer and the feature vector of the plot summary are concatenated and then pass through a fully connected network and activation function to generate the gating signal G;

[0021] The gated signal is split into the first part G1 and the second part G2 corresponding to the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the feature vector of the plot summary;

[0022] The fused feature vector is obtained based on the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, the feature vector of the plot summary, and the corresponding first part G1 and second part G2;

[0023] The expression of the gate signal is:

[0024] G = σ(WF0 + b);

[0025] The calculation formula of 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 the element-wise multiplication, F0 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the concatenation of the feature vector of the plot summary, F1 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and F2 is the feature vector of the plot summary.

[0028] Furthermore, in the above-mentioned automatic matching method of art color design and style based on machine learning, the color design information includes main color, color scheme and color ratio.

[0029] Another object of the present invention is to provide an automatic matching system for art color design and style based on machine learning, the system comprising:

[0030] an acquisition module, configured to acquire 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, wherein the annotated data includes at least style category and color design information;

[0031] The training module is used to establish a multi-layer perceptron neural network and input the training data set into the multi-layer perceptron neural network to train the model until the loss function tends to be stable to obtain a style color matching model;

[0032] The matching module is used to obtain 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, wherein the program, when executed by a processor, implements the steps of any one of the methods described above.

[0034] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-described methods when executing the program.

[0035] The present invention obtains a preset number of scene images from games of different styles, normalizes the size of the scene images, and annotates the scene images to form a training dataset, wherein the data annotations include at least style categories and color design information. A multi-layer perceptual neural network is established and the training dataset is input into the multi-layer perceptual neural network for model training until the loss function stabilizes to obtain a style color matching model. A scene image to be matched is obtained and input into the style color matching model to obtain target color design information that matches the style of the scene image to be matched. A machine learning algorithm is used to train a large number of scene images to obtain a style color matching model. The style color matching model grasps the inherent logic of color design and style matching, thereby enabling rapid and accurate generation of color design solutions. Compared with manual design, this method significantly shortens the design cycle and improves design efficiency. This solves the problem of low efficiency in matching color design with game style in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Flowchart of the method for automatic matching of art color design and style based on machine learning in the first embodiment of the present invention;

[0037] Figure 2 This is a structural block diagram of an art color design and style automatic matching system based on machine learning in the third embodiment of the present invention.

[0038] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0039] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. The drawings illustrate several embodiments of the present invention. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present invention.

[0040] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be an intermediate element. When an element is referred to as being "connected to" another element, it may be directly connected to the other element or there may be an intermediate element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the relevant listed types.

[0042] The following will describe in detail how to improve the efficiency of designing game style matching in conjunction with specific embodiments and drawings.

[0043] Example 1

[0044] See also Figure 1 , shown is an automatic matching method for art color design and style based on machine learning in the first embodiment of the present invention, the method includes steps S10 to S12.

[0045] Step S10, obtaining a preset number of scene images from games of different styles, normalizing the size of the scene images and annotating the scene images to form a training data set, wherein the data annotation includes at least style category and color design information.

[0046] Among them, scene images are obtained from multiple games of different styles, with the goal of collecting images that cover a rich variety of game styles, such as realism, cartoons, and fantasy. Specifically, images can be collected through a variety of methods, including but not limited to in-game screenshots, visiting the official game website, downloading high-quality image materials such as game promotional images and art settings, as well as screenshots and self-made content shared by players in game forums and communities, and screening images that meet the requirements. The sizes of the collected game scene images may vary. In order to facilitate subsequent model training, all images need to be uniformly adjusted to the same size.

[0047] Data annotation involves labeling images with style categories and color design information to provide accurate guidance for model training. Specifically, images are annotated into corresponding style categories based on the visual style of the game scene, such as realistic, cartoon, cyberpunk, and ancient style. This can be done by professional game artists or those with in-depth knowledge of game styles to ensure accuracy. Color design information primarily analyzes and annotates the color information in the image. This includes the dominant color, color scheme (such as complementary colors and adjacent color combinations), and color ratios. For example, if the dominant color of an image is blue, a blue-and-white color scheme is used, with blue accounting for approximately 60% and white accounting for approximately 40%. In practice, professional image analysis tools can be used to assist annotators in accurately extracting color information. Through the above steps, a high-quality training dataset can be constructed for training a game style and color matching model.

[0048] In step S11, a multi-layer perceptron neural network is established and a training data set is input into the multi-layer perceptron neural network for model training until the loss function becomes stable to obtain a style color matching model.

[0049] Among them, after building a multi-layer perceptual neural network, the training data set is used to train the model in the multi-layer perceptual neural network, so that the trained model can master the internal logic of style color matching. In the specific implementation, the training data set can be divided into training set, test set and validation set in proportion, and the loss function and optimizer are defined. When the loss function tends to be stable and no longer decreases significantly, it is considered that the model training has reached a good state and the final style color matching model is obtained.

[0050] Specifically, the multi-layer perception 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 the data dimension and extract the main features, and the second convolutional layer is used to receive the output of the first pooling layer to extract more complex features. It can be understood that the input layer is responsible for receiving preprocessed image data; the convolutional layer extracts image features through convolution kernels; the pooling layer downsamples the convolutional layer output to reduce the data dimension while retaining the main features; the fully connected layer integrates the previously extracted features; and the output layer outputs the predicted results of style and color matching. A residual connection is added between the first and second convolutional layers. In the task of color and style matching in games, images usually contain rich and diverse details and complex structures. Traditional deep neural networks are prone to the gradient vanishing problem when processing such complex images, making the network difficult to train and affecting the extraction of style and color features. The residual connection provides a direct back-propagation path for the gradient by adding the output of the previous layer to the output of the next layer and then activating it, enabling the model to better handle the complex style and color information in the game.

[0051] In the specific implementation, in order to comprehensively consider the accuracy of both style and color, loss functions are set for style classification and color matching respectively. Specifically, the loss function of the multi-layer perception neural network is:

[0052] L=L1+λL2

[0053]

[0054] Among them, L1 is the style classification loss function, L2 is the color matching loss function, n is the number of style categories, is the true style category label, is the probability distribution of style categories predicted by the network, Is a real color design label, is the color scheme predicted by the prediction network, m is the dimension of the color scheme vector, and λ is the weight parameter.

[0055] By combining the cross entropy loss for style classification and the mean squared error loss for color matching, the model can better balance the style and color matching effects during training, avoiding the problem of focusing on one aspect while ignoring the other.

[0056] Step S12: obtaining a scene image to be matched that needs to be color matched, and inputting the scene image to be matched into a style color matching model to obtain target color design information that matches the style of the scene image to be matched.

[0057] Among them, game scene images that need to be color matched are collected, and the obtained scene images to be matched can be preprocessed to make them meet the input requirements of the style color matching model, and the trained style color matching model is used for prediction. Since the style color matching model masters 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 method for automatically matching art color design and style in the above-mentioned embodiments of the present invention obtains a preset number of scene images from games of different styles, normalizes the size of the scene images, and annotates the scene images to form a training dataset, wherein the data annotations include at least style categories and color design information; establishes a multi-layer perceptual neural network and inputs the training dataset into the multi-layer perceptual neural network for model training until the loss function stabilizes to obtain a style color matching model; obtains a scene image to be matched, inputs the scene image to be matched into the style color matching model to obtain target color design information that matches the style of the scene image to be matched; and utilizes a machine learning algorithm to train a large number of scene images to obtain a style color matching model. The style color matching model grasps the inherent logic of color design and style matching, thereby being able to quickly and accurately generate color design solutions. Compared with manual design, this method greatly shortens the design cycle and improves design efficiency. This solves the problem of low efficiency in matching color design and game style in the prior art.

[0059] Example 2

[0060] This embodiment also proposes a method for automatically matching art color design and style based on machine learning. The difference between the method for automatically matching art color design and style based on machine learning proposed in this embodiment and the method for automatically matching art color design and style based on machine learning proposed in the first embodiment is that:

[0061] The data annotation also includes plot label annotation and cultural background label annotation, and the multi-layer perception neural network also includes a first fusion module, a second fusion module and a third fusion module arranged between the second pooling layer and the fully connected layer.

[0062] To fully understand the complex relationship between style and color, more information is introduced as input. Specifically, plot tags, such as battles, and cultural background tags, such as Chinese fairy tales, are included. These tags are converted into corresponding vector representations and used as model input data. Furthermore, the multi-layer perceptron neural network architecture is expanded.

[0063] Specifically, it is responsible for fusing image features with plot features. In the image data processing flow, the feature map output by the first pooling layer is first adjusted by a 1x1 convolutional layer to adjust the number of channels so that the number of channels matches the dimension of the plot summary feature vector. Subsequently, these two parts of data are spliced in the first fusion module and 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 passed in by the input layer. It also uses a concatenation method to combine the two, and then fuses them through a fully connected network. This design allows the model to incorporate cultural background information, taking into account 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 through multiple layers of convolution and pooling. These features are combined with the previously incorporated features of plot and cultural background information, and finally input into the fully connected layer. The fully connected layer comprehensively processes these fused features to provide a basis for the model's final decision. By incorporating plot and cultural background information, the model can understand the game scene from multiple dimensions, avoiding the limitations of judging solely based on visual features, thereby more accurately matching colors and styles. The integration of multiple types of features enables the model to learn richer patterns and regularities, enhancing its adaptability to different game styles and scenarios. Whether it is a fantasy adventure game or a historical simulation game, the model can make reasonable color and style matching decisions based on this rich input information.

[0065] In addition, in some optional embodiments of the present invention, the first fusion module is configured to receive the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and the feature vector of the plot summary input by the input layer, concatenate the two, and fuse them through a fully connected network. The step of outputting the fused feature vector includes:

[0066] The output of the first pooling layer after adjusting the number of channels through the 1x1 convolution layer and the feature vector of the plot summary are concatenated and then pass through a fully connected network and activation function to generate the gating signal G;

[0067] The gated signal is split into the first part G1 and the second part G2 corresponding to the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the feature vector of the plot summary;

[0068] The fused feature vector is obtained based on the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, the feature vector of the plot summary, and the corresponding first part G1 and second part G2;

[0069] The expression of the gate signal is:

[0070] G = σ(WF0 + b);

[0071] The calculation formula of 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 the element-wise multiplication, F0 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the concatenation of the feature vector of the plot summary, F1 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and F2 is the feature vector of the plot summary.

[0074] While multiple fusion modules are employed for feature fusion, the fusion method is relatively fixed, primarily consisting of simple concatenation and fully connected network processing. For complex and diverse game scenes and semantic information, the deep connections between different features may not be fully exploited, limiting the accuracy of color and style matching. Therefore, a gating unit is used to adaptively fuse features, generating a gating signal that 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, is concatenated with the feature vector of the plot summary along the channel dimension to generate a new vector. This concatenated vector is then input into a fully connected network, which performs a linear transformation using a weight matrix and a bias vector, followed by a sigmoid activation function to generate a gating signal. The sigmoid function compresses the output value to between 0 and 1, ensuring that the gating signal effectively controls the features as a weight. To weight image and plot features separately, the generated gating signal is split and weightedly fused with the corresponding features.

[0075] In summary, the machine learning-based method for automatically matching art color design and style in the above-mentioned embodiments of the present invention obtains a preset number of scene images from games of different styles, normalizes the size of the scene images, and annotates the scene images to form a training dataset, wherein the data annotations include at least style categories and color design information; establishes a multi-layer perceptual neural network and inputs the training dataset into the multi-layer perceptual neural network for model training until the loss function stabilizes to obtain a style color matching model; obtains a scene image to be matched, inputs the scene image to be matched into the style color matching model to obtain target color design information that matches the style of the scene image to be matched; and utilizes a machine learning algorithm to train a large number of scene images to obtain a style color matching model. The style color matching model grasps the inherent logic of color design and style matching, thereby being able to quickly and accurately generate color design solutions. Compared with manual design, this method greatly shortens the design cycle and improves design efficiency. This solves the problem of low efficiency in matching color design and game style in the prior art.

[0076] Example 3

[0077] See also Figure 2 , shown is 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] An acquisition module 100 is configured to acquire 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, wherein the annotated data includes at least style category and color design information;

[0079] A training module 200 is used to establish a multi-layer perceptron neural network and input a training data set into the multi-layer perceptron neural network to perform model training until the loss function becomes stable to obtain a style and color matching model;

[0080] The matching module 300 is used to obtain a scene image to be matched that needs to be color matched, and input the scene image to be matched into a style color matching model to obtain target color design information that matches the style of the scene image to be matched.

[0081] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments and will not be described in detail here.

[0082] Example 4

[0083] Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the above-mentioned embodiments 1 to 2.

[0084] Example 5

[0085] On the other hand, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor, and when the processor executes the program, the steps of the method described in any one of the above embodiments one to two are implemented.

[0086] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, 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 appreciate that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the 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 (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0088] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0089] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement the hardware: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0090] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations 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 any one or more embodiments or examples.

[0091] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method for automatic matching of art color design and style based on machine learning, characterized in that: The method comprises: Obtaining a preset number of scene images from games of different styles, normalizing the size of the scene images, and annotating the scene images to form a training dataset, wherein the data annotations include at least style category and color design information; Establish a multi-layer perceptron neural network and input the training data set into the multi-layer perceptron neural network to train the model until the loss function tends to be stable to obtain a style color matching model; The image of the scene to be matched that needs to be color matched is obtained, and the image of the scene to be matched is input into the style color matching model to obtain the target color design information that matches the style of the image of the scene to be matched.

2. The method for automatic matching of art color design and style based on machine learning according to claim 1, characterized in that: The multi-layer 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, wherein 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 the data dimension and extract the main features, and the second convolutional layer is used to receive the output of the first pooling layer to extract more complex features, wherein a residual connection is added between the first convolutional layer and the second convolutional layer.

3. The method for automatic matching of art color design and style based on machine learning according to claim 2, characterized in that: The data annotation also includes plot label annotation and cultural background label annotation, and the multi-layer perception neural network also includes a first fusion module, a second fusion module and a third fusion module arranged between the second pooling layer and the fully connected layer.

4. The method for automatic matching of art color design and style based on machine learning according to claim 3, characterized in that: The first fusion module is used to receive the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and the feature vector of the plot summary input by the input layer, concatenate the two, and fuse them through a fully connected network to output the fused feature vector; The second fusion module is used to concatenate and fuse the output of the first fusion module with the feature vector about the cultural background inputted 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 input them into the fully connected layer.

5. The method for automatic matching of art color design and style based on machine learning according to claim 1, characterized in that: The loss function of the multi-layer perceptron neural network is: L=L1+λL2 Among them, L1 is the style classification loss function, L2 is the color matching loss function, n is the number of style categories, is the true style category label, is the probability distribution of style categories predicted by the network, Is a real color design label, is the color scheme predicted by the prediction network, m is the dimension of the color scheme vector, and λ is the weight parameter.

6. The method for automatic matching of art color design and style based on machine learning according to claim 3, characterized in that: The first fusion module is configured to receive the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and the feature vector of the plot summary input by the input layer, concatenate the two, and fuse them through a fully connected network. The steps of outputting the fused feature vector include: The output of the first pooling layer after adjusting the number of channels through the 1x1 convolution layer and the feature vector of the plot summary are concatenated and then pass through a fully connected network and activation function to generate the gating signal G; The gated signal is split into the first part G1 and the second part G2 corresponding to the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the feature vector of the plot summary; The fused feature vector is obtained based on the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, the feature vector of the plot summary, and the corresponding first part G1 and second part G2; The expression of the gate signal is: G = σ(WF0 + b); The calculation formula of the fused feature vector is: F=G1⊙F1+G2⊙F2; Where W is the weight matrix, b is the bias vector, σ is the Sigmoid function, ⊙ is the element-wise multiplication, F0 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer and the concatenation of the feature vector of the plot summary, F1 is the output of the first pooling layer after the number of channels is adjusted by the 1x1 convolution layer, and F2 is the feature vector of the plot summary.

7. The method for automatic matching of art color design and style based on machine learning according to claim 1, characterized in that: The color design information includes main color, color scheme and color ratio.

8. An automatic matching system for art color design and style based on machine learning, characterized by: The system comprises: an acquisition module, configured to acquire 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, wherein the annotated data includes at least style category and color design information; The training module is used to establish a multi-layer perceptron neural network and input the training data set into the multi-layer perceptron neural network to train the model until the loss function tends to be stable to obtain a style color matching model; The matching module is used to 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.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.

Citation Information

Patent Citations

  • Image processing method and related equipment

    CN110852940A

  • Image processing method and device, storage medium and electronic equipment

    CN112232425A

  • Intelligent image design method and device based on neural network, equipment and storage medium

    CN112927321A

  • Image coloring method based on multi-modal content coding

    CN113888660A

  • Text-driven color manipulation of real images

    WO2024080984A1