A dynamic image beautification parameter adjustment method based on deep learning algorithm
The deep learning algorithm analyzes user image characteristics and dynamically adjusts the parameters of the beauty processing module, which solves the problem that traditional beauty applications cannot meet personalized needs, achieves fine control and high adaptability of beautification effects, and improves user experience.
Patent Information
- Application Number
- CN202410471131.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-04-18
AI Technical Summary
Traditional beauty applications cannot dynamically adjust beautification parameters based on the specific characteristics of portrait images uploaded by users, resulting in suboptimal beautification effects. Users have limited control over beautification effects, making it difficult to meet personalized needs.
Using a method based on deep learning algorithms, the deep learning model analyzes the features in user images and dynamically adjusts the parameters of the beauty image processing module, including skin whitening, dark circle removal, face slimming, freckle and acne removal, eye enlargement, wrinkle removal, Facial plumping and double eyelid functions generate customized beauty parameters.
It improves the adaptability and satisfaction of the beautification effect, allowing each user to obtain the beautification effect that best suits their characteristics and aesthetic needs. Users can finely control the beautification effect, which enhances the freedom and satisfaction of the operation.
Smart Images

Figure CN118298489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image beautification technology, and in particular to a dynamic image beautification parameter adjustment method based on a deep learning algorithm. Background Art
[0002] In the field of digital image processing, especially in the optimization of personal beautification and portrait photos, the application of beauty applications is becoming more and more widespread. Traditional beauty applications usually provide a series of preset filters and beautification effects, such as skin smoothing, whitening, eye enlargement and other functions. Most of these functions are implemented based on some fixed algorithms, such as basic image filtering technology and simple image enhancement algorithms. However, these traditional methods have some significant limitations:
[0003] The beautification effects in traditional photo beautification applications mostly rely on preset parameters, which cannot be dynamically adjusted according to the specific features of the portrait images uploaded by users. For example, for skin color, face shape or other individual differences, static parameters often cannot meet the needs of all users, resulting in suboptimal beautification effects.
[0004] In many traditional applications, users have very limited control over photo beautification effects, and it is difficult to make detailed adjustments based on individual needs. Users can only choose preset effects, but cannot make personalized adjustments for specific problems, such as only adjusting the overall brightness but not making specific adjustments for dark circles under the eyes.
[0005] Due to the lack of in-depth analysis and understanding of user characteristics, traditional methods are difficult to meet users' needs for personalized beautification. Different skin types, face shapes and other individual characteristics of users require more detailed and specific processing methods, which are difficult to provide with traditional technologies.
[0006] Therefore, how to provide a dynamic image beautification parameter adjustment method based on a deep learning algorithm is a problem that technicians in this field urgently need to solve. Summary of the invention
[0007] One object of the present invention is to propose a dynamic beautification parameter adjustment method based on a deep learning algorithm. The present invention can generate customized beautification parameters for each user by using a deep learning model to accurately analyze the specific features in the portrait images uploaded by the user. This processing improves the adaptability and satisfaction of the beautification effect, so that each user can obtain the beautification effect that best suits their characteristics and aesthetic needs.
[0008] A method for adjusting dynamic image parameters based on a deep learning algorithm according to an embodiment of the present invention includes the following steps:
[0009] S1. Obtain user images and analyze the user images using a deep learning model. The deep learning model has been trained with a large amount of portrait image data and can identify the characteristics of the person in the user image, including skin color, face shape, skin problems, eye size, whether there are wrinkles, and whether there are double eyelids;
[0010] S2. Based on the user features identified by the deep learning model in step S1, the system dynamically adjusts the initial beautification parameters of the functional modules integrated within each main beautification processing module through a pre-designed algorithm. The functional modules include skin smoothing and whitening, dark circle removal, face and body slimming, freckle and acne removal, eye enlargement, wrinkle removal, facial plumping and double eyelids;
[0011] S3. For each identified feature, a weight coefficient based on the output of the deep learning model is introduced, and the weight coefficient determines the intensity of the parameter adjustment of the corresponding functional module;
[0012] For users with darker or uneven skin tones, the deep learning model increases the adjustment intensity of the skin resurfacing and whitening parameters;
[0013] For patients with obvious dark circles or eye bags under the eyes, the deep learning model increases the adjustment intensity of dark circle removal parameters;
[0014] For users with rounder faces or larger bodies, the deep learning model increases the adjustment intensity of face and body slimming parameters;
[0015] For users with spots, acne or other skin blemishes on their faces, the deep learning model increases the adjustment intensity of the parameters for removing spots and acne;
[0016] For users with relatively small eyes, the deep learning model improves the adjustment strength of eye magnification parameters;
[0017] For users with wrinkles or fine lines around the eyes and forehead, the deep learning model increases the adjustment intensity of wrinkle removal parameters;
[0018] For users with thin facial contours, the deep learning model adjusts facial volume parameters;
[0019] For users with single eyelids or who want their eyes to look brighter, the deep learning model enables or enhances the double eyelid function module;
[0020] S4, combining the results of steps S2 and S3, the software automatically generates a set of image beautification parameters customized for the uploaded portrait image features;
[0021] S5. Apply the customized beautification parameters in step S4, perform deep optimization processing on the uploaded portrait image through the main beautification processing module, generate an adjusted portrait image, display the deeply optimized portrait image to the user, and provide further fine-tuning options.
[0022] Optionally, the S1 includes the following steps:
[0023] S11, receiving a user image uploaded by the user through the system;
[0024] S12. Design a corresponding filter for each specific portrait feature and define filter k skin Used to capture skin color features, k face_shape For face recognition, and k eye_size , k wrinkle and k eyelid They are used to analyze eye size, wrinkles and double eyelid status, and use filters to extract features from the input portrait image;
[0025] S13. Introducing a feature-dependent dynamic weight adjustment mechanism allows the deep learning model to adjust the contribution of each filter based on the content of the input portrait image:
[0026]
[0027] Among them, I ab represents the pixel value of the input portrait image at position (a, b), k feature (a, b) represents the weight value of the convolution kernel at position (a, b) for a specific feature feature;
[0028] S14. Implement a dedicated pooling strategy for each feature to retain and enhance important features, use a larger pooling window to retain the global information of the face shape, and use a smaller pooling window for detailed features:
[0029]
[0030] in, It is the set of regions for the specific feature pooling operation of the l-th layer pyramid, which is used to perform the maximum pooling operation. is the maximum pooling result obtained in the l-th layer of pyramid pooling;
[0031] S15. Combine the data obtained from each filter and pooling layer to construct a feature vector, which reflects the detailed information of skin color, face shape, eye size, wrinkles and whether there is double eyelid:
[0032] f=[P skin , P face_shape , P eye_size , P wrinkle , P eyelid ];
[0033] Among them, f is the final feature vector, which is the pooling result of different features. Composition, combining all important portrait feature information;
[0034] S16. For the identification of skin problems, the deep learning model distinguishes different types of skin problems, including dark circles and spots, and outputs them as features.
[0035] Optionally, the S16 includes the following steps:
[0036] S161, deploy two skin problem detection sub-networks, namely dark circles network N dark_circles and the spotted subnetwork N spots ;
[0037] S162, define the corresponding feature detection filter k for each sub-network dark_circles and k spots , and perform convolution operations on the uploaded portrait images to extract relevant features;
[0038] S163, applying a dynamic adjustment strategy to adjust the weight coefficient α of each filter feature (t):
[0039]
[0040] Among them, σ represents the Sigmoid activation function, which is used to adjust the weight coefficient according to the average intensity of the convolution output;
[0041] S164. Combining the convolution and weight adjustment results, the skin problem features identified are processed and refined through the subsequent layers of the neural network. The final feature expression is:
[0042] F feature =ReLU(β·C feature +γ);
[0043] Among them, β and γ are learnable parameters.
[0044] Optionally, S2 includes the following steps:
[0045] S21, according to the feature vector f, the initial parameters of each functional module Automatically adjust the strength of the corresponding feature in the feature vector, and dynamically adjust the parameters of each functional module:
[0046]
[0047] Among them, g i is the nonlinear adjustment function corresponding to the ith feature, Represents the initial parameter value of each functional module, indicating the default setting before any personalized adjustment. i Represents the adjustment coefficient, which is used to increase or decrease the influence of a specific feature;
[0048] S22, define parameter adjustment function Θ for the skin polishing and whitening function module whitening (f), according to the skin color feature P skin Adjust the intensity of microdermabrasion and whitening:
[0049]
[0050] Among them, α whitening Represents the adjustment coefficient of the skin resurfacing whitening intensity, which controls the proportion of adjusting the whitening intensity according to the skin color characteristics, τ skin Indicates the skin brightness threshold, which is used to activate the whitening intensity adjustment. When the skin brightness is lower than this value, the skin resurfacing and whitening effect is enhanced;
[0051] S23, for the dark circle removal function module, set the parameter adjustment function Θ dark_circles (f) According to P eye_size And adjust the intensity of the dark circle treatment:
[0052]
[0053] Among them, α dark_circles represents the adjustment coefficient of the dark circle treatment intensity, and λ represents the threshold constant, which is used to determine the limit when the enhanced dark circle removal treatment becomes significant;
[0054] S24, setting parameter adjustment function θ for the eye magnification function module eye_enlargement (f), according to the eye size P eye_size Adjust the parameters of eye enlargement:
[0055]
[0056] Among them, α eye_enlargement represents the adjustment factor of the eye magnification strength, τ eye_size represents the eye size adjustment threshold. When the actual eye size is lower than this value, the magnification effect is enhanced. κ represents the coefficient of the steepness of the adjustment curve, which controls the sensitivity of eye size adjustment.
[0057] S25, define parameter adjustment function Θ for wrinkle removal function module wrinkle_removal (f), according to the wrinkle condition P wrinkle Adjust the intensity of wrinkle removal:
[0058]
[0059] Among them, α wrinkle_removal represents the adjustment coefficient of wrinkle removal intensity, and the normalization function norm represents the function of normalizing the wrinkle degree x to the interval [0, 1];
[0060] S26, setting parameter adjustment function θ for the facial plumping function modulefacial_plumping (f), according to face shape P face_shape Adjust parameters for facial volumizing:
[0061]
[0062] Among them, α facirl_plumping Indicates the adjustment coefficient of facial volume intensity, max(P face_shape ) represents the maximum value of the facial feature and is used for normalization calculation;
[0063] S27, define parameter adjustment function Θ for double eyelid function module double_eyelid (f) According to whether there is double eyelid P eyelid Adjust double eyelid parameters:
[0064]
[0065] Among them, α double_eyelid Indicates the adjustment factor of double eyelid strength.
[0066] Optionally, S3 includes the following steps:
[0067] S31. Define a weight adjustment function Φ(f, P based on the output of the deep learning model feature ), used to calculate the weight coefficients for adjusting the parameters of each functional module, based on the identified feature strength:
[0068]
[0069] in, represents the basic weight of the functional module, β module is the adjustment amplitude coefficient, which determines the range of the feature's influence on the adjustment intensity, γ module is the adjustment sensitivity coefficient, which controls the reaction speed of the adjustment to the characteristic value, P feature is the portrait feature value corresponding to a specific function;
[0070] S32. For users with darker or uneven skin tones, adjust the weight coefficient of the skin resurfacing and whitening function module:
[0071]
[0072] Among them, log(1+P skin ) Enhance the nonlinear effect of skin color characteristics on skin resurfacing and whitening adjustment;
[0073] S33. For those with obvious dark circles or eye bags under the eyes, adjust the weight coefficient of the dark circle removal function module:
[0074]
[0075] S34. For users with rounder faces or larger bodies, the weight coefficient of the face and body slimming function module is adjusted, and the nonlinear adjustment of the face shape to the slimming effect is reflected by the logistic function:
[0076]
[0077] S35. For users with spots, acne or other skin blemishes on their faces, adjust the weight coefficient of the spot and acne removal function module, and modulate the influence of skin blemish characteristics through the denominator of the quadratic power:
[0078]
[0079] S36. For a user with small eyes, the weight coefficient of the eye magnification function module is increased, and the influence of the eye size feature is enhanced by using the tangent function:
[0080]
[0081] S37. For users with wrinkles or fine lines around the eyes and forehead, the weight coefficient of the wrinkle removal function module is increased, and the wrinkle feature is enhanced and adjusted through the quadratic term:
[0082]
[0083] S38. For a user with a thinner facial contour, the weight coefficient of the facial volume function module is adjusted, and the square root function provides adjustment for facial features:
[0084]
[0085] S39. For users with single eyelids or who want their eyes to look lively, the weight coefficient of the double eyelid function module is enabled or enhanced, and the inverse tangent function is used to gently adjust the influence of the double eyelid feature:
[0086]
[0087] Optionally, S4 includes the following steps:
[0088] S41, based on the initial image beautification parameters of the functional modules for each main image beautification processing module in step S2 The adjustment result and the function module parameter adjustment weight coefficient α calculated in step S3 module , calculate the final beauty image parameters:
[0089]
[0090] in, It is the basic parameter of the module. Based on user characteristics The adjusted weight coefficient, is a nonlinear function, according to the characteristics Importance Adjustment Contribution According to the characteristics The calculated maximum possible adjustment of the module parameters;
[0091] S42, automatically generate a set of beautification parameters customized for the uploaded portrait image features, the beautification parameters are obtained by adjusting the adjustment parameters θ of all modules final A complete parameter configuration set is formed to reflect the beautification needs of different users:
[0092]
[0093] Among them, U represents the merging operation, and the parameters of all modules are integrated into a unified parameter set, which is the result of optimization based on the interdependencies and influences between modules.
[0094] Optionally, S5 includes the following steps:
[0095] S51, applying the beautification parameter θ generated in step S4 custom , the uploaded portrait images are deeply optimized through the system's main image processing module;
[0096] S52, the main image beautification processing module performs image beautification by applying an algorithm according to the following process:
[0097] Image final =apply(Image original , Θ custon );
[0098] Among them, Image original is the original portrait image uploaded by the user, apply(·,·) is a function that applies the image to the given image according to the provided parameters Θ custom Perform beautification processing on the original image;
[0099] S53, the generated adjusted portrait image is displayed to the user, and the user sees the comparison effect before and after beautification;
[0100] S54. Provides fine-tuning options, allowing users to make detailed adjustments to the photo effects based on personal preferences.
[0101] The beneficial effects of the present invention are:
[0102] (1) The present invention uses a deep learning model to accurately analyze the specific features of portrait images uploaded by users, and can generate customized beautification parameters for each user. This processing improves the adaptability and satisfaction of the beautification effect, so that each user can obtain the beautification effect that best suits their characteristics and aesthetic needs.
[0103] (2) Unlike traditional static beautification parameters, the present invention can dynamically adjust beautification parameters based on the identified personal characteristics, thereby effectively optimizing for user-specific problems. The introduced weight coefficient based on model output allows users to finely control every detail of the beautification effect. Users can not only adjust the overall beautification intensity according to personal preferences, but also make detailed adjustments for specific areas, greatly enhancing the freedom and satisfaction of operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0105] Figure 1 This is a flow chart of a method for adjusting dynamic image beautification parameters based on a deep learning algorithm proposed in the present invention. DETAILED DESCRIPTION
[0106] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0107] refer to Figure 1 , a method for adjusting dynamic image parameters based on deep learning algorithm, comprising the following steps:
[0108] S1. Obtain user images and analyze the user images using a deep learning model. The deep learning model has been trained with a large amount of portrait image data and can identify the characteristics of the person in the user image, including skin color, face shape, skin problems, eye size, whether there are wrinkles, and whether there are double eyelids;
[0109] In this implementation, S1 includes the following steps:
[0110] S11, receiving a user image uploaded by the user through the system;
[0111] S12. Design a corresponding filter for each specific portrait feature and define filter k skin Used to capture skin color features, k face_shape For face recognition, and k eye_size , k wrinkle and k eyelidThey are used to analyze eye size, wrinkles and double eyelid status, and use filters to extract features from the input portrait image;
[0112] S13. Introducing a feature-dependent dynamic weight adjustment mechanism allows the deep learning model to adjust the contribution of each filter based on the content of the input portrait image:
[0113]
[0114] Among them, I ab represents the pixel value of the input portrait image at position (a, b), k feature (a, b) represents the weight value of the convolution kernel at position (a, b) for a specific feature feature;
[0115] S14. Implement a dedicated pooling strategy for each feature to retain and enhance important features, use a larger pooling window to retain the global information of the face shape, and use a smaller pooling window for detailed features:
[0116]
[0117] in, It is the set of regions for the specific feature pooling operation of the l-th layer pyramid, which is used to perform the maximum pooling operation. is the maximum pooling result obtained in the l-th layer of pyramid pooling;
[0118] S15. Combine the data obtained from each filter and pooling layer to construct a feature vector, which reflects the detailed information of skin color, face shape, eye size, wrinkles and whether there is double eyelid:
[0119] f=[P skin , P face_shape , P eye_size , P wrinkle , P eyelid ];
[0120] Among them, f is the final feature vector, which is the pooling result of different features. Composition, combining all important portrait feature information;
[0121] S16. For the identification of skin problems, the deep learning model distinguishes different types of skin problems, including dark circles and spots, and outputs them as features.
[0122] In this implementation, S16 includes the following steps:
[0123] S161, deploy two skin problem detection sub-networks, namely dark circles network N dark_circles and the spotted subnetwork N spots ;
[0124] S162, define the corresponding feature detection filter k for each sub-network dark_circles and k spots , and perform convolution operations on the uploaded portrait images to extract relevant features;
[0125] S163, applying a dynamic adjustment strategy to adjust the weight coefficient α of each filter feature (t):
[0126]
[0127] Among them, σ represents the Sigmoid activation function, which is used to adjust the weight coefficient according to the average intensity of the convolution output;
[0128] S164. Combining the convolution and weight adjustment results, the skin problem features identified are processed and refined through the subsequent layers of the neural network. The final feature expression is:
[0129] F feature =ReLU(β·C feature +γ);
[0130] Among them, β and γ are learnable parameters.
[0131] S2. Based on the user features identified by the deep learning model in step S1, the system dynamically adjusts the initial beautification parameters of the functional modules integrated within each main beautification processing module through a pre-designed algorithm. The functional modules include skin smoothing and whitening, dark circle removal, face and body slimming, freckle and acne removal, eye enlargement, wrinkle removal, facial plumping and double eyelids;
[0132] In this implementation, S2 includes the following steps:
[0133] S21, according to the feature vector f, the initial parameters of each functional module Automatically adjust the strength of the corresponding features in the feature vector, and dynamically adjust the parameters of each functional module:
[0134]
[0135] Among them, g i is the nonlinear adjustment function corresponding to the ith feature, Represents the initial parameter value of each functional module, indicating the default setting before any personalized adjustment. i Represents the adjustment coefficient, which is used to increase or decrease the influence of a specific feature;
[0136] S22, define parameter adjustment function Θ for the skin polishing and whitening function module whitening (f), according to the skin color feature P skinAdjust the intensity of microdermabrasion and whitening:
[0137]
[0138] Among them, α whitening Represents the adjustment coefficient of the skin resurfacing whitening intensity, which controls the proportion of adjusting the whitening intensity according to the skin color characteristics, τ skin Indicates the skin brightness threshold, which is used to activate the whitening intensity adjustment. When the skin brightness is lower than this value, the skin resurfacing and whitening effect is enhanced;
[0139] S23, for the dark circle removal function module, set the parameter adjustment function Θ dark_circles (f) According to P eye_size And adjust the intensity of the dark circle treatment:
[0140]
[0141] Among them, α dark_circles represents the adjustment coefficient of the dark circle treatment intensity, and λ represents the threshold constant, which is used to determine the limit when the enhanced dark circle removal treatment becomes significant;
[0142] S24, setting parameter adjustment function θ for the eye magnification function module eye_enlargement (f), according to the eye size P eye_size Adjust the parameters of eye enlargement:
[0143]
[0144] Among them, α eye_enlargement represents the adjustment factor of the eye magnification strength, τ eye_size represents the eye size adjustment threshold. When the actual eye size is lower than this value, the magnification effect is enhanced. κ represents the coefficient of the steepness of the adjustment curve, which controls the sensitivity of eye size adjustment.
[0145] S25, define parameter adjustment function Θ for wrinkle removal function module wrinkle_removal (f), according to the wrinkle condition P wrinkle Adjust the intensity of wrinkle removal:
[0146]
[0147] Among them, α wrinkle_removal represents the adjustment coefficient of wrinkle removal intensity, and the normalization function norm represents the function of normalizing the wrinkle degree x to the interval [0, 1];
[0148] S26, setting parameter adjustment function θ for the facial plumping function module facial_plumping (f), according to face shape P face_shape Adjust parameters for facial volumizing:
[0149]
[0150] Among them, α facial_plumping Indicates the adjustment coefficient of facial volume intensity, max(P face_shape ) represents the maximum value of the facial feature and is used for normalization calculation;
[0151] S27, define parameter adjustment function Θ for double eyelid function module double_eyelid (f) According to whether there is double eyelid P eyelid Adjust double eyelid parameters:
[0152]
[0153] Among them, α double_eyelid Indicates the adjustment factor of double eyelid strength.
[0154] S3. For each identified feature, a weight coefficient based on the output of the deep learning model is introduced, and the weight coefficient determines the intensity of the parameter adjustment of the corresponding functional module;
[0155] For users with darker or uneven skin tones, the deep learning model increases the adjustment intensity of the skin resurfacing and whitening parameters;
[0156] For patients with obvious dark circles or eye bags under the eyes, the deep learning model increases the adjustment intensity of dark circle removal parameters;
[0157] For users with rounder faces or larger bodies, the deep learning model increases the adjustment intensity of face and body slimming parameters;
[0158] For users with spots, acne or other skin blemishes on their faces, the deep learning model increases the adjustment intensity of the parameters for removing spots and acne;
[0159] For users with relatively small eyes, the deep learning model improves the adjustment strength of eye magnification parameters;
[0160] For users with wrinkles or fine lines around the eyes and forehead, the deep learning model increases the adjustment intensity of wrinkle removal parameters;
[0161] For users with thin facial contours, the deep learning model adjusts facial volume parameters;
[0162] For users with single eyelids or who want their eyes to look brighter, the deep learning model enables or enhances the double eyelid function module;
[0163] In this implementation, S3 includes the following steps:
[0164] S31. Define a weight adjustment function Φ(f, P based on the output of the deep learning model feature), used to calculate the weight coefficients for adjusting the parameters of each functional module, based on the identified feature strength:
[0165]
[0166] in, represents the basic weight of the functional module, β module is the adjustment amplitude coefficient, which determines the range of the feature's influence on the adjustment intensity, γ module is the adjustment sensitivity coefficient, which controls the reaction speed of the adjustment to the characteristic value, P feature is the portrait feature value corresponding to a specific function;
[0167] S32. For users with darker or uneven skin tones, adjust the weight coefficient of the skin resurfacing and whitening function module:
[0168]
[0169] Among them, log(1+P skin ) Enhance the nonlinear effect of skin color characteristics on skin resurfacing and whitening adjustment;
[0170] S33. For those with obvious dark circles or eye bags under the eyes, adjust the weight coefficient of the dark circle removal function module:
[0171]
[0172] S34. For users with rounder faces or larger bodies, the weight coefficient of the face and body slimming function module is adjusted, and the nonlinear adjustment of the face shape to the slimming effect is reflected by the logistic function:
[0173]
[0174] S35. For users with spots, acne or other skin blemishes on their faces, adjust the weight coefficient of the spot and acne removal function module, and modulate the influence of skin blemish characteristics through the denominator of the quadratic power:
[0175]
[0176] S36. For a user with small eyes, the weight coefficient of the eye magnification function module is increased, and the influence of the eye size feature is enhanced by using the tangent function:
[0177]
[0178] S37. For users with wrinkles or fine lines around the eyes and forehead, the weight coefficient of the wrinkle removal function module is increased, and the wrinkle feature is enhanced and adjusted through the quadratic term:
[0179]
[0180] S38. For a user with a thinner facial contour, the weight coefficient of the facial volume function module is adjusted, and the square root function provides adjustment for facial features:
[0181]
[0182] S39. For users with single eyelids or who want their eyes to look lively, the weight coefficient of the double eyelid function module is enabled or enhanced, and the inverse tangent function is used to gently adjust the influence of the double eyelid feature:
[0183]
[0184] S4, combining the results of steps S2 and S3, the software automatically generates a set of image beautification parameters customized for the uploaded portrait image features;
[0185] In this implementation, S4 includes the following steps:
[0186] S41, based on the initial image beautification parameters of the functional modules for each main image beautification processing module in step S2 The adjustment result and the function module parameter adjustment weight coefficient α calculated in step S3 module , calculate the final beauty image parameters:
[0187]
[0188] in, It is the basic parameter of the module. Based on user characteristics The adjusted weight coefficient, is a nonlinear function, according to the characteristics Importance Adjustment Contribution According to the characteristics The calculated maximum possible adjustment of the module parameters;
[0189] S42, automatically generate a set of beautification parameters customized for the uploaded portrait image features, the beautification parameters are obtained by adjusting the adjustment parameters θ of all modules final A complete parameter configuration set is formed to reflect the beautification needs of different users:
[0190]
[0191] Among them, U represents the merging operation, and the parameters of all modules are integrated into a unified parameter set, which is the result of optimization based on the interdependencies and influences between modules.
[0192] S5. Apply the customized beautification parameters in step S4, perform deep optimization processing on the uploaded portrait image through the main beautification processing module, generate an adjusted portrait image, display the deeply optimized portrait image to the user, and provide further fine-tuning options.
[0193] In this implementation, S5 includes the following steps:
[0194] S51, applying the beautification parameter θ generated in step S4 custom , the uploaded portrait images are deeply optimized through the system's main image processing module;
[0195] S52, the main image beautification processing module performs image beautification by applying an algorithm according to the following process:
[0196] Image final =apply(Image original , Θ custom );
[0197] Among them, Image original is the original portrait image uploaded by the user, apply(·,·) is a function that applies the image to the given image according to the provided parameters Θ custom Perform beautification processing on the original image;
[0198] S53, the generated adjusted portrait image is displayed to the user, and the user sees the comparison effect before and after beautification;
[0199] S54. Provides fine-tuning options, allowing users to make detailed adjustments to the photo effects based on personal preferences.
[0200] This implementation method uses a well-trained deep learning model to analyze the portrait images uploaded by users, accurately identifies a variety of character features in the image, and makes personalized parameter adjustments based on these features. According to the features identified by the deep learning model, the beautification parameters are dynamically adjusted, which can not only adjust the overall beautification effect, but also perform specific optimization for specific problems. At the same time, weight coefficients based on model output are introduced. These weight coefficients dynamically adjust the parameters of each functional module according to the identified features, thereby achieving detailed adjustments for individual differences. By combining all adjustment parameters to generate the final beautification effect, and allowing users to fine-tune the results according to their personal preferences, the user experience is further enhanced.
[0201] The present invention uses a deep learning model to accurately analyze the specific features in portrait images uploaded by users, and can generate customized beautification parameters for each user. This processing improves the adaptability and satisfaction of the beautification effect, so that each user can obtain the beautification effect that best suits their characteristics and aesthetic needs.
[0202] Unlike traditional static beautification parameters, the present invention can dynamically adjust beautification parameters according to the identified personal characteristics, thereby effectively optimizing for user-specific problems. The introduced weight coefficient based on model output allows users to finely control every detail of the beautification effect. Users can not only adjust the overall beautification intensity according to personal preferences, but also make detailed adjustments for specific areas, greatly enhancing the freedom and satisfaction of operation.
[0203] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for adjusting dynamic image parameters based on deep learning algorithm, characterized in that: The following steps are involved: S1. When a user uploads a portrait image to be processed to the Meitu software, the deep learning model is used to analyze the portrait image to be processed. The deep learning model has been trained with a large amount of portrait image data and can identify the characteristics of the person in the portrait image to be processed, including skin color, face shape, skin problems, eye size, whether there are wrinkles, and whether there are double eyelids; S2. Based on the user features identified by the deep learning model in step S1, the beautification software dynamically adjusts the initial beautification parameters of the functional modules integrated within each main beautification processing module through a pre-designed algorithm. The functional modules include skin resurfacing and whitening, dark circle removal, face and body slimming, freckle and acne removal, eye enlargement, wrinkle removal, facial plumping and double eyelids; S3. For each identified feature, a weight coefficient based on the output of the deep learning model is introduced, and the weight coefficient determines the intensity of the parameter adjustment of the corresponding functional module; For users with darker or uneven skin tones, the deep learning model increases the adjustment intensity of the skin resurfacing and whitening parameters; For patients with obvious dark circles or eye bags under the eyes, the deep learning model increases the adjustment intensity of dark circle removal parameters; For users with rounder faces or larger bodies, the deep learning model increases the adjustment intensity of face and body slimming parameters; For users with spots, acne or other skin blemishes on their faces, the deep learning model increases the adjustment intensity of the parameters for removing spots and acne; For users with relatively small eyes, the deep learning model improves the adjustment strength of eye magnification parameters; For users with wrinkles or fine lines around the eyes and forehead, the deep learning model increases the adjustment intensity of wrinkle removal parameters; For users with thin facial contours, the deep learning model adjusts facial volume parameters; For users with single eyelids or who want their eyes to look brighter, the deep learning model enables or enhances the double eyelid function module; S4, combining the results of steps S2 and S3, the software automatically generates a set of image beautification parameters customized for the uploaded portrait image features; S5, applying the customized beautification parameters in step S4, performing deep optimization processing on the uploaded portrait image through the main beautification processing module, generating an adjusted portrait image, displaying the deeply optimized portrait image to the user, and providing further fine-tuning options; The S1 comprises the following steps: S11, receiving a portrait image to be processed uploaded by a user through a beauty software; S12. Design a corresponding filter for each specific portrait feature and define filter k skin Used to capture skin color features, k face_shape For face recognition, and k eye_size , k wrinkle and k eyelid They are used to analyze eye size, wrinkles and double eyelid status, and use filters to extract features from the input portrait image; S13. Introducing a feature-dependent dynamic weight adjustment mechanism allows the deep learning model to adjust the contribution of each filter based on the content of the input portrait image: Among them, I ab Represents the pixel value of the input portrait image at position (a, b), α feature (t) represents the weight coefficient, k feature (a, b) represents the weight value of the convolution kernel at position (a, b) for a specific feature feature; S14. Implement a dedicated pooling strategy for each feature to retain and enhance important features, use a larger pooling window to retain the global information of the face shape, and use a smaller pooling window for detailed features: in, It is the set of regions for the specific feature pooling operation of the l-th layer pyramid, which is used to perform the maximum pooling operation. is the maximum pooling result obtained in the l-th layer of pyramid pooling; S15. Combine the data obtained from each filter and pooling layer to construct a feature vector, which reflects the detailed information of skin color, face shape, eye size, wrinkles and whether there is double eyelid: f=[P skin ,P face_shape ,P eye_size ,P wrinkle ,P eyelid ]; Among them, f is the final feature vector, which is the pooling result of different features. Composition, combining all important portrait feature information; S16. For skin problem identification, the deep learning model distinguishes different types of skin problems, including dark circles and spots, and outputs them as features; The S16 comprises the following steps: S161, deploy two skin problem detection sub-networks, namely dark circles network N dark_circles and the spotted subnetwork N spots ; S162, define the corresponding feature detection filter k for each sub-network dark_circles and k spots , and perform convolution operations on the uploaded portrait images to extract relevant features; S163, applying a dynamic adjustment strategy to adjust the weight coefficient α of each filter feature (t): Among them, σ represents the Sigmoid activation function, which is used to adjust the weight coefficient according to the average intensity of the convolution output; S164. Combining the convolution and weight adjustment results, the skin problem features identified are processed and refined through the subsequent layers of the neural network. The final feature expression is: F feature =ReLU(β·C feature +c); Among them, β and γ are learnable parameters.
2. According to the method for adjusting parameters of dynamic image beautification based on deep learning algorithm in claim 1, it is characterized in that: The S2 comprises the following steps: S21, according to the feature vector f, the initial parameters of each functional module Automatically adjust the strength of the corresponding features in the feature vector, and dynamically adjust the parameters of each functional module: Among them, g i is the nonlinear adjustment function corresponding to the ith feature, Represents the initial parameter value of each functional module, indicating the default setting before any personalized adjustment. i Represents the adjustment coefficient, which is used to increase or decrease the influence of a specific feature; S22, define parameter adjustment function Θ for the skin polishing and whitening function module whitening (f), according to the skin color feature P skin Adjust the intensity of microdermabrasion and whitening: Among them, α whitening Represents the adjustment coefficient of the skin resurfacing whitening intensity, which controls the proportion of adjusting the whitening intensity according to the skin color characteristics, τ skin Indicates the skin brightness threshold, which is used to activate the whitening intensity adjustment. When the skin brightness is lower than this value, the skin resurfacing and whitening effect is enhanced; S23, for the dark circle removal function module, set the parameter adjustment function Θ dark_circles (f) According to P eye_size And adjust the intensity of the dark circle treatment: Among them, α dark_circles represents the adjustment coefficient of the dark circle treatment intensity, and λ represents the threshold constant, which is used to determine the limit when the enhanced dark circle removal treatment becomes significant; S24, setting parameter adjustment function θ for the eye magnification function module eye_enlargement (f), according to the eye size P eye_size Adjust the parameters of eye enlargement: Among them, α eye_enlargement represents the adjustment factor of the eye magnification strength, τ eye_size represents the eye size adjustment threshold. When the actual eye size is lower than this value, the magnification effect is enhanced. κ represents the coefficient of the steepness of the adjustment curve, which controls the sensitivity of eye size adjustment. S25, define parameter adjustment function Θ for wrinkle removal function module wrinkle_removal (f), according to the wrinkle condition P wrinkle Adjust the intensity of wrinkle removal: Among them, α wrinkle_removal represents the adjustment coefficient of wrinkle removal intensity, and the normalization function norm represents the function of normalizing the wrinkle degree x to the interval [0,1]; S26, setting parameter adjustment function θ for the facial plumping function module facial_plumping (f), according to face shape P face_shape Adjust parameters for facial volumizing: Among them, α facial_plumping Indicates the adjustment coefficient of facial volume intensity, max(P face_shape ) represents the maximum value of the facial feature and is used for normalization calculation; S27, define parameter adjustment function Θ for double eyelid function module double_eyelid (f) According to whether there is double eyelid P eyelid Adjust double eyelid parameters: Among them, α double_eyelid Indicates the adjustment factor of double eyelid strength.
3. The method for adjusting dynamic image parameters based on deep learning algorithm according to claim 2, characterized in that: The S3 comprises the following steps: S31. Define the weight adjustment function Φ(f,P based on the output of the deep learning model feature ), used to calculate the weight coefficients for adjusting the parameters of each functional module, based on the identified feature strength: in, represents the basic weight of the functional module, β module is the adjustment amplitude coefficient, which determines the range of the feature's influence on the adjustment intensity, γ module is the adjustment sensitivity coefficient, which controls the reaction speed of the adjustment to the characteristic value, P feature is the portrait feature value corresponding to a specific function; S32. For users with darker or uneven skin tones, adjust the weight coefficient of the skin resurfacing and whitening function module: Among them, log(1+P skin ) Enhance the nonlinear effect of skin color characteristics on skin resurfacing and whitening adjustment; S33. For those with obvious dark circles or eye bags under the eyes, adjust the weight coefficient of the dark circle removal function module: S34. For users with rounder faces or larger bodies, the weight coefficient of the face and body slimming function module is adjusted, and the nonlinear adjustment of the face shape to the slimming effect is reflected by the logistic function: S35. For users with spots, acne or other skin blemishes on their faces, adjust the weight coefficient of the spot and acne removal function module, and modulate the influence of skin blemish characteristics through the denominator of the quadratic power: S36. For a user with small eyes, the weight coefficient of the eye magnification function module is increased, and the influence of the eye size feature is enhanced by using the tangent function: S37. For users with wrinkles or fine lines around the eyes and forehead, the weight coefficient of the wrinkle removal function module is increased, and the wrinkle feature is enhanced and adjusted through the quadratic term: S38. For a user with a thinner facial contour, the weight coefficient of the facial volume function module is adjusted, and the square root function provides adjustment for facial features: S39. For users with single eyelids or who want their eyes to look lively, the weight coefficient of the double eyelid function module is enabled or enhanced, and the inverse tangent function is used to gently adjust the influence of the double eyelid feature:
4. The method for adjusting dynamic image parameters based on deep learning algorithm according to claim 3, characterized in that: The S4 comprises the following steps: S41, based on the initial image beautification parameters of the functional modules for each main image beautification processing module in step S2 The adjustment result and the function module parameter adjustment weight coefficient α calculated in step S3 module , calculate the final beauty image parameters: in, It is the basic parameter of the module. Based on user characteristics Adjusted weight coefficient, is a nonlinear function, according to the characteristics Importance Adjustment Contribution According to the characteristics The calculated maximum possible adjustment of the module parameters; S42, automatically generate a set of beautification parameters customized for the uploaded portrait image features, the beautification parameters are obtained by adjusting the adjustment parameters θ of all modules final A complete parameter configuration set is formed to reflect the beautification needs of different users: Among them, ∪ represents the merging operation, and the parameters of all modules are integrated into a unified parameter set, which is the result of optimization based on the interdependencies and influences between modules.
5. The method for adjusting dynamic image parameters based on deep learning algorithm according to claim 4, characterized in that: The S5 comprises the following steps: S51, applying the beautification parameter θ generated in step S4 custom , the uploaded portrait images are deeply optimized through the main beauty processing module of the beauty software; S52, the main image beautification processing module performs image beautification by applying an algorithm according to the following process: Image final =apply(Image original ,Θ custom ); Among them, Image original is the original portrait image uploaded by the user, apply(·,·) is a function that applies the image to the given image according to the provided parameters Θ custom Perform beautification processing on the original image; S53, the generated adjusted portrait image is displayed to the user, and the user sees the comparison effect before and after beautification; S54. Provides fine-tuning options, allowing users to make detailed adjustments to the photo effects based on personal preferences.
