CN114119935B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN114119935B
CN114119935B CN202111435489.1A CN202111435489A CN114119935B CN 114119935 B CN114119935 B CN 114119935B CN 202111435489 A CN202111435489 A CN 202111435489A CN 114119935 B CN114119935 B CN 114119935B
Authority
CN
China
Prior art keywords
target object
image
avatar
features
training
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.)
Active
Application number
CN202111435489.1A
Other languages
Chinese (zh)
Other versions
CN114119935A (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

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 disclosure provides an image processing method and device, relates to the technical field of computers, and particularly relates to the technical field of artificial intelligence such as enhancement/virtual reality, image processing and the like. The implementation scheme is as follows: obtaining an avatar corresponding to the target object, the avatar including a plurality of avatar characteristic points corresponding to a plurality of target object characteristic points on the target object, respectively, a relative spatial position relationship between the plurality of avatar characteristic points indicating that the avatar corresponds to the target object; determining a plurality of control parameters of the avatar based on the first image including the target object; and adjusting a plurality of virtual object features of the avatar to correspond to a plurality of target object features of the target object associated with the first image based on the plurality of control parameters.

Description

Image processing method and device
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of artificial intelligence technologies such as augmented/virtual reality, image processing, and the like, 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 discipline of studying the process of making a computer mimic certain mental processes and intelligent behaviors (e.g., learning, reasoning, thinking, planning, etc.) of a person, both hardware-level and software-level techniques. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.: the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Image processing techniques based on artificial intelligence have penetrated into various fields. Among them, with the rise of the metauniverse, an avatar having multiple human features (e.g., appearance features, interactive ability, etc.) is generated from an image based on an image processing technology of artificial intelligence, which has been receiving attention because of its high personification.
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, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides an image processing method, apparatus, electronic device, computer-readable storage medium, and 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 characteristic points respectively corresponding to a plurality of target object characteristic points on the target object, a relative spatial positional relationship between the plurality of avatar characteristic points indicating that the avatar corresponds to the target object; determining a plurality of control parameters of the avatar based on a first image including the target object; and adjusting a plurality of virtual object features of the avatar to correspond to a plurality of target object features of the target object associated with the first image based on the plurality of control parameters.
According to another aspect of the present disclosure, there is provided an image processing apparatus including: a first acquisition unit configured to acquire an avatar corresponding to a target object, the avatar including a plurality of avatar feature points respectively corresponding to a plurality of target object feature points on the target object, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object; a first determining unit configured to determine a plurality of control parameters of the avatar based on a first image including the target object; and an adjustment 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 storing computer instructions for causing the computer to implement a method according to the above.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements a method according to the above.
According to one or more embodiments of the present disclosure, by adjusting the virtual object characteristics of the avatar corresponding to the target object by including the first image of the target object such that the virtual object characteristics of the avatar correspond to the target object characteristics of the target object in the first image, it is possible to achieve adjustment of the avatar corresponding to the target object according to the image. When the image comes from a video frame with continuously changed target object characteristics of a target object captured in real time, 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 changed along with the target object while being similar to the target object.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals 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, in accordance with an embodiment of the present disclosure;
FIG. 2 shows a flow chart of an image processing method according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating 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 is a flowchart illustrating 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 illustrates a schematic diagram of a neural network model trained in an image processing method to obtain a plurality of control parameters for determining an avatar, according to an embodiment of the present disclosure;
fig. 6 is a flowchart illustrating 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 is a flowchart illustrating 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 a 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 in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used 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, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated 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, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses 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 an embodiment 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 embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the image processing method.
In some embodiments, server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In some 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 that are executable by one or more processors. A user operating client devices 101, 102, 103, 104, 105, and/or 106 may in turn utilize one or more client applications to interact with server 120 to utilize the services provided by these components. It should be appreciated 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 view an image containing an avatar using the client devices 101, 102, 103, 104, 105, and/or 106. 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 the present disclosure may support any number of client devices.
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 laptop computers), 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 the like. 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, tablet computers, 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 various 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 number of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. For example only, the 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 that involves virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices of the server). In various embodiments, 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. 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, etc.
In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of 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 implementations, the server 120 may be a server of a distributed system or a server that incorporates a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and virtual private server (VPS, virtual Private Server) 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 databases 130 may be used to store information such as audio files and object files. The data store 130 may reside in a variety of 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 some embodiments, the data store used by server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve the databases and data from the databases in response to the commands.
In some embodiments, one or more of 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 conventional stores supported by the 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 including the target object; and
step S230: and adjusting a plurality of virtual object characteristics of the avatar based on the plurality of control parameters.
Wherein, in step S210, the avatar includes a plurality of avatar characteristic points respectively corresponding to a plurality of target object characteristic points on the target object, and a relative spatial position relationship between the plurality of avatar characteristic points indicates that the avatar corresponds to the target object; and in step S230, the plurality of virtual object features of the adjusted avatar correspond to a plurality of target object features of a target object related to the first image.
The virtual object characteristics of the virtual image corresponding to the target object are adjusted through the first image containing the target object, so that the virtual object characteristics of the virtual image correspond to the target object characteristics of the target object in the first image, and the virtual image corresponding to the target object can be adjusted according to the image. When the image comes from a video frame with continuously changed target object characteristics of a target object captured in real time, 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 changed along with the target object while being similar to the target object.
In the related art, a personalized expression coefficient is determined according to a face image in a live video frame to be applied to a personalized avatar for virtual live broadcasting instead of a main cast own avatar, thereby driving the expression of the personalized avatar. The method for determining the personalized expression coefficient according to the face image in the live video frame comprises the steps of firstly determining a standard expression coefficient corresponding to the face image according to a standard expression base group, and then determining the personalized expression coefficient corresponding to the standard expression coefficient according to the standard expression coefficient. The method is difficult to multiplex, and for different virtual images, different standard expression groups are often provided, so that the standard expression coefficients bound by the standard expression groups are difficult to migrate.
In the embodiment of the disclosure, the control parameters of the avatar can be obtained by obtaining the avatar corresponding to different target objects and by including the image of the corresponding target object, so that the features of the avatar correspond to the features of the target object corresponding to the avatar in the image, and the corresponding adjustment can be performed for different avatars, so that the adjustment of the avatar is more flexible. Meanwhile, since the avatar corresponds to the target object, the relative spatial position relationship of the plurality of avatar feature points thereon indicates that it corresponds to the target object, by further enabling the avatar feature of the avatar to be 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, according to the embodiments of the present disclosure, the avatar and the target object similarity are made higher.
In some embodiments, the target object comprises a face and the avatar comprises a face model corresponding to the face.
In some embodiments, the target object also includes, but is not limited to, an animal's face, a human's body, an animal's body, a plant, a vehicle, and the like, any object that may change or move over time.
In some embodiments, the avatar may include a plurality of coordinate positions in the virtual space calculated from the coordinate positions of the target object in the real space, the plurality of coordinate positions corresponding to the plurality of avatar characteristic points on the avatar in the virtual space corresponding to the plurality of coordinate positions corresponding to the plurality of target object characteristic points on the target object in the real space, respectively.
In some embodiments, the avatar may be a virtual model corresponding to a feature of a target object (e.g., age, gender, hairstyle, etc.) obtained from a plurality of virtual models.
In some embodiments, as shown in fig. 3, obtaining an avatar corresponding to the target object includes:
step S310: acquiring a target image containing a target object;
step S320: performing face alignment processing on the target image to obtain a standard image; and
Step S330: the avatar is generated based on the standard image.
By generating an avatar based on a standard image obtained by face alignment processing of a target image containing a target object, the generated avatar is made more similar to the target object, and an adjusted avatar obtained by subsequent adjustment based on the avatar is made more similar to the target object.
In some embodiments, in step S310, the target image may be, for example, a certificate photograph input by the user, a face self-photograph, or an image obtained from any photograph containing a face of a person, which is not limited herein.
In some embodiments, in step S320, 72 keypoint coordinates are obtained by performing 72 keypoint detection on a face in the target image, the face in the image is adjusted based on the 72 keypoint coordinates to make the face a positive face, and the standard image is obtained based on the 72 keypoints and the face detection frame, wherein the standard image includes a face region larger than the face region enclosed by the face detection frame.
In some embodiments, the avatar is generated by inputting the target image to the avatar generation model in step S330. The avatar generation model may include, for example, generation of an countermeasure network or a loop generation network, etc.
In some embodiments, in the process of obtaining the avatar corresponding to the target object, the avatar having the target style type may be further obtained based on the target style type determined by the user from among the plurality of style types.
In some examples, the plurality of style types includes: the type of ancient wind, the type of comic and doll, the aver (Avatar) style, the disco style, and so forth.
In some embodiments, an avatar having the target attribute feature may also be obtained based on 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 the like, without limitation.
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, wherein determining the plurality of control parameters of the avatar based on the first image including the target object, as shown in fig. 4, includes:
step S410: extracting image features of the first image; and
step S420: the at least one rendering parameter is obtained based on the extracted image features.
Wherein adjusting the plurality of virtual object characteristics of the avatar based on the plurality of control parameters comprises: rendering the plurality of avatar characteristic points based on the at least one rendering parameter such that color features of the plurality of avatar characteristic points correspond to color features of the plurality of target object characteristic points in the first image.
And adjusting a plurality of virtual object characteristics of the virtual image through at least one rendering parameter, so that a plurality of virtual image characteristic points on the virtual image correspond to color characteristics of a plurality of target object characteristic points in the first image respectively, one-to-one correspondence between the virtual image and the target object at a pixel level is realized, and the similarity of the virtual image and the target object is improved.
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, the neural network model 500 employs the differentiable renderer 510 to assist in training, in which, first, a training image 501A including 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 are inputted to the differentiable renderer 510 further to output the adjusted avatar 504a 'corresponding to the training target object in the training image 501A, and the avatar 504a' is compared with the annotation data 501B obtained based on the training target object during the acquisition of the training image 501A to obtain the contrast loss, so as to adjust the parameters of the neural network model 500. Wherein in obtaining the countermeasures, the effect of pixel level refinement is achieved by calculating a one-to-one dense loss value of the RGB space by the annotation data and the adjusted avatar 504 a'.
In some embodiments, the at least one target object feature comprises: the at least one rendering parameter includes texture parameters, shape parameters, and expression parameters, and the extracted image features include texture features, shape features, and geometric spatial features.
The virtual image rendered based on the texture parameters, the shape parameters and the expression parameters is enabled to be similar to the face in the image in the expression characteristics, the texture characteristics, the shape characteristics and the like of the face by obtaining at least one rendering parameter comprising the texture parameters, the shape parameters and the expression parameters, and the virtual image rendered based on the at least one rendering parameter and the target object are enabled to be higher in similarity.
In some examples, the target object texture features include wrinkles, skin tone, and lighting texture of a human face, among others.
In some examples, the target object shape features include the dimensions 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 of illumination, skin tone of the target object, and the like.
In some examples, the shape features include features of a face shape, five sense organs (eyes, nose, and mouth) size, and the like of the target object.
In some examples, the geometric spatial features include the relative positions of the 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 related to a camera coordinate system corresponding to the first image, the plurality of control parameters includes a rotational translation parameter, and the determining the plurality of control parameters of the avatar based on the first image including the target object, as shown in fig. 6, based on the first image including 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: the rotational translation parameters are determined based on the camera coordinate system and the target object pose features.
Based on the plurality of control parameters, adjusting a plurality of virtual object characteristics of the avatar includes: and adjusting the spatial positions of the plurality of avatar characteristic points based on the rotation and translation parameters.
The rotation and translation parameters for adjusting the pose characteristics of the virtual object of the virtual image are obtained, the spatial positions (such as spatial position coordinates) of the feature points of the virtual image are adjusted, the pose characteristics of the virtual object of the virtual image are further adjusted to correspond to the pose characteristics of the target object, the adjusted pose characteristics of the virtual image and the target object in the first image are kept consistent in pose, and the similarity of the virtual image and the target object in the first image is further improved.
For example, the face in the first image is a side face, and the avatar adjusted by the rotation and translation parameter is also turned to the side opposite to the side face.
In some embodiments, step S610 and step S620 are performed to obtain the rotational translation parameters by employing the trained neural network model described above with reference to fig. 5.
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: outputting the second image.
By obtaining a second image based on the adjusted avatar and outputting the second image, it is achieved to drive the change of the avatar in real time according to the first image and visualize the change of the avatar.
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, resulting in an 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, an 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 characteristic points respectively corresponding to a plurality of target object characteristic points on the target object, and a relative spatial positional relationship between the plurality of avatar characteristic points indicates that the avatar corresponds to the target object; the first determining unit 820 is configured to determine a plurality of control parameters of the avatar based on a first image including the target object, and the adjusting unit is 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.
In some embodiments, the first obtaining unit 810 includes: a target image acquisition unit configured to acquire a target image including 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 generation 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, and the first determining unit 820 includes: a first feature extraction unit configured to extract image features of the first image; and a first determination subunit configured to obtain the at least one rendering parameter based on the extracted image feature, and wherein the adjustment 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: texture features, shape features, and expression features, the at least one rendering parameter includes texture parameters, shape parameters, and expression parameters, and the extracted image features include texture features, shape features, and geometric spatial features.
In some embodiments, the plurality of target object features includes a camera coordinate system corresponding to the first image and a target object pose feature, 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 determination subunit configured to determine the rotational translation parameter based on the camera coordinate system and the target object pose feature; and wherein the adjustment unit is configured to adjust the spatial positions of the plurality of avatar characteristic points based on the rotational translation parameter.
In some embodiments, the apparatus 800 further comprises: a second image generation 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 apparatus 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 a 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, when executed by a processor, implements a method according to the above.
Referring to fig. 9, a block diagram of an electronic device 900 that 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 devices are 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes according to 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 computing unit 901, the ROM 902, and the RAM903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the 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, the input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, object/audio output terminals, vibrators, and/or printers. Storage unit 908 may include, but is not limited to, magnetic disks, optical disks. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices through 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 computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program tangibly embodied on 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 the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, computing unit 901 may be configured to perform 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 circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing 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 following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of 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 by equivalent elements that appear after the disclosure.

Claims (12)

1. An image processing method, comprising:
obtaining an avatar corresponding to the target object, comprising:
Generating an avatar by inputting a target image of a target object to an avatar generation model, the avatar including a plurality of avatar feature points respectively corresponding to a plurality of target object feature points on the target object, 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, 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 including at least one rendering parameter, the determining the plurality of control parameters of the avatar based on the first image containing the target object including:
extracting image features of the first image using a trained neural network model, and obtaining the at least one rendering parameter based on the extracted image features, the neural network model being trained with the aid of a differentiable renderer, the training process of the neural network model comprising:
inputting a training image containing a training target object into the neural network model, and outputting predicted rendering parameters;
Inputting the predicted rendering parameters and training avatars corresponding to training target objects in the training image to the differentiable renderer to obtain adjusted training avatars output by the differentiable renderer;
comparing the adjusted training avatar with annotation data obtained based on the training target object during acquisition of the training image to obtain a countering loss; and
adjusting parameters of the neural network model based on the countermeasures; and
adjusting a plurality of virtual object features of the avatar to correspond to a plurality of target object features of the target object associated with the first image based on the plurality of control parameters, comprising:
and adjusting the plurality of avatar characteristic points based on the at least one rendering parameter so that color characteristics of the plurality of avatar characteristic points correspond to color characteristics of the plurality of target object characteristic points in 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;
Performing face alignment processing on the target image to obtain a standard image; and
the avatar is generated based on the standard image.
3. The method of claim 1, 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.
4. The method of claim 1, wherein the plurality of target object features further comprises a target object pose feature associated with a camera coordinate system corresponding to the first image, the plurality of control parameters further comprises a rotational translation parameter, and the determining the plurality of control parameters for the avatar based on the first image including the target object further comprises:
extracting a camera coordinate system corresponding to the first image and the target object pose characteristics of the target object, and
determining the rotational translation parameter based on the camera coordinate system and the target object pose feature, and wherein adjusting the plurality of virtual object features of the avatar based on the plurality of control parameters comprises:
And adjusting the spatial positions of the plurality of avatar characteristic points based on the rotation and translation parameters.
5. The method of claim 1, further comprising:
obtaining a second image based on the adjusted avatar; and
outputting the second image.
6. An image processing apparatus comprising:
a first acquisition unit configured to acquire an avatar corresponding to a target object, including:
generating an avatar by inputting a target image of a target object to an avatar generation model, the avatar including a plurality of avatar feature points respectively corresponding to a plurality of target object feature points on the target object, a relative spatial positional relationship between the plurality of avatar feature points indicating that the avatar corresponds to the target object;
a first determining unit configured to determine a plurality of control parameters of the avatar based on a first image including the target object, 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 including at least one rendering parameter, the first determining unit comprising:
A first feature extraction unit configured to extract image features of the first image using a trained neural network model; and
a first determination subunit configured to obtain the at least one rendering parameter based on the extracted image features using the neural network model, wherein the neural network model employs differential renderer-assisted training, the training process of the neural network model comprising:
inputting a training image containing a training target object into the neural network model, and outputting predicted rendering parameters;
inputting the predicted rendering parameters and training avatars corresponding to training target objects in the training image to the differentiable renderer to obtain adjusted training avatars output by the differentiable renderer;
comparing the adjusted training avatar with annotation data obtained based on the training target object during acquisition of the training image to obtain a countering loss; and
adjusting parameters of the neural network model based on the countermeasures; and
an adjustment 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, the adjustment unit being further configured to:
And adjusting the plurality of avatar characteristic points based on the at least one rendering parameter so that color characteristics of the plurality of avatar characteristic points correspond to color characteristics of the plurality of target object characteristic points in the first image.
7. The apparatus of claim 6, wherein the first acquisition unit comprises:
a target image acquisition unit configured to acquire a target image including a target object;
a standard image acquisition unit configured to perform face alignment processing on the target image to obtain a standard image; and
and an avatar generating unit configured to generate the avatar based on the standard image.
8. The apparatus of claim 6, wherein,
the at least one target object feature comprises: target object texture features, target object shape features and target object expression features,
the at least one rendering parameter includes texture parameters, shape parameters, and expression parameters, and
the extracted image features include texture features, shape features, and geometric spatial features.
9. The apparatus of claim 6, wherein the plurality of target object features further comprises target object pose features related to a camera coordinate system corresponding to the first image, the plurality of control parameters further comprises rotational translation parameters, the first determination unit further 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 determination subunit configured to determine the rotational translation parameter based on the camera coordinate system and the target object pose feature;
and wherein the adjustment unit is configured to adjust the spatial positions of the plurality of avatar characteristic points based on the rotational translation parameter.
10. The apparatus of claim 6, further comprising:
a second image generation unit configured to obtain a second image based on the adjusted avatar; and
and an output unit configured to output the second image.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
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-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
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 CN114119935A (en) 2022-03-01
CN114119935B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115345981B (en) * 2022-10-19 2023-03-24 北京百度网讯科技有限公司 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 (11)

* 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
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
CN111694429A (en) * 2020-06-08 2020-09-22 北京百度网讯科技有限公司 Virtual object driving method and device, electronic equipment and readable storage
CN111695471A (en) * 2020-06-02 2020-09-22 北京百度网讯科技有限公司 Virtual image generation method, device, equipment and storage medium
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10592780B2 (en) * 2018-03-30 2020-03-17 White Raven Ltd. Neural network training system

Patent Citations (11)

* 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
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

Also Published As

Publication number Publication date
CN114119935A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN113313650B (en) Image quality enhancement method, device, equipment and medium
CN114119935B (en) Image processing method and device
CN112967355B (en) Image filling method and device, electronic equipment and medium
CN116051729B (en) Three-dimensional content generation method and device and electronic equipment
CN112749685B (en) Video classification method, apparatus and medium
CN115511779B (en) Image detection method, device, electronic equipment and storage medium
CN112967356A (en) Image filling method and device, electronic device and medium
CN117274491A (en) Training method, device, equipment and medium for three-dimensional reconstruction model
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
CN117274370A (en) Three-dimensional pose determining method, three-dimensional pose determining device, electronic equipment and medium
CN115761855B (en) Face key point information generation, neural network training and three-dimensional face reconstruction method
CN116030185A (en) Three-dimensional hairline generating method and model training method
CN114120448B (en) Image processing method and device
CN115393514A (en) Training method of three-dimensional reconstruction model, three-dimensional reconstruction method, device and equipment
CN114049472A (en) Three-dimensional model adjustment method, device, electronic apparatus, and medium
CN114494797A (en) Method and apparatus for training image detection model
CN114119154A (en) Virtual makeup method and device
CN114120412B (en) Image processing method and device
CN116385641B (en) Image processing method and device, electronic equipment and storage medium
CN115423827B (en) Image processing method, image processing device, electronic equipment and storage medium
CN115937430B (en) Method, device, equipment and medium for displaying virtual object
CN116030191B (en) Method, device, equipment and medium for displaying virtual object
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