Online portrait generation method and system based on node type artificial intelligence

Through the online portrait generation method based on node-based artificial intelligence, the problem of low portrait generation quality in the prior art is solved, high-quality image generation is achieved, ensuring the fit between portraits and scenes, and improving personalized customization capabilities and generation efficiency.

CN119600140AActive Publication Date: 2025-03-11BEIJING LIRUIKAI ADVERTISING CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411681336.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-11
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

In the prior art, when generating portraits, it is difficult to achieve facial details accuracy for real shooting, and the image edges are prone to blurring or unnatural problems. In addition, the personalized customization capabilities are insufficient, the style and scene are single, and the output image quality cannot be guaranteed.

Method used

The online portrait generation method based on node-based artificial intelligence is adopted. By obtaining the generation demand control data, the training model generates background image information and portrait posture information, the target image information is obtained after the merging process, and the facial image information is cut, merged, and unified parameter processing is performed, including unified resolution, light direction and tone, edge contour features are extracted to judge the fit, and correction is made based on the reasons for failure.

Benefits of technology

It improves the quality of online portrait generation, ensures the fit between portraits and scenes, enhances personalized customization capabilities, realizes diversification of styles and scenes, and improves generation efficiency and image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600140A_ABST
    Figure CN119600140A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an online portrait generation method and system based on node type artificial intelligence. According to the method, the target image information is determined through the obtained generation demand, the personalized customization capability in the online portrait generation process can be effectively improved while the style and scene diversification of the subsequent online portrait information can be ensured, and meanwhile, the user experience is improved. Whether the generated online portrait information is qualified or not is determined according to the integrating degree of the face image information and the target image information, and the corresponding parameters in the generation process are corrected based on the determined reason when the online portrait information is judged to be unqualified, so that the integrating condition of the portrait and the scene in the subsequently generated online portrait information can be effectively ensured; therefore, the generation quality of the online portrait is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an online portrait generation method and system based on node-based artificial intelligence. Background Art

[0002] With the rapid development of artificial intelligence technology, especially breakthroughs in deep learning and computer vision, computers can generate high-quality images in an unprecedented way based on AIGC (AI Generated Content), which has significantly improved image generation technology through AIGC. Currently, AIGC has been widely used in a variety of image generation scenarios, such as virtual character generation, stylized photos, intelligent beautification, etc. AIGC technology has gradually replaced some traditional photography functions, reduced photography costs, and shortened the post-processing process.

[0003] Although great progress has been made in using AIGC to generate portraits, the processing of facial details, hair, skin texture, etc. in the image still cannot achieve the accuracy of real shooting, and problems such as blurred or unnatural image edges are prone to occur. There is also a lack of personalized customization capabilities, a single style and scene, and the output image quality cannot be guaranteed. Summary of the invention

[0004] To this end, the present invention provides an online portrait generation method and system based on node-based artificial intelligence, so as to overcome the problem of low quality of online portrait generation caused by the inability of the portrait to match the generated scene in the prior art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] On the one hand, the present invention provides an online image generation method based on node-based artificial intelligence, comprising:

[0007] Based on the acquired generation demand control data, the model is trained to generate background image information and portrait posture information;

[0008] Combining the background image information and the portrait posture information to obtain target image information;

[0009] Acquire original image information and cut facial image information in the original image information, and merge the cut facial image information into the target image information to acquire merged portrait information;

[0010] Performing parameter unification processing on the combined portrait information to obtain online portrait information, wherein the parameter unification processing includes resolution unification, light direction unification and color tone unification;

[0011] Performing feature extraction on the online portrait information to obtain edge contour features of the preprocessed facial image information, and determining the degree of fit between the preprocessed facial image information and the target image information based on the edge contour features;

[0012] determining whether the online portrait information is qualified based on the degree of fit, and determining a reason for the unqualified status based on the degree of fit when the online portrait information is determined to be unqualified;

[0013] After the reasons for non-conformity are determined, a corresponding correction method is generated based on the determined reasons;

[0014] Generate a corresponding instruction based on the determined correction method, and re-determine the corresponding parameter in the online portrait information generation process according to the corresponding instruction;

[0015] The online portrait information is regenerated based on the determined parameters and a qualified instruction is issued when the generated online portrait information is re-determined to be qualified, and the qualified online portrait information is output.

[0016] Furthermore, the unified processing process of the parameters of the combined portrait information includes:

[0017] After completing the acquisition of the combined portrait information, determining the resolution scaling factor of the facial image information to complete the unified resolution processing of the facial image information and the target image information;

[0018] Correcting the light direction of the facial image information based on the target image information, and performing shadow compensation on the facial image information according to the determined light direction, so as to unify the light directions of the facial image information and the target image information;

[0019] Acquire facial features of the facial image information, and determine deformation magnifications of the facial features to complete fine-tuning of the facial image information, wherein the deformation magnification is the magnification of the edge contour at the corresponding position of the facial image information when it is deformed when merged into the target image information;

[0020] A preset number of pixel points are collected from the facial image information respectively, and the hue of the target image information is determined based on the collected pixel points to complete unified processing of the hues of the facial image information and the target image information, and online portrait information is generated after the unified processing is completed.

[0021] Further, the process of determining whether the generated online portrait information is qualified based on the degree of fit includes:

[0022] Identify and obtain edge contour features of the facial image information in the online portrait information, wherein the edge contour features are edge contours of the facial image information that can be identified in the online portrait information;

[0023] Calculating the ratio of the length of the edge contour feature to the total length of the edge contour of the facial image information, and recording the obtained ratio as the degree of fit;

[0024] The degree of fit is compared with a first preset degree of fit and a second preset degree of fit that are stored in advance, and based on the comparison result, whether the generated online portrait information is qualified is determined, and based on the determination result, based on the number of edge contour features obtained, whether the generated online portrait information is qualified is determined, or the reason for failure is determined based on a degree of fit difference, wherein the degree of fit difference is the difference between the degree of fit and the second preset degree of fit.

[0025] Further, the process of determining whether the online portrait information is qualified based on the number of edge contour features includes:

[0026] Counting the number of edge contour features obtained and comparing the number with a preset number of features;

[0027] According to the comparison result, the reason why the online portrait information is unqualified is determined based on the fit difference, or, based on the feature quantity difference, a correction method for corresponding parameters in the process of fine-tuning the facial image information is determined, wherein the feature quantity difference is the difference between the number of edge contour features and the preset feature number.

[0028] Furthermore, the correction method of determining the facial image information based on the feature quantity difference includes:

[0029] Re-determining the deformation ratio according to the obtained characteristic quantity difference;

[0030] The characteristic quantity difference is compared with a preset quantity difference, and based on the comparison result, the deformation magnification is corrected to a corresponding value using a deformation magnification adjustment coefficient, wherein the characteristic quantity difference is proportional to the reduction range of the deformation magnification.

[0031] Further, the process of determining the reason why the generated online portrait information is unqualified based on the fit difference includes:

[0032] Comparing the obtained fit difference with a preset fit difference;

[0033] and determining the reasons why the online portrait information is unqualified based on the comparison results, including that the light direction unification process does not meet the standards, the color tone unification process does not meet the standards, and the resolution unification process does not meet the standards;

[0034] Determine the corresponding treatment method based on the determined cause, including:

[0035] When it is determined that the reason is that the light direction unification process does not meet the standard, the vertical illumination distance is corrected to a corresponding value based on the physical object contour and the shadow contour in the online portrait information, wherein the vertical illumination distance is the distance between the facial portrait information and the light source in the combined image information in the depth of field direction;

[0036] When it is determined that the reason is that the color tone unification process does not meet the standard, the number of pixels collected is corrected to a corresponding value based on the chromaticity difference value in the online portrait information, wherein the chromaticity difference value is the difference between the chromaticity of the target image information and the chromaticity of the facial image information, and the number of pixels collected is the number of pixels collected from the facial image information when acquiring the online portrait information;

[0037] When it is determined that the reason is that the resolution unification process does not meet the standards, the average spacing of the pixel acquisition points is corrected to a corresponding value based on the resolution difference of the online portrait information, wherein the resolution difference is the difference between the resolution of the target image information and the resolution of the facial image information, and the average spacing of the pixel acquisition points is the average value of the distances between several pixels collected on the facial image information.

[0038] Furthermore, the process of re-determining the vertical illumination distance in the process of unifying the light direction includes:

[0039] reacquiring the online portrait information, and capturing shadow contour information and object contour information from the online portrait information;

[0040] The shadow contour information and the object contour information are paired to generate a plurality of light and shadow contour groups, and feature point matching is performed on a single light and shadow contour group, wherein a single feature point at a corresponding position in the object contour information in the same light and shadow contour group and a single feature point representing the same position in the shadow contour information are recorded as a feature point group belonging to the light and shadow contour group;

[0041] Performing line processing on each of the feature point groups, obtaining the angle between each line and the horizontal line, and correcting the vertical illumination distance according to the variance of each angle;

[0042] The variance is compared with a preset variance, and based on the comparison result, the vertical illumination distance is corrected to a corresponding value using a vertical illumination distance adjustment coefficient, wherein the variance is proportional to the reduction range of the vertical illumination distance.

[0043] Further, the process of re-determining the pixel acquisition quantity in the tone unification process includes:

[0044] Reacquiring the online portrait information, acquiring a chromaticity difference value from the online portrait information, and correcting the pixel acquisition quantity according to the chromaticity difference value;

[0045] The hue difference is compared with a preset chromaticity difference, and based on the comparison result, the pixel acquisition quantity is corrected to a corresponding value using a pixel acquisition quantity adjustment coefficient, wherein the hue difference is proportional to the increase in the pixel acquisition quantity.

[0046] Furthermore, the process of re-determining the average spacing of pixel acquisition points in the resolution unification process includes:

[0047] After completing the correction of the pixel acquisition quantity, correcting the average spacing of the pixel acquisition points according to the resolution difference between the target image information and the facial image information;

[0048] The resolution difference is compared with a preset resolution difference, and based on the comparison result, the average spacing of the pixel acquisition points is corrected to a corresponding value using the average spacing adjustment coefficient of the pixel acquisition points, wherein the resolution difference is proportional to the increase in the average spacing of the pixel acquisition points.

[0049] On the other hand, the present invention also provides an online portrait generation system based on node-based artificial intelligence, comprising:

[0050] A demand customization module, used to receive online portrait generation requirements;

[0051] A scene generation module, which is connected to the demand customization module and is used to generate background image information and portrait posture information;

[0052] A superposition module, connected to the scene generation module, for combining the background image information and the portrait posture information to obtain target image information;

[0053] A cropping module, used for acquiring original image information and cropping facial image information from the original image information;

[0054] a merging module, connected to both the cropping module and the superposition module, and configured to merge the cropped facial image information into the target image information to obtain merged portrait information;

[0055] a preprocessing module connected to the generating module and configured to perform parameter preprocessing on the facial image information in the merged portrait information to obtain online portrait information;

[0056] a recognition module connected to the preprocessing module, for determining the degree of fit between the facial image information and the target image information based on the acquired edge contour feature, wherein the edge contour feature is an edge contour of the facial image information that can be identified in the online portrait information;

[0057] an analysis module connected to the recognition module, and configured to determine whether the generated online portrait information is qualified based on the degree of fit, and to determine the reason for the unqualified status based on the degree of fit when the generated online portrait information is determined to be unqualified, and the analysis module is further configured to generate a corresponding correction method based on the determined reason;

[0058] an instruction generation module connected to the analysis module, for generating corresponding instructions according to the determined correction method, and re-determining corresponding parameters in the online portrait information generation process according to the corresponding instructions;

[0059] An output module is connected to the instruction generation module and is used to output the online portrait information when the online portrait information generated by the analysis module is determined to be qualified.

[0060] Compared with the prior art, the beneficial effect of the online portrait generation method based on node-based artificial intelligence of the present invention is that the present invention determines the target image information by acquiring the generation requirements, and can effectively improve the personalized customization capability in the online portrait generation process while ensuring the style and scene diversification of the subsequent online portrait information. At the same time, the present invention determines whether the generated online portrait information is qualified according to the fit between the facial image information and the target image information, and corrects the corresponding parameters in the generation process based on the determined reasons when it is judged to be unqualified, which can effectively ensure the fit between the portrait and the scene in the subsequently generated online portrait information, thereby effectively improving the generation quality of the online portrait of the present invention.

[0061] Furthermore, the present invention also uniformly processes the facial image information and the target image information in four aspects in turn, namely, resolution, facial features fine-tuning, light angle and hue, thereby further improving the generation quality of the online portrait of the present invention while ensuring the consistency between the facial image information and the target image information.

[0062] Furthermore, the present invention can quickly determine whether the generated online portrait information is qualified by comparing the degree of fit with a first preset degree of fit and a second preset degree of fit that are pre-stored, thereby timely performing parameter correction on the merged portrait information. This effectively avoids the occurrence of inconsistencies in the generated online portrait information due to mismatches in parameter preprocessing, while effectively improving the generation efficiency of the online portrait information and further improving the generation quality of the online portrait information.

[0063] Furthermore, the present invention can also re-determine the facial features in the facial image information by comparing the number of acquired edge contour features with the pre-stored preset feature number, thereby making the determination process for online portrait information more accurate, and determining the correction method for fine-tuning parameters for the facial image information based on the feature number difference, thereby further ensuring the generation quality of online portrait information.

[0064] Furthermore, after determining the correction method of the fine-tuning parameters for the facial image information, each deformation magnification is corrected to a corresponding value through the corresponding deformation magnification adjustment coefficient, thereby improving the correction speed and correction accuracy of the online portrait information.

[0065] Furthermore, the present invention can quickly determine the reason why the generated online portrait information is unqualified by comparing the acquired fit difference with the pre-stored first preset fit difference and second preset fit difference on the basis of determining that the generated online portrait information is unqualified, and re-correct the light direction, color tone, and resolution to unify the corresponding reasons, thereby effectively improving the correction efficiency of the online portrait information.

[0066] Furthermore, the present invention corrects the vertical illumination distance according to the variance of the connecting line angle, so that the light and shadow of the corrected facial image information in the target image information meets the user's needs, thereby ensuring the fit between the facial image information and the target image information, thereby further ensuring the generation quality of the online portrait information.

[0067] Furthermore, the present invention corrects the number of pixel acquisitions according to the chromaticity difference, so that the chromaticity difference between the corrected facial image information and the target image information meets the user's needs, thereby ensuring the fit between the facial image information and the target image information, thereby further ensuring the generation quality of online portrait information.

[0068] Furthermore, the present invention corrects the average spacing of pixel acquisition points according to the resolution difference, so that the resolution when merging the facial image information into the target image information meets the user's needs, thereby ensuring the fit between the facial image information and the target image information, thereby further ensuring the generation quality of the online portrait information.

[0069] The beneficial effect of the online portrait generation system based on node-based artificial intelligence of the present invention is that the system of the present invention is applied to any of the above-mentioned online portrait generation methods based on node-based artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 A schematic diagram of a module of an online portrait generation system based on node-based artificial intelligence of the present invention;

[0071] Figure 2 A flowchart of an online portrait generation method based on node-based artificial intelligence of the present invention;

[0072] Figure 3 A flow chart of determining whether online portrait information is qualified and re-determining the present invention;

[0073] Figure 4 A flowchart of a corresponding correction method for re-determination of the present invention;

[0074] Figure 5 The flowchart of the present invention is used to determine the cause of non-conformity. DETAILED DESCRIPTION

[0075] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0076] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0077] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0078] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0079] See also Figure 1As shown, it is a module schematic diagram of an online portrait generation system based on node-based artificial intelligence according to an embodiment of the present invention, and the system includes the following modules: a demand customization module, a scene generation module, an overlay module, a cropping module, a merging module, a preprocessing module, a recognition module, an analysis module, an instruction generation module, and an output module. Among them, the demand customization module is used to receive online portrait generation requirements; the scene generation module is connected to the demand customization module, and is used to generate background image information and portrait posture information; the overlay module is connected to the scene generation module, and is used to merge the background image information and the portrait posture information to obtain target image information; the cropping module is used to obtain original image information and cut facial image information in the original image information; the merging module is connected to both the cropping module and the overlay module, and is used to merge the cut facial image information into the target image information to obtain merged portrait information; the preprocessing module is connected to the generation module, and is used to perform parameter preprocessing on the facial image information in the merged portrait information to obtain online portrait information; the recognition module is connected to the preprocessing module, and is used to determine the facial image information and the target image information based on the acquired edge contour features. the degree of fit, wherein the edge contour feature is the edge contour of the facial image information that can be identified in the online portrait information; the analysis module is connected to the recognition module, and is used to determine whether the generated online portrait information is qualified based on the degree of fit, and, when the generated online portrait information is determined to be unqualified, determine the reason for the unqualified based on the degree of fit, and the analysis module is also used to generate a corresponding correction method based on the determined reason; the instruction generation module is connected to the analysis module, and is used to generate a corresponding instruction according to the determined correction method, and, according to the corresponding instruction, re-determine the corresponding parameters in the online portrait information generation process, regenerate the online portrait information based on the determined parameters, and issue a qualified instruction when the generated online portrait information is re-determined to be qualified; the output module is connected to the instruction generation module, and is used to output the online portrait information when the analysis module determines that the generated online portrait information is qualified.

[0080] See also Figure 2 As shown, it is a flow chart of an online portrait generation method based on node-based artificial intelligence according to an embodiment of the present invention. The online portrait generation method comprises the following steps:

[0081] S1: Based on the acquired generation requirement control data, the model is trained to generate background image information and portrait posture information;

[0082] S2: merging the background image information and the portrait posture information to obtain target image information;

[0083] S3: acquiring original image information and cutting facial image information in the original image information, and merging the cut facial image information into the target image information to obtain merged portrait information;

[0084] S4: performing parameter unification processing on the combined portrait information to obtain online portrait information, wherein the parameter unification processing includes resolution unification, light direction unification and color tone unification;

[0085] S5: extracting features from the online portrait information to obtain edge contour features of the preprocessed facial image information, and determining the degree of fit between the preprocessed facial image information and the target image information based on the edge contour features;

[0086] S6: determining whether the online portrait information is qualified based on the degree of fit, and determining the reason for the unqualified status based on the degree of fit when the online portrait information is determined to be unqualified;

[0087] S7: After the reasons for non-conformity are determined, a corresponding correction method is generated based on the determined reasons;

[0088] S8: generating a corresponding instruction based on the determined correction method, and re-determining the corresponding parameters in the online portrait information generation process according to the corresponding instruction;

[0089] S9: regenerate the online portrait information based on the determined parameters and issue a qualified instruction when the generated online portrait information is re-determined to be qualified, and output the qualified online portrait information.

[0090] Specifically, when the generated online portrait information is determined to be unqualified, the reasons for the unqualified are analyzed and the corresponding correction methods are generated based on the determined reasons, and then instructions for the corresponding correction methods are generated. According to the corresponding instructions, the parameters in the online portrait information generation process are uniformly processed and readjusted, so as to effectively adjust the fit of the facial image information in the merged image information, so that the generated online portrait information can meet customer needs and ensure the quality of the output online portrait.

[0091] Specifically, in this embodiment, the present invention builds a complete portrait generation workflow based on ComfyUI, generates background image information and portrait posture information through the application of a large model, and uses the ControlNet control technology to adjust the structure and posture of the portrait in the image generation to ensure that the output meets the user's personalized customization needs, such as specific gestures and specific backgrounds, how to merge the background image information with the portrait posture information to obtain the target image information; cut the original image information through the realistic face-changing technology to obtain the facial image information, and merge the facial image information into the target image information through the style transfer technology to obtain the merged portrait information; and then use the LoRA loader to uniformly process the facial image information and the target image information in the merged portrait information to obtain the online portrait information, and use the image enhancement and restoration technology to improve the clarity and details of the generated online portrait information, and judge whether the processed online portrait information is qualified, and the qualified ones are directly output, and the unqualified ones are re-adjusted using the LoRA loader to generate a new online portrait and re-judge until the qualified online portrait information is output. The above-mentioned technologies are all prior arts and will not be repeated here.

[0092] In other embodiments, parameter preprocessing may be performed on the merged portrait information through Prefix-Tun ing; and signal processing may be performed on the clarity and details of the generated online portrait information through an adaptive filtering algorithm technology.

[0093] Furthermore, the unified processing process of the parameters of the combined portrait information includes:

[0094] After completing the acquisition of the combined portrait information, determining the resolution scaling factor of the facial image information to complete the unified resolution processing of the facial image information and the target image information;

[0095] Correcting the light direction of the facial image information based on the target image information, and performing shadow compensation on the facial image information according to the determined light direction, so as to unify the light directions of the facial image information and the target image information;

[0096] Acquire facial features of the facial image information, and determine deformation magnifications of the facial features to complete fine-tuning of the facial image information, wherein the deformation magnification is the magnification of the edge contour at the corresponding position of the facial image information when it is deformed when merged into the target image information;

[0097] A preset number of pixel points are collected from the facial image information respectively, and the hue of the target image information is determined based on the collected pixel points to complete unified processing of the hues of the facial image information and the target image information, and online portrait information is generated after the unified processing is completed.

[0098] See also Figure 3 As shown, it is a flow chart of the method for determining whether online portrait information is qualified and re-determining according to an embodiment of the present invention. The process of determining whether the generated online portrait information is qualified based on the degree of fit includes:

[0099] Identify and obtain edge contour features of the facial image information in the online portrait information, wherein the edge contour features are edge contours of the facial image information that can be identified in the online portrait information;

[0100] Calculating the ratio of the length of the edge contour feature to the total length of the edge contour of the facial image information, and recording the obtained ratio as the degree of fit;

[0101] The degree of fit is compared with a first preset degree of fit and a second preset degree of fit that are stored in advance, and based on the comparison result, whether the generated online portrait information is qualified is determined, and based on the determination result, based on the number of edge contour features obtained, whether the generated online portrait information is qualified is determined, or the reason for failure is determined based on a degree of fit difference, wherein the degree of fit difference is the difference between the degree of fit and the second preset degree of fit.

[0102] Specifically, in this embodiment, the first preset fit degree is assigned a value of 3%, and the second preset fit degree is assigned a value of 5%. When the fit degree is less than or equal to the first preset fit degree, the generated online portrait information is determined to be qualified, and a qualified instruction is issued;

[0103] When the degree of fit is greater than a first preset degree of fit and less than or equal to a second preset degree of fit, determining whether the generated online portrait information is qualified based on the number of edge contour features obtained;

[0104] When the degree of fit is greater than a second preset degree of fit, the generated online portrait information is determined to be unqualified.

[0105] In other embodiments, the first preset degree of fit and the second preset degree of fit are assigned values ​​according to customer needs and are not limited here.

[0106] Furthermore, in the embodiment of the present invention, the process of determining whether the online portrait information is qualified based on the number of edge contour features includes:

[0107] Counting the number of edge contour features obtained and comparing the number with a preset number of features;

[0108] According to the comparison result, the reason why the online portrait information is unqualified is determined based on the fit difference, or, based on the feature quantity difference, a correction method for corresponding parameters in the process of fine-tuning the facial image information is determined, wherein the feature quantity difference is the difference between the number of edge contour features and the preset feature number.

[0109] Specifically, in this embodiment, the number of preset features is set to 7, and when the number of edge contour features is less than or equal to the number of preset features, the online portrait information is determined to be unqualified;

[0110] When the number of edge contour features is greater than the preset number of features, it is determined that the fine-tuning of the facial image information does not meet the standard.

[0111] In other embodiments, the number of preset features is assigned according to customer needs and is not limited here.

[0112] See also Figure 4 As shown, it is a flowchart of the corresponding correction method when the method of the embodiment of the present invention is re-determined, and the correction method for determining facial image information based on the feature quantity difference includes:

[0113] Re-determining the deformation ratio according to the obtained characteristic quantity difference;

[0114] Comparing the characteristic quantity difference with the preset quantity difference, and correcting the deformation magnification to a corresponding value using a deformation magnification adjustment coefficient based on the comparison result, wherein the characteristic quantity difference is proportional to the reduction range of the deformation magnification;

[0115] Specifically, the larger the feature quantity difference is, the larger the reduction range of the deformation magnification is. In this embodiment, the preset quantity difference is set to a first preset quantity difference and a second preset quantity difference, the first preset quantity difference is assigned a value of 2, and the second preset quantity difference is assigned a value of 4. If the feature quantity difference is less than or equal to the first preset quantity difference, each deformation magnification is corrected to 0.8 times the initial value;

[0116] If the feature quantity difference is greater than the first preset quantity difference and less than or equal to the second preset quantity difference, then the deformation magnification of each deformation is corrected to 0.5 times the initial value;

[0117] If the feature quantity difference is greater than the second preset quantity difference, the deformation magnification of each shape is corrected to 0.2 times the initial value;

[0118] The difference in the number of features between the facial image information and the target image information in the online portrait information is adjusted by correcting the deformation ratio, thereby solving the problem of facial image information generated during the fine-tuning process.

[0119] In other embodiments, the first preset number difference and the second preset number difference may also be adjusted to other values ​​according to the input image information, which are not specifically limited here. Similarly, the adjustment coefficients for each deformation magnification may also be adjusted according to user needs.

[0120] See also Figure 5 As shown, it is a flow chart of the method for determining the unqualified reason according to an embodiment of the present invention. The process of determining the unqualified reason of the generated online portrait information based on the fit difference includes:

[0121] Comparing the obtained fit difference with a preset fit difference;

[0122] and determining the reasons why the online portrait information is unqualified based on the comparison results, including that the light direction unification process does not meet the standards, the color tone unification process does not meet the standards, and the resolution unification process does not meet the standards;

[0123] Determine the corresponding treatment method based on the determined cause, including:

[0124] When it is determined that the reason is that the light direction unification process does not meet the standard, the vertical illumination distance is corrected to a corresponding value based on the physical object contour and the shadow contour in the online portrait information, wherein the vertical illumination distance is the distance between the facial portrait information and the light source in the combined image information in the depth of field direction;

[0125] When it is determined that the reason is that the color tone unification process does not meet the standard, the number of pixels collected is corrected to a corresponding value based on the chromaticity difference value in the online portrait information, wherein the chromaticity difference value is the difference between the chromaticity of the target image information and the chromaticity of the facial image information, and the number of pixels collected is the number of pixels collected from the facial image information when acquiring the online portrait information;

[0126] When it is determined that the reason is that the resolution unification process does not meet the standards, the average spacing of the pixel acquisition points is corrected to a corresponding value based on the resolution difference of the online portrait information, wherein the resolution difference is the difference between the resolution of the target image information and the resolution of the facial image information, and the average spacing of the pixel acquisition points is the average value of the distances between several pixels collected on the facial image information.

[0127] Specifically, in this embodiment, the preset fit difference is set to a first preset fit difference and a second preset fit difference, the first preset fit difference is assigned a value of 2%, and the second preset fit difference is assigned a value of 4%. When the fit difference is less than or equal to the first preset fit difference, it is determined that the reason why the generated online portrait information is unqualified is that the light direction unification process for the facial image information does not meet the standard;

[0128] When the fit difference is greater than a first preset fit difference and less than or equal to a second preset fit difference, determining that the reason why the generated online portrait information is unqualified is that the tone unification process for the facial image information does not meet the standard;

[0129] When the fit difference is greater than the second preset fit difference, it is determined that the reason why the online portrait information is unqualified is that the resolution unification process for the facial image information does not meet the standard.

[0130] In other embodiments, the first preset fit difference value and the second preset fit difference value may also be set to other values ​​according to customer requirements, which are not specifically limited here.

[0131] Furthermore, the process of re-determining the vertical illumination distance in the process of unifying the light direction includes:

[0132] Re-acquire the online portrait information, and capture the shadow outline information and the physical outline information from the online portrait information;

[0133] reacquiring the online portrait information, and capturing shadow contour information and object contour information from the online portrait information;

[0134] The shadow contour information and the object contour information are paired to generate a plurality of light and shadow contour groups, and feature point matching is performed on a single light and shadow contour group, wherein a single feature point at a corresponding position in the object contour information in the same light and shadow contour group and a single feature point representing the same position in the shadow contour information are recorded as a feature point group belonging to the light and shadow contour group;

[0135] Performing line processing on each of the feature point groups, obtaining the angle between each line and the horizontal line, and correcting the vertical illumination distance according to the variance of each angle;

[0136] The variance is compared with a preset variance, and based on the comparison result, the vertical illumination distance is corrected to a corresponding value using a vertical illumination distance adjustment coefficient, wherein the variance is proportional to the reduction range of the vertical illumination distance.

[0137] Specifically, the larger the variance is, the greater the reduction in the vertical illumination distance is. In this embodiment, the preset variance is set to a first preset variance and a second preset variance, the first preset variance is assigned a value of 30°, and the second preset variance is assigned a value of 60°. If the variance is less than or equal to the first preset variance, each vertical illumination distance is corrected to 0.8 times the initial value;

[0138] If the variance is greater than the first preset variance and less than or equal to the second preset variance, each vertical illumination distance is corrected to 0.5 times the initial value;

[0139] If the variance is greater than the second preset variance, each vertical illumination distance is corrected to 0.2 times of the initial value;

[0140] The vertical illumination distance is corrected to adjust the light direction unification process of the facial image information in the online portrait information in the target image information, so that the adjusted online portrait information meets the output condition.

[0141] In other embodiments, the first preset variance and the second preset variance may also be adjusted to other values ​​according to the input image information, which are not specifically limited here. Similarly, the adjustment coefficient for each vertical illumination distance may also be adjusted according to user needs.

[0142] Furthermore, the process of re-determining the number of pixels collected in the process of tone unification includes:

[0143] Reacquiring the online portrait information, acquiring a chromaticity difference value from the online portrait information, and correcting the pixel acquisition quantity according to the chromaticity difference value;

[0144] The hue difference is compared with a preset chromaticity difference, and based on the comparison result, the pixel acquisition quantity is corrected to a corresponding value using a pixel acquisition quantity adjustment coefficient, wherein the hue difference is proportional to the increase in the pixel acquisition quantity.

[0145] Specifically, the larger the chromaticity difference value is, the greater the increase in the number of pixels collected is. In this embodiment, the preset chromaticity difference value is set to a first preset chromaticity difference value and a second preset chromaticity difference value, the first preset chromaticity difference value is assigned a value of 0.4, and the second preset chromaticity difference value is assigned a value of 0.6. If the chromaticity difference value is less than or equal to the first preset chromaticity difference, the number of pixels collected is corrected to 1 times the initial value;

[0146] If the chromaticity difference is greater than the first preset hue difference and less than or equal to the second preset chromaticity difference, the number of pixels collected is corrected to twice the initial value;

[0147] If the chromaticity difference is greater than the second preset hue difference, the number of pixels collected is corrected to three times the initial value;

[0148] The tone unification process between the facial image information and the target image information in the online portrait information is adjusted by correcting the number of pixel acquisition, so that the adjusted online portrait information meets the output condition.

[0149] In other embodiments, the first preset hue difference value and the second preset hue difference value may also be adjusted to other values ​​according to the input image information, which is not specifically limited here. Similarly, the adjustment coefficient for each pixel acquisition quantity may also be adjusted according to user needs.

[0150] Furthermore, the process of re-determining the average spacing of pixel acquisition points in the process of unifying the resolution includes:

[0151] After completing the correction of the pixel acquisition quantity, correcting the average spacing of the pixel acquisition points according to the resolution difference between the target image information and the facial image information;

[0152] The resolution difference is compared with a preset resolution difference, and based on the comparison result, the average spacing of the pixel acquisition points is corrected to a corresponding value using the average spacing adjustment coefficient of the pixel acquisition points, wherein the resolution difference is proportional to the increase in the average spacing of the pixel acquisition points.

[0153] Specifically, the larger the resolution difference is, the greater the increase in the average spacing of the pixel acquisition points is. In this embodiment, the preset resolution difference is set to a first preset resolution difference and a second preset resolution difference, the first preset resolution difference is assigned a value of 1 million, and the second preset resolution difference is assigned a value of 6 million. If the resolution difference is less than or equal to the first preset resolution difference, the average spacing of each pixel acquisition point is corrected to 1 times the initial value;

[0154] If the resolution difference is greater than the first preset resolution difference and less than or equal to the second preset resolution difference, the average spacing of each pixel acquisition point is corrected to twice the initial value;

[0155] If the resolution difference is greater than the second preset resolution difference, the average spacing of each pixel acquisition point is corrected to 3 times the initial value;

[0156] The resolution unification process between the facial image information and the target image information in the online portrait information is adjusted by correcting the average spacing of the pixel acquisition points, so that the adjusted online portrait information meets the output conditions.

[0157] In other embodiments, the first preset resolution difference and the second preset resolution difference may also be adjusted to other values ​​according to the input image information, which is not specifically limited here. Similarly, the adjustment coefficient for the average spacing of each pixel acquisition point may also be adjusted according to user needs.

[0158] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0159] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An online portrait generation method based on node-based artificial intelligence, characterized in that: include: Based on the acquired generation demand control data, the model is trained to generate background image information and portrait posture information; Combining the background image information and the portrait posture information to obtain target image information; Acquire original image information and cut facial image information in the original image information, and merge the cut facial image information into the target image information to acquire merged portrait information; Performing parameter unification processing on the combined portrait information to obtain online portrait information, wherein the parameter unification processing includes resolution unification, light direction unification and color tone unification; Performing feature extraction on the online portrait information to obtain edge contour features of the preprocessed facial image information, and determining the degree of fit between the preprocessed facial image information and the target image information based on the edge contour features; determining whether the online portrait information is qualified based on the degree of fit, and determining a reason for the unqualified status based on the degree of fit when the online portrait information is determined to be unqualified; After the reasons for non-conformity are determined, a corresponding correction method is generated based on the determined reasons; Generate a corresponding instruction based on the determined correction method, and re-determine the corresponding parameter in the online portrait information generation process according to the corresponding instruction; The online portrait information is regenerated based on the determined parameters and a qualified instruction is issued when the generated online portrait information is re-determined to be qualified, and the qualified online portrait information is output.

2. The online portrait generation method based on node-based artificial intelligence according to claim 1, characterized in that: The unified processing process of the parameters of the combined portrait information includes: After completing the acquisition of the combined portrait information, determining the resolution scaling factor of the facial image information to complete the unified resolution processing of the facial image information and the target image information; Correcting the light direction of the facial image information based on the target image information, and performing shadow compensation on the facial image information according to the determined light direction, so as to unify the light directions of the facial image information and the target image information; Acquire facial features of the facial image information, and determine deformation magnifications of the facial features to complete fine-tuning of the facial image information, wherein the deformation magnification is the magnification of the edge contour at the corresponding position of the facial image information when it is deformed when merged into the target image information; A preset number of pixel points are collected from the facial image information respectively, and the hue of the target image information is determined based on the collected pixel points to complete unified processing of the hues of the facial image information and the target image information, and online portrait information is generated after the unified processing is completed.

3. The online portrait generation method based on node-based artificial intelligence according to claim 2, characterized in that: The process of determining whether the generated online portrait information is qualified based on the degree of fit includes: Identify and obtain edge contour features of the facial image information in the online portrait information, wherein the edge contour features are edge contours of the facial image information that can be identified in the online portrait information; Calculating the ratio of the length of the edge contour feature to the total length of the edge contour of the facial image information, and recording the obtained ratio as the degree of fit; The degree of fit is compared with a first preset degree of fit and a second preset degree of fit that are stored in advance, and based on the comparison result, whether the generated online portrait information is qualified is determined, and based on the determination result, based on the number of edge contour features obtained, whether the generated online portrait information is qualified is determined, or the reason for failure is determined based on a degree of fit difference, wherein the degree of fit difference is the difference between the degree of fit and the second preset degree of fit.

4. The online portrait generation method based on node-based artificial intelligence according to claim 3 is characterized in that: The process of determining whether the online portrait information is qualified based on the number of edge contour features includes: Counting the number of edge contour features obtained and comparing the number with a preset number of features; According to the comparison result, the reason why the online portrait information is unqualified is determined based on the fit difference, or the correction method of the corresponding parameters in the fine-tuning process of the facial image information is determined based on the feature quantity difference, wherein the feature quantity difference is the difference between the number of the edge contour features and the preset feature number.

5. The online portrait generation method based on node-based artificial intelligence according to claim 4 is characterized in that: The correction method of determining the facial image information based on the feature quantity difference includes: Re-determining the deformation ratio according to the obtained characteristic quantity difference; The characteristic quantity difference is compared with a preset quantity difference, and based on the comparison result, the deformation magnification is corrected to a corresponding value using a deformation magnification adjustment coefficient, wherein the characteristic quantity difference is proportional to the reduction range of the deformation magnification.

6. The online portrait generation method based on node-based artificial intelligence according to claim 3, characterized in that: The process of determining the reason why the generated online portrait information is unqualified based on the fit difference includes: Comparing the obtained fit difference with a preset fit difference; and determining the reasons why the online portrait information is unqualified based on the comparison results, including that the light direction unification process does not meet the standards, the color tone unification process does not meet the standards, and the resolution unification process does not meet the standards; Determine the corresponding treatment method based on the determined cause, including: When it is determined that the reason is that the light direction unification process does not meet the standard, the vertical illumination distance is corrected to a corresponding value based on the physical object contour and the shadow contour in the online portrait information, wherein the vertical illumination distance is the distance between the facial portrait information and the light source in the combined image information in the depth of field direction; When it is determined that the reason is that the color tone unification process does not meet the standard, the number of pixels collected is corrected to a corresponding value based on the chromaticity difference value in the online portrait information, wherein the chromaticity difference value is the difference between the chromaticity of the target image information and the chromaticity of the facial image information, and the number of pixels collected is the number of pixels collected from the facial image information when acquiring the online portrait information; When it is determined that the reason is that the resolution unification process does not meet the standards, the average spacing of the pixel acquisition points is corrected to a corresponding value based on the resolution difference of the online portrait information, wherein the resolution difference is the difference between the resolution of the target image information and the resolution of the facial image information, and the average spacing of the pixel acquisition points is the average value of the distances between several pixels collected on the facial image information.

7. The online portrait generation method based on node-based artificial intelligence according to claim 6, characterized in that: The process of re-determining the vertical illumination distance in the process of unifying the light direction includes: reacquiring the online portrait information, and capturing shadow contour information and object contour information from the online portrait information; The shadow contour information and the object contour information are paired to generate a plurality of light and shadow contour groups, and feature point matching is performed on a single light and shadow contour group, wherein a single feature point at a corresponding position in the object contour information in the same light and shadow contour group and a single feature point representing the same position in the shadow contour information are recorded as a feature point group belonging to the light and shadow contour group; Performing line processing on each of the feature point groups, obtaining the angle between each line and the horizontal line, and correcting the vertical illumination distance according to the variance of each angle; The variance is compared with a preset variance, and based on the comparison result, the vertical illumination distance is corrected to a corresponding value using a vertical illumination distance adjustment coefficient, wherein the variance is proportional to the reduction range of the vertical illumination distance.

8. The online portrait generation method based on node-based artificial intelligence according to claim 6, characterized in that: The process of re-determining the pixel acquisition quantity in the tone unification process includes: Reacquiring the online portrait information, acquiring a chromaticity difference value from the online portrait information, and correcting the pixel acquisition quantity according to the chromaticity difference value; The hue difference is compared with a preset chromaticity difference, and based on the comparison result, the pixel acquisition quantity is corrected to a corresponding value using a pixel acquisition quantity adjustment coefficient, wherein the hue difference is proportional to the increase in the pixel acquisition quantity.

9. The online portrait generation method based on node-based artificial intelligence according to claim 8, characterized in that: The process of re-determining the average spacing of the pixel acquisition points in the resolution unification process includes: After completing the correction of the pixel acquisition quantity, correcting the average spacing of the pixel acquisition points according to the resolution difference between the target image information and the facial image information; The resolution difference is compared with a preset resolution difference, and based on the comparison result, the average spacing of the pixel acquisition points is corrected to a corresponding value using the average spacing adjustment coefficient of the pixel acquisition points, wherein the resolution difference is proportional to the increase in the average spacing of the pixel acquisition points.

10. An online portrait generation system based on node-based artificial intelligence, characterized in that: The method for generating an online portrait based on node-based artificial intelligence as claimed in any one of claims 1 to 9 comprises: A demand customization module, used to receive online portrait generation requirements; A scene generation module, which is connected to the demand customization module and is used to generate background image information and portrait posture information; A superposition module, connected to the scene generation module, for combining the background image information and the portrait posture information to obtain target image information; A cropping module, used for acquiring original image information and cropping facial image information from the original image information; a merging module, connected to both the cropping module and the superposition module, and configured to merge the cropped facial image information into the target image information to obtain merged portrait information; a preprocessing module connected to the generating module and configured to perform parameter preprocessing on the facial image information in the merged portrait information to obtain online portrait information; a recognition module connected to the preprocessing module, for determining the degree of fit between the facial image information and the target image information based on the acquired edge contour feature, wherein the edge contour feature is an edge contour of the facial image information that can be identified in the online portrait information; an analysis module connected to the recognition module, and configured to determine whether the generated online portrait information is qualified based on the degree of fit, and to determine the reason for the unqualified status based on the degree of fit when the generated online portrait information is determined to be unqualified, and the analysis module is further configured to generate a corresponding correction method based on the determined reason; an instruction generation module connected to the analysis module, for generating corresponding instructions according to the determined correction method, and re-determining corresponding parameters in the online portrait information generation process according to the corresponding instructions; An output module is connected to the instruction generation module and is used to output the online portrait information when the online portrait information generated by the analysis module is determined to be qualified.

Citation Information

Patent Citations

  • Method and device for modeling picture figure

    CN104899825A

  • Face fusion model training method and device and electronic equipment

    CN111598818A

  • Face pose migration method and device based on video driving

    CN113808005A

  • Portrait generation model training method and device, computer equipment and storage medium

    CN117557688A

  • Training method of image generation model and related device

    CN118072127A