An AI simulation method and system for facial cosmetic surgery based on the Internet

Through the Internet-based facial cosmetic plastic surgery AI simulation method, using AI technology and cloud resources, the problems of insufficient realism, nature and personalization in the existing technology are solved, and high-quality postoperative effect simulation and personalized plastic surgery solutions are achieved, improving the accuracy of user experience and surgical planning.

CN119381006BActive Publication Date: 2025-05-13THE FIRST MEDICAL CENT CHINESE PLA GENERAL HOSPITAL
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411958758.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing facial beauty plastic surgery simulation tools have obvious shortcomings in terms of reality, nature and personalization. They rely on local computing resources and have slow processing speeds, so they cannot make full use of the big data resources in the cloud and advanced AI algorithms.

Method used

It provides an AI simulation method for facial cosmetic plastic surgery based on the Internet. It receives the original facial images uploaded by users through an interactive platform, uses AI technology to identify key facial features, combines cloud case database to generate historical plastic surgery cases, and uses variational autoencoder and generative adversarial network technology to simulate the postoperative effect to ensure the realism and nature of the simulated image, and allows users to customize processing and combines feedback from medical institutions to generate detailed plastic surgery guidance plans.

Benefits of technology

It improves the authenticity and nature of the simulation results, provides a personalized plastic surgery plan, enhances user participation and satisfaction, helps users and doctors better plan surgical plans, and reduces the risk of surgery and the possibility of postoperative disputes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119381006B_ABST
    Figure CN119381006B_ABST
Patent Text Reader

Abstract

The present application provides an AI simulation method and system for facial cosmetic surgery based on the Internet. Among them, the original facial image is received through an interactive platform; based on AI technology, the key feature point information of the user's face is identified and located from the original facial image to generate matching historical plastic surgery cases; based on the matching historical plastic surgery cases, the variational autoencoder technology is used to analyze and process the preoperative images and postoperative images to generate personalized change rules for facial plastic surgery; the generative adversarial network technology is used to simulate the postoperative effect and generate a postoperative effect simulation image; based on the postoperative effect simulation image, combined with the feedback from medical institutions, a detailed plastic surgery guidance plan is generated. The technical solution of the present application can enhance the user experience and personalized service level, and improve the realism and naturalness of the postoperative effect simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of facial simulation technology, and in particular to an AI simulation method and system for facial cosmetic surgery based on the Internet. Background Art

[0002] With the development of Internet technology and the improvement of people's aesthetic awareness, the demand for facial cosmetic surgery is growing. Users hope to understand their appearance after different plastic surgery in a convenient way so as to make more informed choices. This demand has given rise to an urgent need for facial cosmetic surgery simulation technology, which requires the technology to not only provide a highly realistic preview of the postoperative effect, but also have good interactivity and personalized customization capabilities.

[0003] There are already some facial cosmetic surgery simulation software on the market. Most of these software are based on traditional image processing technology, such as simple image overlay or filter effects to simulate postoperative effects. Although they can satisfy users' curiosity to a certain extent, they are obviously insufficient in terms of realism, naturalness and personalization. Some advanced simulation tools have begun to try to use AI technology, such as deep learning models, to improve the realism of simulation effects. However, these tools often rely on local computing resources, have slow processing speeds, and cannot fully utilize cloud-based big data resources and advanced AI algorithms.

[0004] Most of the existing facial cosmetic surgery simulation tools use simple image processing technology, and the generated postoperative effect simulation images lack realism and naturalness, and cannot accurately reflect the actual postoperative effects; the services provided by most existing tools are relatively general, lack personalized processing capabilities for individual characteristics, and users cannot make detailed adjustments to the simulated images according to their specific needs; existing simulation tools usually lack interactive mechanisms with professional medical institutions, and cannot generate detailed surgical guidance plans based on the professional opinions of doctors, resulting in users lacking sufficient reference information when making decisions; many existing tools rely on local computing resources, have slow processing speeds, and cannot achieve real-time or fast image processing and feedback, affecting user experience. Summary of the invention

[0005] The embodiments of the present application provide an AI simulation method and system for facial cosmetic surgery based on the Internet, so as to solve the obvious deficiencies in the sense of reality, naturalness and personalization in the prior art.

[0006] In a first aspect, the present application provides an AI simulation method for facial cosmetic surgery based on the Internet, comprising:

[0007] receiving an original facial image uploaded by a user through an interactive platform;

[0008] Based on AI technology, the key feature point information of the user's face is identified and located from the original facial image, and combined with the cloud case database, a matching historical plastic surgery case is generated;

[0009] Based on the matched historical plastic surgery cases, the preoperative images and postoperative images are analyzed and processed using variational autoencoder technology to extract the nonlinear change pattern of facial structure and generate the personalized change law of facial plastic surgery;

[0010] Based on the personalized change law of facial plastic surgery, the generative adversarial network technology is used to simulate the postoperative effect of the original facial image, ensure the realism and naturalness of the simulated image, and generate a simulated image of the postoperative effect;

[0011] Based on the simulated image of the postoperative effect, the user is allowed to customize the facial features of the image, and a detailed plastic surgery guidance plan is generated in combination with feedback from medical institutions.

[0012] In a second aspect, the embodiment of the present application provides an AI simulation system for facial cosmetic surgery based on the Internet, comprising:

[0013] A receiving module, used for receiving an original facial image uploaded by a user through an interactive platform;

[0014] A recognition module, which is used to identify and locate key feature point information of the user's face from the original facial image based on AI technology, and generate matching historical plastic surgery cases in combination with a cloud case database;

[0015] An analysis module, for analyzing and processing preoperative images and postoperative images based on the matched historical plastic surgery cases by using variational autoencoder technology, extracting nonlinear change patterns of facial structures, and generating personalized change rules for facial plastic surgery;

[0016] A simulation module, for simulating the postoperative effect of the original facial image based on the personalized change law of facial plastic surgery and using generative adversarial network technology to ensure the realism and naturalness of the simulated image and generate a simulated image of the postoperative effect;

[0017] A generation module is used to simulate images based on the postoperative effects, allowing users to customize the facial features of the images and generate detailed plastic surgery guidance plans in combination with feedback from medical institutions.

[0018] In an embodiment of the present application, an original facial image uploaded by a user is received through an interactive platform; based on AI technology, key feature point information of the user's face is identified, located and processed from the original facial image, and matched historical plastic surgery cases are generated in combination with a cloud case database; based on the matched historical plastic surgery cases, the preoperative images and postoperative images are analyzed and processed using variational autoencoder technology to extract nonlinear change patterns of facial structure and generate personalized change laws for facial plastic surgery; based on the personalized change laws for facial plastic surgery, the postoperative effect of the original facial image is simulated using generative adversarial network technology to ensure the realism and naturalness of the simulated image and generate a simulated image of the postoperative effect; based on the simulated image of the postoperative effect, the user is allowed to customize the facial features of the image, and a detailed plastic surgery guidance plan is generated in combination with feedback from medical institutions. Through the interactive platform, users can intuitively upload their own facial images and participate in the customized processing of postoperative effects, which improves user participation and satisfaction; AI technology is used to accurately identify and locate key facial feature points, and the cloud case database is combined to generate matching historical plastic surgery cases to provide each user with a personalized plastic surgery plan; variational autoencoder technology is used to analyze the nonlinear change pattern of facial structure, and generative adversarial network technology is combined to generate simulated images of postoperative effects, which greatly improves the realism and naturalness of the simulation results; based on the simulated images of postoperative effects and combined with feedback from professional medical institutions, detailed plastic surgery guidance plans are generated to help doctors and patients reach a consensus on surgical plans; users can preview possible postoperative effects through simulated images before surgery, help set reasonable expectations, reduce dissatisfaction caused by discrepancies between expectations and actual effects, and thus reduce surgical risks; it integrates advanced AI technology and rich medical expertise to provide innovative technical means and service models for the field of facial cosmetic surgery, which helps promote technological innovation and service quality improvement in the industry.

[0019] By standardizing the pre-operative and post-operative images in the matched historical plastic surgery cases, the variational autoencoder technology is used to capture deep features, identify the main nonlinear change patterns, generate effective facial structure change patterns, and combine multiple historical cases for comprehensive analysis to generate personalized change laws for facial plastic surgery. Through standardization and variational autoencoder technology, the deep features in the image are captured, the main nonlinear change patterns are identified, and effective facial structure change patterns are generated, ensuring the high accuracy and reliability of the simulation results; comprehensive analysis and refinement are combined with multiple historical plastic surgery cases to generate personalized change laws for facial plastic surgery, providing each user with a highly personalized plastic surgery plan that can better meet the specific needs of different users and improve user satisfaction and trust; new facial structure change examples are generated through variational autoencoder technology, allowing users to preview and adjust postoperative effects more intuitively. Users can freely customize simulated images on the platform, increasing user participation and interactivity and improving overall user experience. Experience; the generated personalized change rules of facial plastic surgery are combined with feedback from professional medical institutions to generate detailed plastic surgery guidance plans, which help doctors and patients reach a consensus on surgical plans, reduce misunderstandings and disputes caused by information asymmetry, and improve the effectiveness of doctor-patient communication; users can preview possible postoperative effects through simulated images before surgery, help set reasonable expectations, and reduce dissatisfaction caused by discrepancies between expectations and actual effects, thereby reducing surgical risks and the possibility of postoperative disputes; it integrates advanced variational autoencoder technology and rich medical resources, and provides innovative technical means and service models for the field of facial cosmetic surgery, which helps promote technological innovation in the industry and improve service quality, and provide users with higher quality services.

[0020] Based on the personalized change rules of facial plastic surgery, the generative adversarial network technology is used to simulate the postoperative effects of the original facial images to ensure the realism and naturalness of the simulated images; by constructing the input data of the generative adversarial network, the generator is used to generate preliminary simulated images of the postoperative effects, and the discriminator is used to evaluate the realism and naturalness of these images, and optimization suggestions are given; after a continuous optimization process, the performance of the generator and the discriminator is improved, and ultimately high-quality simulated images of the postoperative effects can be generated. Through generative adversarial network technology, subtle changes in facial features are learned and applied to ensure that the generated simulated images of postoperative effects have high accuracy and realism; the discriminator is used to evaluate the realism and naturalness of the preliminary simulated images, and the generator performance is optimized through feedback to ensure the naturalness of the final simulated images, so that users can preview the postoperative effects more intuitively; users can obtain more accurate and satisfactory simulated images of postoperative effects through multiple iterative optimizations, improve user participation and satisfaction, and enhance user trust; the generated simulated images of postoperative effects combined with feedback from professional medical institutions are helpful for doctors and patients to reach a consensus on surgical plans, reduce misunderstandings and disputes caused by information asymmetry, and improve the effectiveness of doctor-patient communication; users can preview possible postoperative effects through simulated images before surgery, help set reasonable expectations, reduce dissatisfaction caused by discrepancies between expectations and actual effects, and thus reduce surgical risks and the possibility of postoperative disputes; this method integrates advanced generative adversarial network technology and abundant medical resources, provides innovative technical means and service models for the field of facial cosmetic surgery, helps promote technological innovation and service quality improvement in the industry, and provides users with higher quality services.

[0021] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 A flowchart of an AI simulation method for facial cosmetic surgery based on the Internet provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of the structure of an AI simulation system for facial cosmetic surgery based on the Internet provided in an embodiment of the present application;

[0025] Figure 3A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0027] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

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

[0029] Figure 1 A flowchart of an AI simulation method for facial cosmetic surgery based on the Internet is provided for the embodiment of the present application, such as Figure 1 As shown, the method includes:

[0030] 101. Receive an original facial image uploaded by a user through an interactive platform;

[0031] Users upload their facial photos through an interactive platform, which can be a web page or a mobile application, allowing users to upload photos anytime, anywhere.

[0032] 102. Based on AI technology, identify and locate key feature point information of the user's face from the original facial image, and generate matching historical plastic surgery cases in combination with the cloud case database;

[0033] Use AI technology (such as deep learning models) to identify and locate key feature points such as eyes, nose, mouth, chin, etc. from uploaded facial images. Accurate identification of these feature points is the basis for subsequent processing; combined with a large database of historical plastic surgery cases stored in the cloud, a feature matching algorithm is used to find historical plastic surgery cases that are most similar to the user's facial features. These matched cases will serve as the basis for subsequent analysis and simulation.

[0034] 103. Based on the matched historical plastic surgery cases, the preoperative images and postoperative images are analyzed and processed using variational autoencoder technology to extract the nonlinear change pattern of facial structure and generate personalized change rules of facial plastic surgery;

[0035] The variational autoencoder technology is used to analyze and process the pre-operative and post-operative images in the matching historical plastic surgery cases. Through standardization, the size and format of all images are ensured to be consistent. The variational autoencoder technology is used to capture the deep features in the image and generate facial information feature vectors. A comparative analysis is performed in the latent space of the variational autoencoder to identify the main nonlinear change patterns and generate facial structure change patterns. A comprehensive analysis is performed based on multiple historical cases to generate personalized change rules for facial plastic surgery and generate personalized plastic surgery plans for each user.

[0036] Optionally, the step 103, based on the matched historical plastic surgery cases, uses variational autoencoder technology to analyze and process preoperative images and postoperative images, extracts nonlinear change patterns of facial structures, and generates personalized change rules for facial plastic surgery, including:

[0037] Using preprocessing technology, standardizing the size and format of the preoperative images and postoperative images in the matched historical plastic surgery cases to obtain a standardized image pair, wherein the standardized image pair includes a standardized preoperative image and a standardized postoperative image;

[0038] Based on the standardized image pair, using variational autoencoder technology to capture deep features in the image and generate a facial information feature vector;

[0039] Based on the facial information feature vector, performing comparative analysis processing in the latent space of the variational autoencoder, identifying the main nonlinear change pattern of the standardized image pair, and generating a facial structure change pattern;

[0040] Based on the facial structure change pattern, a new facial structure change example is generated by a decoder part of a variational autoencoder technology to obtain an effective facial structure change pattern;

[0041] Based on the effective facial structure change pattern, combined with multiple historical plastic surgery cases, comprehensive analysis and refinement are carried out to generate personalized change rules for facial plastic surgery.

[0042] Suppose a user uploads a facial photo, and the system needs to generate a personalized facial plastic surgery plan;

[0043] The system finds the historical plastic surgery cases that best match the user's facial features from the cloud case database; pre-processes the pre-operative and post-operative images of these matching historical plastic surgery cases, including resizing and format conversion, to generate standardized image pairs; uses variational autoencoder technology to process the standardized image pairs, extracts deep features in the images, and generates facial information feature vectors, such as generating a 128-dimensional feature vector for one image; compares and analyzes the generated facial information feature vectors in the latent space of the variational autoencoder to identify major nonlinear change patterns, such as identifying major change patterns such as nose height and eye spacing by calculating the difference between pre-operative and post-operative feature vectors; based on the identified facial structure change patterns, generates new facial structure change examples through the decoder part of the variational autoencoder, such as generating a new image to show the effect of the user's nose being raised; based on the facial structure change examples, combined with data from multiple historical plastic surgery cases, performs comprehensive analysis and refinement processing to generate personalized facial plastic surgery change rules.

[0044] Through the above steps, the system finally generates a detailed and personalized facial plastic surgery plan to help users and doctors better plan surgical plans.

[0045] This application considers that the formula is used to calculate the comprehensive distance metric between the preoperative and postoperative feature vectors. Identifying the nonlinear change pattern between the preoperative and postoperative images is a complex and important task. Traditional linear methods have difficulty capturing complex facial structure changes. By introducing weight matrices and nonlinear distance metric methods, the importance of feature vectors can be enhanced, thereby more accurately identifying the main nonlinear change patterns.

[0046] Optionally, based on the facial information feature vector, performing comparative analysis processing in the latent space of the variational autoencoder, identifying the main nonlinear change pattern of the standardized image pair, and generating the facial structure change pattern, including:

[0047] Introducing the weight matrix and nonlinear distance measurement methods to enhance the importance of feature vectors and perform weighted representation and comparative analysis of feature vectors in latent space;

[0048] The difference between the feature vectors before and after the operation is calculated to obtain the change vector Δz, and the nonlinear function f is used to process the change vector. The weight matrix A and the bias vector b are introduced to adjust the change vector and identify the main nonlinear change mode.

[0049] The comprehensive distance metric between the preoperative and postoperative feature vectors is calculated using the following formula:

[0050] ;

[0051] in, is the comprehensive distance measure between the preoperative and postoperative feature vectors; and are the facial information feature vectors before and after surgery, respectively; is a weight matrix used to emphasize the importance of certain features; is the covariance matrix, which is used to describe the correlation between eigenvectors; is the inverse matrix of the covariance matrix; is a parameter that controls the decay speed of the exponential term; Represents matrix transpose; is the natural exponential function; is the norm of the vector;

[0052] The change vector processed by the nonlinear function is calculated using the following calculation formula:

[0053] ;

[0054] in, is the change vector processed by nonlinear function; and are the facial information feature vectors before and after surgery, respectively; is a weight matrix used to emphasize the importance of certain features; is a transformation matrix used to adjust the dimensions of the change vector; is the bias vector, used to adjust the baseline of the change vector; is a nonlinear function, such as ReLU function or other complex activation functions; and To control the weight and scaling factor of the hyperbolic tangent term; and Parameters that control the weight and decay rate of the exponential term; is the hyperbolic tangent function; is the natural exponential function; is the norm of the vector;

[0055] Based on the change vector processed by the nonlinear function , combining the features of multiple change vectors, while introducing more hyperparameters and nonlinear terms, the facial structure change features are calculated through the following formula:

[0056] ;

[0057] in, is the change vector processed by nonlinear function; is a hyperparameter used to control the contribution of different terms; is the natural exponential function; For vector The norm of ; For vector The element-wise square of ; is the hyperbolic tangent function; is a sine function; It is the facial structure variation feature, which is composed of all cluster centers;

[0058] Based on the facial structure change characteristics , through cluster analysis and feature fusion, multiple candidate facial structure change patterns are generated, and multi-dimensional evaluation and optimization processing are performed to generate facial structure change patterns;

[0059] Comprehensive distance measure between pre-operative and post-operative feature vectors By introducing the weighted Mahalanobis distance and exponential term, the correlation and importance between feature vectors can be comprehensively considered, while balancing the influence of different dimensions to ensure the accuracy and robustness of the distance measurement; the change vector processed by the nonlinear function By introducing transformation matrix, bias vector, hyperbolic tangent function and exponential term, the formula can flexibly capture and express the nonlinear changes of facial features, improve the expressiveness and adaptability of the model; facial structure change characteristics By introducing polynomial terms, exponential terms, hyperbolic tangent functions and sine functions, the formula can capture more types of nonlinear changes, improve the complexity and expressiveness of the model, and ensure that it can accurately reflect the complex changes in facial structure;

[0060] A comprehensive distance measure between pre-operative and post-operative feature vectors middle, : Taking into account the correlation between features, the inverse matrix of the covariance matrix To adjust the distance metric so that it is more consistent with the actual distribution. Used to emphasize the importance of certain features, ensuring that when calculating distances, more attention is paid to those features that have a greater impact on the effect of facial reshaping; : It helps to balance the influence of different dimensions and prevent small changes in some features from having too great an impact on the overall distance metric. The parameter Controls the decay rate of the exponential term, which can be adjusted according to actual conditions;

[0061] After the change vector is processed by nonlinear function middle, : The change direction and amplitude of the feature vector can be adjusted to make the final output more consistent with the expected change pattern; : It can be automatically determined during the training process and used to adjust the baseline of the change vector to make it closer to the actual change pattern; : It can capture the nonlinear changes of the eigenvector, parameters and The weight and scaling factor of the hyperbolic tangent term are controlled separately and can be adjusted according to actual conditions; : It can capture the nonlinear changes of the eigenvector, parameters and Control the weight and decay rate of the exponential term respectively;

[0062] Features of changes in facial structure middle, : Through nonlinear processing and weight control, it can better reflect the changes in facial structure; : Can capture the nonlinear changes of feature vectors; It can capture the quadratic changes of the eigenvector; : It can capture the nonlinear changes of feature vectors and control weights and scaling factors; : Increase the model's ability to express periodic changes through the sine function;

[0063] Weight Matrix It can be trained by supervised learning using a large number of labeled facial image pairs (pre- and post-operative images) as training sets. The labels can be the degree of change in facial features or the changes in specific parts; the covariance matrix and its inverse The covariance matrix of all facial information feature vectors in the training set is calculated to reflect the relationship and dependency between feature vectors; hyperparameters These hyperparameters are usually tuned through grid search, random search or Bayesian optimization to find an optimal set of hyperparameter values ​​to achieve the best model performance; nonlinear function You can choose a common activation function, depending on the experimental effect; the transformation matrix and the bias vector These parameters can be automatically learned by training the neural network. They are usually initialized as learnable parameters when building the neural network model and continuously updated during the training process; the norm of the vector This is a commonly used measurement method in mathematics and can be calculated directly according to the definition of vector; facial information feature vector The pre-operative and post-operative facial images are converted into low-dimensional latent space representations, i.e., feature vectors, through the encoder part of the pre-trained variational autoencoder; the variation vector Directly obtain the difference between the feature vectors before and after surgery; facial structure change characteristics Based on the above calculation formula, the features of multiple change vectors are combined through nonlinear combination to generate the main change trend of facial structure.

[0064] Suppose we have a set of standardized pre- and post-operative image pairs extracted from user-uploaded facial photos, and we want to generate facial structure change patterns;

[0065] The preoperative feature vector is ; The postoperative eigenvector is ;

[0066] Assume the weight matrix and other parameters are , , , ;

[0067] ;

[0068] The change vector is ,

[0069] ;

[0070] ;

[0071] ;

[0072] The comprehensive distance measure between the preoperative and postoperative feature vectors is ;

[0073] The change vector is , , . ;

[0074] The change vector processed by the nonlinear function is: ;

[0075] Assumptions ,but ;

[0076] ;

[0077] ;

[0078] ;

[0079] ;

[0080] ;

[0081] ;

[0082] ;

[0083] By bringing the above data into the calculation, we can get the facial structure change characteristics ;

[0084] Through the above steps, comparative analysis is performed in the latent space of the variational autoencoder to identify the main nonlinear change patterns of the standardized image pairs and obtain the facial structure change characteristics. ,The facial structure change pattern is generated after multi-dimensional evaluation and optimization processing.

[0085] Optionally, the performing comparative analysis processing in the latent space of the variational autoencoder based on the facial information feature vector, identifying the main nonlinear change pattern of the standardized image pair, and generating the facial structure change pattern includes:

[0086] Based on the facial information feature vector, constructing a spatial representation of the preoperative state and the postoperative state in the latent space of the variational autoencoder to obtain a spatial mapping relationship;

[0087] Based on the spatial mapping relationship, a comparative analysis is performed on the preoperative and postoperative states to identify nonlinear changes in facial structure and generate a preliminary facial structure change mark;

[0088] Performing cluster analysis based on the preliminary facial structure change identification, extracting typical change patterns under different categories, and generating classified facial structure change identifications;

[0089] An integration process is performed based on the classified facial structure change markers to ensure accurate reflection of the actual change process from pre-operative to post-operative, thereby generating a facial structure change model.

[0090] Suppose there is a facial plastic surgery case database containing pre- and post-operative image pairs of multiple users. It is hoped that the variational autoencoder technology can be used to analyze the image pairs and extract the nonlinear change pattern of the facial structure, thereby generating the facial structure change pattern.

[0091] Use a variational autoencoder to encode each pre-operative and post-operative image pair to obtain the facial information feature vector corresponding to each image; construct a spatial representation of each pre-operative state and post-operative state in the latent space to form a spatial mapping relationship; identify the main nonlinear changes in facial structure by comparing the spatial representations of the pre-operative and post-operative states. For example, it may be found that some users have changes such as an increase in the distance between their eyes and a higher bridge of the nose; generate preliminary facial structure change markers and record the specific change points on each user's face; perform cluster analysis on all preliminary facial structure change markers to find common change patterns; generate classified facial structure change markers and divide users into different categories, each with its own typical facial structure change pattern; integrate the classified facial structure change markers to ensure that the typical change pattern of each category can accurately reflect the actual change process from pre-operative to post-operative; generate facial structure change patterns to provide personalized facial plastic surgery suggestions for each category of users.

[0092] Through the above steps, a facial structure change pattern can be generated to provide users with more accurate and personalized facial plastic surgery suggestions, ensuring more satisfactory results during the plastic surgery process.

[0093] Optionally, the generating of new facial structure change examples based on the facial structure change pattern by a decoder part of a variational autoencoder technology to obtain a valid facial structure change pattern includes:

[0094] Based on the facial structure change pattern, performing inverse reconstruction processing on the decoder part input information of the variational autoencoder to generate a new facial structure change example;

[0095] Based on the facial structure change example, combined with medical expertise and aesthetic standards, a multi-dimensional evaluation process is performed to ensure that the facial structure change example is reasonable and effective, and an example evaluation result is generated;

[0096] Based on the evaluation results of the examples, necessary adjustments and optimization processing are performed on the facial structure change examples to ensure that the actual plastic surgery effects are accurately and completely reflected, and an optimized facial structure change pattern is generated;

[0097] Based on the optimized facial structure change pattern, the decoder part of the variational autoencoder is used to review the key facial indicators in detail, and the satisfaction evaluation is performed in combination with user needs and preferences to generate an effective facial structure change pattern.

[0098] Suppose there is a user who is having facial plastic surgery. The system finds the historical plastic surgery cases that best match his facial features from the cloud case database. The cases include standardized image pairs before and after the surgery. It is hoped that these image pairs will be used for further analysis and processing to generate effective facial structure change patterns.

[0099] Based on the facial structure change patterns, these patterns are input into the decoder part of the variational autoencoder to generate new examples of facial structure changes, such as generating a new image to show the effect of the user's nose augmentation; based on the facial structure change examples, a multi-dimensional evaluation is performed in combination with medical expertise and aesthetic standards; example evaluation results are generated to ensure that the facial structure change examples are reasonable and effective; based on the example evaluation results, necessary adjustments and optimizations are made to the facial structure change examples; optimized facial structure change patterns are generated to ensure that they accurately and completely reflect the actual plastic surgery effects; based on the optimized facial structure change patterns, the decoder part of the variational autoencoder is used to review key facial indicators in detail, such as nose height, eye distance, overall facial proportions, etc.; satisfaction evaluation is performed in combination with user needs and preferences; effective facial structure change patterns are generated to ensure that the personalized needs of users are met and user satisfaction is improved.

[0100] Through the above steps, the system can generate an effective facial structure change pattern, provide users with more accurate and personalized facial plastic surgery suggestions, and improve user satisfaction during the plastic surgery process.

[0101] 104. Based on the personalized change law of facial plastic surgery, use generative adversarial network technology to simulate the postoperative effect of the original facial image, ensure the realism and naturalness of the simulated image, and generate a simulated image of the postoperative effect;

[0102] Generative adversarial network technology is used to simulate the postoperative effect of the user's original facial image based on the generated personalized change rules of facial plastic surgery; the generator part learns and applies subtle changes in facial features to generate preliminary postoperative effect simulation images; the discriminator part evaluates the realism and naturalness of the preliminary postoperative effect simulation images, feeds back quality optimization suggestions, and generates evaluation results; based on the evaluation results, the performance of the generator and discriminator is continuously optimized, and through multiple iterative optimizations, the final postoperative effect simulation images are generated to ensure the realism and naturalness of the images.

[0103] Optionally, the step 104 uses a generative adversarial network technology to simulate the postoperative effect of the original facial image based on the personalized change law of facial plastic surgery, ensures the realism and naturalness of the simulated image, and generates a postoperative effect simulated image, including:

[0104] Based on the personalized change law of facial plastic surgery and in combination with the original facial image, constructing input information of the generative adversarial network technology to generate input data for simulation;

[0105] Based on the input data, the generator part of the generative adversarial network technology learns and applies subtle changes in facial features to process the original facial image and generate a preliminary postoperative effect simulation image;

[0106] Based on the preliminary postoperative effect simulation images, the discriminator part of the generative adversarial network technology is used to evaluate the realism and naturalness of the preliminary postoperative effect simulation images, feedback quality optimization suggestions, and generate evaluation results;

[0107] Based on the evaluation results, the generator and discriminator performance of the generative adversarial network technology are continuously optimized to ensure that the user's expected plastic surgery effect is truly and accurately reflected. Through multiple iterative optimizations, simulated images of postoperative effects are generated.

[0108] Suppose there is a user who has undergone facial plastic surgery. The system has generated a personalized change pattern for facial plastic surgery. It is hoped that the generative adversarial network technology can be used to simulate the postoperative effect of the user's original facial image.

[0109] Based on the personalized change rules of the user's facial plastic surgery and combined with the user's original facial image, the input information of the generative adversarial network is constructed, and the input information includes the user's original facial image and the personalized change rules of facial plastic surgery; based on the input information, the generator part of the generative adversarial network is used to learn and apply subtle changes in facial features, process the user's original facial image, and generate a preliminary postoperative effect simulation image; based on the preliminary postoperative effect simulation image, the discriminator part of the generative adversarial network is used to evaluate the realism and naturalness of the image; the evaluation results are generated and quality optimization suggestions are fed back. For example, if the evaluation results show that the height of the nose is slightly too high, it is recommended to lower the height appropriately; based on the evaluation results, the performance of the generator and discriminator of the generative adversarial network is continuously optimized; through multiple iterative optimizations, the final postoperative effect simulation image is generated to ensure the realism and naturalness of the image.

[0110] Through the above steps, the system can provide users with high-quality simulated images of postoperative effects, helping users and doctors to better plan and decide on plastic surgery plans.

[0111] The present application considers that, by generating adversarial network technology, combining reconstruction loss and perceptual loss, the details and high-level features of the image are captured and retained, a high-quality postoperative effect simulation image is generated, the realism and naturalness of the image are ensured, and a high-realism postoperative effect simulation image is generated. The optional scheme specifically includes: based on the input data, the generator part of the generative adversarial network technology is used to learn and apply subtle changes in facial features, process the original facial image, and generate a preliminary postoperative effect simulation image, including:

[0112] The objective function of the generative adversarial network is defined as a game between the generator and the discriminator to maximize the discriminator's ability to correctly identify real images while minimizing the probability that the discriminator correctly rejects generated images;

[0113] Add additional reconstruction loss and perceptual loss to achieve the optimal solution of the generator and ensure that the generated images have high visual realism;

[0114] The objective function of the generative adversarial network is calculated using the following formula:

[0115] ;

[0116] in, is the objective function of the generative adversarial network; For the sample drawn; From the real data distribution The sample drawn from The mathematical expectation of For the input distribution from the generator A random noise vector drawn from The mathematical expectation of is the probability output by the discriminator, that is, the probability that the input image is a true postoperative effect image; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; is the log probability that the discriminator correctly identifies the real image; The loss term for the generator to deceive the discriminator;

[0117] The optimal solution of the generator is calculated by the following formula:

[0118] ;

[0119] in, is the optimal solution of the generator; Represents the search for the generation that minimizes the objective function For the input distribution from the generator A random noise vector drawn from The mathematical expectation of The loss term for the generator to deceive the discriminator; and Hyperparameters to control the relative importance of reconstruction loss and perceptual loss; To rebuild the losses; For perceived loss; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; For the sample drawn; The discriminator believes is the probability of a real image;

[0120] Based on the reconstruction loss and perceptual loss, nonlinear transformation and weight terms are introduced to ensure the generation of high-quality postoperative effect simulation images. The comprehensive loss function is calculated by the following formula:

[0121]

[0122] in, is the comprehensive loss function; and Hyperparameters for controlling the relative importance of reconstruction loss and perceptual loss; and Hyperparameters for controlling the weight and decay rate of the exponential term in the reconstruction loss; and are the hyperparameters that control the weight and frequency of the sine terms; and Hyperparameters for controlling the weight and scaling factor of the hyperbolic tangent term in the perceptual loss; and Hyperparameters for controlling the weight and scaling factors of the logarithmic terms; is the L1 norm, which is used to measure the pixel-level difference between the generated image and the target image; is a weighted term used to enhance the model’s sensitivity to small errors; is a sinusoidal term, which is used to introduce periodic changes and enhance the flexibility of the model; The perceptual loss part is used to ensure that the generated image has similar features to the target image at multiple levels of abstraction; For the The L2 norm square of the layer feature map is used to measure the difference between the generated image and the target image at the feature level; is the hyperbolic tangent function, which is used to enhance the model’s sensitivity to feature differences; It is a logarithmic function, which is used to smooth the perceptual loss and reduce the impact of excessive errors; is extracted from the pre-trained feature extraction network Layer feature map; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; For the sample drawn; is the layer index of the feature extraction network, from 1 to ; is the number of layers of the feature extraction network;

[0123] According to the comprehensive loss function, a preliminary postoperative effect simulation image is generated; wherein the comprehensive loss function is used to enable the generator to better capture and retain the details and high-level features of the image when generating the image through a variety of nonlinear transformations and weight terms.

[0124] Objective function of generative adversarial network Through the game between the generator and the discriminator, the discriminator's ability to correctly identify real images is maximized, while the probability of the discriminator correctly rejecting generated images is minimized, thereby prompting the generator to generate more realistic images; the optimal solution of the generator By minimizing the loss term of the generator deceiving the discriminator and adding reconstruction loss and perceptual loss, the generated images are ensured to have high realism and visual quality; comprehensive loss function Through a variety of nonlinear transformations and weight terms, the generator can better capture and preserve the details and high-level features of the image when generating images, ensuring that the generated images have high realism and visual quality;

[0125] In the objective function of the generative adversarial network middle, : Calculate the distribution from real data The sample drawn from The mathematical expectation of , ensuring that the discriminator can correctly identify real images; : Compute the input distribution from the generator The random noise vector extracted from The mathematical expectation of , ensuring that the generator can generate images to deceive the discriminator;

[0126] The optimal solution in the generator middle, : Compute the input distribution from the generator The random noise vector extracted from The mathematical expectation of , ensuring that the generator can generate images to deceive the discriminator; : It is used to measure the pixel-level difference between the generated image and the target image. By introducing reconstruction loss, it ensures that the generated image is similar to the target image at the pixel level. : It is used to measure the difference between the generated image and the target image at the feature level. By introducing perceptual loss, it ensures that the generated image is similar to the target image in terms of high-level features.

[0127] In the comprehensive loss function middle, : It is used to measure the pixel-level difference between the generated image and the target image to ensure that the generated image is similar to the target image at the pixel level; It is used to enhance the model's sensitivity to small errors and ensure that the generated image is consistent with the target image in details by introducing an exponential term. : Used to introduce periodic changes and enhance the flexibility of the model. By introducing sinusoidal terms, the model can better adapt to different change patterns; : It is used to measure the difference between the generated image and the target image at the feature level, ensuring that the generated image is similar to the target image in terms of high-level features; : It is used to enhance the model's sensitivity to feature differences. By introducing the hyperbolic tangent term, the model can better capture subtle changes in features. : Used to smooth the perceptual loss and reduce the impact of excessive errors. By introducing logarithmic terms, the model is made more stable when dealing with large errors.

[0128] Among them, the hyperparameters and Determined by cross validation to achieve optimal performance; parameters Through experimental adjustment, find the best value suitable for the current application scenario; It can be obtained from the original facial image and the personalized change rules of facial plastic surgery, including but not limited to facial feature points, texture information, surgery type, etc.; It can be directly obtained from actual postoperative images to train and evaluate the performance of the generator; The input distribution of the generator is usually a standard normal distribution or a uniform distribution; Estimated by a large number of real image samples from the real data distribution; The image output by the generator is generated through the generator network, and the input includes the original facial image and the personalized change law of facial plastic surgery; The probability output by the discriminator is calculated through the discriminator network, indicating the probability that the input image is a true postoperative effect image; The feature extraction network The layer feature maps are extracted through a pre-trained feature extraction network; The number of layers of the feature extraction network is usually the middle layer of the pre-trained deep convolutional neural network; Calculated by the discriminator network, it indicates the probability that the input image is a true postoperative effect image; reconstruction loss By calculating the pixel-level difference between the generated image and the target image; perceptual loss By calculating the feature similarity between the generated image and the target image at multiple levels of abstraction.

[0129] The following is a specific model architecture example:

[0130] Generator G:

[0131] Input: the original facial image and the surgical plan (possibly in the form of parameter or condition images), and a random noise vector Z.

[0132] Output: Predicted post-operative facial image .

[0133] Structure: A convolutional neural network (CNN) is used, including a downsampling layer (encoder part) to capture the features of the input image, and an upsampling layer (decoder part) to reconstruct the image of the target size. Skip connections can also be used to retain more detailed information.

[0134] Discriminator D:

[0135] Input: real post-operative images or simulated post-operative images generated by the generator.

[0136] Output: A scalar value representing the probability that the input image is a true post-operative image.

[0137] Structure: It is usually also a CNN, but its task is to distinguish between real images and generated images, so it may have a deeper network structure or a more complex activation function.

[0138] The objective function and training process are as follows:

[0139] Generate adversarial network objective function V(D,G): The goal is to maximize V(D,G), that is, to let the discriminator distinguish between real and generated images as accurately as possible, while minimizing the generator's ability to deceive the discriminator.

[0140] ;

[0141] Generator Optimal Solution :In order to make the images output by the generator more realistic, we need to consider not only the adversarial loss, but also the reconstruction loss and the perceptual loss to ensure that the generated images are close to the real images at the pixel level and similar in high-level features.

[0142] ;

[0143] Comprehensive loss function L_combined: The comprehensive loss function combines reconstruction loss, perceptual loss and adversarial loss, aiming to improve the authenticity and naturalness of generated images.

[0144] ;

[0145] Among them, the reconstruction loss and perceived loss Both contain additional nonlinear transformations and weight terms to enhance the model's sensitivity to different error types and ensure that the generated images can better capture and preserve the details and high-level features of the image.

[0146] In practical applications, combining all the above loss components into a comprehensive loss function provides a comprehensive and detailed goal-oriented approach for the generator. During the training process, the generator continuously tries to minimize this complex comprehensive loss function, thereby gradually learning to generate a medically logical and visually convincing postoperative effect simulation image from a given original facial image and surgical plan. This approach can help doctors and patients better understand possible surgical outcomes.

[0147] Optionally, based on the input data, the generator part of the generative adversarial network technology is used to learn and apply subtle changes in facial features, process the original facial image, and generate a preliminary postoperative effect simulation image, including:

[0148] Based on the input data, the generator part of the generative adversarial network technology is initialized and configured to ensure effective learning of the input data and obtain an initialized and configured generator;

[0149] Based on the generator of the initialization configuration, combined with the specific change pattern of key facial parts, the subtle changes of facial features are learned to generate a facial feature change model;

[0150] Based on the facial feature change model, the original facial image is analyzed and processed to ensure realism and naturalness, and an optimized facial feature change model is generated;

[0151] Based on the optimized facial feature change model, combined with the overall coordination of the facial structure and aesthetic standards, visual effect optimization processing is performed to generate preliminary postoperative effect simulation images.

[0152] Suppose you are developing a facial plastic surgery simulation system and want to provide users with a personalized preview of the postoperative effect to ensure that users understand and choose the plastic surgery plan that suits them.

[0153] The user uploads a high-definition frontal facial photo as the original facial image through the system interface, ensuring that there are no obvious light and shadows and occlusions in the photo so that the system can accurately analyze facial features; the system generates personalized rules that reflect the changes in the user's facial structure by analyzing a large number of historical plastic surgery cases; based on the personalized change rules of facial plastic surgery, combined with the user's original facial image, construct the input information of the generative adversarial network; based on the above input data, the generator part of the generative adversarial network is initialized and configured to ensure that the generator can effectively learn these input data; the generator is initialized as a deep neural network containing multiple convolutional layers and residual blocks, which can effectively capture changes in facial features; based on the initialized generator, combined with the specific change patterns of key facial parts, learn the facial features. The generator gradually optimizes the ability to capture facial feature changes through multiple rounds of training. The generated facial feature change model is used to analyze and process the user's original facial image. The generator processes the image pixel by pixel to ensure that every detail meets the expected plastic surgery effect. Based on the optimized facial feature change model, combined with the overall coordination of the facial structure and aesthetic standards, the visual effect is optimized to generate a preliminary postoperative effect simulation image to ensure that the image is visually natural and harmonious. The discriminator part of the generative adversarial network is used to evaluate the realism and naturalness of the preliminary postoperative effect simulation image and generate an evaluation result. Based on the evaluation results, the generator and discriminator performance of the generative adversarial network are continuously optimized to ensure that the expected plastic surgery effect of the user is truly and accurately reflected. The final postoperative effect simulation image is generated through multiple iterative optimizations. The optimization process includes adjusting the network structure and parameters of the generator and discriminator to improve the quality of the generated image. After multiple iterative optimizations, a high-quality postoperative effect simulation image is generated.

[0154] Through the above steps, the system can provide users with personalized previews of postoperative effects, helping users to better understand and choose a plastic surgery plan that suits them.

[0155] 105. Based on the simulated image of the postoperative effect, the user is allowed to customize the facial features of the image, and a detailed plastic surgery guidance plan is generated in combination with feedback from medical institutions.

[0156] Users can customize the generated postoperative effect simulation images on the platform. The platform provides a user-friendly interface and supports a variety of editing tools. It collects users' specific needs and preferences and generates user demand feedback information. A team of medical experts conducts professional evaluations based on the customized postoperative effect simulation images and generates feedback from medical institutions. Based on the feedback from medical institutions, the customized postoperative effect simulation images are optimized to generate optimized postoperative effect simulation images. Based on user demand feedback information and feedback from medical institutions, detailed plastic surgery guidance plans are generated to help users and doctors better plan surgical plans and improve the success rate and satisfaction of surgery.

[0157] Optionally, the simulated image based on the postoperative effect in step 105 allows the user to customize the facial features of the image, and generates a detailed plastic surgery guidance plan in combination with the feedback from the medical institution, including:

[0158] Based on the postoperative effect simulation image, the user is allowed to customize and edit facial features through an interactive platform to generate a customized postoperative effect simulation image;

[0159] Based on the customized postoperative effect simulation image, collecting specific needs and preferences of the user, and generating user demand feedback information;

[0160] Based on the user demand feedback information and the customized postoperative effect simulation images, a team of medical experts will conduct a professional evaluation and generate feedback from medical institutions;

[0161] Based on the feedback from the medical institution, the customized postoperative effect simulation image is optimized to ensure that the medical safety and aesthetic standards are met, and an optimized postoperative effect simulation image is generated;

[0162] Based on the optimized postoperative effect simulation images, combined with the user demand feedback information and feedback from medical institutions, a detailed plastic surgery guidance plan is generated.

[0163] Suppose you are developing a facial plastic surgery simulation system and want to combine user-defined processing and feedback from medical institutions to generate a detailed plastic surgery guidance plan.

[0164] The user uploaded a frontal facial photo through the system and selected plastic surgery projects such as nose height increase and eye distance adjustment; the system generated a preliminary post-operative effect simulation image through generative adversarial network technology; the system provides a user-friendly interactive platform and supports a variety of editing tools, such as adjusting the nose height, eye distance, chin line, etc.; the user customized the generated post-operative effect simulation image on the platform, adjusted the nose height and eye distance, and generated a customized post-operative effect simulation image; the system collected specific needs and preferences and generated user demand feedback information; a team of medical experts conducted a professional evaluation of Zhang San’s customized post-operative effect simulation image and generated feedback from medical institutions; based on the feedback from medical institutions, the system optimized the user’s customized post-operative effect simulation image to ensure that it meets medical safety and aesthetic standards; based on the optimized post-operative effect simulation image, combined with the user’s demand feedback information and the feedback from medical institutions, the system generated a detailed plastic surgery guidance plan to better plan the surgical plan and improve the success rate and satisfaction of the operation.

[0165] Through the above steps, the system provides a personalized preview of postoperative effects and generates a detailed plastic surgery guidance plan through user-defined processing and professional evaluation by medical institutions to ensure the safety of the surgery and user satisfaction.

[0166] Figure 2 The present application provides a schematic diagram of the structure of an AI simulation system for facial cosmetic surgery based on the Internet, such as Figure 2 As shown, the device comprises:

[0167] A receiving module 21, configured to receive an original facial image uploaded by a user through an interactive platform;

[0168] The recognition module 22 is used to recognize and locate the key feature point information of the user's face from the original facial image based on AI technology, and generate matching historical plastic surgery cases in combination with the cloud case database;

[0169] An analysis module 23 is used to analyze and process the preoperative images and postoperative images based on the matched historical plastic surgery cases by using variational autoencoder technology, extract the nonlinear change pattern of facial structure, and generate personalized change rules of facial plastic surgery;

[0170] A simulation module 24 is used to simulate the postoperative effect of the original facial image based on the personalized change law of facial plastic surgery and use the generative adversarial network technology to ensure the realism and naturalness of the simulated image and generate a postoperative effect simulated image;

[0171] The generation module 25 is used to simulate the postoperative effect image, allow the user to customize the facial features of the image, and generate a detailed plastic surgery guidance plan based on the feedback from the medical institution.

[0172] Figure 2 The AI ​​simulation system for facial cosmetic surgery based on the Internet can perform Figure 1 The implementation principle and technical effects of the AI ​​simulation method for facial cosmetic surgery based on the Internet described in the embodiment shown are not repeated here. The specific manner in which each module and unit performs operations in the AI ​​simulation system for facial cosmetic surgery based on the Internet in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.

[0173] In one possible design, Figure 2 The AI ​​simulation system for facial cosmetic surgery based on the Internet in the embodiment shown can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32;

[0174] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .

[0175] The processing component 32 is used to: receive the original facial image uploaded by the user through the interactive platform; based on AI technology, identify and locate the key feature point information of the user's face from the original facial image, and generate matching historical plastic surgery cases in combination with the cloud case database; based on the matching historical plastic surgery cases, use variational autoencoder technology to analyze and process the pre-operative images and post-operative images, extract the nonlinear change pattern of the facial structure, and generate personalized change rules for facial plastic surgery; based on the personalized change rules for facial plastic surgery, use generative adversarial network technology to simulate the post-operative effect of the original facial image, ensure the realism and naturalness of the simulated image, and generate a post-operative effect simulation image; based on the post-operative effect simulation image, allow the user to customize the facial features of the image, and generate a detailed plastic surgery guidance plan in combination with feedback from medical institutions.

[0176] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0177] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0178] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0179] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.

[0180] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0181] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.

[0182] The present application also provides a computer storage medium storing a computer program, wherein the computer program can achieve the above-mentioned Figure 1 The illustrated embodiment is an AI simulation method for facial cosmetic surgery based on the Internet.

[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0184] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0185] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0186] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An AI simulation method for facial cosmetic surgery based on the Internet, characterized in that: include: receiving an original facial image uploaded by a user through an interactive platform; Based on AI technology, the key feature point information of the user's face is identified and located from the original facial image, and combined with the cloud case database, a matching historical plastic surgery case is generated; Based on the matched historical plastic surgery cases, the preoperative images and postoperative images are analyzed and processed using variational autoencoder technology to extract the nonlinear change pattern of facial structure and generate personalized change rules of facial plastic surgery; Based on the personalized change law of facial plastic surgery, the generative adversarial network technology is used to simulate the postoperative effect of the original facial image, ensure the realism and naturalness of the simulated image, and generate a simulated image of the postoperative effect; Based on the simulated image of the postoperative effect, the user is allowed to customize the facial features of the image and generate a detailed plastic surgery guidance plan in combination with feedback from medical institutions; The method of using variational autoencoder technology to analyze and process preoperative images and postoperative images based on the matched historical plastic surgery cases, extracting nonlinear change patterns of facial structures, and generating personalized change rules of facial plastic surgery includes: Using preprocessing technology, the preoperative images and postoperative images in the matched historical plastic surgery cases are standardized in size and format to obtain a standardized image pair, wherein the standardized image pair includes a standardized preoperative image and a standardized postoperative image; Based on the standardized image pair, using variational autoencoder technology to capture deep features in the image and generate a facial information feature vector; Based on the facial information feature vector, performing comparative analysis processing in the latent space of the variational autoencoder, identifying the main nonlinear change pattern of the standardized image pair, and generating a facial structure change pattern; Based on the facial structure change pattern, a new facial structure change example is generated by a decoder part of a variational autoencoder technology to obtain an effective facial structure change pattern; Based on the effective facial structure change pattern, combined with multiple historical plastic surgery cases, comprehensive analysis and refinement are carried out to generate personalized change rules for facial plastic surgery.

2. The method according to claim 1, characterized in that Based on the facial information feature vector, a comparative analysis process is performed in the latent space of the variational autoencoder to identify the main nonlinear change pattern of the standardized image pair and generate a facial structure change pattern, including: Introducing the weight matrix and nonlinear distance measurement methods to enhance the importance of feature vectors and perform weighted representation and comparative analysis of feature vectors in latent space; The difference between the feature vectors before and after the operation is calculated to obtain the change vector Δz, and the nonlinear function f is used to process the change vector. The weight matrix A and the bias vector b are introduced to adjust the change vector and identify the main nonlinear change mode. The comprehensive distance metric between the preoperative and postoperative feature vectors is calculated using the following formula: ; in, is the comprehensive distance measure between the preoperative and postoperative feature vectors; and are the facial information feature vectors before and after surgery, respectively; is a weight matrix used to emphasize the importance of certain features; is the covariance matrix, which is used to describe the correlation between eigenvectors; is the inverse matrix of the covariance matrix; is a parameter that controls the decay speed of the exponential term; Represents matrix transpose; is the natural exponential function; is the norm of the vector; The change vector processed by the nonlinear function is calculated using the following calculation formula: ; in, is the change vector processed by nonlinear function; and are the facial information feature vectors before and after surgery, respectively; is the weight matrix; is a transformation matrix used to adjust the dimensions of the change vector; is the bias vector, used to adjust the baseline of the change vector; is a nonlinear activation function; and To control the weight and scaling factor of the hyperbolic tangent term; and Parameters that control the weight and decay rate of the exponential term; is the hyperbolic tangent function; is the natural exponential function; is the norm of the vector; Based on the change vector processed by the nonlinear function , combining the features of multiple change vectors, while introducing more hyperparameters and nonlinear terms, the facial structure change features are calculated through the following formula: ; in, is the change vector processed by nonlinear function; is a hyperparameter used to control the contribution of different terms; is the natural exponential function; For vector The norm of ; For vector The element-wise square of ; is the hyperbolic tangent function; is a sine function; It is the facial structure variation feature, which consists of all cluster centers; Based on the facial structure change characteristics ,Through cluster analysis and feature fusion, multiple candidate facial structure change patterns are generated, ,multi-dimensional evaluation and optimization processing are performed to generate the facial ,structure change pattern.

3. The method according to claim 1, characterized in that The method of performing comparative analysis in the latent space of the variational autoencoder based on the facial information feature vector, identifying the main nonlinear change pattern of the standardized image pair, and generating the facial structure change pattern includes: Based on the facial information feature vector, constructing a spatial representation of the preoperative state and the postoperative state in the latent space of the variational autoencoder to obtain a spatial mapping relationship; Based on the spatial mapping relationship, a comparative analysis is performed on the preoperative and postoperative states to identify nonlinear changes in facial structure and generate a preliminary facial structure change mark; Performing cluster analysis based on the preliminary facial structure change identification, extracting typical change patterns under different categories, and generating classified facial structure change identifications; An integration process is performed based on the classified facial structure change markers to ensure accurate reflection of the actual change process from pre-operative to post-operative, thereby generating a facial structure change model.

4. The method according to claim 1, characterized in that: The method of generating a new facial structure change example based on the facial structure change pattern through the decoder part of the variational autoencoder technology to obtain an effective facial structure change pattern includes: Based on the facial structure change pattern, performing inverse reconstruction processing on the decoder part input information of the variational autoencoder to generate a new facial structure change example; Based on the facial structure change example, combined with medical expertise and aesthetic standards, a multi-dimensional evaluation process is performed to ensure that the facial structure change example is reasonable and effective, and an example evaluation result is generated; Based on the evaluation results of the examples, necessary adjustments and optimization processing are performed on the facial structure change examples to ensure that the actual plastic surgery effects are accurately and completely reflected, and an optimized facial structure change pattern is generated; Based on the optimized facial structure change pattern, the decoder part of the variational autoencoder is used to review the key facial indicators in detail, and the satisfaction evaluation is performed in combination with user needs and preferences to generate an effective facial structure change pattern.

5. The method according to claim 1, characterized in that Based on the personalized change law of facial plastic surgery, the generative adversarial network technology is used to simulate the postoperative effect of the original facial image, ensure the realism and naturalness of the simulated image, and generate a postoperative effect simulated image, including: Based on the personalized change law of facial plastic surgery and in combination with the original facial image, constructing input information of the generative adversarial network technology to generate input data for simulation; Based on the input data, the generator part of the generative adversarial network technology learns and applies subtle changes in facial features to process the original facial image and generate a preliminary postoperative effect simulation image; Based on the preliminary postoperative effect simulation images, the discriminator part of the generative adversarial network technology is used to evaluate the realism and naturalness of the preliminary postoperative effect simulation images, feedback quality optimization suggestions, and generate evaluation results; Based on the evaluation results, the generator and discriminator performance of the generative adversarial network technology are continuously optimized to ensure that the user's expected plastic surgery effect is truly and accurately reflected. Through multiple iterative optimizations, simulated images of postoperative effects are generated.

6. The method according to claim 5, characterized in that Based on the input data, the generator part of the generative adversarial network technology learns and applies subtle changes in facial features, processes the original facial image, and generates a preliminary postoperative effect simulation image, including: The objective function of the generative adversarial network is defined as a game between the generator and the discriminator to maximize the discriminator's ability to correctly identify real images while minimizing the probability that the discriminator correctly rejects generated images; Add additional reconstruction loss and perceptual loss to achieve the optimal solution of the generator and ensure that the generated images have high visual realism; The objective function of the generative adversarial network is calculated using the following formula: ; in, is the objective function of the generative adversarial network; For the sample drawn; From the real data distribution The sample drawn from The mathematical expectation of For the input distribution from the generator The random noise vector extracted from The mathematical expectation of is the probability output by the discriminator, that is, the probability that the input image is a true postoperative effect image; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; is the log probability that the discriminator correctly identifies the real image; The loss term for the generator to deceive the discriminator; The optimal solution of the generator is calculated by the following formula: ; in, is the optimal solution of the generator; Represents the search for a generator that minimizes the objective function For the input distribution from the generator The random noise vector extracted from The mathematical expectation of The loss term for the generator to deceive the discriminator; and Hyperparameters to control the relative importance of reconstruction loss and perceptual loss; To rebuild the losses; For perceived loss; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; For the sample drawn; The discriminator believes is the probability of a real image; Based on the reconstruction loss and perceptual loss, nonlinear transformation and weight terms are introduced to ensure the generation of high-quality postoperative effect simulation images. The comprehensive loss function is calculated by the following formula: ; in, is the comprehensive loss function; and Hyperparameters for controlling the relative importance of reconstruction loss and perceptual loss; and Hyperparameters for controlling the weight and decay rate of the exponential term in the reconstruction loss; and are the hyperparameters that control the weight and frequency of the sine terms; and Hyperparameters for controlling the weight and scaling factor of the hyperbolic tangent term in the perceptual loss; and Hyperparameters for controlling the weight and scaling factors of the logarithmic terms; is the L1 norm, which is used to measure the pixel-level difference between the generated image and the target image; is a weighted term used to enhance the model’s sensitivity to small errors; is a sinusoidal term, which is used to introduce periodic changes and enhance the flexibility of the model; ; The perceptual loss part is used to ensure that the generated image has similar features to the target image at multiple levels of abstraction; For the The L2 norm square of the layer feature map is used to measure the difference between the generated image and the target image at the feature level; is the hyperbolic tangent function, which is used to enhance the model’s sensitivity to feature differences; It is a logarithmic function, which is used to smooth the perceptual loss and reduce the impact of excessive errors; is extracted from the pre-trained feature extraction network Layer feature map; is the image output by the generator, is the input of the generator, which includes the original facial image and the personalized change rules of facial plastic surgery; For the sample drawn; is the layer index of the feature extraction network, from 1 to ; is the number of layers of the feature extraction network; According to the comprehensive loss function, a preliminary postoperative effect simulation image is generated; wherein the comprehensive loss function is used to enable the generator to better capture and retain the details and high-level features of the image when generating the image through a variety of nonlinear transformations and weight terms.

7. The method according to claim 5, characterized in that Based on the input data, the generator part of the generative adversarial network technology is used to learn and apply subtle changes in facial features, process the original facial image, and generate a preliminary postoperative effect simulation image, including: Based on the input data, the generator part of the generative adversarial network technology is initialized and configured to ensure effective learning of the input data to obtain an initialized and configured generator; Based on the generator of the initialization configuration, combined with the specific change pattern of key facial parts, the subtle changes of facial features are learned to generate a facial feature change model; Based on the facial feature change model, the original facial image is analyzed and processed to ensure realism and naturalness, and an optimized facial feature change model is generated; Based on the optimized facial feature change model, combined with the overall coordination of the facial structure and aesthetic standards, visual effect optimization processing is performed to generate preliminary postoperative effect simulation images.

8. The method according to claim 1, characterized in that Based on the simulated image of the postoperative effect, the user is allowed to customize the facial features of the image, and a detailed plastic surgery guidance plan is generated in combination with the feedback from the medical institution, including: Based on the postoperative effect simulation image, the user is allowed to customize and edit facial features through an interactive platform to generate a customized postoperative effect simulation image; Based on the customized postoperative effect simulation image, collecting specific needs and preferences of the user, and generating user demand feedback information; Based on the user demand feedback information and the customized postoperative effect simulation images, a team of medical experts will conduct professional evaluation and generate feedback from medical institutions; Based on the feedback from the medical institution, the customized postoperative effect simulation image is optimized to ensure that the medical safety and aesthetic standards are met, and an optimized postoperative effect simulation image is generated; Based on the optimized postoperative effect simulation images, combined with the user demand feedback information and feedback from medical institutions, a detailed plastic surgery guidance plan is generated.

9. An AI simulation system for facial cosmetic surgery based on the Internet, characterized in that: include: A receiving module, used for receiving an original facial image uploaded by a user through an interactive platform; A recognition module, which is used to identify and locate key feature point information of the user's face from the original facial image based on AI technology, and generate matching historical plastic surgery cases in combination with a cloud case database; An analysis module, for analyzing and processing preoperative images and postoperative images based on the matched historical plastic surgery cases by using variational autoencoder technology, extracting nonlinear change patterns of facial structures, and generating personalized change rules for facial plastic surgery; A simulation module, for simulating the postoperative effect of the original facial image based on the personalized change law of facial plastic surgery and using generative adversarial network technology to ensure the realism and naturalness of the simulated image and generate a simulated image of the postoperative effect; A generation module is used to simulate the image of the postoperative effect based on the image, allowing the user to customize the facial features of the image and generate a detailed plastic surgery guidance plan in combination with feedback from medical institutions; The method of using variational autoencoder technology to analyze and process preoperative images and postoperative images based on the matched historical plastic surgery cases, extracting nonlinear change patterns of facial structures, and generating personalized change rules of facial plastic surgery includes: Using preprocessing technology, the preoperative images and postoperative images in the matched historical plastic surgery cases are standardized in size and format to obtain a standardized image pair, wherein the standardized image pair includes a standardized preoperative image and a standardized postoperative image; Based on the standardized image pair, using variational autoencoder technology to capture deep features in the image and generate a facial information feature vector; Based on the facial information feature vector, performing comparative analysis processing in the latent space of the variational autoencoder, identifying the main nonlinear change pattern of the standardized image pair, and generating a facial structure change pattern; Based on the facial structure change pattern, a new facial structure change example is generated by a decoder part of a variational autoencoder technology to obtain an effective facial structure change pattern; Based on the effective facial structure change pattern, combined with multiple historical plastic surgery cases, comprehensive analysis and refinement are carried out to generate personalized change rules for facial plastic surgery.

Citation Information

Patent Citations

  • Orthopedic surgery plan generation method and device based on medical image and storage medium

    CN118866251A