A training method for removing double chin models from images

By constructing pseudo double chin image data and using VGGloss and GANloss to train the model, the problems of low accuracy and high complexity of double chin removal algorithms in existing technologies are solved, achieving fast and efficient double chin removal, and making the image beautiful and natural.

CN116543265BActive Publication Date: 2025-09-19XIAMEN LIKE SWEET TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310670895.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-09-19
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

In the existing field of image beautification, double chin removal algorithms have problems such as low prediction accuracy, high complexity, slow speed and severe overfitting. Existing deep learning algorithms are difficult to effectively remove double chins.

Method used

By constructing pseudo double chin image data, using original person image data for supervision, combining VGGloss and GANloss loss functions, and using gradient backpropagation method to train the double chin removal model, fast and efficient model training and removal can be achieved.

Benefits of technology

It can quickly and efficiently remove double chins from people in pictures, improve the accuracy and aesthetics of the model, and avoid tedious manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543265B_ABST
    Figure CN116543265B_ABST
Patent Text Reader

Abstract

The present invention discloses a training method for a double chin removal model for a person in an image. The method comprises: obtaining original person image data and pseudo double chin image data generated based on the original person image data; inputting the pseudo double chin image data into a double chin removal model, outputting a double chin region mask identified by the model and normal chin image data without a double chin generated by the model; fusing the normal chin image data with the original person image data to generate a result image; calculating a loss function using the result image and the original person image data, and iterating the double chin removal model using a gradient backpropagation method until the model converges. The present invention can effectively and quickly train a double chin removal model, thereby achieving one-click removal of a person's double chin from an image, eliminating the need for complex manual double chin removal using various photo editing tools. Furthermore, the image produced after double chin removal by this technical solution is beautiful and natural.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of age prediction, and in particular to a training method for removing a double chin model of a person in an image. Background Art

[0002] A double chin is caused by excessive accumulation of fat tissue in the chin, coupled with aging and loose skin, which sags due to gravity. From the appearance, it looks like there is a double chin, the neck looks swollen, short and thick, and the person loses the inherent beauty of lines and curves.

[0003] In the current field of image beautification, double chin removal is often performed manually, using various complex image editing tools for incremental optimization. Existing double chin removal algorithms often rely on manual feature extraction, which may not accurately represent facial features. Consequently, prediction accuracy is low, inferior to deep learning. The main challenges with existing deep learning algorithms are high algorithm complexity, slow speed, severe overfitting, and large prediction bias. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to propose a training method for removing double chins from pictures, which can use the original image and pseudo data to train and supervise the model, achieve fast and efficient model training, and improve the accuracy of the model.

[0005] According to one aspect of the present invention, a training method for a model for removing a double chin from a person in an image is provided, comprising: obtaining original person image data and pseudo double chin image data generated based on the original person image data; inputting the pseudo double chin image data into a double chin removal model, outputting a double chin region mask identified by the model and normal chin image data without a double chin generated by the model; fusing the normal chin image data with the original person image data to generate a result graph; calculating a loss function using the result graph and the original person image data, and iteratively updating the double chin removal model using a gradient backpropagation method until the model converges.

[0006] In the above technical solution, original person image data is first used to construct pseudo double chin image data to form data pairs. Compared to traditional methods that require large amounts of data and tedious manual annotation, the technical approach adopted in this solution allows for rapid dataset construction, while also allowing the original person image data to be used for subsequent model supervision, achieving two goals at once. Secondly, the constructed pseudo double chin image data is input into a pre-built double chin removal model, which uses the model to identify the double chin region mask in the pseudo double chin image data and the normal chin image without a double chin after model processing. Finally, the normal chin image without a double chin is fused with the original person image data using the double chin region mask, and a loss function is further calculated to perform a reverse gradient propagation update on the pre-built double chin removal model, thereby completing rapid model training and effectively improving model accuracy. This technical solution effectively and quickly trains a double chin removal model, enabling one-click double chin removal in images, eliminating the need for complex manual double chin removal using various photo editing tools. Furthermore, the resulting double chin removal results in beautiful and natural-looking images.

[0007] In some embodiments, obtaining original person image data and pseudo double chin image data generated based on the original person image data specifically includes:

[0008] Use algorithms to identify facial regions in original character image data;

[0009] Identify the chin area of ​​the person based on the face area and randomly move the chin area along the neck direction;

[0010] The randomly moved character chin area is fused with the original character image data and a shadow is added to the character chin area to output pseudo double chin image data.

[0011] In the above technical solution, to better construct pseudo-double chin image data, this solution first uses an algorithm to accurately identify the facial region in the original person image data. It then further identifies the chin region and uses image processing methods such as liquefaction to randomly shift the chin region along the neck. Finally, this randomly generated pseudo-double chin image data is fused with the original person image data to obtain the pseudo-double chin image data. Furthermore, to improve the accuracy of the model, this solution further uses image processing methods such as masking to add shadows to the pseudo-double chin image data after generation to enhance the realism of the double chin. Because the original person's chin is used to construct the double chin, the pseudo-double chin image data is more realistic and natural. Upon completion, the system has a data pair consisting of the original person image data and the pseudo-double chin image data generated based on the original person image data.

[0012] In some embodiments, the normal chin image data is fused with the original person image data to generate a result image, specifically including:

[0013] The normal chin image data is mask-fused with the double chin area mask and the original character image data to obtain the result image. The mask fusion formula is as follows:

[0014] R=Mask*C+(1-Mask)*A

[0015] Among them, R is the result image, C is the normal chin image data, and A is the original person image data.

[0016] In the above technical solution, the mask fusion method is used to fuse the normal chin data domain obtained by model processing with the original character image data, which helps to subsequently calculate the loss function and use the backpropagation algorithm to update the model parameters, thereby continuously optimizing the performance of the model. At the same time, the original character image data is used to supervise the training of the model and improve the accuracy of the model.

[0017] In some embodiments,

[0018] The loss functions include VGGloss and GANloss;

[0019] The GANloss formula is as follows:

[0020] min G max D V(D,G)=Ex~pdata(x)[logD(x)]+Ez~pz(z)[log(1-D(G(z)))]where G is the generator, D is the discriminator, pdata is the distribution of real data, and pz is the distribution of noise. Gz) represents the fake data generated from the noise z. Dx is the output of the discriminator for the input x, which represents the probability that the input x is real data. V(D,G) is the loss function, which represents the game relationship between the discriminator and the generator. During the training process, the goal of the generator is to make the discriminator unable to distinguish between the generated fake data and the real data, while the goal of the discriminator is to distinguish between the real data and the fake data as accurately as possible;

[0021] The VGGLOSS formula is as follows:

[0022]

[0023] Among them, I fake is the generated fake image, I real is a real image, Represents the feature representation of the i-th layer in the VGG network.

[0024] In the above technical solution, the purpose of this setting is to use VGGloss and GANloss together and achieve improved results. VGGloss is used to supervise the structure of the image, and GANloss is used to supervise the details of the image.

[0025] In some embodiments, the loss function is calculated using the result image and the original person image data and the double chin removal model is updated iteratively using gradient back propagation, which then includes:

[0026] Calculate the image superposition diff residual of the original character image data and the result image. The formula is as follows:

[0027] I res (x)=I(x)-I ref (x)

[0028] Among them, I(x) is the original image, I ref (x) is the result graph, I res (x) is the calculated residual image.

[0029] In this technical solution, calculating the diff residual image allows the results of the double chin removal model modification at low resolution to be applied to the high-resolution image, thereby improving model training efficiency. Because the diff residual obtains the difference between the original image and the result at low resolution and then overlays it on the high-resolution image, it only removes the double chin texture in the high-resolution image without affecting other textures and causing image blur. This solution can maintain the image's high resolution while removing the double chin texture.

[0030] According to another aspect of the present invention, a method for removing a double chin from a person in an image is provided, comprising: obtaining an image of a person with a double chin to be processed;

[0031] Input the double chin image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing;

[0032] The double chin removal model is trained by the above-mentioned training method for removing the double chin model of a person in an image.

[0033] In the above technical solution, the double chin removal model trained by the above training method for removing the double chin model of a person in an image can remove the double chin of the person with one click, making the chin of the person beautiful and natural.

[0034] According to another aspect of the present invention, there is provided a training device for removing a double chin model of a person in an image, characterized in that it comprises an acquisition module, an analysis module, a fusion module and an update module connected in sequence;

[0035] The acquisition module is used to acquire original character image data and pseudo double chin image data generated based on the original character image data;

[0036] The analysis module is used to input the pseudo double chin image data into the double chin removal model and output the double chin area mask identified by the model and the normal chin image data without double chin generated by the model;

[0037] The fusion module is used to fuse the normal chin image data with the original character image data to generate a result image;

[0038] The update module is used to calculate the loss function using the result image and the original person image data and use the gradient backpropagation method to iteratively update the double chin removal model until the model converges.

[0039] In the above technical solution, a training device is further provided to improve model training efficiency. First, an acquisition module is used to obtain original person image data and pseudo double chin image data generated based on the original person image data. Second, an analysis module is used to input the pseudo double chin image data into the double chin removal model, which outputs a double chin area mask identified by the model and a normal chin image data without a double chin generated by the model. Third, a fusion module is used to fuse the normal chin image data with the original person image data to generate a result image. Finally, an update module is used to calculate a loss function using the result image and the original person image data and iteratively update the double chin removal model using gradient backpropagation until the model converges.

[0040] According to another aspect of the present invention, there is provided an apparatus for removing a double chin of a person in a picture, based on the above-mentioned method for removing a double chin of a person in a picture, comprising a collection module, a processing module, and an output module connected in sequence;

[0041] The acquisition module is used to obtain the double chin person image to be processed;

[0042] The processing module is used to input the double chin person image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing.

[0043] According to another aspect of the present invention, a device capable of removing a double chin from a person in an image is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-described methods for training a model for removing a double chin from a person in an image.

[0044] According to another aspect of the present invention, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the method for training a model for removing a double chin from a person in an image as described in any one of the above items is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 This is a flow chart of an embodiment of a training method for removing a double chin model of a person in an image according to the present invention;

[0047] Figure 2 1. It is a flow chart of model training according to an embodiment of a training method for removing a double chin model of a person in an image according to the present invention;

[0048] Figure 3 This is an image before double chin image processing according to an embodiment of a training method for removing a double chin model of a person in an image of the present invention;

[0049] Figure 4 This is an image after double chin image processing according to an embodiment of a training method for removing a double chin model of a person in an image of the present invention;

[0050] Figure 5 1. It is a schematic diagram of a mask fusion process according to an embodiment of a training method for removing a double chin model of a person in an image according to the present invention;

[0051] Figure 6 This is a schematic diagram of the loss function calculation process of an embodiment of a training method for removing a double chin model of a person in an image according to the present invention. DETAILED DESCRIPTION

[0052] The present invention will be described in further detail below with reference to the accompanying drawings and examples. It is particularly noted that the following examples are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. Similarly, the following examples are only some embodiments of the present invention and are not intended to be exhaustive. All other embodiments obtained by those of ordinary skill in the art without creative effort are intended to fall within the scope of protection of the present invention.

[0053] The present invention provides a training method for removing double chins from a person's image. The method can utilize the original image and pseudo data to train and supervise the model, thereby achieving fast and efficient model training and improving the accuracy of the model.

[0054] Example 1

[0055] See Figure 1 , Figure 1 This is a flow chart of an embodiment of a training method for removing a double chin model of a person in an image according to the present invention. It should be noted that the method of the present invention is not limited to the training method of the person in the image. Figure 1 The process sequence shown is limited. Figure 1 As shown, the method includes the following steps:

[0056] S101, obtaining original person image data and pseudo double chin image data generated based on the original person image data;

[0057] In this embodiment, the original character image data may be single-person image data or multi-person image data, which is not limited in this embodiment.

[0058] In this embodiment, S101, obtaining original person image data and pseudo double chin image data generated based on the original person image data, specifically includes:

[0059] S1011, using an algorithm to identify a face region in the original person image data;

[0060] S1012, identifying the chin area of ​​the person based on the face area, and randomly moving the chin area of ​​the person along the neck direction;

[0061] S1013: Fusing the randomly moved character chin region with the original character image data and adding a shadow to the character chin region to output pseudo double chin image data.

[0062] In this embodiment, to better construct pseudo-double chin image data, this technical solution first uses an algorithm to accurately identify the facial region in the original person image data. It then further identifies the chin region and uses image processing methods such as liquefaction to randomly shift the chin region along the neck. Finally, this randomly generated pseudo-double chin image data is fused with the original person image data to obtain the pseudo-double chin image data. Furthermore, to improve the accuracy of the model, this technical solution further uses image processing methods such as masking to add shadows to the pseudo-double chin image data after generation to enhance the realism of the double chin. Because the original person's chin is used to construct the double chin, the pseudo-double chin image data appears more realistic and natural. Upon completion, a data pair consisting of the original person image data and the pseudo-double chin image data generated based on the original person image data is obtained.

[0063] S102, inputting the pseudo double chin image data into a double chin removal model, outputting a double chin area mask identified by the model and normal chin image data without a double chin generated by the model;

[0064] In this embodiment, the double chin removal model is a pre-built solution. The specific model example is not limited in this embodiment. It only needs to be able to output a double chin area mask identified by the model and a normal chin image data without a double chin generated by the model. It is important to note that this embodiment also does not limit the size and resolution of the image data, nor does it specify the pre-processing steps required when inputting the image data into the model.

[0065] S103, fusing the normal chin image data with the original person image data to generate a result image;

[0066] In this embodiment, the specific steps are as follows:

[0067] S1031,

[0068] The normal chin image data is fused with the original person image data to generate the result image, which specifically includes:

[0069] The normal chin image data is mask-fused with the double chin area mask and the original character image data to obtain the result image. The mask fusion formula is as follows:

[0070] R=Mask*C+(1-Mask)*A

[0071] Among them, R is the result image, C is the normal chin image data, and A is the original person image data.

[0072] In this embodiment, the mask fusion method is used to fuse the normal chin data domain obtained by model processing with the original character image data, which helps to subsequently calculate the loss function and use the back propagation algorithm to update the model parameters, thereby continuously optimizing the performance of the model. At the same time, the original character image data is used to supervise the training of the model and improve the accuracy of the model.

[0073] S104. Calculate the loss function using the result image and the original person image data and use the gradient back propagation method to iteratively update the double chin removal model until the model converges.

[0074] In this embodiment,

[0075] The loss functions include VGGloss and GANloss;

[0076] The GANloss formula is as follows:

[0077] min G max Dv(D,G)=Ex~pdata(x)[logD(x)]+Ez~pz(z)[log(1-D(G(z)))]where G is the generator, D is the discriminator, pdata is the distribution of real data, and pz is the distribution of noise. Gz) represents the fake data generated from the noise z. Dx is the output of the discriminator for the input x, which represents the probability that the input x is real data. V(D,G) is the loss function, which represents the game relationship between the discriminator and the generator. During the training process, the goal of the generator is to make the discriminator unable to distinguish between the generated fake data and the real data, while the goal of the discriminator is to distinguish between the real data and the fake data as accurately as possible;

[0078] The VGGLOSS formula is as follows:

[0079]

[0080] Among them, I fake is the generated fake image, I real is a real image, Represents the feature representation of the i-th layer in the VGG network. In this embodiment, the purpose of this setting is to use VGGloss and GANloss together and achieve improved results. VGGloss is used to supervise the structure of the image, and GANloss is used to supervise the details of the image.

[0081] In this embodiment, S104, using the result image and the original person image data to calculate the loss function and using the gradient back propagation method to iteratively update the double chin removal model until the model converges, further includes:

[0082] S105, calculate the image superposition diff residual of the original character image data and the result image, the formula is as follows:

[0083] I res (x)=I(x)-I ref (x)

[0084] Among them, I(x) is the original image, I ref (x) is the result graph, I res (x) is the calculated residual image.

[0085] In this embodiment, calculating the diff residual image allows the results of double chin removal model modifications at low resolution to be applied to high resolution, thereby improving model training efficiency. Because the diff residual obtains the difference between the original image and the resulting image at low resolution and then overlays it on the high-resolution image, it only removes the double chin texture in the high-resolution image without affecting other textures and causing image blur. This solution can maintain high resolution while removing the double chin texture.

[0086] In this example, the model converges if the double chin is successfully removed from the test images, and the loss is basically no longer decreasing.

[0087] In this embodiment, all steps are further explained with specific examples:

[0088] (1) Creating a data pair for model training (i.e., step S101)

[0089] The specific process is as follows

[0090] 1. Recognize the face and determine the chin area

[0091] 2. Randomly move the chin area a certain distance below the face and merge it back into the original image (the original face is covered on the extracted chin area), and obtain a fake user image with two chins to simulate the user's double chin structure.

[0092] 3. Add shadows to the fused user image to make the double chin more realistic.

[0093] 4. After the production is completed, we have a data pair (A, B), where A is the original image and B is the fake double chin image.

[0094] (2) Model training and final effect application (i.e. steps S102-104)

[0095] See also Figure 2 , Figure 2 The flowchart for model training includes the following steps:

[0096] 1. Enter double chin image B

[0097] 2. Enter the double chin removal model M

[0098] 3. Model output results C, D

[0099] 4. C is the normal chin without double chin generated by the model, and D is the double chin area mask identified by the model

[0100] 5.C uses Mask to fuse with the original image to generate the result image R

[0101] 6.Calculate the loss using R and the original image.

[0102] 7. Loss gradient is passed back to model M for model iteration

[0103] 8. Diff between the calculated result image and the original image after the model converges

[0104] 9. Zoom in to high resolution and overlay the diff onto the high resolution image

[0105] Among them, steps 4 and 5 are to fuse the model's double chin removal results with the original image to obtain the final double chin removal result image R. Step 6 uses the loss function to calculate the difference between the model's predicted results and the actual results. Step 7 uses the backpropagation algorithm to update the model parameters to continuously optimize the model's performance. Steps 8 and 9 are to apply the low-resolution results to the high-resolution ones. For the final result comparison chart, please refer to Figure 3 、 Figure 4 .

[0106] Among them, see Figure 5 , Figure 5 This is the flowchart of step 5. The normal chin image data is mask-fused with the original person image data using the double chin area mask to obtain the result image. The mask fusion formula is as follows:

[0107] R=Mask*C+(1-Mask)*A

[0108] Among them, R is the result image, C is the normal chin image data, and A is the original person image data.

[0109] Among them, see Figure 6 , Figure 6 This is the flowchart for step 6.

[0110] The loss functions include VGGloss and GANloss;

[0111] The GANloss formula is as follows:

[0112] min G max DV(D,G)=Ex~pdata(x)[logD(x)]+Ez~pz(z)|log(1-D(G(z)))] Where G is the generator, D is the discriminator, pdata is the distribution of real data, and pz is the distribution of noise. Gz) represents the fake data generated from the noise z. Dx is the output of the discriminator for the input x, which represents the probability that the input x is real data. V(D,G) is the loss function, which represents the game relationship between the discriminator and the generator. During the training process, the goal of the generator is to make the discriminator unable to distinguish between the generated fake data and the real data, while the goal of the discriminator is to distinguish between the real data and the fake data as accurately as possible;

[0113] The VGGLOSS formula is as follows:

[0114]

[0115] Among them, I fake is the generated fake image, is a real image, Represents the feature representation of the i-th layer in the VGG network.

[0116] The diff calculation formula in step 9 is as follows:

[0117] I res (x)=I(x)-I ref (x)

[0118] Among them, I(x) is the original image, I ref (x) is the result graph, I res (x) is the calculated residual image. Calculating the diff residual image allows the results of the double chin removal model modification at low resolution to be applied to high resolution, thereby improving model training efficiency. Because the diff residual obtains the difference between the original image and the result at low resolution and then overlays it on the high-resolution image, it only removes the double chin texture in the high-resolution image without affecting other textures and causing image blur. This solution can maintain the image's high resolution while removing the double chin texture.

[0119] In this embodiment, pseudo double chin image data is first constructed using original person image data to form data pairs. Compared to traditional methods that require large amounts of data and tedious manual annotation, this technical solution utilizes a method that rapidly constructs a dataset while also allowing the original person image data to be used for subsequent model supervision, achieving two goals at once. Secondly, the constructed pseudo double chin image data is input into a pre-built double chin removal model, which then identifies the double chin region mask within the pseudo double chin image data and a normal chin image without a double chin after model processing. Finally, the normal chin image without a double chin is fused with the original person image data using the double chin region mask, and a loss function is further calculated to perform a reverse gradient propagation update on the pre-built double chin removal model. This allows for rapid model training and effectively improves model accuracy. This technical solution effectively and rapidly trains a double chin removal model, enabling one-click double chin removal in images, eliminating the need for complex manual double chin removal using various image editing tools. Furthermore, this solution produces beautiful and natural-looking images after double chin removal.

[0120] Example 2

[0121] A method for removing a double chin of a person in a picture, the method comprising the following steps:

[0122] Obtaining a double-chin person image to be processed;

[0123] Input the double chin image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing;

[0124] The double chin removal model is trained by the above-mentioned training method for removing the double chin model of a person in an image.

[0125] In this embodiment, a method for removing a double chin from a person in an image is based on a double chin removal model, which is trained using the aforementioned training method for removing a double chin from a person in an image. The training method for removing a double chin from a person in an image has been described in detail above and will not be further described here.

[0126] In this embodiment, the double chin removal model trained by the above-mentioned training method for removing the double chin model of a person in an image can remove the double chin of a person with one click, making the person's chin beautiful and natural.

[0127] Embodiment 3

[0128] A training device for removing a double chin model of a person in an image, characterized by comprising an acquisition module, an analysis module, a fusion module, and an update module connected in sequence;

[0129] The acquisition module is used to acquire original character image data and pseudo double chin image data generated based on the original character image data;

[0130] The analysis module is used to input the pseudo double chin image data into the double chin removal model and output the double chin area mask identified by the model and the normal chin image data without double chin generated by the model;

[0131] The fusion module is used to fuse the normal chin image data with the original character image data to generate a result image;

[0132] The update module is used to calculate the loss function using the result image and the original person image data and use the gradient backpropagation method to iteratively update the double chin removal model until the model converges.

[0133] In this embodiment, a training device is further provided to improve model training efficiency. First, an acquisition module is used to obtain original person image data and pseudo double chin image data generated based on the original person image data. Second, an analysis module is used to input the pseudo double chin image data into the double chin removal model, which outputs a double chin area mask identified by the model and a normal chin image data without a double chin generated by the model. Third, a fusion module is used to fuse the normal chin image data with the original person image data to generate a result image. Finally, an update module is used to calculate a loss function using the result image and the original person image data and iteratively update the double chin removal model using gradient backpropagation until the model converges.

[0134] In this embodiment, the function of each module corresponds one-to-one to the steps in one of the above embodiments, and the specific functions and principles of each module are not further described here.

[0135] Example 4

[0136] A device for removing a double chin from a person in a picture, based on the above-mentioned method for removing a double chin from a person in a picture, comprises a collection module, a processing module, and an output module connected in sequence;

[0137] The acquisition module is used to obtain the double chin person image to be processed;

[0138] The processing module is used to input the double chin person image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing.

[0139] In this embodiment, each module corresponds to the steps in the second embodiment one by one, so the specific functions and principles of each module will not be further explained here.

[0140] Embodiment 5

[0141] A device capable of removing a double chin from a person in an image, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-described methods for training a model for removing a double chin from a person in an image.

[0142] In this embodiment, a training method for removing a double chin model of a person in an image has been described in detail in one embodiment and will not be repeated here.

[0143] Example 6

[0144] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any of the above-mentioned training methods for removing a double chin model of a person in an image.

[0145] In this embodiment, a training method for removing a double chin model of a person in an image has been described in detail in one embodiment and will not be repeated here.

[0146] The above descriptions are only some embodiments of the present invention and do not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A training method for removing double chin models of people in pictures, characterized in that: include: Obtaining original person image data and pseudo double chin image data generated based on the original person image data specifically includes: Recognize faces and determine the chin area; The chin area is randomly moved a certain distance below the face using the liquefaction image processing method and then fused back into the original image, so that the original face covers the extracted chin area. This creates a fake image of the user with two chins, simulating a double chin structure. The mask image processing method is then used to add shadows to the fused image. After the production is completed, you have data A and B, where A is the original image and B is the fake double chin image; Input the pseudo double chin image data into the double chin removal model, and output the double chin area mask identified by the model and the normal chin image data without double chin generated by the model; The normal chin image data is fused with the original person image data to generate a result image; The loss function is calculated using the result image and the original person image data, and the gradient backpropagation method is used to iteratively update the double chin removal model until the model converges.

2. A training method for removing a double chin model of a person in an image according to claim 1, characterized in that: The normal chin image data is fused with the original person image data to generate the result image, which specifically includes: The normal chin image data is mask-fused with the double chin area mask and the original character image data to obtain the result image. The mask fusion formula is as follows: Among them, R is the result image, C is the normal chin image data, and A is the original character image data. Mask for the double chin area.

3. The training method for removing double chin models of characters in pictures according to claim 1, characterized in that: The loss functions include VGGloss and GANloss; The GANloss formula is as follows: Where G is the generator, D is the discriminator, pdata is the distribution of real data, and pz is the distribution of noise; G(z) represents the fake data generated from the noise z; D(x) is the output of the discriminator for input x, which represents the probability that input x is real data; V(D,G) is the loss function, which represents the game relationship between the discriminator and the generator; during the training process, the goal of the generator is to make the discriminator unable to distinguish between the generated fake data and the real data, while the goal of the discriminator is to distinguish between the real data and the fake data as accurately as possible; The VGGLOSS formula is as follows: in, is the generated fake image, is a real image, represents the feature representation of the i-th layer in the VGG network.

4. The training method for removing double chin models of characters in pictures according to claim 1, characterized in that: The loss function is calculated using the result graph and the original person image data, and the double chin removal model is updated and iterated using gradient backpropagation. The following also includes: Calculate the image superposition diff residual of the original character image data and the result image. The formula is as follows: in, is the original image, The result graph is is the calculated residual image.

5. A method for removing double chins from a person in a picture, characterized in that: include: Obtaining a double-chin person image to be processed; Input the double chin image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing; The double chin removal model is trained by a training method for removing a double chin model of a person in an image according to any one of claims 1 to 4.

6. A training device for removing double chin models of people in pictures, characterized in that: The method according to any one of claims 1 to 4, comprising an acquisition module, an analysis module, a fusion module, and an update module connected in sequence; The acquisition module is used to acquire original character image data and pseudo double chin image data generated based on the original character image data; The analysis module is used to input the pseudo double chin image data into the double chin removal model and output the double chin area mask identified by the model and the normal chin image data without double chin generated by the model; The fusion module is used to fuse the normal chin image data with the original character image data to generate a result image; The update module is used to calculate the loss function using the result image and the original person image data and use the gradient backpropagation method to iteratively update the double chin removal model until the model converges.

7. A device for removing double chins from pictures, characterized in that: A method for removing a double chin from a person in an image according to claim 5, comprising a collection module, a processing module, and an output module connected in sequence; The acquisition module is used to obtain the double chin person image to be processed; The processing module is used to input the double chin person image to be processed into the double chin removal model, and the model outputs the image after double chin removal after processing.

8. A device capable of removing a double chin from a person in a picture, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the training method for removing a double chin model of a person in an image according to any one of claims 1 to 4.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for training a model for removing a double chin from a person in an image according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Portrait image double jaw removal method based on deep learning

    CN113034355A

  • Face mask mask image automatic segmentation and restoration management platform and method

    CN115731597A