A method and system for automatically coloring characters based on 3D models

Through the automatic coloring method of characters based on 3D models, and the automated quality inspection and coloring process are used to solve the problems of low efficiency and poor consistency of traditional 3D model coloring methods, and the automatic coloring of 3D models with efficient and consistent quality is achieved.

CN118710862BActive Publication Date: 2025-05-09深圳艺核科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411025547.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2025-05-09
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

The traditional 3D model coloring method relies on manual operation, is inefficient, time-consuming, and difficult to ensure consistency of color and texture, increasing labor and time costs.

Method used

The automatic coloring method of characters based on 3D models is adopted. By obtaining the target pre-color quality inspection character model and coloring standards, the 3D model pre-color quality inspection model and automatic coloring model are used for quality inspection and automatic coloring to ensure the consistency of coloring quality.

Benefits of technology

It significantly improves the efficiency of 3D models, reduces the time and labor of manual operations, ensures consistency and high standards of coloring quality, and reduces project costs and cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710862B_ABST
    Figure CN118710862B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for automatic coloring of characters based on 3D models, and relates to the technical field of 3D model application. A system for automatic coloring of characters based on 3D models, comprising: a 3D model coloring initial quality inspection module, a 3D model automatic coloring module, and a 3D model coloring final quality inspection module. The present invention significantly reduces the time and labor required for manual coloring through an automated coloring process, thereby improving the overall coloring efficiency; through a systematic quality inspection process, it ensures that the coloring quality meets the preset standards, thereby improving the visual quality of the final product; the automated coloring and quality inspection process speeds up the design iteration, allowing designers to try and experiment with different coloring schemes more quickly; in addition, through two automated 3D model quality inspection modules, the character models before and after coloring are subjected to standardized quality control, further improving the efficiency and consistency of quality inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of 3D model application, and in particular to a method and system for automatically coloring a character based on a 3D model. Background Art

[0002] With the rapid development of digital media and entertainment industries, 3D models are increasingly used in movies, games, animations, virtual reality and other fields. The visual effects of 3D models depend to a large extent on their coloring process, that is, by giving the model surface specific colors and textures to achieve realistic visual effects. However, traditional 3D model coloring methods have some limitations and challenges, especially in the coloring of character models.

[0003] The traditional 3D model coloring method relies on manual operation by technicians, which not only requires the operator to have superb artistic skills and color perception, but also the process is cumbersome and time-consuming, which seriously limits the efficiency of coloring; in the manual coloring process, it is a challenge to maintain the consistency of color and texture of different parts of the model; in addition, long manual coloring work not only increases the manpower cost of the project, but also prolongs the project cycle, thereby increasing the time cost. Summary of the invention

[0004] The present invention aims to provide a method and system for automatically coloring characters based on a 3D model, thereby improving the coloring efficiency of the 3D model.

[0005] A method for automatically coloring a character based on a 3D model, comprising:

[0006] S1. Obtain a target pre-coloring quality inspection character model and a target coloring standard, wherein the target coloring standard includes a target character model reference image and a target character model texture feature; perform quality inspection on the target pre-coloring quality inspection character model based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model to obtain an evaluation result of the target pre-coloring quality inspection character model; if the evaluation result of the target pre-coloring quality inspection character model is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the evaluation result of the target pre-coloring quality inspection character model is not passed, a professional technician adjusts the target pre-coloring quality inspection character model and then inputs it into the 3D model pre-coloring quality inspection model for quality inspection;

[0007] S2. Input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis to obtain the target colored model to be inspected; input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection to obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, the target colored model to be inspected is adjusted by professional technicians.

[0008] As a preferred technical solution of the present invention, the 3D model pre-coloring quality inspection model in step S1 includes a model preprocessing layer, a model initial quality inspection layer and a result output layer;

[0009] The model preprocessing layer is used to preprocess the target pre-coloring quality inspection character model to obtain a preprocessed target pre-coloring quality inspection character model;

[0010] The model initial quality inspection layer is used to perform quality inspection on the pre-processed target pre-coloring quality inspection character model to obtain the evaluation result of the target pre-coloring quality inspection character model;

[0011] The result output layer is used to output the target pre-colorization quality inspection character model evaluation results.

[0012] As a preferred technical solution of the present invention, the specific steps of training the initial quality inspection layer of the model in the 3D model pre-coloring quality inspection model include:

[0013] Collect several groups of initial model quality inspection training samples, each group of initial model quality inspection training samples contains a preprocessed character model and corresponding quality inspection results; combine several groups of initial model quality inspection training samples to obtain an initial model quality inspection training set;

[0014] The initial model quality inspection training set is input into the 3D model pre-coloring quality inspection model to train the model initial quality inspection layer with the quality inspection result as the goal, and obtain the initial model initial quality inspection layer; the initial model initial quality inspection layer is model evaluated to obtain the model evaluation result of the initial model initial quality inspection layer; if the model evaluation result of the initial model initial quality inspection layer is passed, the initial model initial quality inspection layer is used as the model initial quality inspection layer in the 3D model pre-coloring quality inspection model; otherwise, the initial model quality inspection training set is used to continue model training.

[0015] As a preferred technical solution of the present invention, the 3D model automatic coloring model in step S2 includes a model block layer, a semantic segmentation layer, a feature matching layer and a model output layer;

[0016] The model block layer is used to block the target character model to be colored to obtain N block character models K n , n=1, 2, ..., N; N is the number of blocks after the target character model to be colored is divided into blocks;

[0017] The semantic segmentation layer is used to extract the target character model reference image and the target character model texture features in the target coloring standard to obtain the target coloring standard feature set;

[0018] The feature matching layer is used to transform each block character model K nMatch it with the target coloring standard feature set to obtain the target character model coloring scheme;

[0019] The model output layer is used to automatically colorize the target character model to be colored according to the target character model coloring scheme to obtain the target colored model to be inspected.

[0020] As a preferred technical solution of the present invention, the specific steps of obtaining a target coloring standard feature set in the semantic segmentation layer and obtaining a target character model coloring scheme in the feature matching layer include:

[0021] The specific steps to obtain the target coloring standard feature set in the semantic segmentation layer are as follows:

[0022] The target person model reference image is edge-cut to obtain M target person model reference block images P m , m=1, 2, …, M; M is the number of blocks after edge cutting of the reference image of the target person model;

[0023] The target person model reference block image P m After the dot product attention operation, the dot product attention feature map D of the target person model is obtained. m ; The target person model reference block image P m After the channel attention operation, the channel attention feature map T of the target person model is obtained m ; Take the target person model dot product attention feature map D m And the target person model channel attention feature map T m After the addition operation, the parallel feature map B of the target person model is obtained m ; Parallel feature map B for the target person model m Expand the receptive field to obtain the enhanced feature map Z of the target person model m ;

[0024] Based on the texture feature of the target person model and the enhanced feature map Z of the target person model m The target coloring standard feature function is used for calculation to obtain the target coloring standard feature H m ;

[0025] Traverse all target person model reference block images P m , all target person model reference block images P m and target coloring standard feature H m Combine them to obtain the target coloring standard feature set;

[0026] The specific steps to obtain the coloring scheme of the target character model in the feature matching layer are as follows:

[0027] For the block character model Kn , the target coloring standard feature set and the block character model K n Matching is performed to obtain the target color block feature F n ; Traverse all block character models K n , all the block character models K n and target color block feature F n Combine them to get the coloring scheme of the target character model.

[0028] As a preferred technical solution of the present invention, the specific steps of constructing the target coloring standard characteristic function include:

[0029] Construct I objective function individuals X i , i=1,2,…,I; each objective function individual X i Contains a method for fusing the texture features of the target person model and the enhanced feature map Z of the target person model m The target coloring standard characteristic function; I target function individual X i Combination, get the target function iteration population; set the maximum number of iterations J max ;

[0030] Obtaining several groups of objective function feature fusion training samples, each group of objective function feature fusion training samples comprising a simulation model enhanced feature map, corresponding simulation texture features and a colored standard simulation model; combining several groups of objective function feature fusion training samples to obtain an objective function optimization training set;

[0031] According to the objective function iteration population objective function individuals X i The objective function optimization training set is simulated and calculated to obtain several groups of simulated coloring standard features; simulated coloring simulation is performed based on several groups of simulated coloring standard features to obtain several corresponding simulated coloring models; similarity mean is calculated based on several corresponding simulated coloring models and the colored standard simulation model to obtain the objective function simulation similarity Y i , the objective function simulates the similarity Y i As the objective function individual X i The fitness G i ;

[0032] When the current iteration number is j, according to the formula A=W*(1+cos(π*(j-1) / (J max -1))) Calculate the population update factor A, where W is the initial value of the population update factor; when the population update factor A is greater than the set threshold, the shrinkage surround operator is used to update the target function iterative population; otherwise, the surround predation operator is used to update the target function iterative population;

[0033] When the maximum number of iterations J is reachedmax When the output fitness is the largest, the objective function individual X i , which is the optimal objective function individual; the target coloring standard feature function in the optimal objective function individual is used as the target coloring standard feature function in the semantic segmentation layer for calculation.

[0034] As a preferred technical solution of the present invention, the 3D model coloring quality inspection model in step S2 includes a model preprocessing layer, a model coloring quality inspection layer and a result output layer;

[0035] The model preprocessing layer is used to preprocess the colorized model of the target to be inspected, and obtain the preprocessed colorized model of the target to be inspected;

[0036] The model colored quality inspection layer is used to perform final quality inspection on the pre-processed target colored model to be inspected, and obtain the quality inspection result of the target colored model;

[0037] The result output layer is used to output the quality inspection results of the target colored model;

[0038] The specific steps for training the model to colorize the quality inspection layer include:

[0039] Collecting several groups of colored model quality inspection samples, each group of colored model quality inspection samples includes a colored model and a corresponding colored quality inspection result; combining several groups of colored model quality inspection samples to obtain a colored model quality inspection training set;

[0040] The colored model quality inspection training set is input into the colored quality inspection model of the 3D model, and the model colored quality inspection layer is trained using the colored quality inspection result as the target to obtain the initial model colored quality inspection layer; a model evaluation is performed on the initial model colored quality inspection layer to obtain the model evaluation result of the initial model colored quality inspection layer; if the model evaluation result of the initial model colored quality inspection layer is passed, the initial model colored quality inspection layer is used as the model colored quality inspection layer in the 3D model colored quality inspection model; otherwise, the model training is continued using the colored model quality inspection training set.

[0041] A character automatic coloring system based on a 3D model, comprising:

[0042] The 3D model coloring initial quality inspection module is used to deploy the 3D model pre-coloring quality inspection model, obtain the target pre-coloring quality inspection character model and the target coloring standard, the target coloring standard includes the target character model reference image and the target character model texture features; based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model, the target pre-coloring quality inspection character model is quality inspected to obtain the target pre-coloring quality inspection character model evaluation result; if the target pre-coloring quality inspection character model evaluation result is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the target pre-coloring quality inspection character model evaluation result is not passed, the target pre-coloring quality inspection character model is adjusted by professional technicians and then input into the 3D model pre-coloring quality inspection model for quality inspection;

[0043] The 3D model automatic coloring module is used to deploy the 3D model automatic coloring model, input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis, and obtain the target coloring model to be inspected;

[0044] The 3D model coloring final quality inspection module is used to deploy the 3D model colored quality inspection model, input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection, and obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, professional technicians will adjust the target colored model to be inspected.

[0045] The present invention has the following advantages:

[0046] 1. The present invention significantly reduces the time and labor required for manual coloring through an automated coloring process, thereby improving the overall coloring efficiency; through a systematic quality inspection process, it ensures that the coloring quality meets the preset standards, thereby improving the visual quality of the final product; the automated coloring and quality inspection process speeds up the design iteration speed, allowing designers to try and experiment with different coloring schemes more quickly; in addition, through two automated 3D model quality inspection modules, the character models before and after coloring are subjected to standardized quality control, further improving the efficiency and consistency of quality inspection.

[0047] 2. The present invention ensures high consistency and accuracy of coloring results by utilizing an automated coloring model for precise feature extraction and matching processes; through block processing at the model block layer, the system can process complex 3D character models more meticulously and improve the detail performance of coloring; the semantic segmentation layer combines dot product attention and channel attention operations to expand the receptive field of the model and enhance the understanding and extraction of target character model features; by constructing a target coloring standard feature function, texture features and enhanced feature maps can be more effectively fused to provide richer information for coloring decisions; according to the dynamic adjustment of the population update factor A, different update strategies can be flexibly adopted to enhance the adaptability and stability of the function optimization algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a schematic diagram of the structure of a 3D model-based automatic character coloring system used in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to enable persons skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0050] Embodiment 1, a method for automatically coloring a character based on a 3D model, comprising:

[0051] S1. Obtain a target pre-coloring quality inspection character model and a target coloring standard, wherein the target coloring standard includes a target character model reference image and a target character model texture feature; perform quality inspection on the target pre-coloring quality inspection character model based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model to obtain an evaluation result of the target pre-coloring quality inspection character model; if the evaluation result of the target pre-coloring quality inspection character model is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the evaluation result of the target pre-coloring quality inspection character model is not passed, a professional technician adjusts the target pre-coloring quality inspection character model and then inputs it into the 3D model pre-coloring quality inspection model for quality inspection;

[0052] The target pre-coloring quality inspection character model is a white model that has been built but not colored. The target coloring standard is set by professional technicians. The target character model reference image is the reference image used to build the target pre-coloring quality inspection character model, which contains features such as color. The target character model texture feature is the texture requirement for the target pre-coloring quality inspection character model, which specifies the specific material information of the model, such as glossy fabric, matte metal, etc.

[0053] In the 3D model automatic coloring process, implementing the pre-coloring quality inspection step can ensure high standards of model quality by identifying and correcting potential problems in advance, significantly improving coloring efficiency and the visual quality of the final product, not only preventing rework and cost increase, but also speeding up design iterations;

[0054] In step S1, the 3D model pre-coloring quality inspection model includes a model preprocessing layer, a model initial quality inspection layer and a result output layer;

[0055] The model preprocessing layer is used to preprocess the target pre-coloring quality inspection character model to obtain a preprocessed target pre-coloring quality inspection character model;

[0056] The model initial quality inspection layer is used to perform quality inspection on the pre-processed target pre-coloring quality inspection character model to obtain the evaluation result of the target pre-coloring quality inspection character model;

[0057] The result output layer is used to output the target pre-coloring quality inspection character model evaluation results;

[0058] The specific steps of training the initial quality inspection layer of the model in the 3D model pre-coloring quality inspection model include:

[0059] Collect several groups of initial model quality inspection training samples, each group of initial model quality inspection training samples contains a preprocessed character model and corresponding quality inspection results; combine several groups of initial model quality inspection training samples to obtain an initial model quality inspection training set; the corresponding quality inspection results are annotated by professional technicians, the initial model quality inspection training samples come from a compliant database, and the preprocessed character model is a white model without coloring;

[0060] Input the initial model quality inspection training set into the 3D model pre-coloring quality inspection model to train the model initial quality inspection layer with the quality inspection result as the goal, and obtain the initial model initial quality inspection layer; perform model evaluation on the initial model initial quality inspection layer to obtain the model evaluation result of the initial model initial quality inspection layer; if the model evaluation result of the initial model initial quality inspection layer is passed, the initial model initial quality inspection layer is used as the model initial quality inspection layer in the 3D model pre-coloring quality inspection model; otherwise, continue to train the model using the initial model quality inspection training set; during model evaluation, obtain the evaluation result by evaluating the accuracy of the output result;

[0061] The 3D model pre-coloring quality inspection model used in step S1 realizes efficient and standardized preprocessing and quality assessment of 3D character models through the collaborative work of the model preprocessing layer, the model initial quality inspection layer and the result output layer. This automated process not only significantly improves the detection efficiency and reduces human errors, but also enhances the generalization ability and robustness of the model through data-driven training methods; continuous model evaluation and iterative optimization ensure the continuous improvement of detection accuracy, while improving the work efficiency of professional technicians; in addition, the implementation of the automated quality inspection process reduces production costs and accelerates the product iteration cycle;

[0062] S2. Input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis to obtain the target colored model to be inspected; input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection to obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, the target colored model to be inspected is adjusted by professional technicians;

[0063] The 3D model automatic coloring model in step S2 includes a model segmentation layer, a semantic segmentation layer, a feature matching layer and a model output layer;

[0064] The model block layer is used to block the target character model to be colored to obtain N block character models K n , n=1, 2, ..., N; N is the number of blocks after the target character model to be colored is divided into blocks; the model can be divided into blocks by means of edge segmentation or grid decomposition;

[0065] The semantic segmentation layer is used to extract the target character model reference image and the target character model texture features in the target coloring standard to obtain the target coloring standard feature set;

[0066] The feature matching layer is used to transform each block character model K n Match it with the target coloring standard feature set to obtain the target character model coloring scheme;

[0067] The model output layer is used to automatically colorize the target character model to be colored according to the target character model coloring scheme to obtain the target colorized model to be inspected;

[0068] The specific steps of obtaining the target coloring standard feature set in the semantic segmentation layer and obtaining the target character model coloring scheme in the feature matching layer include:

[0069] The specific steps to obtain the target coloring standard feature set in the semantic segmentation layer are as follows:

[0070] The target person model reference image is edge-cut to obtain M target person model reference block images P m , m=1, 2, …, M; M is the number of blocks after edge cutting of the reference image of the target person model;

[0071] The target person model reference block image P m After the dot product attention operation, the dot product attention feature map D of the target person model is obtained. m ; The target person model reference block image P m After the channel attention operation, the channel attention feature map T of the target person model is obtained m ; Take the target person model dot product attention feature map D m And the target person model channel attention feature map T m After the addition operation, the parallel feature map B of the target person model is obtained m ; Parallel feature map B for the target person model m Expand the receptive field to obtain the enhanced feature map Z of the target person model m ; The combination of dot product attention and channel attention enhances the model's ability to focus on key visual information and helps extract richer feature representations; the parallel connection of feature maps and the expansion of the receptive field operations enhance the expressive power of feature maps, allowing the coloring process to consider a wider range of contextual information; the use of the target coloring standard feature function ensures that the coloring scheme accurately matches the texture features of the target character model;

[0072] The dot product attention operation is to refer to the block image P of the target person model m After three 1*1 convolutions, three different matrices are obtained, which are represented as feature matrices 1, 2, and 3 respectively; feature matrix 1 is deformed and normalized, and then multiplied with the deformed feature matrix 3 to obtain correlation matrix 1; feature matrix 2 is deformed and normalized, and then multiplied with correlation matrix 1 to obtain correlation matrix 2; correlation matrix 2 and the reference block image P of the target person model are combined to obtain correlation matrix 2. m Add them together to get the target person model dot product attention feature map D m ;

[0073] The channel attention operation is to refer to the block image P of the target person model m After shape transformation, shape transformation matrices 1, 2, and 3 are obtained; shape transformation matrix 3 is transposed and multiplied with shape transformation matrix 2 to obtain channel correlation matrix 1; channel correlation matrix 1 is softmax-operated and multiplied with shape transformation matrix 1 to obtain weighted feature matrix 2; feature matrix 2 and target person model reference block image P are added together. mAdd them together to get the target person model channel attention feature map T m ;

[0074] The operation of expanding the receptive field is to connect the target person model in parallel with the feature map B m Input into 5 1*1 convolutions to reduce the number of channels, then connect the last 3 branches to a 1*e and e*1 convolution, where e represents the size of the convolution; finally, concatenate the feature maps output by branches 2, 3, 4, and 5 in the channel dimension to obtain a feature tensor; after the concatenated feature tensor passes through a 3*3 convolution, it is residually connected with the features of the first branch to obtain the enhanced feature map Z of the target person model. m ; This operation can capture rich contextual information and prevent gradient disappearance;

[0075] Based on the texture feature of the target person model and the enhanced feature map Z of the target person model m The target coloring standard feature function is used for calculation to obtain the target coloring standard feature H m ; The role of the target coloring standard feature function is to enhance the texture features of the target character model and the target character model feature map Z m Perform feature fusion operations to obtain texture and color features of different image blocks;

[0076] Traverse all target person model reference block images P m , all target person model reference block images P m and target coloring standard feature H m Combine them to obtain the target coloring standard feature set;

[0077] The specific steps to obtain the coloring scheme of the target character model in the feature matching layer are as follows:

[0078] For the block character model K n , the target coloring standard feature set and the block character model K n Matching is performed to obtain the target color block feature F n ; Traverse all block character models K n , all the block character models K n and target color block feature F n Combine them to get the coloring scheme of the target character model; n and the target person model reference block image P in the target coloring standard feature set m For matching, one model block can correspond to multiple image blocks, and the target coloring standard feature H corresponding to the image block m Perform feature fusion to obtain the target color block feature F n ;

[0079] The specific steps of constructing the target coloring standard feature function include:

[0080] Construct I objective function individuals X i , i=1,2,…,I; each objective function individual X i Contains a method for fusing the texture features of the target person model and the enhanced feature map Z of the target person model m The target coloring standard characteristic function; I target function individual X i Combination, get the target function iteration population; set the maximum number of iterations J max ; Maximum number of iterations J max Set by professional technicians; different target coloring standard characteristic functions fluctuate within the preset range;

[0081] Obtain several groups of objective function feature fusion training samples, each group of objective function feature fusion training samples includes a simulation model enhancement feature map, corresponding simulation texture features and a colored standard simulation model; combine several groups of objective function feature fusion training samples to obtain an objective function optimization training set; the objective function feature fusion training samples are derived from a compliant database, and the simulation model enhancement feature map, the corresponding simulation texture features and the colored standard simulation model are all models that have undergone quality inspection;

[0082] According to the objective function iteration population objective function individuals X i The objective function optimization training set is simulated and calculated to obtain several groups of simulated coloring standard features; simulated coloring simulation is performed based on several groups of simulated coloring standard features to obtain several corresponding simulated coloring models; similarity mean is calculated based on several corresponding simulated coloring models and the colored standard simulation model to obtain the objective function simulation similarity Y i , the objective function simulates the similarity Y i As the objective function individual X i The fitness G i ;

[0083] When the current iteration number is j, according to the formula A=W*(1+cos(π*(j-1) / (J max -1))) Calculate the population update factor A, where W is the initial value of the population update factor; when the population update factor A is greater than the set threshold, the shrinkage surround operator is used to update the target function iterative population; otherwise, the surround predation operator is used to update the target function iterative population;

[0084] The role of the population update factor A is to control the update range of the objective function iteration population. When the objective function iteration population is updated using the shrinking surround operator, the search efficiency is improved by gradually narrowing the scope of the solution space, and the update can be performed around the optimal individual to quickly converge to the optimal solution. When the objective function iteration population is updated using the surround predator operator, it can search around the optimal solution and retain the diversity of the population, which can effectively balance exploration and utilization and improve the global search ability and adaptability of the algorithm.

[0085] When the maximum number of iterations J is reached max When the output fitness is the largest, the objective function individual X i , which is the optimal objective function individual; the target coloring standard feature function in the optimal objective function individual is used as the target coloring standard feature function in the semantic segmentation layer for calculation;

[0086] The 3D model coloring quality inspection model in step S2 includes a model preprocessing layer, a model coloring quality inspection layer and a result output layer;

[0087] The model preprocessing layer is used to preprocess the colorized model of the target to be inspected, and obtain the preprocessed colorized model of the target to be inspected;

[0088] The model colored quality inspection layer is used to perform final quality inspection on the pre-processed target colored model to be inspected, and obtain the quality inspection result of the target colored model;

[0089] The result output layer is used to output the quality inspection results of the target colored model;

[0090] The specific steps for training the model to colorize the quality inspection layer include:

[0091] Collect several groups of colored model quality inspection samples, each group of colored model quality inspection samples contains a colored model and the corresponding colored quality inspection results; combine several groups of colored model quality inspection samples to obtain a colored model quality inspection training set; the colored quality inspection results are standardized by professional technicians, and qualified colored model quality inspection samples ensure the accuracy of color and texture, and are closer to the preset effect;

[0092] Input the colored model quality inspection training set into the 3D model colored quality inspection model, train the model colored quality inspection layer using the colored quality inspection result as the target, and obtain the initial model colored quality inspection layer; perform model evaluation on the initial model colored quality inspection layer to obtain the model evaluation result of the initial model colored quality inspection layer; if the model evaluation result of the initial model colored quality inspection layer is passed, use the initial model colored quality inspection layer as the model colored quality inspection layer in the 3D model colored quality inspection model; otherwise, continue model training using the colored model quality inspection training set;

[0093] The model preprocessing layer ensures that all colored models to be tested undergo a unified preprocessing step, providing a consistent basis for subsequent quality inspections; the model colored quality inspection layer automatically evaluates the quality of the preprocessed model, reducing the need for manual inspection and improving efficiency; through repeated training and evaluation, the model can better handle various anomalies and edge cases, enhancing the robustness of the model.

[0094] Example 2, a 3D model-based character automatic coloring system, see Figure 1 As shown, including:

[0095] The 3D model coloring initial quality inspection module is used to deploy the 3D model pre-coloring quality inspection model, obtain the target pre-coloring quality inspection character model and the target coloring standard, the target coloring standard includes the target character model reference image and the target character model texture features; based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model, the target pre-coloring quality inspection character model is quality inspected to obtain the target pre-coloring quality inspection character model evaluation result; if the target pre-coloring quality inspection character model evaluation result is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the target pre-coloring quality inspection character model evaluation result is not passed, the target pre-coloring quality inspection character model is adjusted by professional technicians and then input into the 3D model pre-coloring quality inspection model for quality inspection;

[0096] The 3D model automatic coloring module is used to deploy the 3D model automatic coloring model, input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis, and obtain the target coloring model to be inspected;

[0097] The 3D model coloring final quality inspection module is used to deploy the 3D model colored quality inspection model, input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection, and obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, professional technicians will adjust the target colored model to be inspected.

[0098] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention. Parts not described in detail in this specification belong to the prior art known to those skilled in the art.

Claims

1. A method for automatically coloring a character based on a 3D model, characterized in that: include: S1. Obtaining a target pre-coloring quality inspection character model and a target coloring standard, wherein the target coloring standard includes a target character model reference image and a target character model texture feature; Based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model, the target pre-coloring quality inspection character model is quality inspected to obtain an evaluation result of the target pre-coloring quality inspection character model; if the evaluation result of the target pre-coloring quality inspection character model is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the evaluation result of the target pre-coloring quality inspection character model is not passed, a professional technician adjusts the target pre-coloring quality inspection character model and then inputs it into the 3D model pre-coloring quality inspection model for quality inspection; S2. Input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis to obtain the target colored model to be inspected; input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection to obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, the target colored model to be inspected is adjusted by professional technicians; The 3D model automatic coloring model in step S2 includes a model segmentation layer, a semantic segmentation layer, a feature matching layer and a model output layer; The model block layer is used to block the target character model to be colored to obtain N block character models K n , n=1,2,…,N; N is the number of blocks after the target character model to be colored is divided into blocks; The semantic segmentation layer is used to extract the target character model reference image and the target character model texture features in the target coloring standard to obtain the target coloring standard feature set; The feature matching layer is used to transform each block character model K n Match it with the target coloring standard feature set to obtain the target character model coloring scheme; The model output layer is used to automatically colorize the target character model to be colored according to the target character model coloring scheme to obtain the target colorized model to be inspected; The specific steps of obtaining the target coloring standard feature set in the semantic segmentation layer and obtaining the target character model coloring scheme in the feature matching layer include: The specific steps to obtain the target coloring standard feature set in the semantic segmentation layer are as follows: The target person model reference image is edge-cut to obtain M target person model reference block images P m , m = 1, 2, ..., M; M is the number of blocks after edge cutting of the target person model reference image; The target person model reference block image P m After the dot product attention operation, the dot product attention feature map D of the target person model is obtained. m ; The target person model reference block image P m After the channel attention operation, the channel attention feature map T of the target person model is obtained m ; Take the target person model dot product attention feature map D m And the target person model channel attention feature map T m After the addition operation, the parallel feature map B of the target person model is obtained m ; Parallel feature map B for the target person model m Expand the receptive field to obtain the enhanced feature map Z of the target person model m ; Based on the texture feature of the target person model and the enhanced feature map Z of the target person model m The target coloring standard feature function is used for calculation to obtain the target coloring standard feature H m ; Traverse all target person model reference block images P m , all target person model reference block images P m and target coloring standard feature H m Combine them to obtain the target coloring standard feature set; The specific steps to obtain the coloring scheme of the target character model in the feature matching layer are as follows: For the block character model K n , the target coloring standard feature set and the block character model K n Matching is performed to obtain the target color block feature F n ; Traverse all block character models K n , all the block character models K n and target color block feature F n Combine them to get the coloring scheme of the target character model; The specific steps of constructing the target coloring standard feature function include: Construct I objective function individuals X i , i = 1, 2, ..., I; each objective function individual X i Contains a method for fusing the texture features of the target person model and the enhanced feature map Z of the target person model m The target coloring standard characteristic function; I target function individual X i Combination, get the target function iteration population; set the maximum number of iterations J max ; Obtaining several groups of objective function feature fusion training samples, each group of objective function feature fusion training samples comprising a simulation model enhanced feature map, corresponding simulation texture features and a colored standard simulation model; combining several groups of objective function feature fusion training samples to obtain an objective function optimization training set; According to the objective function iteration population objective function individuals X i The objective function optimization training set is simulated and calculated to obtain several groups of simulated coloring standard features; simulated coloring simulation is performed based on several groups of simulated coloring standard features to obtain several corresponding simulated coloring models; similarity mean is calculated based on several corresponding simulated coloring models and the colored standard simulation model to obtain the objective function simulation similarity Y i , the objective function simulates the similarity Y i As the objective function individual X i The fitness G i ; When the current iteration number is j, according to the formula A=W*(1+cos(π*(j-1) / (J max -1))) Calculate the population update factor A, where W is the initial value of the population update factor; when the population update factor A is greater than the set threshold, the shrinkage surround operator is used to update the target function iterative population; otherwise, the surround predation operator is used to update the target function iterative population; When the maximum number of iterations J is reached max When the output fitness is the largest, the objective function individual X i , which is the optimal objective function individual; the target coloring standard feature function in the optimal objective function individual is used as the target coloring standard feature function in the semantic segmentation layer for calculation.

2. The method for automatically coloring a character based on a 3D model according to claim 1, characterized in that: In step S1, the 3D model pre-coloring quality inspection model includes a model preprocessing layer, a model initial quality inspection layer and a result output layer; The model preprocessing layer is used to preprocess the target pre-coloring quality inspection character model to obtain a preprocessed target pre-coloring quality inspection character model; The model initial quality inspection layer is used to perform quality inspection on the pre-processed target pre-coloring quality inspection character model to obtain the evaluation result of the target pre-coloring quality inspection character model; The result output layer is used to output the target pre-colorization quality inspection character model evaluation results.

3. The method for automatically coloring a character based on a 3D model according to claim 2, characterized in that: The specific steps of training the initial quality inspection layer of the model in the 3D model pre-coloring quality inspection model include: Collect several groups of initial model quality inspection training samples, each group of initial model quality inspection training samples contains a preprocessed character model and corresponding quality inspection results; combine several groups of initial model quality inspection training samples to obtain an initial model quality inspection training set; The initial model quality inspection training set is input into the 3D model pre-coloring quality inspection model, and the model initial quality inspection layer is trained with the quality inspection result as the goal to obtain the initial model initial quality inspection layer; the initial model initial quality inspection layer is model evaluated to obtain the model evaluation result of the initial model initial quality inspection layer; if the model evaluation result of the initial model initial quality inspection layer is passed, the initial model initial quality inspection layer is used as the model initial quality inspection layer in the 3D model pre-coloring quality inspection model; otherwise, the model training is continued using the initial model quality inspection training set.

4. The method for automatically coloring a character based on a 3D model according to claim 3, characterized in that: The 3D model coloring quality inspection model in step S2 includes a model preprocessing layer, a model coloring quality inspection layer and a result output layer; The model preprocessing layer is used to preprocess the colorized model of the target to be inspected, and obtain the preprocessed colorized model of the target to be inspected; The model colored quality inspection layer is used to perform final quality inspection on the pre-processed target colored model to be inspected, and obtain the quality inspection result of the target colored model; The result output layer is used to output the quality inspection results of the target colored model; The specific steps for training the model to colorize the quality inspection layer include: Collecting several groups of colored model quality inspection samples, each group of colored model quality inspection samples includes a colored model and a corresponding colored quality inspection result; combining several groups of colored model quality inspection samples to obtain a colored model quality inspection training set; The colored model quality inspection training set is input into the colored quality inspection model of the 3D model, and the model colored quality inspection layer is trained using the colored quality inspection result as the target to obtain the initial model colored quality inspection layer; a model evaluation is performed on the initial model colored quality inspection layer to obtain the model evaluation result of the initial model colored quality inspection layer; if the model evaluation result of the initial model colored quality inspection layer is passed, the initial model colored quality inspection layer is used as the model colored quality inspection layer in the 3D model colored quality inspection model; otherwise, the model training is continued using the colored model quality inspection training set.

5. A 3D model-based character automatic coloring system, characterized in that: The system applies a method for automatically coloring a character based on a 3D model as described in any one of claims 1 to 4, comprising: The 3D model coloring initial quality inspection module is used to deploy the 3D model pre-coloring quality inspection model, obtain the target pre-coloring quality inspection character model and the target coloring standard, the target coloring standard includes the target character model reference image and the target character model texture features; based on the target pre-coloring quality inspection character model and the 3D model pre-coloring quality inspection model, the target pre-coloring quality inspection character model is quality inspected to obtain the target pre-coloring quality inspection character model evaluation result; if the target pre-coloring quality inspection character model evaluation result is passed, the target pre-coloring quality inspection character model is used as the target character model to be colored; if the target pre-coloring quality inspection character model evaluation result is not passed, the target pre-coloring quality inspection character model is adjusted by professional technicians and then input into the 3D model pre-coloring quality inspection model for quality inspection; The 3D model automatic coloring module is used to deploy the 3D model automatic coloring model, input the target character model to be colored and the target coloring standard into the 3D model automatic coloring model for analysis, and obtain the target coloring model to be inspected; The 3D model coloring final quality inspection module is used to deploy the 3D model colored quality inspection model, input the target colored model to be inspected into the 3D model colored quality inspection model for quality inspection, and obtain the quality inspection result of the target colored model. If the quality inspection result of the target colored model is passed, the coloring operation of the target colored model to be inspected is completed; otherwise, professional technicians will adjust the target colored model to be inspected.

Citation Information

Patent Citations

  • Portrait picture coloring method and device and terminal equipment

    CN113313786A

  • Code rate control method, device and equipment and computer readable storage medium

    CN113382242A

  • Quality detection model training method and device, equipment, medium and program product

    CN117036670A