Image real-time interaction generation method based on portrait diffusion data model

Through the real-time image interaction generation method based on the portrait diffusion data model, the problem of insufficient selection of portrait generation model and image generation evaluation and analysis is solved, and more accurate image generation and stable interactive experience are achieved, ensuring the improvement of image generation quality and user experience .

CN119168845AInactive Publication Date: 2024-12-20FEIWU (SHANGHAI) CREATIVE DESIGN CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411277944.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing image generation methods have shortcomings in portrait generation model selection and image generation evaluation and analysis, resulting in the quality of generated cartoon portraits that are unstable and cannot meet specific needs, and cannot accurately understand the user's interactive experience.

Method used

Using the real-time image interaction generation method based on the portrait diffusion data model, through portrait acquisition, generation selection, popularity ranking, feature revision, interaction acquisition and interaction evaluation steps, the gender and age group are detected according to the tourists' face images, the style type is selected, and the style type is generated. and sort the face model, conduct real-time image interaction processing reaction analysis, obtain the rapidity, timeliness and stability of processing reactions, and calculate and feedback the evaluation index of real-time image interaction.

Benefits of technology

It improves the accuracy and service quality of image generation, ensures that users have a good experience in real-time image interaction, avoids bad situations such as lag, and improves the stability and adaptability of image generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168845A_ABST
    Figure CN119168845A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to an image real-time interaction generation method based on a portrait diffusion data model, which comprises the following steps: S1, portrait acquisition; s2, generating a selection; s3, ranking popularity; s4, revising the features; s5, interactive acquisition; according to the method, face models are generated according to style types selected by tourists, the number of times of use of the face models is obtained, popularity recommendation indexes of the face models are obtained by combining the gender and the age group of the tourists, the popularity recommendation indexes are sorted and displayed to the tourists, individual feature revision is carried out on the preliminary portrait images to obtain portrait images, and the portrait images are displayed to the tourists. According to the image real-time interaction processing reaction rapid degree, timeliness and stability analysis, the evaluation index of the image real-time interaction is obtained and fed back, the comprehensive performance of the image real-time interaction can be comprehensively evaluated, it is ensured that the image real-time interaction reaches a certain quality standard, and the user experience is 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, and in particular to a real-time interactive image generation method based on a portrait diffusion data model. Background Art

[0002] With the continuous development of science and technology and the advancement of computer technology, people's demand for image generation and processing is increasing. Traditional image generation methods often have limitations and cannot meet the increasingly diversified and personalized requirements.

[0003] In this context, the diffusion data model came into being, which provides a new idea and method for image generation. It can achieve rapid generation and allow users to see the generated results in a short time. In terms of interaction, users can influence the appearance and style of the generated image by adjusting various parameters and providing different feature descriptions, thereby achieving personalized creation. This technology has broad application prospects in the fields of digital art, virtual image design, film and television special effects, etc., and provides new possibilities and tools for creative expression and visual presentation.

[0004] For example, the existing Chinese patent with publication number CN202211525194.8 discloses the construction of a cartoon portrait generation model and an image processing method, device and equipment. This scheme obtains a first latent space vector by inputting a baseline cartoon portrait into a general portrait generation model, and generates a real cartoon portrait based on the target cartoon portrait generation model by extracting style features, performing portrait segmentation, extracting local and global latent space features, etc., which can achieve accurate processing and transformation of the portrait, making the generated cartoon portrait more in line with expectations and improving the quality and level of image production.

[0005] However, the above patent has the following problems: First, the solution obtains the first latent space vector by inputting the baseline cartoon portrait into the general portrait generation model, but does not involve the selection of the portrait generation model. Different portrait generation models differ in performance, effect, etc., which may cause the quality of the final generated cartoon portrait to be unstable, or fail to meet specific needs and expectations well.

[0006] Second, this solution does not involve evaluation and analysis of image generation, and may not be able to accurately understand the user experience when interacting with images, such as whether the smoothness, convenience, and accuracy of the interaction have reached a good level, which is not conducive to judging the effectiveness and feasibility of the solution in practical applications. Summary of the invention

[0007] In order to overcome the shortcomings of the background technology, an embodiment of the present invention provides a real-time interactive image generation method based on a portrait diffusion data model, which can effectively solve the problems involved in the above-mentioned background technology.

[0008] The purpose of the present invention can be achieved through the following technical solutions: a real-time interactive image generation method based on a portrait diffusion data model, the method comprising the following steps: S1. Portrait acquisition: used to capture the facial images of tourists in real time and extract the key features of the face from them, the key features of the face including the face shape and the position and shape of each facial organ.

[0009] S2. Generate selection: Detect the gender and age group of tourists based on their facial images, and select the style type through voice.

[0010] S3. Popularity ranking: Generate each face model according to the style type selected by the tourist, obtain the number of times each face model is used, and analyze the popularity recommendation index of each face model based on the gender and age group of the tourist, sort them and display them to the tourist.

[0011] S4. Feature revision: Generate a preliminary portrait image based on the style type and face model selected by the tourist, and revise the individual features of the preliminary portrait image to generate a portrait image.

[0012] S5. Interaction acquisition: read the records of each historical image processing, and analyze the processing response speed T, timeliness θ, and stability δ of the real-time interaction of the image.

[0013] S6. Interaction evaluation: Based on the rapidity of the processing response, timeliness, and stability of the real-time image interaction, an evaluation index of the real-time image interaction is obtained and feedback is provided.

[0014] Preferably, the specific analysis method of the portrait collection is as follows: the first step is to capture the portrait of the tourist in real time by a camera to obtain the portrait of the tourist.

[0015] In the second step, the tourist face is extracted from the tourist portrait and recorded as the tourist facial image.

[0016] The third step is to take the midpoints of the upper and lower edges of the tourist's facial image, connect them to get a vertical reference line, and at the same time connect the tourist's eyes in the tourist's facial image, which is recorded as the tourist's eye connection line.

[0017] The fourth step is to adjust the angle of the tourist's face until the line connecting the tourist's eyes is perpendicular to the vertical reference line, and record the tourist's facial image after the angle adjustment as the tourist's facial image.

[0018] Preferably, the specific analysis method of the key features of the face is as follows: the first step is to read the facial image of the tourist, extract the facial contour of the tourist from the facial image of the tourist by edge detection technology, measure the face width and face length of the tourist in the facial contour of the tourist, obtain the length-to-width ratio of the tourist's face by dividing the face width and face length of the tourist, and simultaneously read the corresponding length-to-width ratio of each face shape from the management database, compare the length-to-width ratio of the tourist's face with the corresponding length-to-width ratio of each face shape, and obtain the face shape corresponding to the length-to-width ratio of the tourist's face, which is recorded as the tourist's face shape.

[0019] In the second step, the midpoint of each facial organ is used as the feature point to locate the feature point of each facial organ of the tourist, and the position of each facial organ of the tourist is obtained. The edge contour of each facial organ of the tourist is extracted by edge detection technology, and it is separated separately and recorded as the image of each facial organ of the tourist. The preset images of each facial organ and each shape are read from the management database, and the images of each facial organ of the tourist are compared with the preset images of each facial organ and each shape to obtain the shape of each facial organ of the tourist.

[0020] Preferably, the specific analysis method for generating the selection is as follows: the first step is to read the facial image of the tourist, identify the face of the tourist and obtain the gender of the tourist.

[0021] The second step is to determine the approximate age of the tourists and match the approximate age of the tourists according to the set age segments to obtain the age groups of the tourists.

[0022] The third step is to select the style type by voice.

[0023] The fourth step is to generate multiple face models according to the style type selected by the tourists, which are recorded as individual face models.

[0024] Preferably, the specific analysis method of the popularity ranking is as follows: the first step is to read the gender of the tourist, and compare the gender of each face model with the gender of the tourist. If the gender of a face model is the same as the gender of the tourist, the gender conformity of the face model is recorded as 1, otherwise it is 0, and the gender conformity of each face model is counted and recorded as σ i , i represents the number of the i-th face model, i = 1, 2, ..., n.

[0025] The second step is to read the maximum age and minimum age corresponding to the age group of the tourists, and at the same time obtain the predicted age group of each face model, and obtain the maximum age and minimum age corresponding to the predicted age group of each face model. The maximum age and minimum age corresponding to the age group of the tourists are compared with the maximum age and minimum age corresponding to the predicted age group of each face model to obtain the length of the age range that overlaps the tourists and each face model, which is recorded as L. i , through the formula Age consistency of each face model ε i, L' i Represents the predicted age range length of each face model.

[0026] The third step is to obtain the number of times each face model is used from the management database, recorded as N i , substituting it into the formula Get the popularity recommendation index γ of each face model i , φ1, φ2, φ3 represent the weight factors of the number of times the set face model is used, gender conformity, and age conformity, respectively, and n represents the number of face models, which are sorted in descending order and displayed to tourists.

[0027] Preferably, the specific analysis method for the feature revision is as follows: the first step is to read the face model selected by the user, and input the tourist's face shape and the shapes of various facial organs into the face model selected by the user to generate a preliminary portrait image.

[0028] In the second step, the individual features of the preliminary portrait images are revised according to the tourists’ preferences.

[0029] The third step is to read the preliminary person image after the individual features are revised and record it as a portrait image.

[0030] Preferably, the specific analysis method of the processing response speed of the real-time interactive image is as follows: reading the records of each historical image processing from the management database, extracting the time point of inputting the image into the system and the time point of outputting the processed image from each historical image record, and obtaining the processing time of each historical image processing by calculating the time difference, which is recorded as t m , m represents the number of the mth image processing in history, m = 1, 2, ..., q, and the average processing time of the historical image processing is obtained by averaging the processing time of each historical image processing. Substituting this into the formula The processing response speed T of the real-time interactive image is obtained, and q represents the number of historical image processing times.

[0031] Preferably, the specific analysis method of the timeliness of the real-time interaction of the image is: divide the time period according to the set time length, and classify the records of each historical image processing according to the set time period, record it as each image processing in each historical time period, read the processing time of each historical image processing, and extract the processing time of each image processing in each historical time period, record it as t mx , x represents the number of the xth period, x=1,2,...,y, and the processing time of each image processing in each historical period is averaged to obtain the processing time of each image processing in each historical period, which is recorded as Substituting this into the formula The timeliness θ of real-time interaction of images is obtained, where q represents the number of historical image processing times and y represents the number of time periods.

[0032] Preferably, the specific analysis method of the stability of the real-time interaction of the image is as follows: the first step is to read the images output by each historical image processing, record them as each interactive portrait, read the resolution size of each interactive portrait, and record the pixel amounts in the horizontal direction and the vertical direction as , substituting it into the formula The resolution stability of the interactive portraits ξ is obtained, and q represents the number of interactive portraits.

[0033] In the second step, the face part of each interactive portrait is extracted separately by edge detection technology to determine it as the signal part of each interactive portrait, and the rest is recorded as the noise part of each interactive portrait. The signal part of each interactive portrait and the noise part of each interactive portrait are grayed, and the gray value of each pixel is detected, which is recorded as j represents the number of the jth pixel, j = 1, 2, ..., k. The average grayscale value of each interactive portrait signal part is obtained by averaging the grayscale values ​​of each pixel in each interactive portrait signal part, which is recorded as Substituting this into the formula Get the gray value variance of each interactive portrait signal k represents the number of pixels. The variance of the grayscale value of the noise part of each interactive portrait is obtained by analyzing the variance of the grayscale value of each interactive portrait signal part, which is recorded as

[0034] The third step is to use the formula The stability δ of the real-time interaction of the image is obtained, and μ1 and μ2 represent the weight factors of the set resolution stability and signal-to-noise ratio, respectively.

[0035] Preferably, the specific analysis method of the interaction evaluation is: respectively read the processing response rapidity T, timeliness θ, and stability δ of the real-time image interaction, substitute them into the formula χ=T*η1+θ*η2+δ*η3 to obtain the evaluation index χ of the real-time image interaction, η1, η2, η3 respectively represent the weight factors of the set processing response rapidity, timeliness, and stability, compare the evaluation index of the real-time image interaction with the preset evaluation index threshold, if the evaluation index of the real-time image interaction is greater than or equal to the preset evaluation index threshold, it indicates that the evaluation index of the real-time image interaction is qualified, if the evaluation index of the real-time image interaction is less than the preset evaluation index threshold, it indicates that the evaluation index of the real-time image interaction is unqualified, and feedback is given.

[0036] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects: 1. The present invention detects the gender and age group of tourists based on their facial images, selects the style type through voice, provides more suitable content according to the gender and age group of tourists, and improves service accuracy.

[0037] 2. The present invention generates various face models according to the style type selected by the tourist, obtains the number of times each face model is used, and obtains the popularity recommendation index of each face model in combination with the facial image of the tourist, sorts them and displays them to the tourist, so as to facilitate the tourist to quickly find a more popular model that may be suitable for him / her.

[0038] 3. The present invention obtains an evaluation index of real-time image interaction based on the rapidity, timeliness and stability of the processing response of real-time image interaction, and provides feedback to ensure that users have a good experience during the real-time image interaction process without any adverse situations such as lag. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.

[0040] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0041] Figure 2 for Figure 1 Schematic diagram of the method flow chart of step S1 in FIG.

[0042] Figure 3 for Figure 1 Schematic diagram of the method flow chart of step S2 in FIG.

[0043] Figure 4 for Figure 1 Schematic diagram of the method flow of step S4 in FIG. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] See also Figure 1As shown, the present invention provides a real-time interactive image generation method based on a portrait diffusion data model, the method comprising the following steps: S1. Portrait acquisition: used to capture the facial image of a tourist in real time and extract key features of the face therefrom, the key features of the face including the face shape and the position and shape of each facial organ.

[0046] See also Figure 2 As shown, the specific analysis method of portrait collection is: the first step is to capture the portrait of the tourist in real time through the camera to obtain the portrait of the tourist; the tourist information can be quickly obtained to better meet the needs of tourists and improve service efficiency and quality.

[0047] The second step is to extract the tourist's face from the tourist's portrait and record it as the tourist's facial image; this facilitates the provision of more personalized services and experiences based on facial images.

[0048] The third step is to take the midpoints of the upper and lower edges of the tourist's facial image, connect them to get a vertical reference line, and at the same time connect the tourist's eyes in the tourist's facial image, which is recorded as the tourist's eye connection line; this helps to more accurately analyze the symmetry, expression and other features of the tourist's face.

[0049] The fourth step is to adjust the angle of the tourist's face until the line connecting the tourist's eyes is perpendicular to the vertical reference line, and record the tourist's facial image after the angle adjustment as the tourist's facial image; ensuring that the recognition of the tourist's face in different situations has higher consistency and accuracy.

[0050] The specific analysis method of the key features of the face is as follows: the first step is to read the facial image of the tourist, extract the facial contour of the tourist from the facial image of the tourist by edge detection technology, measure the face width and face length of the tourist in the facial contour of the tourist, obtain the length-to-width ratio of the tourist's face by dividing the face width and face length of the tourist, and at the same time read the length-to-width ratio corresponding to each face shape from the management database, compare the length-to-width ratio of the tourist's face with the length-to-width ratio of each face shape, obtain the face shape corresponding to the length-to-width ratio of the tourist's face, and record it as the tourist's face shape; this is convenient for giving tourists more interaction and attention that fits their own characteristics, thereby enhancing the tourist experience.

[0051] In the second step, the midpoint of each facial organ is used as the feature point to locate the feature point of each facial organ of the tourist, and the position of each facial organ of the tourist is obtained. The edge contour of each facial organ of the tourist is extracted by edge detection technology, and it is separated separately and recorded as the image of each facial organ of the tourist. The preset images of each facial organ and each shape are read from the management database, and the images of each facial organ of the tourist are compared with the preset images of each facial organ and each shape to obtain the shape of each facial organ of the tourist; personalized services or suggestions can be provided according to the characteristics of different facial organ shapes.

[0052] It should be noted that the specific analysis method of the shapes of the facial organs of the tourists is as follows: read the preset images of the shapes of the facial organs from the management database, resize the images of the facial organs of the tourists to make them the same size as the images of the shapes of the facial organs, overlap the images of the facial organs of the tourists with the preset images of the shapes of the facial organs, and obtain the overlapping length of the contours of the facial organs of the tourists with the images of the shapes, which is recorded as L. af ,f represents the number of the f-th shape image, f=1,2,...,l, substitute it into the formula Get the similarity ω between each facial organ of the tourist and each shape image af , and the maximum value is selected to obtain the maximum value of the similarity between each facial organ of the tourist and each shape image, and the shape corresponding to the shape image is recorded as the shape of each facial organ of the tourist; this helps to more accurately identify and distinguish the facial features of different tourists, provide a more accurate basis for the intelligent interactive system, and enhance the interactive effect.

[0053] S2. Generate selection: Detect the gender and age group of tourists based on their facial images, and select the style type through voice.

[0054] See also Figure 3 As shown, the specific analysis method for generating the selection is: the first step is to read the facial image of the tourist, identify the face of the tourist to obtain the gender of the tourist, and quickly obtain the gender of the tourist.

[0055] The second step is to determine the approximate age of the tourists and match the approximate age of the tourists according to the set age segments to obtain the age groups of the tourists. Clarifying the age stage of the tourists will help select a more suitable face model based on the age group of the tourists.

[0056] The third step is to select the style type through voice; this allows tourists to choose a specific style based on their preferences and get a more satisfying experience.

[0057] The fourth step is to generate multiple face models according to the style type selected by the tourists, which are recorded as individual face models; tourists can obtain unique face models according to their favorite styles to enhance their personalized experience.

[0058] S3. Popularity ranking: Generate each face model according to the style type selected by the tourist, obtain the number of times each face model is used, and analyze the popularity recommendation index of each face model based on the gender and age group of the tourist, sort them and display them to the tourist.

[0059] The specific analysis method of the popularity ranking is as follows: the first step is to read the gender of the tourist and compare the gender of each face model with the gender of the tourist. If the gender of a face model is the same as the gender of the tourist, the gender consistency of the face model is recorded as 1, otherwise it is 0. The gender consistency of each face model is counted and recorded as σ i , i represents the number of the i-th face model, i=1,2,...,n; it can better provide face models that meet the expectations of tourists according to their gender and improve the accuracy of services.

[0060] The second step is to read the maximum age and minimum age corresponding to the age group of the tourists, and at the same time obtain the predicted age group of each face model, and obtain the maximum age and minimum age corresponding to the predicted age group of each face model. The maximum age and minimum age corresponding to the age group of the tourists are compared with the maximum age and minimum age corresponding to the predicted age group of each face model to obtain the length of the age range that overlaps the tourists and each face model, which is recorded as L. i , through the formula Age consistency of each face model ε i , L' i Indicates the predicted age range length of each face model; can provide tourists with face models that are more consistent with their actual age range, improving the accuracy of adaptation.

[0061] It should be noted that the specific analysis method of the length of the age range overlapped between the tourists and each face model is as follows: read the age group of the tourists, record the maximum age and the minimum age corresponding to the age group of the tourists as A and B respectively. max , A min At the same time, read the predicted age range of each face model, and record the maximum age and minimum age corresponding to the predicted age range of each face model as A' imax , A' imin , compare the maximum age and minimum age corresponding to the age group of tourists with the maximum age and minimum age corresponding to the predicted age group of each face model. If A min ≥A' imax And A max ≤A' imin , it means that there is an overlap between the age group of tourists and the predicted age group of each face model. i =min(A min ,A' imin )-max(A max ,A' imax ) Get the length L of the age range that overlaps with each face model i .

[0062] The third step is to obtain the number of times each face model is used from the management database, recorded as N i, substituting it into the formula Get the popularity recommendation index γ of each face model i , φ1, φ2, φ3 represent the weight factors of the number of times the set face model is used, gender conformity, and age conformity, respectively, and n represents the number of face models. They are sorted in order from large to small and displayed to tourists; providing tourists with model recommendations that better meet their needs and preferences, thereby improving the accuracy of recommendations.

[0063] It should be noted that in a specific embodiment, φ1 can be set to 0.2, φ2 can be set to 0.4, and φ3 can be set to 0.4. Accurate gender and age judgment is critical for many application scenarios (such as precision marketing, social interaction, etc.). If the model performs poorly in this regard, it may seriously affect its value and popularity. Therefore, the weights corresponding to gender conformity and age conformity are relatively high.

[0064] S4. Feature revision: Generate a preliminary portrait image based on the style type and face model selected by the tourist, and revise the individual features of the preliminary portrait image to generate a portrait image.

[0065] See also Figure 4 As shown, the specific analysis method for feature revision is: the first step is to read the face model selected by the user, input the tourist's face shape and the shapes of various facial organs into the face model selected by the user to generate a preliminary portrait image; so that the user can quickly see the preliminary effect of combining the model selected by the user with his own features.

[0066] The second step is to revise the individual features of the preliminary portrait image according to the preferences of the tourists; the individual features can be adjusted completely according to the preferences of the tourists to obtain the portrait that best suits their wishes.

[0067] It should be noted that the individual characteristics include hairstyle, skin color, and facial expression.

[0068] The third step is to read the preliminary image of the person after the individual features are revised and record it as a portrait image; the revised final portrait is saved in the form of a picture for subsequent use and viewing.

[0069] S5. Interaction acquisition: read the records of each historical image processing, and analyze the processing response speed T, timeliness θ, and stability δ of the real-time interaction of the image.

[0070] The specific analysis method of the processing response speed of the real-time interactive image is as follows: read the records of each historical image processing from the management database, extract the time point of inputting the image into the system and the time point of outputting the processed image from each historical image record, and obtain the processing time of each historical image processing by calculating the time difference, which is recorded as t m, m represents the number of the mth image processing in history, m = 1, 2, ..., q, and the average processing time of the historical image processing is obtained by averaging the processing time of each historical image processing. Substituting this into the formula The processing response speed T of real-time image interaction is obtained, and q represents the number of historical image processing times; the time spent on each image processing is clearly understood, so as to evaluate the efficiency of system processing, which helps to improve the user experience in real-time image interaction in a targeted manner.

[0071] The specific analysis method of the timeliness of the real-time interaction of the image is as follows: divide the time period according to the set time length, and classify the records of each historical image processing according to the set time period, record them as each image processing in each historical time period, read the processing time of each historical image processing, and extract the processing time of each image processing in each historical time period, record them as t mx , x represents the number of the xth period, x=1,2,...,y, and the processing time of each image processing in each historical period is averaged to obtain the processing time of each image processing in each historical period, which is recorded as Substituting this into the formula The timeliness θ of real-time image interaction is obtained, where q represents the number of historical image processing times and y represents the number of time periods. This provides a more detailed understanding of the efficiency of image processing in different time periods, and helps to discover the law of changes in image processing efficiency over time, so as to better respond to the needs of different scenarios.

[0072] The specific analysis method of the stability of the real-time interaction of the image is as follows: the first step is to read the images output by each historical image processing, record them as each interactive portrait, read the resolution size of each interactive portrait, and record the number of pixels in the horizontal direction and the vertical direction as Substituting this into the formula The resolution stability of the interactive portraits ξ is obtained, and q represents the number of interactive portraits. Abnormal fluctuations in resolution can be discovered in time for adjustment and optimization to ensure that the resolution of the output image remains at a stable level and the consistency of image quality is guaranteed.

[0073] In the second step, the face part of each interactive portrait is extracted separately by edge detection technology to determine it as the signal part of each interactive portrait, and the rest is recorded as the noise part of each interactive portrait. The signal part of each interactive portrait and the noise part of each interactive portrait are grayed, and the gray value of each pixel is detected, which is recorded as j represents the number of the jth pixel, j = 1, 2, ..., k. The average grayscale value of each interactive portrait signal part is obtained by averaging the grayscale values ​​of each pixel in each interactive portrait signal part, which is recorded as Substituting this into the formula Get the gray value variance of each interactive portrait signal k represents the number of pixels. The variance of the grayscale value of the noise part of each interactive portrait is obtained by analyzing the variance of the grayscale value of each interactive portrait signal part, which is recorded as Data such as the average grayscale value and grayscale value variance help to understand the characteristics of facial signals more accurately and improve the accuracy of subsequent processing.

[0074] The third step is to use the formula The stability δ of the real-time interaction of the image is obtained, and μ1 and μ2 represent the weight factors of the set resolution stability and signal-to-noise ratio respectively; ensuring that the image interaction meets a certain standard in terms of stability and improving the overall quality.

[0075] It should be noted that in a specific embodiment, μ1 can be set to 0.5, and μ2 can be set to 0.5. The stability of resolution is more critical because it directly affects the clarity and detail of the image. If the resolution is unstable, the image may be blurred and unclear, seriously affecting the interactive experience. The signal-to-noise ratio is also very important. It reflects the ratio of image signal to noise. A higher signal-to-noise ratio means better image quality and less interference, which also has a greater impact on the stability of real-time image interaction. If the signal-to-noise ratio is poor, problems such as image noise and distortion may occur, which will also interfere with the interaction. Therefore, the weights corresponding to the resolution stability and signal-to-noise ratio are equal.

[0076] S6. Interaction evaluation: Based on the rapidity of the processing response, timeliness, and stability of the real-time image interaction, an evaluation index of the real-time image interaction is obtained and feedback is provided.

[0077] The specific analysis method of the interaction evaluation is: respectively read the processing response rapidity T, timeliness θ, and stability δ of the image real-time interaction, substitute them into the formula χ=T*η1+θ*η2+δ*η3 to obtain the evaluation index χ of the image real-time interaction, η1, η2, η3 respectively represent the set weight factors of the processing response rapidity, timeliness, and stability, compare the evaluation index of the image real-time interaction with the preset evaluation index threshold, if the evaluation index of the image real-time interaction is greater than or equal to the preset evaluation index threshold, it means that the evaluation index of the image real-time interaction is qualified, if the evaluation index of the image real-time interaction is less than the preset evaluation index threshold, it means that the evaluation index of the image real-time interaction is unqualified, and feedback is given; it can comprehensively evaluate the comprehensive performance of the image real-time interaction, ensure that the image real-time interaction reaches a certain quality standard, and improve the user experience.

[0078] It should be noted that, in a specific embodiment, η1 can be set to 0.2, η2 can be set to 0.4, and η3 can be set to 0.4. Stability is usually more important because if the system is unstable and frequently fails or fluctuates, it will greatly affect the user experience and even cause the interaction to fail. Timeliness is also relatively important. Real-time image interaction has strict time requirements. If it cannot respond and present in time, users will feel delayed and unsmooth, reducing satisfaction. The speed of processing response is slightly less important than the first two, but it still has a direct impact on the smoothness and efficiency of the interaction. Therefore, the weights corresponding to timeliness and stability are relatively high.

[0079] The present invention generates various face models according to the style type selected by tourists, obtains the number of times each face model is used, and obtains the popularity recommendation index of each face model in combination with the gender and age group of tourists, sorts them and displays them to tourists, and obtains the portrait image by revising the individual characteristics of the preliminary portrait image, obtains the evaluation index of the real-time image interaction according to the rapidity, timeliness and stability of the processing response of the real-time image interaction, and provides feedback on it, which can comprehensively evaluate the comprehensive performance of the real-time image interaction, ensure that the real-time image interaction reaches a certain quality standard, and improve the user experience.

[0080] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention and they are still covered by the protection scope of the present invention.

Claims

1. A real-time interactive image generation method based on a portrait diffusion data model, characterized in that: The steps include: S1. Portrait collection: used to capture the facial images of tourists in real time and extract the key features of the face, including the face shape and the position and shape of each facial organ; S2. Generate selection: detect the gender and age group of tourists based on their facial images, and select the style type through voice; S3. Popularity ranking: Generate each face model according to the style type selected by the tourist, obtain the number of times each face model is used, and analyze the popularity recommendation index of each face model based on the gender and age group of the tourist, sort them and display them to the tourist; S4. Feature revision: Generate a preliminary portrait image based on the style type and face model selected by the tourist, and revise the individual features of the preliminary portrait image to generate a portrait image; S5. Interaction acquisition: read the records of each historical image processing, analyze and obtain the processing response speed T, timeliness θ, and stability δ of the real-time interaction of the image; S6. Interaction evaluation: Based on the rapidity of the processing response, timeliness, and stability of the real-time image interaction, an evaluation index of the real-time image interaction is obtained and feedback is provided.

2. The method for real-time interactive generation of images based on a portrait diffusion data model according to claim 1, characterized in that: The specific analysis method of the portrait collection is as follows: The first step is to capture the portrait of the tourist in real time through the camera to obtain the portrait of the tourist; The second step is to extract the tourist face from the tourist portrait and record it as the tourist facial image; The third step is to take the midpoints of the upper and lower edges of the tourist's facial image, connect them to get a vertical reference line, and connect the tourist's eyes in the tourist's facial image, which is recorded as the tourist's eye connection line; The fourth step is to adjust the angle of the tourist's face until the line connecting the tourist's eyes is perpendicular to the vertical reference line, and record the tourist's facial image after the angle adjustment as the tourist's facial image.

3. The real-time interactive image generation method based on the portrait diffusion data model according to claim 2, characterized in that: The specific analysis method of the key features of the face is: The first step is to read the facial image of the tourist, extract the facial contour of the tourist from the facial image of the tourist by edge detection technology, measure the width and length of the face of the tourist in the facial contour of the tourist, obtain the length-to-width ratio of the face of the tourist by dividing the width and length of the face of the tourist, and read the length-to-width ratio corresponding to each face shape from the management database, compare the length-to-width ratio of the face of the tourist with the length-to-width ratio corresponding to each face shape, and obtain the face shape corresponding to the length-to-width ratio of the face of the tourist, which is recorded as the face shape of the tourist; In the second step, the midpoint of each facial organ is used as the feature point to locate the feature point of each facial organ of the tourist, and the position of each facial organ of the tourist is obtained. The edge contour of each facial organ of the tourist is extracted by edge detection technology, and it is separated separately and recorded as the image of each facial organ of the tourist. The preset images of each facial organ and each shape are read from the management database, and the images of each facial organ of the tourist are compared with the preset images of each facial organ and each shape to obtain the shape of each facial organ of the tourist.

4. The real-time interactive image generation method based on the portrait diffusion data model according to claim 3 is characterized in that: The specific analysis method for generating the selection is: The first step is to read the tourist's face image and identify the tourist's face to obtain the tourist's gender; The second step is to determine the approximate age of the tourists and match the approximate age of the tourists according to the set age segments to obtain the age groups of the tourists; The third step is to select the style type by voice; The fourth step is to generate multiple face models according to the style type selected by the tourists, which are recorded as individual face models.

5. The real-time interactive image generation method based on the portrait diffusion data model according to claim 4 is characterized in that: The specific analysis method of the heat ranking is: The first step is to read the gender of the tourist and compare the gender of each face model with the gender of the tourist. If the gender of a face model is the same as the gender of the tourist, the gender consistency of the face model is recorded as 1, otherwise it is 0. The gender consistency of each face model is calculated and recorded as σ i , i represents the number of the i-th face model, i = 1, 2, ..., n; The second step is to read the maximum age and minimum age corresponding to the age group of the tourists, and at the same time obtain the predicted age group of each face model, and obtain the maximum age and minimum age corresponding to the predicted age group of each face model. The maximum age and minimum age corresponding to the age group of the tourists are compared with the maximum age and minimum age corresponding to the predicted age group of each face model to obtain the length of the age range that overlaps the tourists and each face model, which is recorded as L. i , through the formula Age consistency of each face model ε i , L' i Represents the predicted age range length of each face model. The third step is to obtain the number of times each face model is used from the management database, recorded as N i , substituting it into the formula Get the popularity recommendation index γ of each face model i , φ1, φ2, φ3 represent the weight factors of the number of times the set face model is used, gender conformity, and age conformity, respectively, and n represents the number of face models, which are sorted in descending order and displayed to tourists.

6. The real-time interactive image generation method based on the portrait diffusion data model according to claim 5, characterized in that: The specific analysis method of the feature revision is: The first step is to read the face model selected by the user, input the tourist's face shape and the shapes of various facial organs into the face model selected by the user to generate a preliminary portrait image; The second step is to revise the individual features of the preliminary portrait images according to tourists’ preferences; The third step is to read the preliminary person image after the individual features are revised and record it as a portrait image.

7. The real-time interactive image generation method based on the portrait diffusion data model according to claim 1, characterized in that: The specific analysis method of the processing response speed of the real-time interaction of the image is as follows: Read the records of each historical image processing from the management database, extract the time point of inputting the image into the system and the time point of outputting the processed image from each historical image record, and obtain the processing time of each historical image processing by taking the time difference, recorded as t m , m represents the number of the mth image processing in history, m = 1, 2, ..., q, and the average processing time of the historical image processing is obtained by averaging the processing time of each historical image processing. Substituting this into the formula The processing response speed T of the real-time interactive image is obtained, and q represents the number of historical image processing times.

8. The real-time interactive image generation method based on the portrait diffusion data model according to claim 1, characterized in that: The specific analysis method of the timeliness of the real-time interaction of the images is as follows: Divide the time period according to the set time length, and classify the records of each historical image processing according to the set time period, record it as each image processing in each historical time period, read the processing time of each historical image processing, and extract the processing time of each image processing in each historical time period, record it as t mx , x represents the number of the xth period, x=1,2,...,y, and the processing time of each image processing in each historical period is averaged to obtain the processing time of each image processing in each historical period, which is recorded as Substituting this into the formula The timeliness θ of real-time interaction of images is obtained, where q represents the number of historical image processing times and y represents the number of time periods.

9. The real-time interactive image generation method based on the portrait diffusion data model according to claim 1, characterized in that: The specific analysis method of the stability of the real-time interaction of the images is as follows: The first step is to read the images output by each historical image processing, record them as each interactive portrait, read the resolution size of each interactive portrait, and record the number of pixels in the horizontal and vertical directions as Substituting this into the formula The resolution stability of the interactive portraits ξ is obtained, and q represents the number of interactive portraits; In the second step, the face part of each interactive portrait is extracted separately by edge detection technology to determine it as the signal part of each interactive portrait, and the rest is recorded as the noise part of each interactive portrait. The signal part of each interactive portrait and the noise part of each interactive portrait are grayed, and the gray value of each pixel is detected, which is recorded as j represents the number of the jth pixel, j = 1, 2, ..., k. The average grayscale value of each interactive portrait signal part is obtained by averaging the grayscale values ​​of each pixel in each interactive portrait signal part, which is recorded as Substituting this into the formula Get the gray value variance of each interactive portrait signal k represents the number of pixels. The variance of the grayscale value of the noise part of each interactive portrait is obtained by analyzing the variance of the grayscale value of each interactive portrait signal part, which is recorded as The third step is to use the formula The stability δ of the real-time interaction of the image is obtained, and μ1 and μ2 represent the weight factors of the set resolution stability and signal-to-noise ratio, respectively.

10. The real-time interactive image generation method based on the portrait diffusion data model according to claim 9, characterized in that: The specific analysis method of the interactive evaluation is as follows: The processing response rapidity T, timeliness θ, and stability δ of the image real-time interaction are read respectively, and substituted into the formula χ=T*η1+θ*η2+δ*η3 to obtain the evaluation index χ of the image real-time interaction, where η1, η2, and η3 respectively represent the weight factors of the set processing response rapidity, timeliness, and stability. The evaluation index of the image real-time interaction is compared with the preset evaluation index threshold. If the evaluation index of the image real-time interaction is greater than or equal to the preset evaluation index threshold, it means that the evaluation index of the image real-time interaction is qualified. If the evaluation index of the image real-time interaction is less than the preset evaluation index threshold, it means that the evaluation index of the image real-time interaction is unqualified, and feedback is given.

Citation Information

Patent Citations

  • An image processing method and a mobile terminal

    CN109167914A

  • Age and gender attribute analysis method, system and device for face 2D image, and medium

    CN110532970A

  • Virtual image rendering method, device and system, electronic equipment, medium and product

    CN116137080A

  • Artificial intelligence interaction method and artificial intelligence interaction system

    CN117690416A

  • Method, device and equipment for constructing cartoon human image generation model and image processing method and device

    CN118154705A