Processing method and system for muscle building and body shaping of human body in picture

By obtaining and processing muscle-building and body-building renderings, high-quality picture sample sets are generated and model training is carried out, which solves the problem of unrealistic muscle-building and body-building effects in the existing technology, and achieves a more realistic and delicate Muscle remodeling effect.

CN119130781APending Publication Date: 2024-12-13PIXEL HEMING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411234791.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art is difficult to generate high-quality muscle-building and body-beautifying effects, especially due to insufficient quality and quantity of public data sets, resulting in unreal muscle remodeling effects and low human fit.

Method used

By obtaining the rendering of muscle-building and body beauty, positioning key points and aligning, image segmentation and pixel inversion, generating redraw masks, combining the original human body pictures of multiple target poses, using the diffusion model to expand the image to form a picture sample set, And use Lora fine-tuning technology to train the model to generate a muscle-building and body beauty model that meets user needs.

Benefits of technology

It achieves a more realistic and delicate skin texture and muscle layout, improves the human fit and meets users' high-quality needs for muscle remodeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130781A_ABST
    Figure CN119130781A_ABST
Patent Text Reader

Abstract

The invention provides a method and a system for processing muscle-building and body-shaping of a human body in a picture. The method comprises the following steps: acquiring a muscle-building and body-shaping effect picture; performing image segmentation and pixel inversion of a specified target area on the muscle building and body shaping effect picture after key point alignment to obtain a redrawing mask corresponding to the target area image; original human body pictures of multiple target postures are obtained, and a muscle building and body building effect picture corresponding to the target posture is generated based on the redrawing mask corresponding to the target area image; performing picture expansion on the muscle building and body shaping effect pictures of the multiple target postures to obtain a picture sample set; and carrying out model training by utilizing the picture sample set to obtain a muscle-building body-building model, and carrying out body-building muscle-building processing on a target picture input by a user for a target area to obtain a processed muscle-building body-building picture. According to the invention, when a user carries out picture muscle remodeling editing, the skin texture is finer and more real, the muscle layout and lines better conform to the aesthetic appreciation of the user, the human body fitting degree is higher, and the requirements of the user can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of picture processing, and in particular to a method and system for processing human body muscle enhancement and body beautification in pictures. Background Art

[0002] In daily image editing, users may need to reshape muscles, such as generating more realistic effects of waistline, cleavage, pectoral muscles, abdominal muscles, clavicle and other muscle parts of the body.

[0003] In order to achieve the above needs, the current industry mainly uses the following two methods to reshape muscles:

[0004] The first method is to first create a more realistic muscle texture map, and then use the multiply or other image blending techniques to blend the map with the user's original image. This method does not have the human mask recognition and positioning effect, and requires the user to manually move the map to a specific skin position, and then manually adjust the parameters later, which is complicated. And because the texture is provided by default, the map and the user's body are less compatible, and the effect is less realistic.

[0005] The second method uses the stable diffusion model, which can effectively simulate and generate more realistic effects. At present, the stable diffusion model mainly uses the open source and plug-in-rich stablediffusion to generate effects. Stablediffusion supports a variety of fine-tuning parameters. Combined with the redrawing function of stablediffusion and the human skin mask recognition technology, it can automatically locate and identify the corresponding skin area that the user needs to adjust, and then automatically generate muscles that fit the human body. Users no longer need to perform tedious operations. The human body fits better and the effect is more realistic than image fusion. However, since the generation effect of stablediffusion is limited by the data set of its own base model, it is easy to cause many problems. The main problems include: the skin is blurred and lacks skin texture, the muscle shape is unnatural, the muscles are easily misplaced, and most of the muscles generated by stablediffusion tend to be male muscles, or present an exaggerated bodybuilder effect, and the degree of fit to the human body is not satisfactory.

[0006] In order to solve this technical problem, the existing technology attempts to generate high-quality datasets for muscle-building and body-beautifying effects. However, in public datasets, the proportion of such specific data is very small. Because the required effect is relatively demanding, there is no automated screening tool for screening, and manual screening requires a lot of manpower costs; the resolution of data with specific requirements in public datasets is low. For example, in the scenario of abdominal muscle building, the resolution of the abdomen is expected to be relatively high, but the amount of such data is very small. In summary, it is extremely difficult to obtain high-quality datasets for muscle-building and body-beautifying effects, and the quality and quantity of public datasets are far from meeting the model training requirements. Summary of the invention

[0007] To this end, the present invention provides a method and system for processing human body muscle enhancement and body beautification in pictures, aiming to solve the technical problems that existing picture editing functions cannot meet users' high-quality demands for muscle remodeling, and high-quality data sample sets are difficult to obtain.

[0008] To achieve the above objectives, the present invention adopts the following technical solutions:

[0009] According to a first aspect of the present invention, the present invention provides a method for processing a human body in a picture to increase muscle and beautify the body, the method comprising:

[0010] Get muscle-enhancing and body-beautifying effect pictures;

[0011] Positioning key points in the muscle-building and body-shaping effect picture, aligning the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtaining the muscle-building and body-shaping effect picture after key point alignment;

[0012] Performing image segmentation of a designated target area on the muscle-enhancing and body-shaping effect image after key point alignment to obtain an image of the target area;

[0013] Perform pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image;

[0014] Acquire original human body images of multiple target postures, and generate muscle enhancement and body shaping effect images of corresponding target postures based on the redrawn masks corresponding to the target area images;

[0015] Expand the muscle-building and body-beautifying effect pictures of various target postures to obtain a sample set of pictures;

[0016] The image sample set is used for model training to obtain a muscle-building and body-shaping model, and the muscle-building and body-shaping model is used to perform body-shaping and muscle-building processing on a target area of ​​a target image input by a user to obtain a processed muscle-building and body-shaping image.

[0017] Optionally, obtaining the muscle-building and body-beautifying effect picture includes:

[0018] The muscle enhancement and body beautification effect map is obtained by artificially drawing the map according to the morphological requirements and / or skin quality requirements of the human body.

[0019] Optionally, the positioning of the key points in the muscle-building and body-shaping effect picture, aligning the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtaining the muscle-building and body-shaping effect picture after the key points are aligned includes:

[0020] Using the openpose key point recognition model, the neck key points, the left hip key points, and the right hip key points in the muscle enhancement and body shaping effect diagram and the standard posture diagram are respectively located;

[0021] The neck key points, left hip key points and right hip key points of the muscle-building and body-beautifying effect diagram are respectively aligned with the neck key points, left hip key points and right hip key points of the standard posture diagram to obtain the muscle-building and body-beautifying effect diagram after key point alignment.

[0022] Optionally, the target area includes at least one of an abdomen area, an arm area, a clavicle area, and a chest area;

[0023] The step of generating a muscle enhancement and body shaping effect image corresponding to a target posture based on a redraw mask corresponding to the target area image includes:

[0024] Aligning the key points of the original human body image with the key points of the standard posture image to obtain a target original human body image after key point alignment;

[0025] Using the openpose key point recognition model to identify the human body key points of the target original human body image, and obtaining a human body posture guide map based on the human body key points;

[0026] Based on the redrawing mask corresponding to the target area image, the stable diffusion redrawing technology is used to supplement the muscle-building and body-beautifying effect image with other area images except the target area image to obtain the muscle-building and body-beautifying effect image with the same target posture as the original human body image.

[0027] Optionally, the image expansion of the muscle-building and body-beautifying effect images of multiple target postures to obtain a batch of image sample sets includes:

[0028] For muscle-building and body-shaping effect pictures of multiple target postures, modify the picture parameters to obtain muscle-building and body-shaping effect pictures corresponding to different picture parameters; wherein the picture parameters include at least one of the picture scene, human clothing, and human face identity;

[0029] and / or,

[0030] For muscle-building and body-shaping effect images of various target postures, the occlusion degree of the redrawing mask is adjusted, and based on the adjusted redrawing mask, the muscle-building and body-shaping effect images corresponding to different occlusion degrees are generated by using the stable diffusion redrawing technology.

[0031] Optionally, adjusting the occlusion degree of the redraw mask includes:

[0032] Obtaining the upper edge coordinate y1 and the lower edge coordinate y2 of the target area image;

[0033] Randomly select a new upper edge coordinate y1_new and a new lower edge coordinate y2_new in the upper and lower edge interval [y1, y2] of the target area image;

[0034] The pixel of the target area image is inverted in the area where the y coordinate is less than the upper edge coordinate y1_new and the y coordinate is greater than the lower edge coordinate y2_new to obtain a redrawing mask with an adjusted occlusion degree.

[0035] Optionally, before using the image sample set for model training, the method further includes:

[0036] Performing degree enhancement on the muscle-building and body-beautifying effect pictures in the picture sample set to obtain a picture sample set with a larger data volume;

[0037] The degree enhancement includes at least one of three-dimensional rotation, left-right flipping, skin color adjustment, brightness adjustment and contrast adjustment.

[0038] Optionally, the using the image sample set to perform model training to obtain a muscle enhancement and body shaping model includes:

[0039] Based on the image sample set, the Lora fine-tuning technology is used to perform model training to obtain a Lora model that conforms to the distribution of the data set as a muscle-building and body-beautifying model.

[0040] Optionally, the using the muscle enhancement and body beautification model to perform body enhancement and muscle enhancement processing on a target area of ​​a target image input by a user to obtain a processed muscle enhancement and body beautification image includes:

[0041] Performing image segmentation of a target area on a target image input by a user to obtain a target redrawing mask area corresponding to the target image;

[0042] The target redrawing mask area is redrawn to enhance body muscle using the muscle enhancement body beautification model to obtain a muscle enhancement body beautification image corresponding to the target image.

[0043] According to a second aspect of the present invention, the present invention provides a system for processing a human body in a picture for enhancing muscle and beautifying the body, characterized in that the system comprises:

[0044] An image acquisition module is used to obtain muscle enhancement and body beauty effect pictures;

[0045] An image alignment module is used to locate key points in the muscle-building and body-shaping effect picture, align the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtain the muscle-building and body-shaping effect picture after key point alignment;

[0046] An image segmentation module is used to perform image segmentation of a designated target area on the muscle enhancement and body shaping effect image after key point alignment to obtain an image of the target area;

[0047] A pixel inversion module, used for performing pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image;

[0048] A posture adjustment module, used to obtain original human body images of various target postures, and generate muscle enhancement and body shaping effect images of corresponding target postures based on the redrawn masks corresponding to the target area images;

[0049] An image expansion module is used to expand the muscle enhancement and body shaping effect pictures of various target postures to obtain an image sample set;

[0050] The model application module is used to use the image sample set to perform model training to obtain a muscle-building and body-shaping model, and use the muscle-building and body-shaping model to perform body-shaping and muscle-building processing on the target area of ​​the target image input by the user to obtain a processed muscle-building and body-shaping image.

[0051] The present invention adopts the above technical solution and has at least the following beneficial effects:

[0052] Through the scheme of the present invention, a muscle-building and body-beautifying effect picture is obtained; the key points in the muscle-building and body-beautifying effect picture are located, and the key points in the muscle-building and body-beautifying effect picture are aligned with the key points in the standard posture picture to obtain a muscle-building and body-beautifying effect picture after the key points are aligned; the image segmentation of the specified target area is performed on the muscle-building and body-beautifying effect picture after the key points are aligned to obtain a target area image; the pixel of the target area image is reversed to obtain a redrawing mask corresponding to the target area image; the original human body pictures of various target postures are obtained, and the muscle-building and body-beautifying effect pictures of the corresponding target postures are generated based on the redrawing mask corresponding to the target area image; the muscle-building and body-beautifying effect pictures of various target postures are expanded to obtain a picture sample set; the picture sample set is used for model training to obtain a muscle-building and body-beautifying model, and the muscle-building and body-beautifying model is used to perform body-beautifying and muscle-building processing on the target picture input by the user for the target area to obtain a processed muscle-building and body-beautifying picture. As a result, when the user performs the picture muscle reshaping editing, the skin texture is more delicate and real, the muscle layout and lines are more in line with the user's aesthetics, the human body fit is higher, and the user's needs can be better met. It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.

[0054] Figure 1 A schematic diagram of the process of a method for processing a human body in a picture to increase muscle and beautify the body provided by an embodiment of the present invention is shown;

[0055] Figure 2 A simplified schematic diagram of a muscle enhancement and body beautification effect image obtained by manual drawing provided by an embodiment of the present invention is shown;

[0056] Figure 3 A simplified schematic diagram of aligning key points of a muscle-building and body-beautifying effect picture provided by an embodiment of the present invention is shown;

[0057] Figure 4 A brief schematic diagram showing a target area image and a corresponding redrawing mask provided by an embodiment of the present invention is shown;

[0058] Figure 5 A simplified schematic diagram of generating a muscle-enhancing and body-beautifying effect diagram of a target posture provided by an embodiment of the present invention is shown;

[0059] Figure 6A simplified schematic diagram showing a muscle enhancement and body shaping effect image after adjusting the occlusion degree of the redraw mask provided by an embodiment of the present invention;

[0060] Figure 7 A brief schematic diagram showing a muscle enhancement and body shaping effect image after horizontal flipping and three-dimensional rotation provided by an embodiment of the present invention;

[0061] Figure 8 A simplified schematic diagram of generating a muscle enhancement and body shaping picture based on a target picture input by a user according to an embodiment of the present invention is shown;

[0062] Fig. 9 A schematic diagram of the structure of a human body muscle enhancement and body beautification processing system in a picture provided by an embodiment of the present invention is shown;

[0063] Fig.10 A structural schematic diagram of a human body muscle enhancement and body beautification processing system in a picture provided by another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0064] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0065] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0066] The embodiment of the present invention provides a method for processing a human body in a picture to increase muscle and beautify the body. Figure 1 As shown, at least the following steps S101 to S107 may be included:

[0067] Step S101, obtaining a muscle enhancement and body beautification effect picture.

[0068] In order to obtain a muscle-enhancing and body-beautifying effect picture with delicate skin texture and natural muscle shape, the embodiment of the present invention performs artificial photo editing according to the morphological requirements and / or skin quality requirements of the human body to obtain a highly customized muscle-enhancing and body-beautifying effect picture. Figure 2 As shown, this is a schematic diagram of the muscle-enhancing and body-beautifying effect diagram obtained by artificial drawing.

[0069] It should be noted that Figure 2 This is just an example. In actual applications, manual drawing can be performed according to actual needs, and corresponding adjustments can be made to the model's gender, body characteristics, skin texture, muscle shape, etc. The present invention is not limited to this. Figure 2 Taking as an example, subsequent picture expansion description is carried out to obtain a picture sample set that can meet the order of magnitude of model training.

[0070] Step S102, locating key points in the muscle-building and body-shaping effect picture, aligning the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtaining the muscle-building and body-shaping effect picture after key point alignment.

[0071] like Figure 3 As shown, it is a brief schematic diagram of aligning key points of a muscle-building and body-shaping effect picture. Specifically, the embodiment of the present invention can use the openpose key point recognition model to locate the key points in the muscle-building and body-shaping effect picture. Figure 3 On the left is an example of key point positioning in the muscle-building and body-beautifying effect picture. The red dots in the picture are the neck key point, the left hip key point, and the right hip key point.

[0072] In addition, the openpose key point recognition model is also needed to locate the neck key points, left hip key points, and right hip key points in the standard posture diagram. Figure 3 The middle part shows an example of key point localization for a standard pose graph.

[0073] Furthermore, the neck key points, left hip key points and right hip key points of the muscle-enhancing body-beautifying effect picture are aligned to the neck key points, left hip key points and right hip key points of the standard posture picture, respectively, and the following is obtained: Figure 3 The muscle-building and body-beautifying effect after the key points on the right are aligned.

[0074] Step S103, performing image segmentation of a designated target area on the muscle enhancement and body shaping effect image after key point alignment to obtain an image of the target area.

[0075] Among them, the target area may include the abdominal area, arm area, clavicle area and chest area, etc. The embodiment of the present invention takes the abdominal area as an example to introduce the image processing scheme of the target area in detail. Specifically, the image segmentation of the target area can be performed on the muscle-building and body-beautifying effect map according to the preset body segmentation model. The body segmentation model can use existing computer vision technology or a neural network model based on machine learning to distinguish and extract the human skin part from the background or other non-skin areas through pixel-level segmentation in the image or video, so as to realize the recognition / segmentation of different parts of the human body (such as the abdomen, chest, arms, neck, etc.).

[0076] Furthermore, the content of the muscle enhancement and body shaping effect image corresponding to the target area after image segmentation is used as the target area image. Figure 4 The left side shows an image of the target area taking the abdomen area as an example.

[0077] Step S104, performing pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image.

[0078] The pixel inversion in the embodiment of the present invention refers to setting the pixel point with the original pixel value of 0 to 255, and setting the pixel point with the original pixel value of 255 to 0, thereby obtaining the redrawing mask corresponding to the target area image. Figure 4 The right side shows the redraw mask of the abdomen area as an example. It can be understood that white pixels are areas that need to be redrawn, and black pixels are areas that need to retain the original image. Based on the redraw mask for the area, the target area image corresponding to the area can be retained, and other locations can be redrawn.

[0079] Step S105, obtaining original human body images of various target postures, and generating muscle enhancement and body beautification effect images of corresponding target postures based on the redrawing mask corresponding to the target area image.

[0080] In an embodiment of the present invention, original human body pictures of different target postures can be obtained based on the Internet, and posture learning of muscle-building and body-beautifying effect pictures can be realized based on these pictures. Specifically, the key points of the original human body picture can be aligned with the key points in the standard posture picture to obtain the target original human body picture after key point alignment; the human body key points of the target original human body picture can be identified by using the openpose key point recognition model, and the human body posture guidance map can be obtained based on the human body key point drawing; based on the redrawing mask corresponding to the target area image, the human body posture guidance map can be supplemented with other area images of the muscle-building and body-beautifying effect picture except the target area image by using the stable diffusion redrawing technology, so as to obtain the muscle-building and body-beautifying effect picture with the same target posture as the original human body picture.

[0081] It is understandable that in order to enhance the accuracy of posture learning, the original human image also wants to perform key point alignment as described in step S102, so that the key points of the original human image are aligned with the key points in the standard posture image. The specific operation method will not be repeated here.

[0082] Furthermore, the openpose key point recognition model is used to identify the key points of the target original human body image to draw the human body posture guidance map corresponding to the original human body image. It can be understood that in order to accurately draw the human body posture guidance map, the human body key points required here need to be the position key points corresponding to multiple joints of the human body, such as the head key points, neck key points, shoulder key points, elbow key points, hip key points, knee key points, foot key points, etc. Figure 5 The first one on the left is an example of an original human body picture. According to the key points of the human body corresponding to the original human body picture, the following can be drawn: Figure 5 The human body posture guidance diagram shown in the second from the left.

[0083] Furthermore, the stable diffusion redrawing technology can be used to redraw the regional image except the target region image based on the human body posture guidance map.

[0084] Stable diffusion is a generative model used to generate samples that conform to a specific data distribution. This diffusion model generates samples by simulating the gradual propagation and update process of information. It starts from an initial state and gradually propagates and updates the information in the data through multiple iterations, so that the generated samples gradually approach the target data distribution. Compared with image fusion technology, the generated effect can be more realistic and natural. Redrawing refers to redrawing or generating a new image based on the pixel information of an existing image in image processing and computer graphics. This process can be to transform, repair, enhance or re-render the original image to change its appearance, repair damaged or distorted parts, or generate a completely new image. In the diffusion model, redrawing mainly refers to the Inpaint mode in stable diffusion.

[0085] It should be noted that in the process of redrawing the image based on the human posture guidance map, it is necessary to combine the redrawing mask corresponding to the target area image, that is, to retain the area content corresponding to the redrawing mask, and supplement the content of the muscle enhancement and body shaping effect image in other areas. In the specific operation, use text prompts to control the generated content of the area to be supplemented, use openposecontrolnet to control the position of abdominal muscle generation, and control the human posture of the result image based on the human posture guidance map. Thus, we get the following Figure 5 As shown on the right, this is a muscle-enhancing and body-beautifying effect image that retains the image content of the target area and has the same target posture as the original human body image.

[0086] Based on the above steps, original human body pictures in various postures are obtained, and multiple muscle-enhancing and body-beautifying effect pictures can be obtained in which the target area image remains unchanged and the posture changes with the different postures of the original human body pictures.

[0087] Step S106, performing image expansion on the muscle-building and body-beautifying effect images of various target postures to obtain an image sample set.

[0088] Specifically, for the muscle-building and body-beautifying effect pictures of various target postures, the image parameters can be modified to obtain muscle-building and body-beautifying effect pictures corresponding to different image parameters; and / or, for the muscle-building and body-beautifying effect pictures of various target postures, the occlusion degree of the redrawing mask can be adjusted, and based on the adjusted redrawing mask, the stable diffusion redrawing technology is used to generate muscle-building and body-beautifying effect pictures corresponding to different occlusion degrees.

[0089] That is to say, the image expansion in the embodiment of the present invention includes the following two forms: modifying the image parameters and adjusting the occlusion degree of the redraw mask. Among them, the image parameters can be modified by different text prompt parameters in actual operation to obtain multiple muscle enhancement and body shaping effect pictures under various scenes, different clothes, and different face identities. In addition, by adjusting the occlusion degree of the redraw mask, muscle enhancement and body shaping effect pictures with different occlusion degrees can be obtained to cover more landing scenes, making the model more robust.

[0090] Specifically, the occlusion degree of the redraw mask can be adjusted by: obtaining the upper edge coordinate y1 and the lower edge coordinate y2 of the target area image; randomly selecting a new upper edge coordinate y1_new and a new lower edge coordinate y2_new in the upper and lower edge interval [y1, y2] of the target area image; performing pixel inversion on the target area image in the area where the y coordinate is less than the upper edge coordinate y1_new and the y coordinate is greater than the lower edge coordinate y2_new, to obtain a redraw mask with the occlusion degree adjusted. The specific implementation of pixel inversion is detailed in step S104 and will not be repeated here. Figure 6 The second figure from the left shows the redrawn mask after adjusting the occlusion degree. After obtaining the redrawn mask with adjusted occlusion degree, the image can be redrawn by the redrawing method described in step S105 to obtain a muscle enhancement and body shaping effect image with different target postures and redrawn mask degrees. Figure 6 The second figure on the right is the human body posture guidance diagram corresponding to the target posture; Figure 6 The first picture on the right shows the muscle enhancement and body shaping effects with different degrees of redrawing and masking.

[0091] In an optional embodiment, the above steps S105-S106 may be repeatedly performed to obtain a batch of muscle-enhancing and body-beautifying effect pictures as a picture sample set for model training.

[0092] Step S107, using the image sample set to perform model training to obtain a muscle enhancement and body beautification model, and using the muscle enhancement and body beautification model to perform body enhancement and muscle enhancement processing on the target area of ​​the target image input by the user to obtain a processed muscle enhancement and body beautification image.

[0093] In an optional embodiment, before using the image sample set for model training, the muscle enhancement and body shaping effect pictures in the image sample set can also be enhanced to further expand the order of magnitude of the image sample set. Specifically, the degree enhancement may include three-dimensional rotation, left-right flipping, skin color adjustment, brightness adjustment, and contrast adjustment. Figure 7 As shown, it is an example image after the muscle enhancement and body shaping effect image is three-dimensionally rotated and horizontally flipped. By repeatedly executing S105-S106 and the degree enhancement step, a batch of image sample sets with different image parameters, different human body postures, different occlusion levels, different rotation angles, skin colors, brightness, contrast, etc. are obtained.

[0094] In an embodiment of the present invention, the Lora fine-tuning technology can be used to perform model training based on the image sample set to obtain a Lora model that conforms to the distribution of the data set as a muscle-building and body-shaping model. Lora is a fine-tuning technology for a large model that can quickly and lightly fine-tune the large model; only a small number of parameters need to be fine-tuned, and after the fine-tuning is completed, they can be merged back into the parameters of the large model without adding additional parameters and calculations. If Lora fine-tuning is performed on the large model generated by the image, after the Lora fine-tuning is completed, the result distribution of the image generation model can be changed, so that the original large model is more inclined to generate the data distribution in the fine-tuning data set.

[0095] Furthermore, the target image input by the user is segmented into a target area to obtain a target redrawing mask area corresponding to the target image; the target redrawing mask area is redrawn to increase muscle by using the muscle-enhancing body beauty model to obtain a muscle-enhancing body beauty image corresponding to the target image.

[0096] like Figure 8 As shown on the left, the target image input by the user is input into the preset body segmentation model to obtain the mask of the abdominal area, such as Figure 8 As shown in the middle, it is used as the target redrawing mask area. The trained body-building muscle-building redrawing with highly customized muscle-building and body-building effects is integrated into the redrawing base film, and the target redrawing mask area is redrawn to redraw a picture with highly customized muscles, such as Figure 8 The output image of a muscle-enhanced body is shown on the right.

[0097] The embodiment of the present invention provides a method for processing muscle-building and body-beautifying images of human bodies. When the number of images of muscle-building and body-beautifying effects is extremely small, a variety of data expansion schemes are designed, and specific designs are made for muscle-building scenarios to construct a large number of widely distributed data sets. The muscle-building and body-beautifying model trained with the data sets can generate images of specific muscle-building and body-beautifying effects that meet user needs during implementation.

[0098] Further, as Figure 1 The specific implementation of the present invention provides a system for processing human body muscle enhancement and body beautification in a picture, such as Fig. 9 As shown, the system may include: an image acquisition module 910, an image alignment module 920, an image segmentation module 930, a pixel inversion module 940, a posture adjustment module 950, a picture expansion module 960 and a model application module 970.

[0099] The image acquisition module 910 can be used to obtain muscle enhancement and body shaping effect pictures;

[0100] The image alignment module 920 can be used to locate key points in the muscle-building and body-shaping effect picture, align the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtain the muscle-building and body-shaping effect picture after key point alignment;

[0101] The image segmentation module 930 can be used to perform image segmentation of a designated target area on the muscle enhancement and body shaping effect image after key point alignment to obtain an image of the target area;

[0102] The pixel inversion module 940 may be used to perform pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image;

[0103] The posture adjustment module 950 can be used to obtain original human body images of various target postures, and generate muscle enhancement and body shaping effect images of corresponding target postures based on the redrawn mask corresponding to the target area image;

[0104] The image expansion module 960 can be used to expand the muscle enhancement and body shaping effect pictures of various target postures to obtain an image sample set;

[0105] The model application module 970 can be used to use the image sample set to perform model training to obtain a muscle-enhancing body model, and use the muscle-enhancing body model to perform body-enhancing muscle-enhancing processing on the target area of ​​the target image input by the user to obtain a processed muscle-enhancing body image.

[0106] Alternatively, if Fig.10 As shown, another embodiment of the present invention provides a system for processing a human body in a picture for enhancing muscle and beautifying the body, and further includes: a degree enhancement module 980.

[0107] The degree enhancement module 980 can be used to enhance the degree of muscle enhancement and body shaping effect pictures in the picture sample set before using the picture sample set for model training, so as to obtain a picture sample set with a larger data volume;

[0108] The degree enhancement includes at least one of three-dimensional rotation, left-right flipping, skin color adjustment, brightness adjustment, and contrast adjustment.

[0109] Optionally, the image acquisition module 910 can also be used to manually draw a picture according to the shape requirements and / or skin quality requirements of the human body to obtain a muscle-enhancing and body-beautifying effect picture.

[0110] Optionally, the image alignment module 920 may also be used to respectively locate the neck key points, the left hip key points, and the right hip key points in the muscle enhancement and body shaping effect image and the standard posture image using the openpose key point recognition model;

[0111] The neck key points, left hip key points and right hip key points of the muscle-building body-beautifying effect diagram are respectively aligned to the neck key points, left hip key points and right hip key points of the standard posture diagram to obtain the muscle-building body-beautifying effect diagram after key point alignment.

[0112] Optionally, the posture adjustment module 950 may also be used to align key points of the original human body image with key points in the standard posture image to obtain a target original human body image after key point alignment;

[0113] The openpose key point recognition model is used to identify the key points of the target original human body image, and a human posture guidance map is obtained based on the key points of the human body.

[0114] Based on the redrawing mask corresponding to the target area image, the stable diffusion redrawing technology is used to supplement the muscle-enhancing body-beautifying effect image with other area images except the target area image to obtain the muscle-enhancing body-beautifying effect image with the same target posture as the original human body image.

[0115] Optionally, the image expansion module 960 can also be used to modify the image parameters for the muscle-enhancing and body-shaping effect images of various target postures to obtain muscle-enhancing and body-shaping effect images corresponding to different image parameters; wherein the image parameters include at least one of the image scene, human clothing, and human face identity;

[0116] and / or,

[0117] For muscle-building and body-beautifying effect diagrams of various target postures, the occlusion degree of the redraw mask is adjusted, and based on the adjusted redraw mask, the stable diffusion redrawing technology is used to generate muscle-building and body-beautifying effect diagrams corresponding to different occlusion degrees.

[0118] Optionally, the image expansion module 960 may also be used to obtain the upper edge coordinate y1 and the lower edge coordinate y2 of the target area image;

[0119] Randomly select a new upper edge coordinate y1_new and a new lower edge coordinate y2_new in the upper and lower edge interval [y1, y2] of the target area image;

[0120] The pixels of the target area image in the area where the y coordinate is less than the upper edge coordinate y1_new and the y coordinate is greater than the lower edge coordinate y2_new are inverted to obtain a redrawn mask with an adjusted occlusion degree.

[0121] Optionally, the model application module 970 can also be used to perform model training based on the image sample set using the Lora fine-tuning technology to obtain a Lora model that conforms to the distribution of the data set as a muscle-building and body-beautifying model.

[0122] Optionally, the model application module 970 may also be used to perform image segmentation of a target area on a target image input by a user to obtain a target redrawing mask area corresponding to the target image;

[0123] The muscle enhancement and body beautification model is used to perform body enhancement and muscle enhancement redrawing on the target redrawing mask area to obtain a muscle enhancement and body beautification image corresponding to the target image.

[0124] Those skilled in the art can clearly understand that the specific working processes of the systems, devices, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.

[0125] In addition, the functional units in various embodiments of the present invention may be physically independent of each other, or two or more functional units may be integrated together, or all functional units may be integrated into one processing unit. The above integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.

[0126] Those skilled in the art can understand that if the integrated functional unit is implemented in the form of software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can essentially or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, which includes a number of instructions to enable a computing device (such as a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention when running the instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.

[0127] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as a computing device such as a personal computer, a server, or a network device), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of a computing device, the computing device executes all or part of the steps of the methods described in the embodiments of the present invention.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate from the protection scope of the present invention.

Claims

1. A method for processing a human body in a picture to increase muscle and beautify the body, characterized in that: The method comprises: Get muscle-enhancing and body-beautifying effect pictures; Positioning key points in the muscle-building and body-shaping effect picture, aligning the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtaining the muscle-building and body-shaping effect picture after key point alignment; Performing image segmentation of a designated target area on the muscle-enhancing and body-shaping effect image after key point alignment to obtain an image of the target area; Perform pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image; Acquire original human body images of multiple target postures, and generate muscle enhancement and body shaping effect images of corresponding target postures based on the redrawn masks corresponding to the target area images; Expand the muscle-building and body-beautifying effect pictures of various target postures to obtain a sample set of pictures; The image sample set is used for model training to obtain a muscle-building and body-shaping model, and the muscle-building and body-shaping model is used to perform body-shaping and muscle-building processing on a target area of ​​a target image input by a user to obtain a processed muscle-building and body-shaping image.

2. The method according to claim 1, characterized in that The step of obtaining a muscle enhancement and body shaping effect picture comprises: The muscle enhancement and body beautification effect map is obtained by artificially drawing the map according to the morphological requirements and / or skin quality requirements of the human body.

3. The method according to claim 1, characterized in that: The positioning of the key points in the muscle-building and body-shaping effect picture, aligning the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtaining the muscle-building and body-shaping effect picture after the key points are aligned, comprises: Using the openpose key point recognition model, the neck key points, the left hip key points, and the right hip key points in the muscle enhancement and body shaping effect diagram and the standard posture diagram are respectively located; The neck key points, left hip key points and right hip key points of the muscle-building and body-beautifying effect diagram are respectively aligned with the neck key points, left hip key points and right hip key points of the standard posture diagram to obtain the muscle-building and body-beautifying effect diagram after key point alignment.

4. The method according to claim 1, characterized in that: The target area includes at least one of an abdomen area, an arm area, a clavicle area, and a chest area; The step of generating a muscle enhancement and body shaping effect image corresponding to a target posture based on a redraw mask corresponding to the target area image includes: Aligning the key points of the original human body image with the key points of the standard posture image to obtain a target original human body image after key point alignment; Using the openpose key point recognition model to identify the human body key points of the target original human body image, and obtaining a human body posture guide map based on the human body key points; Based on the redrawing mask corresponding to the target area image, the stable diffusion redrawing technology is used to supplement the muscle-building and body-beautifying effect image with other area images except the target area image to obtain the muscle-building and body-beautifying effect image with the same target posture as the original human body image.

5. The method according to claim 1, characterized in that The muscle enhancement and body shaping effect pictures of various target postures are expanded to obtain a batch of picture sample sets, including: For muscle-building and body-shaping effect pictures of multiple target postures, modify the picture parameters to obtain muscle-building and body-shaping effect pictures corresponding to different picture parameters; wherein the picture parameters include at least one of the picture scene, human clothing, and human face identity; and / or, For muscle-building and body-shaping effect images of various target postures, the occlusion degree of the redrawing mask is adjusted, and based on the adjusted redrawing mask, the muscle-building and body-shaping effect images corresponding to different occlusion degrees are generated by using the stable diffusion redrawing technology.

6. The method according to claim 5, characterized in that The adjusting the occlusion degree of the redraw mask includes: Obtaining the upper edge coordinate y1 and the lower edge coordinate y2 of the target area image; Randomly select a new upper edge coordinate y1_new and a new lower edge coordinate y2_new in the upper and lower edge interval [y1, y2] of the target area image; The pixel of the target area image is inverted in the area where the y coordinate is less than the upper edge coordinate y1_new and the y coordinate is greater than the lower edge coordinate y2_new to obtain a redrawing mask with an adjusted occlusion degree.

7. The method according to any one of claims 1 to 6, characterized in that: Before using the picture sample set for model training, the method further includes: Performing degree enhancement on the muscle-building and body-beautifying effect pictures in the picture sample set to obtain a picture sample set with a larger data volume; The degree enhancement includes at least one of three-dimensional rotation, left-right flipping, skin color adjustment, brightness adjustment and contrast adjustment.

8. The method according to claim 1, characterized in that: The method of using the image sample set to perform model training to obtain a muscle enhancement and body shaping model includes: Based on the image sample set, the Lora fine-tuning technology is used to perform model training to obtain a Lora model that conforms to the distribution of the data set as a muscle-building and body-beautifying model.

9. The method according to claim 1, characterized in that: The method of using the muscle enhancement and body beautification model to perform body enhancement and muscle enhancement processing on a target area of ​​a target image input by a user to obtain a processed muscle enhancement and body beautification image includes: Performing image segmentation of a target area on a target image input by a user to obtain a target redrawing mask area corresponding to the target image; The target redrawing mask area is redrawn to enhance body muscle using the muscle enhancement body beautification model to obtain a muscle enhancement body beautification image corresponding to the target image.

10. A system for processing human body muscle enhancement and body beautification in a picture, characterized in that: The system comprises: An image acquisition module is used to obtain muscle enhancement and body beauty effect pictures; An image alignment module is used to locate key points in the muscle-building and body-shaping effect picture, align the key points in the muscle-building and body-shaping effect picture with the key points in the standard posture picture, and obtain the muscle-building and body-shaping effect picture after key point alignment; An image segmentation module is used to perform image segmentation of a designated target area on the muscle enhancement and body shaping effect image after key point alignment to obtain an image of the target area; A pixel inversion module, used for performing pixel inversion on the target area image to obtain a redraw mask corresponding to the target area image; A posture adjustment module, used to obtain original human body images of various target postures, and generate muscle enhancement and body shaping effect images of corresponding target postures based on the redrawn masks corresponding to the target area images; An image expansion module is used to expand the muscle enhancement and body shaping effect pictures of various target postures to obtain an image sample set; The model application module is used to use the image sample set to perform model training to obtain a muscle-building and body-shaping model, and use the muscle-building and body-shaping model to perform body-shaping and muscle-building processing on the target area of ​​the target image input by the user to obtain a processed muscle-building and body-shaping image.