CN114119935A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN114119935A
CN114119935A CN202111435489.1A CN202111435489A CN114119935A CN 114119935 A CN114119935 A CN 114119935A CN 202111435489 A CN202111435489 A CN 202111435489A CN 114119935 A CN114119935 A CN 114119935A
Authority
CN
China
Prior art keywords
target object
image
avatar
features
feature
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.)
Granted
Application number
CN202111435489.1A
Other languages
Chinese (zh)
Other versions
CN114119935B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111435489.1A priority Critical patent/CN114119935B/en
Publication of CN114119935A publication Critical patent/CN114119935A/en
Application granted granted Critical
Publication of CN114119935B publication Critical patent/CN114119935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Architecture (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure provides an image processing method and apparatus, which relate to the technical field of computers, and in particular, to the technical field of artificial intelligence such as augmented/virtual reality and image processing. The implementation scheme is as follows: obtaining an avatar corresponding to the target object, the avatar including a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object; determining a plurality of control parameters of the avatar based on the first image containing the target object; and adjusting, based on the plurality of control parameters, a plurality of virtual object features of the avatar to correspond with a plurality of target object features of the target object associated with the first image.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of artificial intelligence technologies such as augmented/virtual reality and image processing, and in particular, to an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like: the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
Image processing techniques based on artificial intelligence have penetrated into various fields. Among them, with the rise of the meta universe, the image processing technology based on artificial intelligence generates an avatar having multiple human features (e.g., appearance features, interactive capabilities, etc.) from an image, which is receiving wide attention due to its high anthropomorphic level.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The present disclosure provides an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to an aspect of the present disclosure, there is provided an image processing method including: obtaining an avatar corresponding to a target object, the avatar including a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object; determining a plurality of control parameters of the avatar based on a first image containing the target object; and adjusting, based on the plurality of control parameters, a plurality of virtual object features of the avatar to correspond with a plurality of target object features of the target object associated with the first image.
According to another aspect of the present disclosure, there is provided an image processing apparatus including: a first obtaining unit configured to obtain an avatar corresponding to a target object, the avatar including a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, relative spatial positional relationships between the plurality of avatar feature points indicating that the avatar corresponds to the target object; a first determination unit configured to determine a plurality of control parameters of the avatar based on a first image including the target object; and an adjusting unit configured to adjust a plurality of virtual object features of the avatar to correspond to a plurality of target object features of the target object related to the first image based on the plurality of control parameters.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to implement a method according to the above.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to implement the method according to the above.
According to another aspect of the present disclosure, a computer program product is provided comprising a computer program, wherein the computer program realizes the method according to the above when executed by a processor.
According to one or more embodiments of the present disclosure, adjusting an avatar corresponding to a target object according to an image may be achieved by including a first image of the target object, adjusting avatar characteristics of the avatar corresponding to the target object such that the avatar characteristics of the avatar correspond to the target object characteristics of the target object in the first image. When the image is from a video frame in which the target object characteristics of the target object captured in real time continuously change, the virtual object characteristics of the virtual image are adjusted in real time according to the change of the target object characteristics of the target object, and the virtual image is similar to the target object and changes along with the target object.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the embodiments and, together with the description, serve to explain the exemplary implementations of the embodiments. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a schematic diagram of an exemplary system in which various methods described herein may be implemented, according to an embodiment of the present disclosure;
FIG. 2 shows a flow diagram of an image processing method according to an embodiment of the present disclosure;
fig. 3 illustrates a flowchart of a process of obtaining an avatar corresponding to a target object in a target image in an image processing method according to an embodiment of the present disclosure;
fig. 4 illustrates a flowchart of a process of determining a plurality of control parameters of an avatar in an image processing method according to an embodiment of the present disclosure;
FIG. 5 shows a schematic diagram of a neural network model trained to obtain a plurality of control parameters that determine an avatar in an image processing method according to an embodiment of the present disclosure;
fig. 6 illustrates a flowchart of a process of determining a plurality of control parameters of an avatar in an image processing method according to an embodiment of the present disclosure;
fig. 7 illustrates a flowchart of a process of obtaining a second image based on an updated avatar in an image processing method according to an embodiment of the present disclosure;
fig. 8 shows a block diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure; and
FIG. 9 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. Furthermore, the term "and/or" as used in this disclosure is intended to encompass any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the image processing method to be performed.
In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In certain embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and/or 106 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. A user operating a client device 101, 102, 103, 104, 105, and/or 106 may, in turn, utilize one or more client applications to interact with the server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
The user may use client devices 101, 102, 103, 104, 105, and/or 106 to view an image containing an avatar. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only six client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, 104, 105, and/or 106 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular telephones, smart phones, tablets, Personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and object files. The data store 130 may reside in various locations. For example, the data store used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The data store 130 may be of different types. In certain embodiments, the data store used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or regular stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
Referring to fig. 2, an image processing method 200 according to some embodiments of the present disclosure includes:
step S210: obtaining an avatar corresponding to the target object;
step S220: determining a plurality of control parameters of the avatar based on a first image containing the target object; and
step S230: adjusting a plurality of virtual object features of the avatar based on the plurality of control parameters.
Wherein, in step S210, the avatar includes a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object; and in step S230, the plurality of virtual object features of the adjusted avatar are adjusted to correspond to a plurality of target object features of the target object associated with the first image.
By adjusting the virtual object features of the avatar corresponding to the target object by the first image including the target object so that the virtual object features of the avatar correspond to the target object features of the target object in the first image, it is possible to adjust the avatar corresponding to the target object according to the image. When the image is from a video frame in which the target object characteristics of the target object captured in real time continuously change, the virtual object characteristics of the virtual image are adjusted in real time according to the change of the target object characteristics of the target object, and the virtual image is similar to the target object and changes along with the target object.
In the related art, an individualized expression coefficient is determined according to a face image in a live video frame to be applied to an individualized avatar used for performing live virtual broadcasting instead of a main broadcast's own avatar, thereby driving the expression of the individualized avatar. The method for determining the personalized expression coefficient according to the facial image in the live video frame comprises the steps of determining a standard expression coefficient corresponding to the facial image according to a standard expression base set, and determining the personalized expression coefficient corresponding to the standard expression coefficient according to the standard expression coefficient. The method is difficult to multiplex, different virtual images often have different standard expression base groups, and standard expression coefficients bound by the standard expression base groups are difficult to migrate.
In the embodiment according to the present disclosure, the control parameters of the avatar can be obtained by obtaining the avatar corresponding to different target objects and by obtaining the image containing the corresponding target object, so that the avatar characteristics of the avatar correspond to the target object characteristics of the target object corresponding to the avatar in the image, and the avatar can be adjusted correspondingly to different avatars, so that the adjustment of the avatar is more flexible. Meanwhile, since the avatar and the target object correspond, and the relative spatial position relationship of the plurality of avatar feature points thereon indicates that they correspond to the target object, by embodiments according to the present disclosure, the avatar feature of the avatar can be further adjusted to be more consistent or similar to the target object feature (e.g., color, spatial pose, illumination texture, etc.) of the target object in the image, resulting in a higher similarity between the avatar and the target object.
In some embodiments, the target object comprises a human face and the avatar comprises a human face model corresponding to the human face.
In some embodiments, the target object further includes any object that may change or move over time, such as an animal's face, a human's body, an animal's body, a plant, a vehicle, etc., without limitation.
In some embodiments, the avatar may include a plurality of coordinate positions in the virtual space calculated from the coordinate position of the target object in the real space, the corresponding plurality of coordinate positions in the virtual space of the plurality of avatar feature points on the avatar respectively corresponding to the corresponding plurality of coordinate positions in the real space of the plurality of target object feature points on the target object.
In some embodiments, the avatar may be a virtual model corresponding to features of the target object obtained from a plurality of virtual models based on the features (e.g., age, gender, hair style, etc.) of the target object.
In some embodiments, as shown in fig. 3, obtaining the avatar corresponding to the target object includes:
step S310: acquiring a target image containing a target object;
step S320: carrying out face alignment processing on the target image to obtain a standard image; and
step S330: generating the avatar based on the standard image.
The method comprises the steps of generating an avatar based on a standard image obtained after face alignment processing is carried out on a target image containing a target object, enabling the generated avatar to have higher similarity with the target object, and enabling the adjusted avatar obtained by adjustment based on the avatar to have higher similarity with the target object.
In some embodiments, in step S310, the target image may be, for example, a certificate photo input by a user, a face self-photograph, or an image obtained from any photo containing a face of a person, and is not limited herein.
In some embodiments, in step S320, 72 keypoint coordinates are obtained by performing 72 keypoint detections on the face in the target image, respectively, the face in the image is adjusted based on the 72 keypoint coordinates to make the face a positive face, and a standard image including a face detection frame is obtained based on the 72 keypoint coordinates, wherein the standard image includes a face area larger than that surrounded by the face detection frame.
In some embodiments, the avatar is generated by inputting the target image to the avatar-generating model in step S330. The avatar-generating model may include, for example, generating a countermeasure network or a cycle generating network, etc.
In some embodiments, in obtaining the avatar corresponding to the target object, the avatar having a target style type may also be obtained based on a target style type determined by the user from among a plurality of style types.
In some examples, the plurality of genre types includes: ancient style, caricature style and dolls, avanda (Avatar) style, discone style, and the like.
In some embodiments, the avatar having the target attribute feature may also be obtained according to the target attribute feature determined by the target user from the plurality of attribute features.
In some examples, the plurality of attribute features may be a glasses type, a headwear type, and/or the like, without limitation.
In some embodiments, the plurality of target object features comprises at least one target object feature related to an image feature of the first image, and the plurality of control parameters comprises at least one rendering parameter, wherein, as shown in fig. 4, determining the plurality of control parameters of the avatar based on the first image containing the target object comprises:
step S410: extracting image features of the first image; and
step S420: obtaining the at least one rendering parameter based on the extracted image features.
Wherein adjusting the plurality of virtual object features of the avatar based on the plurality of control parameters comprises: rendering the plurality of avatar feature points based on the at least one rendering parameter such that color features of the plurality of avatar feature points correspond to color features of the plurality of target object feature points in the first image.
The method comprises the steps of adjusting a plurality of virtual object features of an avatar through at least one rendering parameter, enabling the plurality of avatar feature points on the avatar to correspond to the color features of the plurality of target object feature points in a first image respectively, achieving one-to-one correspondence of the avatar and the target object at a pixel level, and improving the similarity of the avatar and the target object.
In some embodiments, the image features are extracted by a trained neural network model, and at least one rendering parameter is obtained based on the image features.
Specifically, as shown in fig. 5, a training process of a neural network model is shown, wherein the neural network model 500 is trained with the aid of a differentiable renderer 510, and in the training process, first, a training image 501A containing a training target object is input to the neural network model 500 and rendering parameters 502A, 502B, 503C are output; next, the rendering parameters 502A, 502B, 503C and the avatar 503a corresponding to the training target object in the training image 501A are further input to the differentiable renderer 510, and the adjusted avatar 504a 'is output, and the avatar 504 a' is compared with the annotation data 501B obtained based on the training target object in the process of acquiring the training image 501A, so as to obtain the countermeasure loss, thereby adjusting the parameters of the neural network model 500. Wherein, in the process of obtaining the countermeasure loss, a one-to-one dense loss value of the RGB space is calculated by using the annotation data and the adjusted avatar 504 a', thereby achieving the effect of pixel level refinement.
In some embodiments, the at least one target object feature comprises: the at least one rendering parameter comprises a texture parameter, a shape parameter and an expression parameter, and the extracted image feature comprises a texture feature, a shape feature and a geometric space feature.
By obtaining at least one rendering parameter comprising a texture parameter, a shape parameter and an expression parameter, the similarity between the virtual image rendered based on the texture parameter, the shape parameter and the expression parameter and the similarity between the expression feature, the texture feature, the shape feature and the like of the human face and the human face in the image are higher.
In some examples, the target object texture features include wrinkles, skin tones, and lighting textures of the human face, among others.
In some examples, the target object shape features include the size of the five sense organs (eyes, nose, and mouth), and the like.
In some examples, the expressive features of the target object include features related to the size of the five sense organs (eyes, nose, and mouth).
In some examples, the texture features include features such as lighting, skin tone of the target object, and the like.
In some examples, the shape features include features of the target object such as face shape, five sense organ (eye, nose, and mouth) size, and the like.
In some examples, the geometric spatial features include relative positions of five sense organs (eyes, nose, and mouth) of the target object, and the like.
In some embodiments, the plurality of target object features includes target object pose features associated with a camera coordinate system corresponding to the first image, the plurality of control parameters includes rotational translation parameters, and the determining the plurality of control parameters for the avatar based on the first image containing the target object, as shown in fig. 6, based on the first image containing the target object includes:
step S610: extracting a camera coordinate system corresponding to the first image and the target object pose characteristics of the target object; and
step S620: determining the rotational-translational parameters based on the camera coordinate system and the target object pose features.
Adjusting a plurality of virtual object features of the avatar based on the plurality of control parameters comprises: adjusting the spatial positions of the plurality of avatar feature points based on the rotational-translation parameter.
By obtaining the rotation and translation parameters for adjusting the pose characteristics of the virtual object of the virtual image, and by adjusting the spatial position (e.g., spatial position coordinates) of the feature points of the virtual image, the pose characteristics of the virtual object of the virtual image are further adjusted to correspond to the pose characteristics of the target object, so that the adjusted virtual image and the target object in the first image are consistent in posture, and the similarity between the virtual image and the target object in the first image is further improved.
For example, the human face in the first image is a side face, and the avatar after the adjustment of the rotation and translation parameters also turns to the side opposite to the side face.
In some embodiments, step S610 and step S620 are performed by using the trained neural network model described above with reference to fig. 5 to obtain the roto-translation parameter.
In some embodiments, the corresponding image is further output based on the avatar adjusted by the plurality of control parameters.
In some embodiments, as shown in fig. 7, the image processing method further includes:
step S710: obtaining a second image based on the adjusted avatar; and
step S720: and outputting the second image.
By obtaining a second image based on the adjusted avatar and outputting the second image, real-time driving of changes of the avatar according to the first image is achieved and the changes of the avatar are visualized.
In some embodiments, pose adjustment is performed on the avatar according to the rotational-translational parameters, and at least one rendering parameter is rendered onto the avatar by a renderer to obtain the adjusted avatar.
In some embodiments, the second image is obtained based on a virtual camera.
According to another aspect of the present disclosure, there is also provided an image processing apparatus, referring to fig. 8, the apparatus 800 including: a first obtaining unit 810 configured to obtain an avatar corresponding to a target object, wherein the avatar includes a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, and a relative spatial positional relationship between the plurality of avatar feature points indicates that the avatar corresponds to the target object; a first determining unit 820 configured to determine a plurality of control parameters of the avatar based on a first image containing the target object, and an adjusting unit configured to adjust a plurality of avatar characteristics of the avatar based on the plurality of control parameters to correspond to a plurality of target object characteristics of the target object related to the first image.
In some embodiments, the first obtaining unit 810 includes: a target image acquisition unit configured to acquire a target image containing a target object; a standard image acquisition unit configured to perform face alignment processing on the target image to obtain a standard image; and an avatar generating unit configured to generate the avatar based on the standard image.
In some embodiments, the plurality of target object features includes at least one target object feature related to an image feature of the first image, the plurality of control parameters includes at least one rendering parameter, the first determining unit 820 includes: a first feature extraction unit configured to extract an image feature of the first image; and a first determining subunit configured to obtain the at least one rendering parameter based on the extracted image feature, and wherein the adjusting unit is configured to render the plurality of avatar feature points such that color features of the plurality of avatar feature points correspond to color features of the plurality of target object feature points in the first image, based on the at least one rendering parameter.
In some embodiments, the at least one target object feature comprises: the image processing system comprises a texture feature, a shape feature and an expression feature, the at least one rendering parameter comprises a texture parameter, a shape parameter and an expression parameter, and the extracted image feature comprises a texture feature, a shape feature and a geometric space feature.
In some embodiments, the plurality of target object features includes a camera coordinate system and target object pose features corresponding to the first image, the plurality of control parameters includes a rotational-translation parameter, and the first determining unit 820 includes: a second feature extraction unit configured to extract a camera coordinate system corresponding to the first image and the target object pose feature of the target object; and a second determining subunit configured to determine the rotational-translational parameters based on the camera coordinate system and the target object pose features; and wherein the adjusting unit is configured to adjust the spatial positions of the plurality of avatar feature points based on the rotational-translational parameters.
In some embodiments, the apparatus 800 further comprises: a second image generating unit configured to obtain a second image based on the adjusted avatar, and an output unit configured to output the second image.
According to another aspect of the present disclosure, there is also provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program which, when executed by the at least one processor, implements a method according to the above.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to the above.
According to another aspect of the present disclosure, there is also provided a computer program product comprising a computer program, wherein the computer program realizes the method according to the above when executed by a processor.
Referring to fig. 9, a block diagram of a structure of an electronic device 900, which may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the electronic apparatus 900 includes a computing unit 901, which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data required for the operation of the electronic device 900 can also be stored. The calculation unit 901, ROM 902, and RAM903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the electronic device 900, and the input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and/or a remote control. Output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, an object/audio output terminal, a vibrator, and/or a printer. Storage unit 908 may include, but is not limited to, a magnetic disk, an optical disk. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and/or the like.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 901 performs the various methods and processes described above, such as the method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 900 via the ROM 902 and/or the communication unit 909. When loaded into RAM903 and executed by computing unit 901, may perform one or more of the steps of method 200 described above. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method 200 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be performed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the above-described methods, systems and apparatus are merely exemplary embodiments or examples and that the scope of the present invention is not limited by these embodiments or examples, but only by the claims as issued and their equivalents. Various elements in the embodiments or examples may be omitted or may be replaced with equivalents thereof. Further, the steps may be performed in an order different from that described in the present disclosure. Further, various elements in the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced with equivalent elements that appear after the present disclosure.

Claims (15)

1. An image processing method comprising:
obtaining an avatar corresponding to a target object, the avatar including a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object;
determining a plurality of control parameters of the avatar based on a first image containing the target object; and
based on the plurality of control parameters, adjusting a plurality of virtual object features of the avatar to correspond with a plurality of target object features of the target object associated with the first image.
2. The method of claim 1, wherein the target object comprises a human face, and the obtaining an avatar corresponding to the target object comprises:
acquiring a target image containing a target object;
carrying out face alignment processing on the target image to obtain a standard image; and
generating the avatar based on the standard image.
3. The method of claim 2, wherein the plurality of target object features includes at least one target object feature related to an image feature of the first image, the plurality of control parameters includes at least one rendering parameter, and determining the plurality of control parameters of the avatar based on the first image containing the target object includes:
extracting image features of the first image, an
Obtaining the at least one rendering parameter based on the extracted image features, and wherein adjusting the plurality of virtual object features of the avatar based on the plurality of control parameters comprises:
rendering the plurality of avatar feature points based on the at least one rendering parameter such that color features of the plurality of avatar feature points correspond to color features of the plurality of target object feature points in the first image.
4. The method of claim 3, wherein,
the at least one target object feature comprises: texture features, shape features and expression features,
the at least one rendering parameter includes a texture parameter, a shape parameter, and an expression parameter,
the extracted image features include texture features, shape features, and geometric spatial features.
5. The method of claim 1, wherein the plurality of target object features includes target object pose features associated with a camera coordinate system corresponding to the first image, the plurality of control parameters includes a rotational translation parameter, and determining the plurality of control parameters for the avatar based on the first image containing the target object includes:
extracting a camera coordinate system corresponding to the first image and the target object pose feature of the target object, an
Determining the rotational-translation parameters based on the camera coordinate system and the target object pose features, and wherein adjusting a plurality of virtual object features of the avatar based on the plurality of control parameters comprises:
adjusting the spatial positions of the plurality of avatar feature points based on the rotational-translation parameter.
6. The method of claim 1, further comprising:
obtaining a second image based on the adjusted avatar; and
and outputting the second image.
7. An image processing apparatus comprising:
a first obtaining unit configured to obtain an avatar corresponding to a target object, the avatar including a plurality of avatar feature points corresponding to a plurality of target object feature points on the target object, respectively, relative spatial positional relationships between the plurality of avatar feature points indicating that the avatar corresponds to the target object;
a first determination unit configured to determine a plurality of control parameters of the avatar based on a first image including the target object; and
an adjusting unit configured to adjust a plurality of virtual object features of the avatar to correspond to a plurality of target object features of the target object related to the first image based on the plurality of control parameters.
8. The apparatus of claim 7, wherein the first obtaining unit comprises:
a target image acquisition unit configured to acquire a target image containing a target object;
a standard image acquisition unit configured to perform face alignment processing on the target image to obtain a standard image; and
an avatar generating unit configured to generate the avatar based on the standard image.
9. The apparatus of claim 8, wherein the plurality of target object features comprises at least one target object feature related to an image feature of the first image, the plurality of control parameters comprises at least one rendering parameter, the first determination unit comprises:
a first feature extraction unit configured to extract an image feature of the first image; and
a first determining subunit configured to obtain the at least one rendering parameter based on the extracted image feature, and wherein the adjusting unit is configured to render the plurality of avatar feature points such that color features of the plurality of avatar feature points correspond to color features of the plurality of target object feature points in the first image based on the at least one rendering parameter.
10. The apparatus of claim 9, wherein,
the at least one target object feature comprises: the texture feature of the target object, the shape feature of the target object and the expression feature of the target object,
the at least one rendering parameter includes a texture parameter, a shape parameter, and an expression parameter, an
The extracted image features include texture features, shape features, and geometric spatial features.
11. The apparatus of claim 7, wherein the plurality of target object features comprises target object pose features associated with a camera coordinate system to which the first image corresponds, the plurality of control parameters comprises a roto-translation parameter, and the first determination unit comprises:
a second feature extraction unit configured to extract a camera coordinate system corresponding to the first image and the target object pose feature of the target object; and
a second determining subunit configured to determine the rotational-translational parameters based on the camera coordinate system and the target object pose features;
and wherein the adjusting unit is configured to adjust the spatial positions of the plurality of avatar feature points based on the rotational-translational parameters.
12. The apparatus of claim 7, further comprising:
a second image generating unit configured to obtain a second image based on the adjusted avatar; and
an output unit configured to output the second image.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-6 when executed by a processor.
CN202111435489.1A 2021-11-29 2021-11-29 Image processing method and device Active CN114119935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111435489.1A CN114119935B (en) 2021-11-29 2021-11-29 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111435489.1A CN114119935B (en) 2021-11-29 2021-11-29 Image processing method and device

Publications (2)

Publication Number Publication Date
CN114119935A true CN114119935A (en) 2022-03-01
CN114119935B CN114119935B (en) 2023-10-03

Family

ID=80371505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111435489.1A Active CN114119935B (en) 2021-11-29 2021-11-29 Image processing method and device

Country Status (1)

Country Link
CN (1) CN114119935B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115345981A (en) * 2022-10-19 2022-11-15 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN118097082A (en) * 2024-04-26 2024-05-28 腾讯科技(深圳)有限公司 Virtual object image generation method, device, computer equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109584151A (en) * 2018-11-30 2019-04-05 腾讯科技(深圳)有限公司 Method for beautifying faces, device, terminal and storage medium
US20190303725A1 (en) * 2018-03-30 2019-10-03 Fringefy Ltd. Neural network training system
CN110796721A (en) * 2019-10-31 2020-02-14 北京字节跳动网络技术有限公司 Color rendering method and device of virtual image, terminal and storage medium
CN110827379A (en) * 2019-10-31 2020-02-21 北京字节跳动网络技术有限公司 Virtual image generation method, device, terminal and storage medium
CN111695471A (en) * 2020-06-02 2020-09-22 北京百度网讯科技有限公司 Virtual image generation method, device, equipment and storage medium
CN111694429A (en) * 2020-06-08 2020-09-22 北京百度网讯科技有限公司 Virtual object driving method and device, electronic equipment and readable storage
CN112132979A (en) * 2020-09-29 2020-12-25 支付宝(杭州)信息技术有限公司 Virtual resource selection method, device and equipment
CN113112580A (en) * 2021-04-20 2021-07-13 北京字跳网络技术有限公司 Method, device, equipment and medium for generating virtual image
CN113240778A (en) * 2021-04-26 2021-08-10 北京百度网讯科技有限公司 Virtual image generation method and device, electronic equipment and storage medium
WO2021208648A1 (en) * 2020-04-17 2021-10-21 Oppo广东移动通信有限公司 Virtual object adjusting method and apparatus, storage medium and augmented reality device
CN113569614A (en) * 2021-02-23 2021-10-29 腾讯科技(深圳)有限公司 Virtual image generation method, device, equipment and storage medium
CN113643412A (en) * 2021-07-14 2021-11-12 北京百度网讯科技有限公司 Virtual image generation method and device, electronic equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190303725A1 (en) * 2018-03-30 2019-10-03 Fringefy Ltd. Neural network training system
CN109584151A (en) * 2018-11-30 2019-04-05 腾讯科技(深圳)有限公司 Method for beautifying faces, device, terminal and storage medium
US20210192703A1 (en) * 2018-11-30 2021-06-24 Tencent Technology (Shenzhen) Company Limited Face beautification method and apparatus, computer device, and storage medium
CN110796721A (en) * 2019-10-31 2020-02-14 北京字节跳动网络技术有限公司 Color rendering method and device of virtual image, terminal and storage medium
CN110827379A (en) * 2019-10-31 2020-02-21 北京字节跳动网络技术有限公司 Virtual image generation method, device, terminal and storage medium
WO2021208648A1 (en) * 2020-04-17 2021-10-21 Oppo广东移动通信有限公司 Virtual object adjusting method and apparatus, storage medium and augmented reality device
CN111695471A (en) * 2020-06-02 2020-09-22 北京百度网讯科技有限公司 Virtual image generation method, device, equipment and storage medium
CN111694429A (en) * 2020-06-08 2020-09-22 北京百度网讯科技有限公司 Virtual object driving method and device, electronic equipment and readable storage
CN112132979A (en) * 2020-09-29 2020-12-25 支付宝(杭州)信息技术有限公司 Virtual resource selection method, device and equipment
CN113569614A (en) * 2021-02-23 2021-10-29 腾讯科技(深圳)有限公司 Virtual image generation method, device, equipment and storage medium
CN113112580A (en) * 2021-04-20 2021-07-13 北京字跳网络技术有限公司 Method, device, equipment and medium for generating virtual image
CN113240778A (en) * 2021-04-26 2021-08-10 北京百度网讯科技有限公司 Virtual image generation method and device, electronic equipment and storage medium
CN113643412A (en) * 2021-07-14 2021-11-12 北京百度网讯科技有限公司 Virtual image generation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115345981A (en) * 2022-10-19 2022-11-15 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN118097082A (en) * 2024-04-26 2024-05-28 腾讯科技(深圳)有限公司 Virtual object image generation method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114119935B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
CN114119935B (en) Image processing method and device
CN116051729B (en) Three-dimensional content generation method and device and electronic equipment
CN115511779B (en) Image detection method, device, electronic equipment and storage medium
CN112967356A (en) Image filling method and device, electronic device and medium
CN115661375B (en) Three-dimensional hair style generation method and device, electronic equipment and storage medium
CN116245998B (en) Rendering map generation method and device, and model training method and device
CN116311519B (en) Action recognition method, model training method and device
CN115761855B (en) Face key point information generation, neural network training and three-dimensional face reconstruction method
CN114120448B (en) Image processing method and device
CN116030185A (en) Three-dimensional hairline generating method and model training method
CN115393514A (en) Training method of three-dimensional reconstruction model, three-dimensional reconstruction method, device and equipment
CN114119154A (en) Virtual makeup method and device
CN115601555A (en) Image processing method and apparatus, device and medium
CN114049472A (en) Three-dimensional model adjustment method, device, electronic apparatus, and medium
CN114494797A (en) Method and apparatus for training image detection model
CN114120412B (en) Image processing method and device
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115345981B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115937430B (en) Method, device, equipment and medium for displaying virtual object
CN116385641B (en) Image processing method and device, electronic equipment and storage medium
CN116030191B (en) Method, device, equipment and medium for displaying virtual object
CN115619981B (en) Three-dimensional hairstyle generation method and model training method
CN115953512A (en) Expression generation method, neural network training method, device, equipment and medium
CN115131562B (en) Three-dimensional scene segmentation method, model training method, device and electronic equipment
CN117218499A (en) Training method of facial expression capturing model, facial expression driving method and device

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
GR01 Patent grant
GR01 Patent grant