Human body image beautification method and device, equipment and medium

By separating and reshaping the foreground and background of a human image, and combining a reshaping mapping model and background completion technology, the distortion and falsification problems in human image beautification in existing technologies are solved, achieving an efficient and natural body beautification effect.

CN114298941BActive Publication Date: 2026-02-10GUANGZHOU FANGGUI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111665568.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-02-10
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing human body image enhancement technologies suffer from problems such as self-occlusion leading to distortion, adjustment distortion, and background distortion. Furthermore, they require high computational resources, making it difficult to achieve high-quality image enhancement under low computational resource conditions.

Method used

By acquiring the skeletal feature map and part feature map of the human body image, the foreground and background images are separated. The foreground is beautified using a shaping mapping model and then fused with the completed background image to avoid background distortion and achieve efficient body beautification.

Benefits of technology

It effectively avoids the problems of background distortion and foreground distortion in shape beautification, achieving a natural and harmonious image beautification effect and enhancing the aesthetics and visual appeal of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298941B_ABST
    Figure CN114298941B_ABST
Patent Text Reader

Abstract

The application discloses a human body image body beautification method and device, equipment and medium, the method comprises the following steps: obtaining the skeleton feature map and the part feature map of the human body image in the to-be-processed image, wherein the skeleton feature map is used for indicating the human skeleton model in the human body image, and the part feature map is used for highlighting the position of the human body part image in the to-be-processed image; then the to-be-processed image is separated into a foreground image and a background image according to the part feature map; then the shaping mapping model of the foreground image is obtained according to the corresponding relationship between the part feature map and the skeleton feature map, so that the shaping mapping model generates the corresponding foreground beautification image of the foreground image in response to the control parameter; finally, the foreground beautification image and the completed image of the background image are fused to obtain the body beautification image. The human body image body beautification method has higher efficiency and better beautification effect, and can be highly trusted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network live broadcast, and in particular to a human body image body beautification method and a corresponding device, computer equipment and computer readable storage medium. BACKGROUND

[0002] Human body image body beautification includes adjusting height, weight, body mass index (BMI), length and width of limbs, length and width of torso, etc.

[0003] Human body image body beautification technology has been widely used in content production, creation and live special effects, etc. Existing human body image body beautification schemes are basically based on human body 2D key points or 2D contour points to adjust the local area of the human body or based on human body three-dimensional reconstruction model to adjust the human body globally. Such schemes inevitably have the following problems: (a) self-occlusion causes the human body itself to deform and appear deformed, (b) human body adjustment is mechanical, which causes distortion, and is usually accompanied by background distortion, (c) due to the limitation of precision and computing resources, the scheme based on human body three-dimensional reconstruction can only be limited to scenes with small motion amplitude and high computing resource requirements.

[0004] As an auxiliary means, in the field of short video and video live broadcast, whether in the backend server providing related network services or in the client device where the terminal application program is located, it is hoped that the 2D human body image in various video streams generated in the service process can be beautified with high quality with low computer operation resources, so as to maintain high video quality and improve user experience. Therefore, when a new solution is proposed, the above problems need to be considered in order to obtain the expected effect. SUMMARY

[0005] The primary purpose of the present application is to solve at least one of the above problems and provide a human body image body beautification method and a corresponding device, computer equipment and computer readable storage medium.

[0006] To meet the various purposes of the present application, the present application adopts the following technical solutions:

[0007] A human body image body beautification method proposed to adapt to one of the purposes of the present application includes the following steps:

[0008] Obtain the skeleton feature map and the part feature map of the human body image in the image to be processed, the skeleton feature map being used to indicate the human skeleton model in the human body image, and the part feature map being used to highlight the position of the human body part image in the image to be processed;

[0009] Separate the image to be processed into a foreground image and a background image according to the part feature map;

[0010] modeling the correspondence between the part feature map and the skeleton feature map to obtain a morphing mapping model of the foreground image, and making the morphing mapping model generate a foreground beautified image corresponding to the foreground image in response to a control parameter;

[0011] fusing the foreground beautified image and the completed image of the background image to obtain a body beautified image.

[0012] In a deepened embodiment, the skeleton feature map and the part feature map of the human body image in the to-be-processed image are obtained, including the following steps:

[0013] obtaining a video frame in a live video stream as the to-be-processed image;

[0014] extracting a human body key point of the human body image and a part feature map for highlighting different parts of the human body from the to-be-processed image;

[0015] generating a skeleton feature map according to the human body key point.

[0016] In a deepened embodiment, the correspondence between the part feature map and the skeleton feature map is modeled to obtain a morphing mapping model of the foreground image, and the morphing mapping model generates a foreground beautified image corresponding to the foreground image in response to a control parameter, including the following steps:

[0017] modeling the morphing mapping model of the foreground image, and making the morphing mapping model correct the part feature map according to the change of the skeleton feature map to obtain a corresponding morphing feature map;

[0018] substituting a control parameter for controlling the skeleton feature map to generate image deformation into the morphing mapping model to obtain a corresponding morphing feature map;

[0019] correcting the foreground image according to the morphing feature map to generate a corresponding foreground beautified image.

[0020] In a specific embodiment, the morphing mapping model of the foreground image is modeled, including the following steps:

[0021] constructing a part contour line according to the part feature map;

[0022] matching each point of the part contour line with the nearest bone in the skeleton feature map;

[0023] constructing a bone mapping of each point in the part contour line to obtain the morphing mapping model of the foreground image.

[0024] In a specific embodiment, the control parameter for controlling the skeleton feature map to generate image deformation is substituted into the morphing mapping model to obtain a corresponding morphing feature map, including the following steps:

[0025] popping up a control panel to a graphic user interface, in which the foreground image is displayed;

[0026] acquiring a control parameter generated in response to the foreground image in the control panel;

[0027] calculating the reshaping mapping model according to the control parameter to obtain a reshaping feature map.

[0028] In an embodiment, separating the image to be processed into a foreground image and a background image according to the part feature map comprises the following steps:

[0029] determining foreground labels and background labels in the part feature map, the foreground labels being human body part labels corresponding to human body parts in the image to be processed;

[0030] generating a foreground mask by judging whether each pixel in the part feature map is a background label;

[0031] implementing image segmentation on the image to be processed according to the foreground mask to obtain a corresponding foreground image and a background image.

[0032] In an embodiment, fusing the foreground beautified image and the completed image of the background image to obtain a body beautified image comprises the following steps:

[0033] using an image inpainting model pre-trained to a convergent state to complete the image of the background image;

[0034] fusing the completed image of the background image and the foreground image to obtain a body beautified image.

[0035] A human body image body beautifying device is provided for one of the purposes of the present application, comprising a feature map extraction module, a foreground-background separation module, a reshaping mapping module, and a body beautifying fusion module. The feature map extraction module is configured to acquire a skeleton feature map and a part feature map of a human body image in an image to be processed. The skeleton feature map is used to indicate a human skeleton model in the human body image, and the part feature map is used to highlight the positions of different human body part images in the image to be processed. The foreground-background separation module is configured to separate the image to be processed into a foreground image and a background image according to the part feature map. The reshaping mapping module is configured to model the corresponding relationship between the part feature map and the skeleton feature map to obtain a reshaping mapping model of the foreground image, so that the reshaping mapping model generates a foreground beautified image corresponding to the foreground image in response to a control parameter. The body beautifying fusion module is configured to fuse the foreground beautified image and a completed image of the background image to obtain a body beautified image.

[0036] In an embodiment, the feature map extraction module comprises: an image acquisition sub-module configured to acquire a video frame in a live video stream as a to-be-processed image; a feature extraction sub-module configured to extract a human body key point of a human body image and a part feature map for highlighting different parts of the human body from the to-be-processed image; and a skeleton extraction sub-module configured to generate a skeleton feature map according to the human body key point.

[0037] In an embodiment, the shape mapping module comprises: a modeling sub-module configured to model a shape mapping model of the foreground image, so that the shape mapping model corrects the part feature map according to a change in the skeleton feature map to obtain a corresponding shape feature map; a parameter substitution sub-module configured to substitute a control parameter for controlling image deformation of the skeleton feature map into the shape mapping model to obtain a corresponding shape feature map; and a correction sub-module configured to correct the foreground image according to the shape feature map to generate a corresponding foreground beautified image.

[0038] In an embodiment, the modeling sub-module comprises: a contour line unit configured to construct a part contour line according to the part feature map; a matching unit configured to match each point of the part contour line with a nearest skeleton in the skeleton feature map; and a mapping unit configured to construct a skeleton mapping of each point of the part contour line to obtain the shape mapping model of the foreground image.

[0039] In an embodiment, the parameter substitution sub-module comprises: a display unit configured to pop up a control panel in a graphical user interface, and display the foreground image in the control panel; a parameter acquisition unit configured to acquire a control parameter corresponding to an action on the foreground image in the control panel; and a substitution unit configured to calculate the shape mapping model according to the control parameter to obtain a shape feature map.

[0040] In an embodiment, the foreground-background separation module comprises: a front-back separation sub-module configured to determine a foreground label and a background label in the part feature map according to the part feature map, the foreground label being a human body part label corresponding to a human body part in the to-be-processed image; a mask generation sub-module configured to generate a foreground mask by judging whether each pixel in the part feature map is a background label; and an image segmentation sub-module configured to implement image segmentation on the to-be-processed image according to the foreground mask to obtain a corresponding foreground image and a background image.

[0041] In an embodiment, the body beautification fusion module comprises: an image completion sub-module configured to perform image completion on the background image by using an image repair model pre-trained to a convergent state; and an image fusion sub-module configured to fuse the completed image of the background image with the foreground image to obtain a body beautified image.

[0042] A computer device provided for adapting to one of the purposes of the present application, comprising a central processor and a memory, the central processor is used to call a computer program stored in the memory to execute the steps of the human body image body beautifying method described in the present application.

[0043] A computer readable storage medium provided for adapting to another purpose of the present application, which stores a computer program implemented according to the human body image body beautifying method in the form of computer readable instructions, when the computer program is called and run by a computer, the steps included in the method are executed.

[0044] A computer program product provided for adapting to another purpose of the present application, comprising computer program / instructions, which when executed by a processor, implements the steps of the method described in any one of the embodiments of the present application.

[0045] The advantages of the present application relative to the prior art are as follows:

[0046] The present application obtains the skeleton feature map and the part feature map of the human body image in the to-be-processed image, wherein the skeleton feature map is used to indicate the human body skeleton model in the human body image, and the part feature map is used to highlight the position of the image of different parts of the human body in the to-be-processed image; then the to-be-processed image is separated into a foreground image and a background image according to the part feature map; thereafter, a reshaping mapping model of the foreground image is obtained according to the corresponding relationship between the part feature map and the skeleton feature map, so that the reshaping mapping model generates a foreground beautified image corresponding to the foreground image in response to a control parameter; finally, the foreground beautified image is fused with a completed image of the background image to obtain a body beautified image.

[0047] The present application performs body beautification on the to-be-processed image based on foreground-background separation, human key point detection method and human body analysis method, and then performs background completion and fusion with the foreground beautified image. This method can effectively avoid the distortion problem of the background area in body beautification. In addition, the present application performs reshaping mapping modeling based on the part feature map and the skeleton feature map, and performs reshaping mapping based on the parallel direction and the vertical direction of the human skeleton to obtain the foreground beautified image. While efficiently realizing body beautification, the present application can effectively avoid the distortion problem caused by the foreground area in reshaping mapping and the distortion problem caused by self-occlusion. Therefore, the human body image body beautifying method of the present application can efficiently perform preset reshaping on the human body area in the to-be-processed image, while avoiding the distortion and distortion problems of the foreground and the background. The finally obtained body beautified image not only meets the preset requirements, but also is natural and coordinated, and the foreground and the background are seamlessly fused, which improves the beauty and the visual effect of the image.

[0048] In summary, the human body image shape beautification method of the present application has higher efficiency and better beautification effect, can be highly trusted, and is suitable for application scenarios such as e-commerce platforms to perform human body image shape beautification on the to-be-processed image. BRIEF DESCRIPTION OF DRAWINGS

[0049] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the following drawings, in which:

[0050] Figure 1 A flowchart of a typical embodiment of the human body image shape beautification method of the present application;

[0051] Figure 2 A result diagram of human body key point detection and human body analysis in an embodiment of the present application;

[0052] Figure 3 A flowchart of skeleton feature map acquisition in an embodiment of the present application;

[0053] Figure 4 A flowchart of the shaping mapping of a scene image in an embodiment of the present application;

[0054] Figure 5 A flowchart of shaping mapping model construction in a specific embodiment of the present application;

[0055] Figure 6 A diagram representing the shaping mapping relationship in a specific embodiment of the present application;

[0056] Figure 7 A flowchart of control parameter substitution calculation in a specific embodiment of the present application;

[0057] Figure 8 A diagram of a live room graphical user interface pop-up control panel in a specific embodiment of the present application;

[0058] Figure 9 A principle block diagram of the human body image shape beautification device of the present application;

[0059] Figure 10 A structural diagram of a computer device used in the present application;

[0060] Figure 11 A diagram of a network environment that can be used when the computer program product of the present application is applied. DETAILED DESCRIPTION

[0061] Embodiments of the present application are described below in the context of example embodiments, which are shown in the drawings, wherein like or similar designations are used to indicate like or similar elements or elements having the same or similar function throughout the several views. The embodiments described below are merely examples, which are used to explain the present application and are not to be construed as limiting the present application.

[0062] Those skilled in the art will understand that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and / or "including," as used herein, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. In addition, the use of "connection" or "coupling" herein includes wireless connection or wireless coupling. The word "or" as used herein means any one member of a functional group used in the term.

[0063] Those skilled in the art will appreciate that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

[0064] Those skilled in the art will understand that, as used herein, the terms "client," "terminal," and "terminal device" include both devices that are solely wireless signal receivers and devices that have both receiving and transmitting hardware that can communicate bi-directionally over a bi-directional communication link. Such devices can include cellular or other communication devices with single-line or multiple-line displays, or no display, Personal Communications Service (PCS) devices that can combine a voice and data function, Personal Digital Assistants (PDAs) that can include a radio frequency receiver, pagers, Internet / intranet access, Web browsers, organizers, calendars, and / or a Global Positioning System (GPS) receiver, conventional laptop and / or palmtop computers, or other devices that have a radio frequency receiver. The terms "client," "terminal," and "terminal device" as used herein can be portable, transportable, installed in a vehicle (aeronautical, maritime, and / or land), or adapted for and / or configured for local and / or distributed operation on Earth and / or any other location in space. The terms "client," "terminal," and "terminal device" as used herein can also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a Mobile Internet Device (MID), and / or a mobile phone with music / video playing function, a smart television, a set-top box, and the like.

[0065] As used herein, the terms "server," "client," "service node," and the like refer to hardware that has the equivalent capability of a personal computer, i.e., an electronic device having a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device, and the like necessary components disclosed by the Von Neumann principle, a computer program is stored in the memory, the central processing unit calls the program stored in the external memory into the memory and runs it, executes the instructions in the program, and interacts with the input and output devices, thereby completing a specific function.

[0066] It should be noted that the concept of "server" in the present application can also be extended to the case of a server cluster. According to the principle of network deployment understood by those skilled in the art, the servers should be logically divided, and in physical space, these servers can be independent of each other but can be called through an interface, or can be integrated into a physical computer or a computer cluster. Those skilled in the art should understand this variation and should not be restricted by the implementation of the network deployment of the present application.

[0067] One or more technical features of the present application, unless explicitly specified, can be deployed in a server implementation and accessed by a client remotely calling an online service interface provided by the server, or can be directly deployed and run on a client to implement access.

[0068] The neural network model referred to or possibly referred to in the present application, unless explicitly specified, can be deployed on a remote server and remotely called by a client, or can be deployed on a client with sufficient device capability for direct calling. In some embodiments, when it runs on a client, its corresponding intelligence can be obtained through transfer learning to reduce the requirement for client hardware running resources and avoid excessive occupation of client hardware running resources.

[0069] The various data involved in the present application, unless explicitly specified, can be stored remotely on a server or stored locally on a terminal device, as long as it is suitable for being called by the technical solutions of the present application.

[0070] Those skilled in the art should know that the various methods of the present application, although based on the same concept and described to present commonality among them, are independently executable unless otherwise specified. Similarly, for each embodiment disclosed in the present application, it is based on the same inventive concept, and therefore, for the same conceptually expressed concepts, and although the conceptually expressed concepts are different, they should be understood as equivalent.

[0071] Unless it is explicitly stated that the embodiments disclosed in the present application are mutually exclusive, the technical features involved in each embodiment can be combined flexibly to construct new embodiments, as long as such combination does not deviate from the spirit of the present application and can meet the needs of the prior art or solve some deficiencies in the prior art. For this variation, those skilled in the art should know.

[0072] The human image body beautification method of the present application can be programmed as a computer program product, deployed and run in a client or server to achieve, whereby the method can be executed by accessing the interface opened by the computer program product after running, and performing human-computer interaction with the process of the computer program product through a graphical user interface.

[0073] Please see Figure 1 The human body image shape enhancement method of this application, in its typical embodiment, includes the following steps:

[0074] Step S1100: Obtain the skeleton feature map and part feature map of the human body image in the image to be processed. The skeleton feature map is used to indicate the human skeleton model in the human body image, and the part feature map is used to highlight the position of different parts of the human body in the image to be processed.

[0075] The image to be processed, by default, is a picture, which can be either a still image or a video frame extracted from video data. In an exemplary application scenario used to illustrate this application, the video data can be either a live video stream or a short video. In this scenario, the video frames can be obtained and processed from the image space of the live video stream pushed by the broadcaster user, either within a media server in a network live streaming service cluster, or within the broadcaster's device, where the client device camera generates video data and extracts video frames as the image to be processed before pushing it to the media server.

[0076] This step involves detecting and analyzing human key points in the image to be processed, obtaining key point results and feature maps of different body parts, and constructing a human skeleton based on these key points to generate a skeletal feature map. The detailed process is described in subsequent detailed embodiments of this application.

[0077] The skeleton feature map is used to indicate the human skeleton model in the human image. Specifically, the skeleton feature map is obtained by skeleton modeling after obtaining human key points from the image to be processed through human key point detection.

[0078] Human body parsing, a subtask within semantic segmentation, aims to achieve pixel-level fine-grained segmentation of human body images. A classic example dataset, the Look into Person (LIP) dataset, contains 50,000 images with pixel-level human body part annotations. These images are sourced from person instances in the COCO dataset, and all images are larger than 50*50 pixels. The dataset includes 19 category labels and a background label, totaling 20 human body part labels. In the application scenario of this application's embodiments, a pre-trained and converged human body parsing model is invoked to perform human body parsing on the image to be processed, obtaining part feature maps. See the exemplary illustrations in this application's embodiments for details. Figure 2 The feature map is used to highlight the position of different human body parts in the image to be processed, that is, each pixel in the image to be processed has its corresponding human body part label.

[0079] The human body parsing model is preferably implemented using a neural network model. For example, in this embodiment, the human body parsing model is a CE2P model that has been trained to convergence. Alternatively, the neural network model can be selected from various existing, well-established human body parsing models, including but not limited to: WSHP model, MHP series models, PASCAL-Part model, CE2P, etc., all of which are mature human body parsing models.

[0080] Step S1200: Separate the image to be processed into a foreground image and a background image based on the feature map of the part;

[0081] First, based on the feature map of the body parts, foreground and background labels are determined, where the foreground labels are the body part labels corresponding to the human body parts in the image to be processed.

[0082] The feature map is the result of human body analysis performed on the image to be processed by the human body analysis model. It is used to highlight the positions of different human body parts within the image to be processed; that is, each pixel indicates the corresponding human body part label in the image to be processed. Among these human body part labels are background labels and other human body part labels. These other human body part labels are collectively referred to as foreground labels. Therefore, the human body part labels only include background and foreground labels. The background label refers to the location in the image to be processed as the background region, and the foreground human body label refers to the location in the image to be processed as the foreground region.

[0083] Secondly, a foreground mask image is generated by determining whether each pixel in the feature map of the described region is a background label:

[0084] A foreground mask can be generated by determining whether each element of the feature map is a foreground label. That is, if the element is a foreground label, the element is set to 1, and if the element is not a foreground label, the element is set to 0, thereby generating a foreground mask.

[0085] Fore_Mask = Body_Part_Feature&Label_Fore

[0086] Where Fore_Mask represents the foreground mask map, Body_Part_Feature represents the part feature map, Label_Fore represents the foreground label, and & represents the AND operation.

[0087] Finally, image segmentation is performed on the image to be processed based on the foreground mask image to obtain the corresponding foreground and background images:

[0088] In the foreground mask image, a value of 1 represents the foreground region of the image to be processed, and a value of 0 represents the background region of the image to be processed. Therefore, a foreground image and a background image can be generated based on the image to be processed and the foreground mask image.

[0089] Fore_Image = Image * Fore_Mask

[0090] Back_Image = Image * (1 – Fore_Mask)

[0091] Where Fore_Image represents the foreground image, Back_Image represents the background image, Image represents the image to be processed, and Fore_Mask represents the foreground mask image.

[0092] Step S1300: Based on the correspondence between the part feature map and the skeleton feature map, a shaping mapping model of the foreground image is obtained, and the shaping mapping model generates a foreground beautification image corresponding to the foreground image in response to control parameters;

[0093] The part feature map is the result of human body analysis performed on the image to be processed by the human body analysis model. It is used to highlight the position of different human body parts in the image to be processed, that is, each pixel in the image to be processed has its corresponding human body part label. Therefore, the part feature map can represent the size and shape of different parts in the image to be processed.

[0094] The skeleton feature map is obtained by detecting human key points in the image to be processed using a human key point detection model. This leads to the construction of the human skeleton. This generates a skeletal feature map. The skeletal feature map contains all the bones of the human body, which are the main structures of different parts of the body. The shape and size of these different parts can be changed based on the horizontal and vertical directions of the bones.

[0095] Different parts in the part feature map correspond to different bones in the skeleton feature map. In this embodiment, the correspondence is modeled, that is, a part contour line is constructed based on the part feature map, and each point of the part contour line is matched with the nearest bone in the skeleton feature map, thereby constructing a bone mapping for each point in the part contour line and generating a shaping mapping model for the foreground image.

[0096] Based on the aforementioned shaping mapping model, user-triggered requests can be responded to. Control parameters carried in the request are applied to the shaping mapping model to perform corresponding shaping controls on different parts of the human body in the image to be processed. Specifically, in a concrete embodiment of this application, a control panel can be displayed on a graphical user interface, showing the foreground image obtained from the image to be processed; control parameters generated by acting on the foreground image in the control panel can be acquired; the shaping mapping model can be calculated based on the control parameters to obtain a shaping feature map; then, the foreground image is corrected based on the shaping feature map, ultimately generating a foreground beautified image.

[0097] Step S1400: Merge the foreground beautified image with the completed image of the background image to obtain a shape beautified image;

[0098] First, a pre-trained, converged image inpainting model is used to complete the background image:

[0099] The foreground beautified image is obtained by performing a corresponding reshaping mapping on the foreground image based on the control parameters triggered by the user. Compared with the foreground image, it has certain changes in shape and position, that is, it cannot be completely superimposed.

[0100] In the background image, besides displaying non-human background areas, the pixel value of the human body areas is 0, meaning they are essentially "cut out." Since the image to be processed obtains the foreground and background images through the separation of the foreground mask image, and the beautified foreground image has undergone significant changes compared to the foreground image, they cannot be completely superimposed. Therefore, if the beautified foreground image and the background image are directly merged, the merged image will exhibit obvious background distortion or missing elements, resulting in noticeable beautification artifacts and a poor user experience. Therefore, in this embodiment, the background image is completed to obtain a complete image without "cutting out" phenomena. Then, the beautified foreground image and the completed image are merged, which solves the problem of background distortion or missing elements and improves the user experience.

[0101] Image inpainting requires algorithms to fill in missing regions of the image to be repaired based on information from the image itself or an image library, making the repaired image look harmonious and natural, and difficult to distinguish from the undamaged image. Therefore, in this embodiment, a trained and converged image inpainting model is used to perform image inpainting on the background image to obtain the inpainted image. The image inpainting model can be a well-established neural network model, including but not limited to: PD-GAN, TransFill, MPRNet, DBGAN, etc.; similarly, any mature and trained and converged image inpainting model can be used as the image inpainting model in this embodiment to repair the background image and obtain the inpainted image. Then, the inpainted background image is fused with the foreground image to obtain a shape-enhanced image. For example, the inpainted image can be superimposed on the foreground image.

[0102] This application obtains the skeleton feature map and part feature map of the human body image in the image to be processed, wherein the skeleton feature map is used to indicate the human skeleton model in the human body image, and the part feature map is used to highlight the position of different parts of the human body in the image to be processed; then, the image to be processed is separated into a foreground image and a background image according to the part feature map; then, a shaping mapping model of the foreground image is obtained by modeling the correspondence between the part feature map and the skeleton feature map, so that the shaping mapping model generates a foreground beautified image corresponding to the foreground image in response to control parameters; finally, the foreground beautified image is fused with the completed image of the background image to obtain a body beautified image.

[0103] This application utilizes foreground-background separation, human keypoint detection, and human body analysis methods to beautify the shape of the image to be processed. After background completion, the image is then fused with the beautified foreground image. This method effectively avoids background distortion during shape beautification. Furthermore, this application employs shaping mapping modeling based on part feature maps and skeleton feature maps. Shaping mapping is performed based on the parallel and vertical directions of the human skeleton to obtain the beautified foreground image. While efficiently achieving shape beautification, this method effectively avoids distortion problems caused by foreground areas during shaping mapping and distortion problems caused by self-occlusion. Therefore, the human body image beautification method of this application can efficiently perform pre-defined shaping on the human body region in the image to be processed, while avoiding foreground and background distortion problems, resulting in a natural and seamless integration, thus enhancing the aesthetics and visual appeal of the image.

[0104] In summary, this application provides more efficient and better human body image beautification for the images to be processed, and can be highly reliable. It is suitable for applications such as e-commerce platforms to beautify the human body image of the images to be processed.

[0105] Please see Figure 3In a more detailed example, step S1200, obtaining the skeleton feature map and part feature map of the human body image in the image to be processed, includes the following steps:

[0106] Step S1210: Obtain video frames from the live video stream as images to be processed;

[0107] The live video stream refers to the video stream that a live streaming platform provides, which, according to the platform's live streaming logic, outputs in real-time from its media server to be parsed and displayed by users in the live streaming room. The live video stream is typically pushed by the broadcaster, processed by the media server, and then sent to other online viewers in the live streaming room.

[0108] When acquiring the live video stream, depending on the device on which the program implementing the technical solution of this application is running, if it is running in a network live streaming service cluster, the live video stream received from the broadcaster user can be decoded and extracted on the media server. Alternatively, the live video stream output by the media server after encoding can be specially decoded to obtain the video frames. If it is running on a client device, it can be acquired from the video data generated by the camera.

[0109] To adapt to the specific needs of image enhancement in live video streams, processing can be performed on each video frame during the entire live stream, or video frames can be obtained from the live video stream at certain intervals or frame counts for processing, obtaining the corresponding video frames as images to be processed. Those skilled in the art can implement this flexibly. Step S1220: Extract the human body key points and feature maps used to highlight different parts of the human body from the image to be processed;

[0110] Human keypoint detection, also known as human pose estimation, is a fundamental task in computer vision. The number of key nodes representing the human body varies depending on the application scenario. In a classic example dataset, the COCO dataset represents human keypoints as 17 joints: nose, left and right eyes, left and right ears, left and right shoulders, left and right elbows, left and right wrists, left and right hips, left and right knees, and left and right ankles. In another classic example dataset, the Openpose-Body25 dataset represents human keypoints as 25 joints: nose, neck, right shoulder, right elbow, right wrist, left shoulder, left elbow, left wrist, middle arm, right arm, right knee, right ankle, left arm, left knee, left ankle, right eye, left eye, right ear, left ear, left thumb, left little finger, left heel, right thumb, right little finger, right heel, and background.

[0111] The task of human keypoint detection is to detect the human body and its corresponding keypoint locations from an input image. In this embodiment, the human body and its corresponding keypoint locations are detected from the image to be processed.

[0112] Since human keypoint detection is a relatively mature technology, there are various existing models available for reference. These are generally based on CNN convolutional neural networks, including but not limited to CPM, Hourglass, CPN, MSPN, and HRNet. Different neural network-based human keypoint detection models may have different convolutional structures, leading to variations in their recognition methods. However, in terms of function and purpose, as long as the human keypoint detection model has been pre-trained to convergence on a target person and put into production, it can detect the target human keypoints from the image to be processed. As long as sufficient training samples are used to train it to convergence, it can be used as the human keypoint detection model of this application. Of course, the recognition ability of various models varies depending on the model structure and training samples, resulting in different recognition accuracies, which are reflected in the different confidence levels of the recognition results of each model. In this application, HRNet is recommended because its experimental performance is excellent.

[0113] The aforementioned human key point detection model detects the human key points from the image to be processed. Please see Figure 2 This is an example of the effect of human body key point detection.

[0114] Step S1230: Generate a skeleton feature map based on the key points of the human body.

[0115] A human skeleton is constructed from the aforementioned key points. This skeleton consists of two key points connected together, forming a key point vector. The vector starts at one key point and ends at the other. The skeleton indicates the actual location of the human skeleton. Therefore, the detected key points... Can construct human skeleton This process generates a skeleton feature map. k represents the number of joint points, and m represents the number of human bones.

[0116] The human body image beautification method in this application embodiment is controlled based on the horizontal and vertical directions of the skeleton. The construction of the skeleton feature map is the basis for the implementation of the human body image beautification method, which to a certain extent ensures the visual coordination of the beautification.

[0117] Please see Figure 4 In a more detailed example, step S1300, which involves modeling the foreground image based on the correspondence between the part feature map and the skeleton feature map to obtain a shaping mapping model, includes the following steps:

[0118] Step S1310: Model and obtain the shaping mapping model of the foreground image, so that the shaping mapping model corrects the part feature map according to the change of the skeleton feature map to obtain the corresponding shaping feature map.

[0119] The foreground image, also known as the part feature map, refers to the human body region image in the image to be processed. The part feature map is a mask representation of the foreground image and can also represent the contours of different human body parts in the foreground image. Therefore, part contour lines can be constructed based on the part feature map. These contour lines represent the shape and size of their corresponding human body parts, thus allowing for the reshaping and beautification of those parts by altering the contour lines. To avoid distortion during reshaping, the reshaping and beautification of contour lines within the same human body part must have similarity; that is, the contour lines corresponding to the same or adjacent parts must maintain shape continuity and cannot exhibit abrupt changes in position. Therefore, each point on the part contour line needs to be matched to its nearest bone. Representing the point with the matched bone constructs a mapping from the bone to the point, known as a skeletal mapping. Extending the points to all points on the part contour line and extending the bones to the entire skeletal feature map yields the reshaping mapping model of the foreground image. The shaping mapping model refers to the mapping from the skeleton feature map to the contour line of the part. In essence, the shaping mapping model is a function expression of the contour line of the part based on the skeleton feature map (bones).

[0120] Step S1320: Substitute the control parameters used to control the skeleton feature map to generate image deformation into the shaping mapping model to obtain the corresponding shaping feature map;

[0121] The reshaping mapping model can obtain the corresponding part contour line based on the function expression (reshaping mapping) of the skeleton feature map (bones) according to the input control parameters. The control parameters are represented based on the horizontal and vertical directions of the human skeleton.

[0122] Therefore, the shaping mapping model needs to be triggered by user demand. In this embodiment, a control panel pops up in the graphical user interface, displaying the foreground image. The user inputs the corresponding shaping control parameters in the control panel according to the foreground image and the shaping demand. After the shaping mapping model obtains the control parameters generated by the foreground image in the control panel, it calculates the mapping result of the contour line of the part corresponding to the setting of the control parameters, thereby obtaining the shaping feature map.

[0123] Step S1330: Correct the foreground image according to the reshaping feature map to generate a corresponding foreground beautified image.

[0124] The plastic surgery feature map represents the contour line of the corresponding plastic surgery part calculated by the plastic surgery mapping model under the control parameter settings. The foreground image is corrected according to the contour line of the plastic surgery part, thereby generating a corresponding foreground beautified image. The correction is based on the horizontal and vertical directions of the human skeleton in the foreground image.

[0125] This embodiment makes the human-computer interaction process more convenient. When implemented in a live streaming scenario, it facilitates the intelligent enhancement of the human body image in the live video stream, thereby achieving a good video display effect.

[0126] Please see Figure 5 In a specific embodiment, step S1310, which involves modeling and obtaining a shaping mapping model of the foreground image, further includes the following operations:

[0127] Step S1311: Construct the outline of the part based on the part feature map;

[0128] Please see Figure 2 The figure shows the feature map of the affected area. As can be seen from the figure, there is a clear boundary between the affected area and the background area. In the feature map, the position value of the background area is set to 0, the position values ​​of the same affected area are the same, and the position values ​​of different affected areas are different. Therefore, the outline of the affected area can be constructed based on the difference between the numerical values ​​of different positions in the feature map. Specifically, the difference between each position in the feature map is judged. If the difference between the position value and the value in the neighboring position (e.g., four adjacent positions) is not 0, then the position point belongs to the outline of the affected area; if the difference between the position value and the value in the neighboring position (e.g., four adjacent positions) is 0, then the position point does not belong to the outline of the affected area. Thus, all the position points are connected on the feature map to construct the outline of the affected area.

[0129] Step S1312: Match each point of the contour line of the described part with the nearest bone in the skeletal feature map;

[0130] As can be seen from the previous step, the part outline divides the part feature map into different part regions. From another perspective, the part outline is the wrapping line and part outline of different parts in the part feature map.

[0131] The outline of the part represents its size and shape. The human body image beautification method of this application essentially controls and adjusts the outline of the part to achieve beautification and reshaping of the corresponding part. However, directly adjusting each point of the outline can easily cause foreground distortion. The visual coordination of the part outline is based on its skeleton; therefore, it is necessary to model the part outline and the skeleton, adjusting the outline based on the horizontal and vertical directions of the skeleton. For each point of the part outline, it is matched to the human skeleton (skeleton feature map) with the closest distance (Euclidean distance).

[0132] Step S1313: Construct the skeletal mapping of each point of the contour line of the part to obtain the shaping mapping model of the foreground image.

[0133] Based on the steps described above, each point on the contour line of the affected area corresponds to the nearest human skeleton; that is, each human skeleton has its corresponding contour line segment. Next, each point on the contour line is expressed as a function of its nearest matched human skeleton, i.e., a skeleton mapping; subsequently, the skeletal feature map can be mapped to the contour line of the affected area, and this mapping is the shaping mapping model. Please refer to [link to relevant documentation]. Figure 6 The shaping mapping model, based on skeleton feature maps, responds to user control parameter requirements and performs shape enhancement on the foreground image.

[0134] This embodiment first constructs a contour line, then uses each point in the contour line to match the nearest bone in the skeleton feature map, thereby establishing a skeletal mapping between the contour line and each point, and obtaining a shaping mapping model. Its implementation is based on pixel-level operations on the image, so the shaping mapping model it constructs has a strong fitting ability and can effectively describe the changing relationship of the human body image shape. On this basis, it can effectively achieve accurate image beautification effect.

[0135] Please see Figure 7 In a specific embodiment, step S1320, which involves substituting control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain the corresponding shaping feature map, further includes the following operations:

[0136] Step S1321: A control panel pops up in the graphical user interface, and the foreground image is displayed in the control panel;

[0137] The shaping mapping model of the foreground image performs shape enhancement according to control parameters, which are obtained through the graphical user interface and are user-triggered control parameter settings.

[0138] Therefore, in this embodiment, a graphical user interface is provided, which can pop up a control panel. The control panel displays the foreground image, facilitating human-computer interaction and allowing users to input relevant control parameters through drag-and-drop operations. Please refer to [link to relevant documentation]. Figure 8 .

[0139] Step S1322: Obtain the control parameters generated accordingly by the foreground image applied to the control panel;

[0140] In this embodiment, after the user triggers the body shaping entry, they can see the foreground image displayed on the control panel, and then trigger the corresponding control settings according to the user's own shaping requirements. In the backend program of the human body image shaping method, the frontend application can obtain mouse or touch operations, calculate the corresponding coordinate information, and convert it into control parameters corresponding to the corresponding bones.

[0141] Step S1323: Calculate the shaping mapping model based on the control parameters to obtain the shaping feature map.

[0142] After the shaping mapping model obtains the control parameters generated by the foreground image in the control panel, it calculates the corresponding mapping result of the contour line of the part under the setting of the control parameters. Generally, it is based on the shape beautification of the human skeleton in the horizontal or vertical direction, thereby obtaining the shaping feature map.

[0143] This application embodiment models the foreground image, representing the outline of human body parts as a function of human skeleton to obtain a shaping mapping model. Subsequently, based on the control parameters input by the user, the shaping mapping model is substituted to automatically generate the shaping feature map corresponding to the beautified shape. This is fast and efficient. Furthermore, based on the fact that the shaping mapping model has a strong fitting ability, the subsequent obtained foreground beautified image is more accurate.

[0144] This application embodiment models the foreground image, represents the outline of human body parts as a function expression of human skeleton, obtains a shaping mapping model, and performs corresponding shaping mapping in the parallel and vertical directions of human skeleton to achieve human body shape beautification. It can effectively avoid the distortion problem after foreground area shaping and the distortion problem caused by self-occlusion, so that the final shape beautification image can not only meet the preset requirements, but also appear natural and beautiful.

[0145] Please see Figure 9A human body image shaping device provided to meet one of the purposes of this application includes a feature map extraction module 1100, a foreground / background separation module 1200, a shaping mapping module 1300, and a body shaping fusion module 1400. The feature map extraction module 1100 is used to acquire skeleton feature maps and part feature maps of a human body image in the image to be processed. The skeleton feature maps are used to indicate the human skeleton model in the human body image, and the part feature maps are used to highlight the positions of different human body parts in the image to be processed. The foreground / background separation module 1200 is used to separate the image to be processed into a foreground image and a background image based on the part feature maps. The shaping mapping module 1300 is used to model and obtain a shaping mapping model of the foreground image based on the correspondence between the part feature maps and the skeleton feature maps, so that the shaping mapping model generates a foreground beautified image corresponding to the foreground image in response to control parameters. The body shaping fusion module 1400 is used to fuse the foreground beautified image with a completed image of the background image to obtain a body shaping image.

[0146] In a further embodiment, the feature map extraction module 1100 includes: an image acquisition submodule for acquiring video frames from a live video stream as images to be processed; a feature extraction submodule for extracting human body key points and part feature maps for highlighting different parts of the human body from the images to be processed; and a skeleton extraction submodule for generating skeleton feature maps based on the human body key points.

[0147] In a more detailed example, the shaping mapping module 1300 includes: a modeling submodule, used to model and obtain a shaping mapping model for the foreground image, so that the shaping mapping model corrects the part feature map according to the changes in the skeleton feature map to obtain a corresponding shaping feature map; a parameter substitution submodule, used to substitute control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain a corresponding shaping feature map; and a correction submodule, used to correct the foreground image according to the shaping feature map to generate a corresponding foreground beautified image.

[0148] In a specific example, the modeling submodule includes a contour line unit for constructing a part contour line based on the part feature map; a matching unit for matching each point of the part contour line with the nearest bone in the skeleton feature map; and a mapping unit for constructing a bone mapping for each point in the part contour line to obtain a shaping mapping model of the foreground image.

[0149] In a specific example, the parameter substitution submodule includes: a display unit, used to pop up a control panel to the graphical user interface and display the foreground image in the control panel; a parameter acquisition unit, used to acquire the control parameters generated accordingly by acting on the foreground image in the control panel; and a substitution unit, used to calculate the shaping mapping model based on the control parameters to obtain the shaping feature map.

[0150] In a further embodiment, the foreground / background separation module 1200 includes: a foreground / background separation submodule, used to determine foreground and background labels based on the part feature map, wherein the foreground label is a human part label corresponding to a human part in the image to be processed; a mask generation submodule, used to generate a foreground mask map by determining whether each pixel in the part feature map is a background label; and an image segmentation submodule, used to perform image segmentation on the image to be processed based on the foreground mask map to obtain corresponding foreground and background images.

[0151] In a further embodiment, the body beautification fusion module 1400 includes: an image completion submodule, used to complete the background image using a pre-trained image inpainting model that has reached a convergence state; and an image fusion submodule, used to fuse the completed background image with the foreground image to obtain a body beautification image.

[0152] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 10 The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, they enable the processor to implement a method for beautifying the human body image. The processor of the computer device provides computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When these computer-readable instructions are executed by the processor, they enable the processor to execute the human body image beautification method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0153] In this embodiment, the processor is used to execute... Figure 9The system contains the specific functions of each module and its sub-modules, and the memory stores the program code and various data required to execute the aforementioned modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the human body image shaping device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.

[0154] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the human body image beautification method of any embodiment of this application.

[0155] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the method described in any embodiment of this application.

[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0157] like Figure 11 As shown, the application product implemented by the technical solution of this application can run on the business server of the service cluster. Client devices can call the interface opened by the application product running on the business server. The program product implementing the technical solution of this application can run on the backend server or business server of the service cluster for external calls. Of course, if the operating resources of a single machine are sufficient, the program product can run on a single client device, without necessarily relying on the service cluster. For example, it can be deployed on a client device for human body image enhancement of live video streams for broadcasters. Those skilled in the art can implement such solutions flexibly.

[0158] In summary, this application uses foreground-background separation, human keypoint detection, and human body analysis methods to beautify the shape of the image to be processed, followed by background completion and fusion with the beautified foreground image. This method effectively avoids background distortion problems during shape beautification. Furthermore, this application uses part feature maps and skeleton feature maps for shaping mapping modeling, and obtains the beautified foreground image based on the parallel and vertical directions of the human skeleton. While efficiently achieving shape beautification, it effectively avoids distortion problems caused by foreground areas during shaping mapping and distortion problems caused by self-occlusion. Therefore, the human body image shape beautification method of this application can efficiently perform pre-defined shaping on the human body region in the image to be processed, while avoiding foreground and background distortion problems, achieving a natural and seamless integration, and enhancing the aesthetics and visual appeal of the image.

[0159] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0160] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for beautifying the shape of a human body image, characterized in that, Includes the following steps: The skeleton feature map and part feature map of the human body image in the image to be processed are obtained. The skeleton feature map is obtained by connecting the human body key points that make up the human skeleton in the image to be processed, and is used to indicate the human skeleton model in the human body image. The part feature map is obtained by parsing the human body part label corresponding to each pixel in the image to be processed, and is used to highlight the position of different human body parts in the image to be processed. Based on the feature map of the part, the image to be processed is separated into a foreground image and a background image; The modeling of the foreground image is obtained by modeling the correspondence between the part feature map and the skeleton feature map, and the modeling of the foreground image is generated in response to the control parameters to generate the foreground beautification image corresponding to the foreground image. This includes: constructing a part outline based on the part feature map; matching each point of the part outline with the nearest bone in the skeleton feature map, the skeleton feature map containing all the bones of the human body, the bones being the main structure of different parts of the human body, the shape and size of which can be changed based on the horizontal and vertical directions of the bones; constructing a bone mapping for each point in the part outline to obtain a shaping mapping model for the foreground image; substituting control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain a corresponding shaping feature map; and correcting the foreground image based on the shaping feature map to generate a corresponding foreground beautified image. The foreground beautified image is fused with the completed background image to obtain the body beautified image.

2. The method for beautifying the human body image according to claim 1, characterized in that, Obtaining the skeleton feature map and part feature map of the human body image in the image to be processed includes the following steps: Obtain video frames from the live video stream as images to be processed; Extract human body key points and part feature maps used to highlight different parts of the human body from the image to be processed; A skeletal feature map is generated based on the key points of the human body.

3. The method for beautifying the human body image according to claim 1, characterized in that, Substituting control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain the corresponding shaping feature map includes the following steps: A control panel pops up in the graphical user interface, displaying the foreground image. Acquire the control parameters generated by the foreground image applied to the control panel; The shaping mapping model is calculated based on the control parameters to obtain the shaping feature map.

4. The method for beautifying the human body image according to any one of claims 1 to 3, characterized in that, Based on the feature map, the image to be processed is separated into a foreground image and a background image, including the following steps: Based on the feature map of the part, foreground and background labels are determined, wherein the foreground label is the human part label corresponding to the human part in the image to be processed; A foreground mask is generated by determining whether each pixel in the feature map of the described part is a background label. Image segmentation is performed on the image to be processed based on the foreground mask image to obtain the corresponding foreground and background images.

5. The method for beautifying the human body image according to any one of claims 1 to 3, characterized in that, The process of fusing the foreground beautified image with the completed background image to obtain a shape beautified image includes the following steps: The background image is incomplete using a pre-trained, converged image inpainting model. The completed background image is merged with the foreground image to obtain a shape-enhanced image.

6. A human body image shaping and beautification device, characterized in that, include: The feature map extraction module is used to obtain the skeleton feature map and part feature map of the human body image in the image to be processed. The skeleton feature map is obtained by connecting the human body key points that make up the human skeleton in the image to be processed, and is used to indicate the human skeleton model in the human body image. The part feature map is obtained by parsing the human body part label corresponding to each pixel in the image to be processed, and is used to highlight the position of different human body parts in the image to be processed. The foreground / background separation module is used to separate the image to be processed into a foreground image and a background image based on the feature map of the part; The shaping mapping module is used to model the foreground image based on the correspondence between the part feature map and the skeleton feature map to obtain the shaping mapping model, so that the shaping mapping model generates the foreground beautification image corresponding to the foreground image in response to control parameters; This includes: constructing a part outline based on the part feature map; matching each point of the part outline with the nearest bone in the skeleton feature map, the skeleton feature map containing all the bones of the human body, the bones being the main structure of different parts of the human body, the shape and size of which can be changed based on the horizontal and vertical directions of the bones; constructing a bone mapping for each point in the part outline to obtain a shaping mapping model for the foreground image; substituting control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain a corresponding shaping feature map; and correcting the foreground image based on the shaping feature map to generate a corresponding foreground beautified image. The shape enhancement and fusion module is used to fuse the foreground enhancement image with the completed image of the background image to obtain the shape enhancement image.

7. The human body image shaping device according to claim 6, characterized in that, The feature map extraction module includes: an image acquisition submodule for acquiring video frames from a live video stream as images to be processed; a feature extraction submodule for extracting human body key points and part feature maps for highlighting different parts of the human body from the images to be processed; and a skeleton extraction submodule for generating skeleton feature maps based on the human body key points.

8. The human body image shaping device according to claim 6, characterized in that, The shaping mapping module includes: a modeling submodule, used to model and obtain a shaping mapping model for the foreground image, so that the shaping mapping model corrects the part feature map according to the changes in the skeleton feature map to obtain a corresponding shaping feature map; a parameter substitution submodule, used to substitute control parameters for controlling the image deformation of the skeleton feature map into the shaping mapping model to obtain a corresponding shaping feature map; and a correction submodule, used to correct the foreground image according to the shaping feature map to generate a corresponding foreground beautified image.

9. A computer device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 5, which, when invoked by a computer, executes the steps included in the corresponding method.

Citation Information

Patent Citations

  • Method and system for implementing AR

    CN108898061A

  • Image processing method, image processing device, electronic equipment and storage medium

    CN113516755A