CN112150383A - Face beautifying method and device, live broadcast terminal and computer readable storage medium - Google Patents

Face beautifying method and device, live broadcast terminal and computer readable storage medium Download PDF

Info

Publication number
CN112150383A
CN112150383A CN202011041123.1A CN202011041123A CN112150383A CN 112150383 A CN112150383 A CN 112150383A CN 202011041123 A CN202011041123 A CN 202011041123A CN 112150383 A CN112150383 A CN 112150383A
Authority
CN
China
Prior art keywords
face
beauty
image
target
beautified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011041123.1A
Other languages
Chinese (zh)
Inventor
华路延
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202011041123.1A priority Critical patent/CN112150383A/en
Publication of CN112150383A publication Critical patent/CN112150383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The application provides a face beautifying method and device, a live broadcast terminal and a computer readable storage medium, and relates to the field of image processing of live broadcast. The face beautifying method is applied to a live broadcast terminal, and comprises the following steps: acquiring a face image of a main broadcaster to be beautified; inputting the face image into a beauty recognizer to obtain the current color value score of the anchor to be beautified; determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values; and processing the face image according to the target beauty parameter to obtain a target image of the anchor to be beautified. And determining different target beautifying parameters according to the current color value of the face image, further realizing face optimization processing of a director to be beautified, and realizing beautifying of the face image.

Description

Face beautifying method and device, live broadcast terminal and computer readable storage medium
Technical Field
The application relates to the field of image processing of live webcasting, in particular to a face beautifying method, a face beautifying device, a live webcasting terminal and a computer-readable storage medium.
Background
With the development of internet technology and the improvement of communication functions, live webcasting is not limited to scenes such as article sharing and online shopping. Therefore, webcasting not only has more requirements on the live content, but also presents greater challenges to the color value of the anchor.
At present, in the process of live network broadcasting, the face beautifying effect of a main broadcasting is often set and adjusted by the main broadcasting person, a large amount of time is consumed in the setting process, and the face beautifying effect is not ideal. Therefore, how to perform different optimizations according to different anchor is a problem that needs to be solved urgently at present.
Disclosure of Invention
The application aims to provide a face beautifying method, a face beautifying device, a live broadcast terminal and a computer readable storage medium, which can determine different target beautifying parameters according to the current value of a face image, further realize face optimization processing of a main broadcaster of facial beautification and realize facial beautification of the face image.
The embodiment of the application can be realized as follows:
in a first aspect, an embodiment of the present application provides a face beautifying method, which is applied to a live broadcast terminal, and the method includes:
acquiring a face image of a main broadcaster to be beautified;
inputting the face image into a beauty recognizer to obtain the current color value score of the anchor to be beautified;
determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values;
and processing the face image according to the target beauty parameter to obtain a target image of the anchor to be beautified.
In an optional embodiment, inputting the face image to a beauty recognizer, and obtaining the current color value score of the anchor to be beautified includes:
acquiring face type information of the face image;
inputting the face type information into the facial beautification recognizer to obtain a first average face map corresponding to the face type information;
and matching the first average face image with the face image to obtain the current color value score.
In an optional embodiment, the face image is a front image of the anchor to be beautified; the method for acquiring the face image of the anchor to be beautified comprises the following steps:
acquiring a plurality of shot images of the anchor to be beautified;
acquiring images which accord with preset beautifying conditions in the multiple shot images as the face images; the preset beautifying condition is that the deviation value of any angle of the image is smaller than or equal to the deviation threshold value.
In an optional implementation manner, the interaction area of the live broadcast terminal is provided with a plurality of face marks, and the face marks correspond to a plurality of beauty parameters one by one;
before the processing the face image according to the target beauty parameter and acquiring the target image of the anchor to be beautified, the method further includes:
responding to operation information of a user, and acquiring a target face mark corresponding to the operation information;
and taking the beauty parameter corresponding to the target face mark as a target beauty parameter.
In an alternative embodiment, the beauty policy mapping table is obtained by:
acquiring a training image set; the set of training images includes training images of a plurality of facial shapes;
acquiring a second average face image corresponding to the first face according to the training image set; the first facial form is any one of the plurality of facial forms;
performing beauty debugging on the second average face image to obtain a target beauty parameter of the first face;
integrating the target beauty parameters corresponding to each face type to obtain the beauty strategy mapping table.
In an optional embodiment, performing a beauty adjustment on the second average face map to obtain a target beauty parameter of the first face type includes:
performing beauty debugging for preset times on the second average face map, and acquiring a color value score corresponding to each beauty debugging;
determining a highest color value score of the plurality of color value scores;
and taking the beauty adjusting parameter corresponding to the highest color value score as the target beauty parameter of the first face type.
In an optional embodiment, performing a preset number of times of beauty adjustment on the second average face map to obtain a color value score corresponding to each beauty adjustment includes:
acquiring a first image obtained after performing current beauty debugging on the second average face image; the current beautifying debugging is used for indicating that the second average face map is subjected to image processing according to any group of beautifying parameters;
inputting the first image to the beauty recognizer to obtain the color value score corresponding to the current beauty debugging.
In a second aspect, an embodiment of the present application provides a face beautifying device, which is applied to a live broadcast terminal, and the device includes:
the acquisition module is used for acquiring a face image of a main broadcaster to be beautified;
the score determining module is used for inputting the face image into a beauty recognizer and acquiring the current color value score of the anchor to be beautified;
the parameter determining module is used for determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values;
and the processing module is used for processing the face image according to the target beautifying parameters to acquire the target image of the anchor to be beautified.
In an optional embodiment, the score determining module is further configured to obtain face type category information of the face image;
the score determining module is further configured to input the facial form category information to the facial beautification recognizer to obtain a first average face map corresponding to the facial form category information;
the score determining module is further configured to match the first average face image with the face image to obtain the current color score.
In a third aspect, an embodiment of the present application provides a live broadcast terminal, including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the method described in any one of the foregoing embodiments.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method of any one of the foregoing embodiments.
Compared with the prior art, the application provides a face beautifying method and device, a live broadcast terminal and a computer readable storage medium, and relates to the field of image processing of network live broadcast. The face beautifying method is applied to a live broadcast terminal, and comprises the following steps: acquiring a face image of a main broadcaster to be beautified; inputting the face image into a beauty recognizer to obtain the current color value score of the anchor to be beautified; determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values; and processing the face image according to the target beauty parameter to obtain a target image of the anchor to be beautified. And determining different target beautifying parameters according to the current color value of the face image, further realizing face optimization processing of a director to be beautified, and realizing beautifying of the face image.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic block diagram of a live broadcast terminal according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a face beautifying method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of another face beautifying method according to an embodiment of the present application;
FIG. 4 is a graphical illustration of a color score provided by an embodiment of the present application;
fig. 5 is a schematic flow chart of another face beautifying method according to an embodiment of the present application;
fig. 6 is an operation diagram of a face beautifying method according to an embodiment of the present application;
fig. 7 is a schematic flow chart of another face beautifying method according to an embodiment of the present application;
fig. 8 is a schematic flow chart illustrating another face beautifying method according to an embodiment of the present application;
fig. 9 is a flowchart illustrating an obtaining process of a beauty policy mapping table according to an embodiment of the present application;
fig. 10 is a schematic view of a facial form according to an embodiment of the present disclosure;
fig. 11 is a schematic block diagram of a face beautifying apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance. It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In the current live webcast scene, in order to improve the stickiness of a user to a live application program, in the live webcast process, a push scene adopted by the live webcast scene is generally a main webcast which is preferred by a composite person and is pushed to audiences. That is, the live broadcast application collects the commonly watched content of the audience or the type of the commonly watched live broadcast, and then pushes the corresponding anchor to the audience. That is, the current distribution recommendation generally aiming at audiences cannot provide reference for the beauty of the anchor.
In order to solve at least the above problems and disadvantages of the background art, an embodiment of the present invention provides a live broadcast terminal, please refer to fig. 1, and fig. 1 is a block schematic diagram of a live broadcast terminal provided in an embodiment of the present invention, where the live broadcast terminal 100 may include a processor 110, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management Module 140, a power management Module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication Module 150, a wireless communication Module 160, a camera 193, a display screen 194, and a Subscriber Identity Module (SIM) card interface.
The face beautifying method provided by the embodiment of the application can be applied to terminals such as Mobile phones, tablet computers, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices, notebook computers, Ultra-Mobile Personal computers (UMPC), netbooks, Personal Digital Assistants (PDA), and the like, and the embodiment of the application does not limit the specific type of the live broadcast terminal.
It is to be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation to the live terminal 100. In other embodiments of the present application, the live terminal 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the Processor 110 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors. The controller may be a neural center and a command center of the live broadcast terminal 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The Interface may include an Integrated Circuit (I2C) Interface, an Inter-Integrated Circuit built-in audio (I2S) Interface, a Pulse Code Modulation (PCM) Interface, a Universal Asynchronous Receiver/Transmitter (UART) Interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input/Output (GPIO) Interface, a Subscriber Identity Module (SIM) Interface, and/or a Universal Serial Bus (USB) Interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the live broadcast terminal 100, and may also be used to transmit data between the live broadcast terminal 100 and peripheral devices. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other terminals, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only an exemplary illustration, and does not constitute a structural limitation of the live terminal 100. In other embodiments of the present application, the live broadcast terminal 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the live terminal 100. The charging management module 140 may also supply power to the terminal through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the live broadcast terminal 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the live terminal 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied on the live terminal 100. The Wireless Communication module 160 may provide solutions for Wireless Communication applied to the live broadcast terminal 100, including Wireless Local Area Networks (WLANs) (e.g., Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. In some embodiments, the antenna 1 of the live terminal 100 is coupled to the mobile communication module 150 and the antenna 2 is coupled to the wireless communication module 160 so that the live terminal 100 can communicate with networks and other devices through wireless communication techniques.
The live broadcast terminal 100 implements a display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The Display panel may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active Matrix Organic Light-Emitting Diode (Active-Matrix Organic Light-Emitting Diode, AMOLED), a flexible Light-Emitting Diode (FLED), a miniature, a Micro-oeled, a Quantum Dot Light-Emitting Diode (Quantum Dot Light-Emitting Diodes, QLED), or the like. In some embodiments, the live terminal 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The live broadcast terminal 100 can implement the network live broadcast and video shooting functions through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The camera 193 is used to capture still images or moving video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a Complementary Metal-Oxide-Semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the live terminal 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the live terminal 100 by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, a phonebook, etc.) created during use of the live terminal 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The software system of the live broadcast terminal 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, a cloud architecture, or the like.
Next, on the basis of the live broadcast terminal 100 shown in fig. 1, in order to implement a face beautifying process on an anchor and reduce manually set parameters, an embodiment of the present application provides a face beautifying method, which is applied to the live broadcast terminal 100, please refer to fig. 2, where fig. 2 is a flowchart illustrating the face beautifying method provided in the embodiment of the present application, and the face beautifying method may include the following steps:
and S210, acquiring a face image of the anchor to be beautified.
For example, the live broadcast terminal 100 may collect a face image of a director to be beautified through the camera 193; the method can be used for collecting static images of the anchor to be beautified, and can also be used for collecting video information of the anchor to be beautified.
And S220, inputting the face image into the beauty recognizer, and acquiring the current color value score of the anchor to be beautified.
It should be understood that the face beautification recognizer may obtain a current face value score of the anchor to be beautified according to the face position of the anchor to be beautified in the face image; or performing color value numerical evaluation on different face types according to the face type or skin color of the face image to be beautified.
For example, if the face shape of the anchor to be beautified is a round face, the current color value score is given as 80 points; and if the face shape of the anchor to be beautified is the melon seed face, giving a current face value score of 90.
And S230, determining a target beauty parameter corresponding to the current color value according to the beauty strategy mapping table.
The beauty strategy mapping table maintains a correspondence of at least one set of beauty parameters and color values. The beauty strategy mapping table can be stored in the live broadcast terminal, and also can be stored in any database or server of the live broadcast terminal; the beauty strategy mapping table may also be loaded in a live Application (APP), or any cloud database linked to the live APP, etc.
For example, the target beauty parameters may include, but are not limited to, adjustment parameters such as face thinning, buffing, brightening, trimming, reflection removal, level correction, mosaic, blurring, etc., and may also include condition parameters such as brightness, sharpness, contrast, saturation, bright portion, dark portion, etc.
And S240, processing the face image according to the target beauty parameters to obtain a target image of the anchor to be beautified.
It should be noted that, by using the face beautifying method corresponding to S210 to S240, different target beautifying parameters can be determined according to the current color value of the face image, so as to implement face optimization processing on the anchor to be beautified, implement beautifying on the face image, and improve the color value of the anchor to be beautified.
In an optional embodiment, the obtaining of the current color value score of the anchor to be beautified may be performed in different manners, and on the basis of fig. 2, taking the face shape of the anchor to be beautified as an example to perform the color value score determination, a possible embodiment is provided, please refer to fig. 3, where fig. 3 is a flowchart of another face beautification method provided in this embodiment of the present application, and is directed to the above S220: inputting the face image into the facial beautification recognizer, and acquiring the current color value score of the anchor to be beautified, the method may include the following steps:
s220a, the face type information of the face image is acquired.
The face type information is classified according to the front-looking face type, and can comprise melon seed faces, round faces, rectangular faces, square faces, triangular faces and the like; the face type information is classified according to the side-looking face type and can comprise a concave side face, a convex side face, a flat side face and the like; the facial form type information is classified according to the position distribution of five sense organs, and can include an inner facial form, an outer facial form, an upper facial form, a lower facial form, a hanging facial form and the like.
For example, the face type information may be obtained by recognition by a face type recommendation recognizer, which may recognize face type information to be beautified based on face point information of a face image; the face point information may be face point information of a face image obtained by processing the face image using an acquisition mode such as "68 face key points" or "49 face key points".
S220b, the face type information is input to the facial makeup recognizer to obtain a first average face map corresponding to the face type information.
It should be appreciated that the beauty recognizer may be configured to determine an average face map based on the face type category information; for example, the average face image may be an image obtained by correcting the face shape of the face image with the chin-to-nose point of the target object as the center line in the face image. For example, the first average face map may be obtained after performing a plurality of sets of adjustments on a plurality of types of faces.
And S220c, matching the first average face image with the face image to obtain the current color value score.
For example, matching the first average face image with the face image may be multi-dimensional, which may include, but is not limited to: face contour, position of five sense organs, proportion of five sense organs, distance of five sense organs relative to face contour, and the like.
The method comprises the steps of obtaining the current color value score of a main broadcaster to be beautified, further processing a face image according to a target beautification parameter corresponding to the current color value score to obtain a target image of the main broadcaster to be beautified, and effectively avoiding manual more beautification settings so as to realize beautification processing of the face image of the main broadcaster to be beautified.
The current color score may be scored in percent, e.g., the current color score may be 0-100 points. To facilitate understanding of the above current color value score and the target beauty parameter, the present application provides a possible embodiment, please refer to fig. 4, fig. 4 is a schematic diagram of a color value score provided by the embodiment of the present application, a corresponding face type category in (a) in fig. 4 is "melon seed face", a current color value score thereof is "90", and a target beauty parameter for "melon seed face" may be: the adjusting parameter of the pull rod is 10, and then the face shape is adjusted; the corresponding face type category in fig. 4 (b) is "round face", the current face value is scored as "80", and the target beauty parameter for "round face" may be: the adjusting parameter of the pull rod is '50', so that the face shape of the anchor to be beautified is adjusted.
It should be noted that, in the live webcasting process, the head of the anchor often has an offset, so that the image acquired by the live APP has a larger offset relative to the front image of the anchor, and a larger error also occurs in the beautifying process.
In an optional embodiment, in order to achieve the beauty of the anchor to be beautified and reduce the beauty error occurring in the live broadcast process, on the basis of fig. 2, a possible implementation is given by taking a face image as a front image of the anchor to be beautified, please refer to fig. 5, where fig. 5 is a flowchart of another face beauty method provided in the embodiment of the present application, and with respect to the above S210: the method for acquiring the face image of the beauty anchor comprises the following steps:
s210a, acquiring a plurality of shot images to be beautified.
The multiple shot images can be shot before the face beautification of the main player to be beautified, the camera of the live broadcast terminal can rotate or be fixed, and the posture position of the camera relative to the main player to be beautified can be described through multiple direction angles, such as pitch, yaw and roll angles.
And S210b, acquiring images which meet preset beauty conditions in the multiple shot images as the face images.
The preset beautifying condition is that the deviation value of any angle of the image is smaller than or equal to the deviation threshold value. For example, the angles described above may include, but are not limited to, any one or combination of: and (3) determining the face image to be a front face image if the angles of pitch, yaw and roll are all smaller than 10 degrees.
In an alternative embodiment, since the face recognition result of the live broadcast terminal on the anchor for beauty may not be consistent with the actual face of the anchor for beauty, which may cause the effect of beautifying the face to be poor, in order to solve the above problem, on the basis of fig. 2, taking as an example that the interaction area of the live broadcast terminal has a plurality of face marks, the plurality of face marks correspond to a plurality of beauty parameters one to one, with respect to S240: the face image is processed according to the target beauty parameter, and before the target image of the anchor to be beautified is acquired, the face beautifying method can further comprise the following steps: responding to the operation information of the user, and acquiring a target face mark corresponding to the operation information; and taking the beauty parameter corresponding to the target face shape mark as a target beauty parameter.
It should be understood that the operation information may be input by a user using an input device such as a keyboard, a mouse, etc., which is in communication connection with the live broadcast terminal 100, so that the live broadcast terminal can obtain the operation information; if the live broadcast terminal 100 is a mobile terminal having a touch screen, such as a tablet computer or a mobile phone, the operation instruction may be generated by a user by clicking the touch screen of the live broadcast terminal 100, or may be generated by a preset gesture operation performed by sliding a finger joint on the touch screen by the user (for example, the finger joint performs an o-shaped gesture operation on the touch screen), and the touch screen may be integrated with the display screen 194 shown in fig. 1 or may be separately disposed from the display screen 194.
For example, please refer to fig. 6, fig. 6 is an operation schematic diagram of a face beautifying method provided in the embodiment of the present application, a live APP may be set as an AI face recommendation by default, and the face beautifying method corresponding to S210 to S240 is executed to realize the beautifying of a main player to be treated with beautifying; the to-be-beautified anchor can also trigger the face shape mark of the live broadcast terminal 100 through gesture operation to select different face shapes, such as the face shape marks of "melon seed face", "round face", and the like shown in fig. 6, the beautification parameters corresponding to each face shape mark are different, for example, the beautification parameters corresponding to "melon seed face" include: and processing the owner to be beautified in the face image according to the condition that the adjusting parameter of the pull rod is '10' so as to realize the beautification of the owner to be beautified.
Treat the face of the face.
In an optional embodiment, in order to make the beauty anchor more beautiful, a possible implementation is given for the beauty policy mapping table, please refer to fig. 7, fig. 7 is a flowchart of another face beautifying method provided in an embodiment of the present application, where the beauty policy mapping table may be obtained through the following steps:
s201, acquiring a training image set.
The set of training images may include training images of a plurality of facial shapes. It should be understood that each training image is an image that meets the training condition, which may include, but is not limited to, the training image being a frontal image, and angles such as pitch, yaw, roll, etc. are all less than or equal to a preset angle (e.g., 10 degrees, 15 degrees, 18 degrees, etc.).
And S202, acquiring a second average face image corresponding to the first face according to the training image set.
The first face shape is any one of a plurality of face shapes, for example, the first face shape can be a melon seed face, a round face, a rectangular face, a square face or a triangular face. The second average face map may be a middle alignment image obtained after face shape correction according to a medial axis of the face in the training image (e.g., the medial axis may be a straight line defined from a chin point to a nose tip point of the face).
And S203, performing beauty debugging on the second average face image to acquire a target beauty parameter of the first face.
For example, a plurality of facial beautification adjustments may be performed on the second average face map, and each facial beautification adjustment may use different facial beautification parameters, which may include, but are not limited to, adjustment parameters such as face thinning, skin polishing, brightening, trimming, reflection elimination, level correction, mosaic, blurring, and the like, and may further include condition parameters such as brightness, sharpness, contrast, saturation, bright portion, dark portion, and the like.
S204, integrating the target beauty parameters corresponding to each face type to obtain a beauty strategy mapping table.
That is to say, the face beautifying adjustment test can be performed on the average face maps of different face shapes, the target face beautifying parameter of each face shape can be obtained, and the target face beautifying parameter corresponding to different face shapes can be effectively determined, so that in the live broadcast process, different target face beautifying parameters are recommended according to the actual face shape and the current face value of the main broadcast of the face to be beautified, and the face beautifying of the main broadcast of the face to be beautified is realized.
In an optional embodiment, because the second average face map is subjected to single facial beautification adjustment, the facial beautification effect of the second average face map is often not optimal, and on the basis of fig. 7, a possible implementation manner for obtaining a target facial beautification parameter of the second average face map is provided, please refer to fig. 8, where fig. 8 is a flowchart of another face beautification method provided in the embodiment of the present application, and is directed to S203: performing beauty adjustment on the second average face map to obtain target beauty parameters of the first face type, which may include the following steps:
and S2031, performing the beauty debugging on the second average face image for preset times, and acquiring a color value score corresponding to each beauty debugging.
The preset number of times may be preset, or may be set for different face shapes when the target beauty parameter is obtained, for example, the preset number of times may be 30 times for the "melon seed face", and 20 times for the "round face".
For example, for S2031 described above: performing the face beautifying debugging on the second average face map for a preset number of times to obtain a corresponding face value score for each face beautifying debugging, which may include: acquiring a first image obtained after performing current beauty debugging on the second average face image; and inputting the first image into a beauty recognizer to obtain a color value score corresponding to the current beauty debugging. It should be appreciated that the second beauty treatment may be used to instruct image processing of the second average face map according to any set of beauty parameters.
It is to be understood that the beauty recognizer may be a thread that performs a score evaluation based on face information, such as face shape and skin tone. That is, the number of the face value obtained after each face beautifying debugging is obtained, and then the face beautifying parameters corresponding to different face beautifying debugging are stored; when the face beautifying is carried out on the anchor to be beautified, corresponding beautifying parameters can be selected according to needs to be beautified, so that the automatic beautifying of the anchor to be beautified is realized.
S2032, a highest color score among the plurality of color scores is determined.
It can be understood that the higher the score is, the better the effect of the beauty adjustment of the second average face map is; the lower the score, the less effective the beautification of the second average face map.
And S2033, taking the beauty adjusting parameter corresponding to the highest color value score as the target beauty parameter of the first face shape.
It should be understood that the beauty debugging parameter corresponding to the highest color value score is used as the target beauty parameter of the first face shape, and then when face beauty is performed on the anchor to be beautified, each parameter corresponding to the target beauty parameter is called, such as face thinning, face shape correction and the like, so that in the network live broadcast process, different target beauty parameters are determined according to the current color value score of the face image, further, face optimization processing of the anchor to be beautified is realized, the beauty effect processing of the face image is realized, and the color value of the anchor to be beautified is improved.
To facilitate understanding of the above-mentioned obtaining process of the beauty policy mapping table, an embodiment of the present application provides a possible embodiment, please refer to fig. 9, fig. 9 is a flowchart for obtaining the beauty policy mapping table provided in the embodiment of the present application, and an obtaining manner of the beauty policy mapping table may include the following steps:
and S310, constructing the facial form recommendation identifier.
For example, the face recommendation identifier may be a face recognition process or software program.
And S320, classifying the face shape of the training image based on the recommendation recognizer.
For example, the human face shape can be classified according to the front-view shape, which can include melon seed shape, circular shape, rectangular shape, square shape, triangular shape, etc.
And S330, determining an average face map corresponding to each category of face.
The average face image may be a face image obtained by performing face symmetry correction on a face with a straight line determined from a chin point to a nose tip point of the face as a center line.
S340, performing a beauty adjustment test on the average face image, obtaining a tested color value score, and determining a beauty strategy corresponding to the final optimal score as a target beauty strategy corresponding to the average face image to obtain a beauty strategy mapping table.
For example, please refer to fig. 9, fig. 10 is a schematic diagram of a facial form according to an embodiment of the present application, in fig. 10, (a) includes a plurality of different facial forms, and in fig. 10, (b) after determining which facial form the face belongs to, a facial form adjustment is performed on each facial form, wherein each facial form adjustment sets are scored by a facial form recognizer, and finally, a set of parameters with gradually increasing score is obtained and recorded as an adjustment parameter of the current facial form.
That is to say, the beauty debugging parameter corresponding to the highest color value score is used as the target beauty parameter of the first face shape, and then when the face beauty is performed on the anchor to be beautified, each parameter corresponding to the target beauty parameter is called, such as face thinning, face shape correction and the like, so that in the network live broadcast process, different target beauty parameters can be determined according to the current color value score of the face image, further, the face optimization processing of the anchor to be beautified is realized, the beauty of the face image is realized, and the color value of the anchor to be beautified is improved.
It is foreseen that the above process of obtaining the beauty strategy mapping table may be implemented in a live broadcast terminal in a possible embodiment, and the plurality of training images may be obtained through a database linked with a live broadcast APP; in another possible embodiment, the process of obtaining the beauty policy mapping table may be implemented on other electronic devices, and after obtaining the beauty policy mapping table, the electronic device sends the beauty policy mapping table to the live broadcast terminal, or stores the beauty policy mapping table in a database in communication connection with the live broadcast terminal.
In order to implement the above-mentioned face beautifying method, an embodiment of the present application provides a face beautifying device, please refer to fig. 11, where fig. 11 is a block schematic diagram of the face beautifying device according to the embodiment of the present application, where the face beautifying device is applied to a live broadcast terminal, and the face beautifying device 40 includes: an acquisition module 41, a score determination module 42, a parameter determination module 43, and a processing module 44.
The obtaining module 41 is configured to obtain a face image of a democratic.
The score determining module 42 is configured to input the face image to the beauty recognizer, and obtain a current color value score of the anchor to be beautified.
The parameter determining module 43 is configured to determine a target beauty parameter corresponding to the current color value according to the beauty policy mapping table. The beauty strategy mapping table maintains a correspondence of at least one set of beauty parameters and color values.
The processing module 44 is configured to process the face image according to the target beauty parameter, and obtain a target image of the anchor to be beautified.
In an alternative embodiment, the score determination module 42 is further configured to obtain face type information of the face image. The score determining module 42 is further configured to input the face type information to the beauty recognizer to obtain a first average face map corresponding to the face type information. The score determining module 42 is further configured to match the first average face image with the face image to obtain a current color score.
It should be understood that the acquisition module 41, the score determination module 42, the parameter determination module 43 and the processing module 44 may cooperatively implement the above-described face beautification method and possible sub-steps thereof. And determining different target beautifying parameters according to the current color value of the face image, further realizing face optimization processing of a director to be beautified, and realizing beautifying of the face image.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the face beautifying method according to any one of the foregoing embodiments. The computer readable storage medium may be, but is not limited to, various media that can store program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a PROM, an EPROM, an EEPROM, a magnetic or optical disk, etc.
In summary, the present application provides a face beautifying method, an apparatus, a live broadcast terminal and a computer readable storage medium, and relates to the field of image processing of live broadcast over internet. The face beautifying method is applied to a live broadcast terminal, and comprises the following steps: acquiring a face image of a main broadcaster to be beautified; inputting the face image into a beauty recognizer to obtain the current color value score of a main anchor to be beautified; determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and the color value scores; and processing the face image according to the target beautifying parameters to obtain a target image of the anchor to be beautified. And determining different target beautifying parameters according to the current color value of the face image, further realizing face optimization processing of a director to be beautified, and realizing beautifying of the face image.

Claims (10)

1. A face beautifying method is applied to a live broadcast terminal, and comprises the following steps:
acquiring a face image of a main broadcaster to be beautified;
inputting the face image into a beauty recognizer to obtain the current color value score of the anchor to be beautified;
determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values;
and processing the face image according to the target beauty parameter to obtain a target image of the anchor to be beautified.
2. The method of claim 1, wherein inputting the face image to a beauty recognizer, obtaining the current color value score of the anchor to be beautified comprises:
acquiring face type information of the face image;
inputting the face type information into the facial beautification recognizer to obtain a first average face map corresponding to the face type information;
and matching the first average face image with the face image to obtain the current color value score.
3. The method of claim 1, wherein the face image is a front image of the anchor to be beautified; the method for acquiring the face image of the anchor to be beautified comprises the following steps:
acquiring a plurality of shot images of the anchor to be beautified;
acquiring images which accord with preset beautifying conditions in the multiple shot images as the face images; the preset beautifying condition is that the deviation value of any angle of the image is smaller than or equal to the deviation threshold value.
4. The method according to claim 1, characterized in that the interaction area of the live broadcast terminal is provided with a plurality of facial shape marks, and the facial shape marks correspond to a plurality of beauty parameters one by one;
before the processing the face image according to the target beauty parameter and acquiring the target image of the anchor to be beautified, the method further includes:
responding to operation information of a user, and acquiring a target face mark corresponding to the operation information;
and taking the beauty parameter corresponding to the target face mark as a target beauty parameter.
5. The method according to any of claims 1-4, wherein the beauty policy mapping table is obtained by:
acquiring a training image set; the set of training images includes training images of a plurality of facial shapes;
acquiring a second average face image corresponding to the first face according to the training image set; the first facial form is any one of the plurality of facial forms;
performing beauty debugging on the second average face image to obtain a target beauty parameter of the first face;
integrating the target beauty parameters corresponding to each face type to obtain the beauty strategy mapping table.
6. The method of claim 5, wherein performing facial fitting on the second average face map to obtain target facial parameters of the first face type comprises:
performing beauty debugging for preset times on the second average face map, and acquiring a color value score corresponding to each beauty debugging;
determining a highest color value score of the plurality of color value scores;
and taking the beauty adjusting parameter corresponding to the highest color value score as the target beauty parameter of the first face type.
7. The method according to claim 6, wherein performing a preset number of beauty treatments on the second average face map to obtain a color value score corresponding to each beauty treatment comprises:
acquiring a first image obtained after performing current beauty debugging on the second average face image; the current beautifying debugging is used for indicating that the second average face map is subjected to image processing according to any group of beautifying parameters;
inputting the first image to the beauty recognizer to obtain the color value score corresponding to the current beauty debugging.
8. The utility model provides a beautiful face device which characterized in that is applied to live terminal, the device includes:
the acquisition module is used for acquiring a face image of a main broadcaster to be beautified;
the score determining module is used for inputting the face image into a beauty recognizer and acquiring the current color value score of the anchor to be beautified;
the parameter determining module is used for determining a target beauty parameter corresponding to the current color value according to a beauty strategy mapping table; the beauty strategy mapping table maintains the corresponding relation of at least one group of beauty parameters and color values;
and the processing module is used for processing the face image according to the target beautifying parameters to acquire the target image of the anchor to be beautified.
9. A live terminal comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202011041123.1A 2020-09-28 2020-09-28 Face beautifying method and device, live broadcast terminal and computer readable storage medium Pending CN112150383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011041123.1A CN112150383A (en) 2020-09-28 2020-09-28 Face beautifying method and device, live broadcast terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011041123.1A CN112150383A (en) 2020-09-28 2020-09-28 Face beautifying method and device, live broadcast terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112150383A true CN112150383A (en) 2020-12-29

Family

ID=73894944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011041123.1A Pending CN112150383A (en) 2020-09-28 2020-09-28 Face beautifying method and device, live broadcast terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112150383A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107274354A (en) * 2017-05-22 2017-10-20 奇酷互联网络科技(深圳)有限公司 image processing method, device and mobile terminal
CN107730445A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN109325929A (en) * 2018-10-17 2019-02-12 联想(北京)有限公司 Image processing method and electronic equipment
CN110287809A (en) * 2019-06-03 2019-09-27 Oppo广东移动通信有限公司 Image processing method and Related product

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107274354A (en) * 2017-05-22 2017-10-20 奇酷互联网络科技(深圳)有限公司 image processing method, device and mobile terminal
CN107730445A (en) * 2017-10-31 2018-02-23 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN109325929A (en) * 2018-10-17 2019-02-12 联想(北京)有限公司 Image processing method and electronic equipment
CN110287809A (en) * 2019-06-03 2019-09-27 Oppo广东移动通信有限公司 Image processing method and Related product

Similar Documents

Publication Publication Date Title
WO2020140986A1 (en) Image denoising method and apparatus, storage medium and terminal
CN107580209B (en) Photographing imaging method and device of mobile terminal
US20210256672A1 (en) Method, electronic device and storage medium for processing image
CN108200337B (en) Photographing processing method, device, terminal and storage medium
US10885609B2 (en) Electronic device for processing image based on priority and method for operating thereof
CN115835010A (en) Shooting method and terminal
US20230154083A1 (en) Method for Assisting Makeup, Terminal Device, Storage Medium, and Program Product
US11144197B2 (en) Electronic device performing function according to gesture input and operation method thereof
CN113727018B (en) Shooting method and equipment
CN112333385B (en) Electronic anti-shake control method and device
US20190251670A1 (en) Electronic device and method for correcting images using external electronic device
CN116468917A (en) Image processing method, electronic device and storage medium
CN112532885A (en) Anti-shake method and device and electronic equipment
EP4047923A1 (en) Electronic device comprising camera and method of same
CN113132801A (en) Video playing control method, device, terminal and storage medium
US11587205B2 (en) Method and device for generating avatar on basis of corrected image
CN113014830A (en) Video blurring method, device, equipment and storage medium
CN111988525A (en) Image processing method and related device
CN112150383A (en) Face beautifying method and device, live broadcast terminal and computer readable storage medium
CN114915722B (en) Method and device for processing video
CN107105167B (en) Method and device for shooting picture during scanning question and terminal equipment
CN112785490B (en) Image processing method and device and electronic equipment
CN113572955A (en) Image processing method and device and electronic equipment
CN110941977A (en) Image processing method, image processing device, storage medium and electronic equipment
CN112561787B (en) Image processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination