CN110533585A - A kind of method, apparatus that image is changed face, system, equipment and storage medium - Google Patents

A kind of method, apparatus that image is changed face, system, equipment and storage medium Download PDF

Info

Publication number
CN110533585A
CN110533585A CN201910833438.0A CN201910833438A CN110533585A CN 110533585 A CN110533585 A CN 110533585A CN 201910833438 A CN201910833438 A CN 201910833438A CN 110533585 A CN110533585 A CN 110533585A
Authority
CN
China
Prior art keywords
face
image
personage
model
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.)
Granted
Application number
CN201910833438.0A
Other languages
Chinese (zh)
Other versions
CN110533585B (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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201910833438.0A priority Critical patent/CN110533585B/en
Publication of CN110533585A publication Critical patent/CN110533585A/en
Priority to PCT/CN2020/112777 priority patent/WO2021043121A1/en
Application granted granted Critical
Publication of CN110533585B publication Critical patent/CN110533585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Abstract

This application discloses a kind of method, apparatus that image is changed face, system, equipment and storage mediums, belong to field of computer technology.The described method includes: the first of the second account of correspondence that the first terminal for receiving the first Account Logon is sent changes face request;Receive the first account of correspondence that the second terminal of the second Account Logon is sent second is changed face request;The face-image set of face-image set and the second personage based on the first personage, carries out model training, first after train change face model and it is trained after second change face model;First after sending training to first terminal changes face model, and second after sending training to second terminal is changed face model.Using the application, image fault can reduce.

Description

A kind of method, apparatus that image is changed face, system, equipment and storage medium
Technical field
This application involves field of computer technology, in particular to a kind of method, apparatus that image is changed face, system, equipment and Storage medium.
Background technique
With the rapid development of network technology, network video has obtained extensive popularization and use, and video can be live streaming Video or recorded broadcast video.During recorded video, many main broadcasters begin trying some new interaction modes, such as to video It changes face, that is, the face-image of oneself in video to be changed into other people face-image, then upload server is broadcast It puts.
The scheme of changing face in the related technology is face-image to be identified in video image using image recognition technology, then Using the face-image of target person, the face-image in video image, the video image upload service that then will be changed face are replaced Device.
During realizing the application, the inventor finds that the existing technology has at least the following problems:
It is above-mentioned in the related technology video image change face during processing, topography is carried out in video image Replacement, it is likely that the face-image of target person and the unmatched situation of face-image shape of protoplast's object occur, need to mesh The face-image for marking personage carries out deformation process, will lead to the image after changing face in this way and there is distortion.
Summary of the invention
The embodiment of the present application provides a kind of method, apparatus that image is changed face, system, equipment and storage medium, can make The image that image obtains after processing of changing face is more life-like.The technical solution is as follows:
On the one hand, a kind of method that image is changed face is provided, the method is used for server, which comprises
Receive the second account of correspondence that the first terminal of the first Account Logon is sent first is changed face request, wherein described It changes face and carries the face-image set of the first personage in requesting;
Receive the first account of correspondence that the second terminal of the second Account Logon is sent second is changed face request, wherein described It changes face and carries the face-image set of the second personage in requesting;
The face-image set of face-image set and second personage based on first personage carries out model instruction Practice, first after train change face model and it is trained after second change face model, wherein first after the training changes face mould Type is changed for changing face the face-image of first personage for the face-image of second personage, second after the training Face model is for changing face the face-image of second personage for the face-image of first personage;
First after sending the training to the first terminal changes face model, and Xiang Suoshu second terminal sends the training Second afterwards is changed face model.
Optionally, the face-image set of face-image set and second personage based on first personage, into Row model training, first after being trained changes face second changing face model after model and training, comprising:
Alternating obtains the face in the face-image set of first personage and the face-image set of second personage Portion's image;
Every face-image for obtaining first personage, distorts the face-image of first personage, is turned round The face-image input feature vector of the first personage after distortion is extracted model by the face-image of the first personage after song, obtains the Fisrt feature image input second is gone back master mould, the first output image is obtained, based on what is currently obtained by one characteristic image The face-image of first personage and the first output image, go back master mould to the Feature Selection Model and described second, into Row parameter updates;
Every face-image for obtaining second personage, distorts the face-image of second personage, is turned round The face-image input feature vector of the second personage after distortion is extracted model by the face-image of the second personage after song, obtains the Second feature image input first is gone back master mould, the second output image is obtained, based on what is currently obtained by two characteristic images The face-image of second personage and the second output image, go back master mould to the Feature Selection Model and described first, into Row parameter updates;
Face-image and all second personages based on all first personages face-image to the feature extraction mould Type, described first go back master mould and described second go back master mould carry out parameter update after, be based on the updated feature extraction of parameter Model and parameter updated first go back master mould, and first after determining training is changed face model, are based on the updated feature of parameter It extracts model and parameter updated second and goes back master mould, second after determining training is changed face model.
Optionally, it is described send the training to the first terminal after first change face model, comprising:
If first account is currently at presence, first after sending the training to the first terminal It changes face model;
If first account is currently at off-line state, the model of changing face after storing the training, when detecting When first account is switched to presence, what Xiang Suoshu first terminal sent after the training first changes face model;
It is described send the training to the second terminal after second change face model, comprising:
If second account is currently at presence, second after sending the training to the second terminal It changes face model;
If second account is currently at off-line state, the model of changing face after storing the training, when detecting When second account is switched to presence, what Xiang Suoshu second terminal sent after the training second changes face model.
Optionally, it is described send the training to the first terminal after first change face after model, the method is also Include:
When the termination of changing face for receiving correspondence first account that the second terminal is sent is requested, Xiang Suoshu first The first deletion for changing face model that terminal sends after the corresponding training notifies.
On the other hand, it provides a kind of image to change face method, the method is used for terminal, which comprises
The request of changing face of corresponding second account is sent to server, wherein carry the first personage in the request of changing face Face-image set;
First after receiving the training that the server is sent changes face model, wherein first after the training changes face mould Type is for changing face the face-image of first personage for the face-image of second personage;
When receive corresponding second account change face instruct when, after the first image wait change face is inputted the training First change face model, the second image after being changed face.
Optionally, before the request of changing face that corresponding second account is sent to the server, institute's delivery method further include:
Play tutorial message and/or display tutorial message, wherein the tutorial message is used to indicate first personage and does Different movement out;
During playing tutorial message and/or display tutorial message, the set of face images of first personage is shot It closes.
Optionally, the face-image set of shooting first personage, comprising:
In the state of closing Image Adjusting function, the face-image set of first personage is shot.
On the other hand, a kind of device that image is changed face is provided, described device is applied to server, and described device includes:
Receiving module, receive the second account of correspondence that the first terminal of the first Account Logon is sent first are changed face request, Wherein, the face-image set of the first personage is carried in the request of changing face;Receive the second terminal hair of the second Account Logon The second of the first account of correspondence sent is changed face request, wherein the set of face images of the second personage is carried in the request of changing face It closes;
Training module, the face-image set of face-image set and second personage based on first personage, Carry out model training, first after train change face model and it is trained after second change face model, wherein after the training First changes face model for changing face the face-image of first personage for the face-image of second personage, the training Second afterwards changes face model for changing face the face-image of second personage for the face-image of first personage;
Sending module, what Xiang Suoshu first terminal sent after the training first changes face model, Xiang Suoshu second terminal hair Second after sending the training changes face model.
Optionally, the training module, is used for:
Alternating obtains the face in the face-image set of first personage and the face-image set of second personage Portion's image;
Every face-image for obtaining first personage, distorts the face-image of first personage, is turned round The face-image input feature vector of the first personage after distortion is extracted model by the face-image of the first personage after song, obtains the Fisrt feature image input second is gone back master mould, the first output image is obtained, based on what is currently obtained by one characteristic image The face-image of first personage and the first output image, go back master mould to the Feature Selection Model and described second, into Row parameter updates;
Every face-image for obtaining second personage, distorts the face-image of second personage, is turned round The face-image input feature vector of the second personage after distortion is extracted model by the face-image of the second personage after song, obtains the Second feature image input first is gone back master mould, the second output image is obtained, based on what is currently obtained by two characteristic images The face-image of second personage and the second output image, go back master mould to the Feature Selection Model and described first, into Row parameter updates;
Face-image and all second personages based on all first personages face-image to the feature extraction mould Type, described first go back master mould and described second go back master mould carry out parameter update after, be based on the updated feature extraction of parameter Model and parameter updated first go back master mould, and first after determining training is changed face model, are based on the updated feature of parameter It extracts model and parameter updated second and goes back master mould, second after determining training is changed face model.
Optionally, the sending module, is used for:
If first account is currently at presence, first after sending the training to the first terminal It changes face model;
If first account is currently at off-line state, the model of changing face after storing the training, when detecting When first account is switched to presence, what Xiang Suoshu first terminal sent after the training first changes face model;
If second account is currently at presence, second after sending the training to the second terminal It changes face model;
If second account is currently at off-line state, the model of changing face after storing the training, when detecting When second account is switched to presence, what Xiang Suoshu second terminal sent after the training second changes face model.
Optionally, described device further include:
Removing module, when the termination of changing face for receiving correspondence first account that the second terminal is sent is requested, The first deletion for changing face model after sending the corresponding training to the first terminal notifies.
In another aspect, providing a kind of device that image is changed face, described device is applied to terminal, and described device includes:
Sending module sends the request of changing face of corresponding second account to server, wherein carries in the request of changing face The face-image set of first personage;
Receiving module, first after receiving the training that the server is sent changes face model, wherein the after the training One changes face model for changing face the face-image of first personage for the face-image of second personage;
Change face module, when receive corresponding second account change face instruct when, the first image to be changed face is inputted First after the training changes face model, the second image after being changed face.
Optionally, described device further include:
Module is instructed, plays tutorial message and/or display tutorial message, wherein the tutorial message is used to indicate described First personage makes different movements;
Shooting module shoots the face of first personage during playing tutorial message and/or display tutorial message Portion's image collection.
Optionally, the shooting module, is used for:
In the state of closing Image Adjusting function, the face-image set of first personage is shot.
In another aspect, providing a kind of system that image is changed face, the system comprises first terminal, second terminal and services Device, in which:
The server, receive the second account of correspondence of the first terminal transmission of the first Account Logon first are changed face Request, wherein the face-image set of the first personage is carried in the request of changing face;Receive described the of the second Account Logon The second of the first account of correspondence that two terminals are sent is changed face request, wherein it is described change face request in carry the face of the second personage Portion's image collection;The face-image set of face-image set and second personage based on first personage carries out mould Type training, first after being trained changes face second changing face model after model and training, wherein first after the training changes Face model is used to change face the face-image of first personage for the face-image of second personage, and the after the training Two change face model for changing face the face-image of second personage for the face-image of first personage;To described first What terminal sent after the training first changes face model, and what Xiang Suoshu second terminal sent after the training second changes face model.
The first terminal, Xiang Suoshu server send the request of changing face of corresponding second account;Receive the server hair First after the training sent changes face model;When receive corresponding second account change face instruct when, by be changed face first What image inputted after the training first changes face model, the second image after being changed face.
The second terminal, Xiang Suoshu server send the request of changing face of corresponding first account;Receive the server hair Second after the training sent changes face model;When receive corresponding first account change face instruct when, by be changed face second What image inputted after the training second changes face model, the first image after being changed face.
In another aspect, providing a kind of computer equipment, the computer equipment includes one or more processors and one A or multiple memories, are stored at least one instruction in one or more of memories, described instruction by one or Multiple processors are loaded and are executed to realize that described image is changed face operation performed by method.
In another aspect, providing a kind of computer readable storage medium, it is stored in the computer readable storage medium At least one instruction, described instruction are loaded as processor and are executed to realize that described image is changed face operation performed by method.
Technical solution provided by the embodiments of the present application has the benefit that
The embodiment of the present application generation changes face model for processing of changing face, and can be obtained after the first image is inputted model of changing face The second image after changing face, without using the protoplast's object prestored face-image to the face-image of target person, carry out part Image replacement, so not also being related to carrying out deformation process to face-image, it is thus possible to reduce image fault.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of schematic diagram of implementation environment provided by the embodiments of the present application;
Fig. 2 is a kind of schematic diagram of implementation environment provided by the embodiments of the present application;
Fig. 3 is a kind of schematic diagram of implementation environment provided by the embodiments of the present application;
Fig. 4 is a kind of schematic diagram of implementation environment provided by the embodiments of the present application;
Fig. 5 is that a kind of image provided by the embodiments of the present application is changed face method flow diagram;
Fig. 6 is that a kind of image provided by the embodiments of the present application is changed face method flow diagram;
Fig. 7 is that a kind of image provided by the embodiments of the present application is changed face method flow diagram;
Fig. 8 is a kind of schematic diagram of specific implementation provided by the embodiments of the present application;
Fig. 9 is that a kind of image provided by the embodiments of the present application is changed face apparatus structure schematic diagram;
Figure 10 is that a kind of image provided by the embodiments of the present application is changed face apparatus structure schematic diagram;
Figure 11 is terminal structure schematic diagram provided by the embodiments of the present application;
Figure 12 is server architecture schematic diagram provided by the embodiments of the present application.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Fig. 1, Fig. 2, Fig. 3, Fig. 4 are that a kind of image provided in an embodiment of the present invention is changed face the implementation environment of method, the application There is provided the method that image is changed face can be realized jointly by terminal and server.Terminal can be run with picture recording function Application program, such as live streaming application program, short video application, terminal can have the portions such as microphone, camera, loudspeaker Part, terminal have communication function, can access internet, and terminal can be mobile phone, tablet computer, intelligent wearable device, desk-top Computer, laptop etc..Server can be the background server of above-mentioned application program, and server can be established with terminal Communication.The server can be an individual server and be also possible to a server group, should if it is individual server Server can be responsible in following proposal it is in need by server carry out processing, if it is server group, server group In different server can be responsible for the different disposal in following proposal respectively, it is specific handle distribution condition can be by technology people Member's any setting according to actual needs, details are not described herein again.
Face-image in video image can be replaced with it by the method that the image provided in the embodiment of the present application is changed face The face-image of his personage, the function are properly termed as function of changing face.It is carried out for application program is broadcast live in the embodiment of the present application The detailed description of scheme, other situations are similar therewith, repeat no more.Live streaming application program is installed in terminal.Journey is applied in live streaming Sequence during recording, can also can add in video various with recorded video and will be that video is uploaded to network Special efficacy, or carry out some filter processing.
When main broadcaster is using live streaming application program, an account, the account created can be registered in live streaming application program Other accounts can be paid close attention to, can also be of interest by other accounts, live streaming application program have multiple pages, as live page, Original list etc. is broadcast live, personage's page of main broadcaster oneself is as shown in Figure 1, have the personal letter such as account pet name of oneself in personage's page Breath, at the same also change face comprising one apply the page jump control and one terminate change face apply for the page jump control.In It changes face and applies in the page, as shown in Fig. 2, user can input the target account for wanting to change face, user can fill in target manually Account can also concern account list or good friend's account list in selection target account.It fills in or selects to change face pair of application As rear, into the face image capture page, as shown in figure 3, main broadcaster can carry out facial figure according to the prompt in live streaming application program As shooting.Before the live streaming that change face, wanting for two to link up between the main broadcaster to change face, both sides agree to after changing face, two The face-image set respectively shot can be sent to server, the face that server can be uploaded based on two main broadcasters by main broadcaster Image collection trains model of changing face, and is then sent respectively to main broadcaster, subsequent main broadcaster can open live streaming of changing face.
When main broadcaster wants change face and be broadcast live, main broadcaster can click unlatching live streaming control, as shown in figure 4, in live streaming page It is clicked in face and changes face control to trigger live streaming of changing face.Each spectators in direct broadcasting room are it is seen that the live streaming after the main broadcaster changes face regards Frequently.
Fig. 5 is the flow chart of server side in method that a kind of image provided by the embodiments of the present application is changed face.Referring to fig. 2, The process includes:
Step 501, receive the second account of correspondence that the first terminal of the first Account Logon is sent first is changed face request, In, the face-image set of the first personage is carried in request of changing face.
Step 502, receive the first account of correspondence that the second terminal of the second Account Logon is sent second is changed face request, In, the face-image set of the second personage is carried in request of changing face.
Step 503, the face-image set of the face-image set based on the first personage and the second personage carries out model instruction Practice, first after train changes face second changing face model after model and training, wherein the after training first model of changing face is used It changes face in by the face-image of the first personage as the face-image of the second personage, second after training changes face model for by second The face-image of personage is changed face as the face-image of the first personage.
Step 504, first after sending training to first terminal changes face model, second after sending training to second terminal It changes face model.
Fig. 6 is the flow chart of terminal side in method that a kind of image provided by the embodiments of the present application is changed face.It, should referring to Fig. 3 Process includes:
Step 601, the request of changing face of corresponding second account is sent to server, wherein carry first in request of changing face The face-image set of personage.
Step 602, first after receiving the training that server is sent changes face model, wherein first after training changes face mould Type is for changing face the face-image of the first personage for the face-image of the second personage.
Step 603, when receive corresponding second account change face instruct when, after the first image input training wait change face First change face model, the second image after being changed face.
Fig. 7 is the process interacted between server and terminal in method that a kind of image provided by the embodiments of the present application is changed face Figure.Referring to Fig. 7, which includes:
Step 701, first terminal sends the first of corresponding second account to server and changes face request.
Wherein, it changes face and carries the face-image set of the first personage in requesting, face-image set may include first Multiple facial pictures of personage, these facial pictures can be through what is taken pictures, are also possible to extract from video more A video frame.
In an implementation, the first main broadcaster (i.e. above-mentioned first personage) wants change face when being broadcast live, can be straight in terminal operating Application program is broadcast, logs in the first account in live streaming application program, is then operated into personage's page in live streaming application program, Click change face apply for the page jump control, jump to change face and apply for the page, apply for that the page carries out application of changing face changing face.First First main broadcaster can apply for inputting the account mark for the one or more accounts (i.e. the second account) for wanting to change face in the page changing face Know, can fill in manually, can also be selected in concern account list or good friend's account list, the point after having executed aforesaid operations Confirmation control is hit, the face image capture page is jumped to and carries out face image capture.In the face image capture page, first is main Photo can be shot by terminal by broadcasting, and can also shoot video by terminal, the video frame in photo or video is formed face Image collection.After the completion of face image capture, terminal can be generated first and change face request, changes face to add in request first and clap Then first request of changing face is sent to server by the account identification of the face-image set and the second account taken the photograph.Above-mentioned In the shooting of the face-image set carried out in one terminal, Image Adjusting function is closed, such as closes whitening, mill skin, filter function Energy.
Server is changed face after request receiving first from first terminal, can be there are many processing mode.
A kind of possible processing mode, server can according to first change face request in carrying the second account account It identifies the second terminal logged in the second account and sends notice, the account identification of the first account is carried in the notice, is used for Informing the second account currently has the first account just requesting to carry out live streaming of changing face with it.Second terminal can be straight after receiving notice It broadcasts to user's display reminding information in application program, to prompt user to have other users to request live streaming of changing face, which clicks true After recognizing, the second of the first account of correspondence that second terminal can be sent to server be changed face request, and second changes face request carrying the The face-image set of two personages, can be used as the confirmation message to above-mentioned notice.Then server carries out subsequent processing again.
Alternatively possible processing mode, server do not send any notice to second terminal, simply wait for second terminal The second of the first account of correspondence sent to server is changed face request, when receive second change face request when, then carry out subsequent place Reason.It under this mode, ditch can have friendly relations privately between user, then send request respectively, to realize live streaming of changing face, alternatively, with It can also be exactly to be directed to the user for oneself wanting to change face respectively to send request of changing face, if by chance having two without linking up between family A user has sent the request of changing face changed face with other side respectively, then live streaming of changing face may be implemented.
Optionally, before the request of changing face that corresponding second account is sent to server, terminal can play tutorial message and/ Or display tutorial message shoots the face-image of the first personage during playing tutorial message and/or display tutorial message Set.
Wherein, tutorial message is used to indicate the first personage and makes different movements.
In an implementation, when carrying out the shooting of face-image set, live streaming application program can indicate image taking.Example Such as, display passage in side's indicates that the first personage makes different movements on the screen, such as nods, shakes the head, opening one's mouth, shutting up, is micro- It laughs at, terminal can also carry out above-mentioned instruction by way of broadcasting voice.
Step 702, the second of the first account of correspondence that second terminal is sent to server is changed face request.
Wherein, it changes face and carries the face-image set of the second personage in requesting.
In an implementation, before second terminal sends the request of changing face of corresponding first account to server, if two change face The negotiated agreement of main broadcaster is changed face, and the main broadcaster of second terminal opens live streaming application program, and the second account of initial landing enters application Program, subsequently into personage's page, click, which is changed face, applies for page redirected link, jumps to change face and applies for the page, in application of changing face The page carries out application of changing face, and the first main broadcaster first can apply for that the one or more accounts changed face are wanted in input in the page changing face The account identification of (i.e. the second account), can fill in manually, can also select in concern account list or good friend's account list, Confirmation control is clicked after having executed aforesaid operations, is jumped to the face image capture page and is carried out face image capture, in face After the completion of image taking, by the main broadcaster of the account identification of the first account of main broadcaster's input/selection of second terminal and second terminal The set of face images of second personage of shooting is unified and is sent to server.The set of face images carried out in above-mentioned second terminal In the shooting of conjunction, Image Adjusting function is closed, such as closes whitening, mill skin, filter function.
Optionally, before the request of changing face that corresponding first account is sent to server, terminal can play tutorial message and/ Or display tutorial message shoots the face-image of the second personage during playing tutorial message and/or display tutorial message Set.
Wherein, tutorial message is used to indicate the second personage and makes different movements.
In an implementation, when carrying out the shooting of face-image set, live streaming application program can indicate image taking.Example Such as, display passage in side's indicates that the first personage makes different movements on the screen, such as nods, shakes the head, opening one's mouth, shutting up, is micro- It laughs at, terminal can also carry out above-mentioned instruction by way of broadcasting voice.
Step 703, the face-image set of face-image set and second personage of the server based on the first personage carries out Model training, first after being trained changes face second changing face model after model and training.
Wherein, first after training changes face model for changing face the face-image of the first personage for the face of the second personage Image, second after training changes face model for changing face the face-image of the second personage for the face-image of the first personage.
In an implementation, server, which changes face the first account received, requests request storage of changing face with the second account, and root The account identification for including in requesting of changing face according to the first account finds corresponding second account, detects second account and changes face request, Include the account identification of the first account in request if second account is changed face, determines that the first account and the second account are paired into The face-image set of the two accounts is inputted model of changing face by function.
Optionally, the face-image set of the face-image set based on the first personage and the second personage carries out model instruction Practice, first after train change face model and it is trained after second change face model, comprising:
Step 1 alternately obtains the face in the face-image set of the first personage and the face-image set of the second personage Image.
Step 2, every face-image for obtaining first personage, distorts the face-image of the first personage, obtains The face-image input feature vector of the first personage after distortion is extracted model, obtained by the face-image of the first personage after distortion The input of fisrt feature image second is gone back master mould, obtains the first output image by fisrt feature image, based on the currently obtained The face-image of one personage and the first output image, go back master mould to Feature Selection Model and second, carry out parameter update.
Step 3, every face-image for obtaining second personage, distorts the face-image of the second personage, obtains The face-image input feature vector of the second personage after distortion is extracted model, obtained by the face-image of the second personage after distortion The input of second feature image first is gone back master mould, obtains the second output image by second feature image, based on the currently obtained The face-image of two personages and the second output image, go back master mould to Feature Selection Model and first, carry out parameter update.
Step 4, face-image and all second personages based on all first personages face-image to feature extraction Model, first go back master mould and second and go back after master mould carries out parameter update, based on the updated Feature Selection Model of parameter and Parameter updated first goes back master mould, and first after determining training is changed face model, is based on the updated feature extraction mould of parameter Type and parameter updated second go back master mould, and second after determining training is changed face model.
Wherein, the face-image of the first personage and the face-image of the second personage are subjected to distortion processing, are in order to Two, which go back master mould and first, goes back master mould and is trained, by the face-image after the face-image output reduction of input distortion, Master mould is gone back in training on the basis of former face-image again, while training characteristics extract the ability in feature extraction of model.
In an implementation, first by the face of the face-image of the first personage of equal angular, identical expression and the second personage Image is matched, and the face-image of the first personage after pairing is then carried out distortion processing, the first after being distorted The face-image input feature vector of the first personage after distortion is extracted model by the face-image of object, and Feature Selection Model is to the torsion The face-image of the first bent personage carries out feature extraction, obtains fisrt feature image, also by fisrt feature image input second Master mould, second, which goes back master mould, restores fisrt feature image, the first output image is obtained, based on first currently obtained The face-image of personage and the first output image, go back master mould to Feature Selection Model and second, carry out parameter update.
After completing a Feature Selection Model and the second reduction model training, the face of the second personage after pairing is schemed As carrying out distortion processing, the face-image of the second personage after being distorted is defeated by the face-image of the second personage after distortion Enter Feature Selection Model, Feature Selection Model carries out feature extraction to the face-image of the second personage of the distortion, obtains second Second feature image input first is gone back master mould by characteristic image, and first, which goes back master mould, restores second feature image, obtains To the second output image, face-image and the second output image based on the second personage currently obtained, to Feature Selection Model Master mould is gone back with first, carries out parameter update.
Above-mentioned training circulation is carried out, is all input in model of changing face until by all face-image set, is stopped this and follow Ring, it is first to change face model that Feature Selection Model and first after training, which go back master mould, Feature Selection Model after training and the Two to go back master mould be second to change face model.
Step 704, first after server sends training to first terminal changes face model, after sending training to second terminal Second change face model.
In an implementation, when change face model training complete when, the model that will change face storage, generate storage address, server according to The account identification carried in the request of changing face of first terminal and second terminal transmission, by the storage address and training of the model of changing face The message of completion is sent to second terminal.First after sending training to first terminal change face model process therewith it is similar just not It repeats one by one again.
Optionally, to first terminal send training after change face model when, if the first account is currently at presence, First after then sending training to first terminal changes face model;If the first account is currently at off-line state, training is stored Model of changing face afterwards, when detecting that the first account is switched to presence, first after sending training to first terminal changes face Model.
In an implementation, when the first account is currently at presence, server, which will change face, requests the message passed through and changes The storage address of face model is sent to the exclusive network storage space of the first account, and first terminal is according to certain period to first The exclusive network storage space of account detects, when detecting the message that the request of changing face passes through, the automatic root of first terminal It is downloaded according to the storage address for model of changing face.
When the first account is currently at off-line state, it is special that the message that passes through of face request is sent to the first account by server The storage address of message and model of changing face that face request passes through is stored in the exclusive net of the first account by the network storage space of category Network memory space.When the first account is switched to presence, first terminal is exclusive to the first account according to certain periodicity Network storage space detected, when detect this change face message when, storage of the first terminal automatically according to model of changing face Location is downloaded.
Optionally, first after sending training to first terminal changes face after model, when receiving second terminal transmission Corresponding first account change face termination request when, first after sending corresponding training to first terminal change face model deletion it is logical Know.
In an implementation, after model of changing face downloads to first terminal, the main broadcaster of second terminal, which enters termination and changes face, applies for the page It fills in or selects the main broadcaster in concern list as the object for terminating request of changing face, click after determining, second terminal is to clothes Business device transmission, which is changed face, terminates request.Server is stored up when the termination of changing face for receiving second terminal is requested according to server memory The account identification of the first account the deletion of the model of changing face notice is sent to the exclusive network storage space of the first account.The One terminal is detected according to the network storage space exclusive to the first account of certain period, when detecting model of changing face Notice is deleted, first be stored in first terminal is directly deleted and changes face model.
Step 705, when receive corresponding second account change face instruct when, after the first image input training wait change face First change face model, the second image after being changed face.
In an implementation, after first terminal receives the model of changing face of transmission, the personage of first terminal is when being broadcast live, point Effect of changing face is hit, the selection page for the model that occurs changing face selects corresponding second account to change face the button of changing face of model.Camera is not Disconnected the first image for obtaining the first personage improves the accuracy for processing of changing face when obtaining, can close Image Adjusting function Can, by the model of changing face after the input training of the first image, the first image input feature vector is extracted into model first, it will be in the first image The facial image information of the first personage be substituted for the facial image information of the second personage, then the facial image information is inputted Second, which goes back master mould, is restored, and the second image is obtained, and model of changing face persistently exports the second image after changing face, then to the second figure As addition Image Adjusting function beautifies the task image showed.The spectators for watching live streaming are watching the straight of the first personage Sowing time, it is seen that be the second personage face.
Step 706, when receive corresponding first account change face instruct when, after the second image input training wait change face Second change face model, the first image after being changed face.
In an implementation, after second terminal receives the model of changing face of transmission, the personage of second terminal is when being broadcast live, point Effect of changing face is hit, the selection page for the model that occurs changing face selects corresponding first account to change face the button of changing face of model.Camera is not Disconnected the second image for obtaining the second personage improves the accuracy for processing of changing face when obtaining, can close Image Adjusting function Can, by the model of changing face after the input training of the second image, model of changing face is by knowing the encoded device of the face-image of the second personage The facial image information of the second personage is not substituted for first character face's image information, facial image information input decoding will be changed Device is restored to obtain the first image, and model of changing face persistently exports the second image after changing face, then adds image to the first image Adjustment function beautifies the task image showed.The spectators of live streaming are watched when watching the live streaming of the second personage, it is seen that Be the first personage face.
Fig. 8 is a kind of specific implementation schematic diagram provided by the embodiments of the present application, user's recorded material of two terminals, to clothes Business device sends application, and server carries out application to bring pairing together after receiving application, and task queue is added in the task of changing face, Then model training, the time that two terminals need to wait days when client server carries out aforesaid operations, in training are carried out After the completion of model training, the notice that model training is completed is issued to two interrupt sources, two terminals are downloaded after receiving notice There is the control of changing face, that is, functional entrance of changing face in the live streaming interface of user after the download is complete in the training pattern.
The embodiment of the present application generation changes face model for processing of changing face, and can be obtained after the first image is inputted model of changing face The second image after changing face, without using the protoplast's object prestored face-image to the face-image of target person, carry out part Image replacement, so not also being related to carrying out deformation process to face-image, it is thus possible to reduce image fault.
The embodiment of the present application provides a kind of device that image is changed face, which can be the server in above-described embodiment, As shown in figure 9, described device includes:
Receiving module 910, the first of the second account of correspondence that the first terminal of the first Account Logon of reception is sent, which is changed face, asks It asks, wherein the face-image set of the first personage is carried in the request of changing face;Receive the second terminal of the second Account Logon The second of the first account of correspondence of transmission is changed face request, wherein the face-image of the second personage is carried in the request of changing face Set.
Training module 920, the set of face images of face-image set and second personage based on first personage Close, carry out model training, first after train change face model and it is trained after second change face model, wherein the training First afterwards changes face model for changing face the face-image of first personage for the face-image of second personage, described Second after training changes face model for changing face the face-image of second personage for the face-image of first personage.
Sending module 930, what Xiang Suoshu first terminal sent after the training first changes face model, Xiang Suoshu second terminal Second after sending the training changes face model.
Optionally, the face-image set of face-image set and second personage based on first personage, into Row model training, first after being trained changes face second changing face model after model and training, the training module 920, quilt For:
Alternating obtains the face in the face-image set of first personage and the face-image set of second personage Portion's image.
Every face-image for obtaining first personage, distorts the face-image of first personage, is turned round The face-image input feature vector of the first personage after distortion is extracted model by the face-image of the first personage after song, obtains the Fisrt feature image input second is gone back master mould, the first output image is obtained, based on what is currently obtained by one characteristic image The face-image of first personage and the first output image, go back master mould to the Feature Selection Model and described second, into Row parameter updates.
Every face-image for obtaining second personage, distorts the face-image of second personage, is turned round The face-image input feature vector of the second personage after distortion is extracted model by the face-image of the second personage after song, obtains the Second feature image input first is gone back master mould, the second output image is obtained, based on what is currently obtained by two characteristic images The face-image of second personage and the second output image, go back master mould to the Feature Selection Model and described first, into Row parameter updates.
Face-image and all second personages based on all first personages face-image to the feature extraction mould Type, described first go back master mould and described second go back master mould carry out parameter update after, be based on the updated feature extraction of parameter Model and parameter updated first go back master mould, and first after determining training is changed face model, are based on the updated feature of parameter It extracts model and parameter updated second and goes back master mould, second after determining training is changed face model.
Optionally, it is described send the training to the first terminal after first change face model, the sending module 930, it is used for:
If first account is currently at presence, first after sending the training to the first terminal It changes face model.
If first account is currently at off-line state, the model of changing face after storing the training, when detecting When first account is switched to presence, what Xiang Suoshu first terminal sent after the training first changes face model.
If second account is currently at presence, second after sending the training to the second terminal It changes face model.
If second account is currently at off-line state, the model of changing face after storing the training, when detecting When second account is switched to presence, what Xiang Suoshu second terminal sent after the training second changes face model.
Optionally, it is described send the training to the first terminal after first change face after model, described device is also Include:
Removing module, when the termination of changing face for receiving correspondence first account that the second terminal is sent is requested, The first deletion for changing face model after sending the corresponding training to the first terminal notifies.
The embodiment of the present application provides a kind of device that image is changed face, which can be the terminal in above-described embodiment, such as Shown in Figure 10, described device includes:
Sending module 1010 sends the request of changing face of corresponding second account to server, wherein takes in the request of changing face Face-image set with the first personage.
Receiving module 1020, first after receiving the training that the server is sent changes face model, wherein after the training First change face model for changing face the face-image of first personage for the face-image of second personage.
Module of changing face 1030, when receive corresponding second account change face instruct when, by the first image to be changed face First after inputting the training changes face model, the second image after being changed face.
Optionally, before the request of changing face that corresponding second account is sent to server, described device further include:
Module is instructed, plays tutorial message and/or display tutorial message, wherein the tutorial message is used to indicate described First personage makes different movements.
Shooting module shoots the face of first personage during playing tutorial message and/or display tutorial message Portion's image collection.
Optionally, the face-image set of shooting first personage, the shooting module are used for:
In the state of closing Image Adjusting function, the face-image set of first personage is shot.
The embodiment of the present application generation changes face model for processing of changing face, and can be obtained after the first image is inputted model of changing face The second image after changing face, without using the protoplast's object prestored face-image to the face-image of target person, carry out part Image replacement, so not also being related to carrying out deformation process to face-image, it is thus possible to reduce image fault.
It should be understood that the device changed face of image provided by the above embodiment is when carrying out image and changing face, only with above-mentioned The division progress of each functional module can according to need and for example, in practical application by above-mentioned function distribution by different Functional module is completed, i.e., the internal structure of device is divided into different functional modules, with complete it is described above whole or Partial function.In addition, the embodiment of the method that image provided by the above embodiment is changed face belongs to same design, process is implemented It is detailed in embodiment of the method, which is not described herein again.
The embodiment of the present application also provides a kind of system that image is changed face, the system comprises first terminal, second terminal and Server, in which:
The server, the first of the second account of correspondence that the first terminal of the first Account Logon of reception is sent, which is changed face, asks It asks, wherein the face-image set of the first personage is carried in the request of changing face;Receive the second terminal of the second Account Logon The second of the first account of correspondence of transmission is changed face request, wherein the face-image of the second personage is carried in the request of changing face Set;The face-image set of face-image set and second personage based on first personage carries out model training, First after being trained changes face second changing face model after model and training, wherein first after the training changes face model It changes face for changing face the face-image of first personage for the face-image of second personage, second after the training Model is for changing face the face-image of second personage for the face-image of first personage;It is sent out to the first terminal First after sending the training changes face model, and what Xiang Suoshu second terminal sent after the training second changes face model.
The first terminal, Xiang Suoshu server send the request of changing face of corresponding second account;Receive the server hair First after the training sent changes face model;When receive corresponding second account change face instruct when, by be changed face first What image inputted after the training first changes face model, the second image after being changed face.
The second terminal, Xiang Suoshu server send the request of changing face of corresponding first account;Receive the server hair Second after the training sent changes face model;When receive corresponding first account change face instruct when, by be changed face second What image inputted after the training second changes face model, the first image after being changed face.
The embodiment of the present application generation changes face model for processing of changing face, and can be obtained after the first image is inputted model of changing face The second image after changing face, without using the protoplast's object prestored face-image to the face-image of target person, carry out part Image replacement, so not also being related to carrying out deformation process to face-image, it is thus possible to reduce image fault.
Figure 11 is a kind of structural schematic diagram of terminal provided by the embodiments of the present application.The terminal can be in above-described embodiment First terminal or second terminal.The terminal 1100 may is that smart phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) is broadcast Put device, laptop or desktop computer.Terminal 1100 be also possible to referred to as user equipment, portable terminal, laptop terminal, Other titles such as terminal console.
In general, terminal 1100 includes: one or more processors 1101 and one or more memories 1102.
Processor 1101 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 1101 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 1101 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.In In some embodiments, processor 1101 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 1101 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 1102 may include one or more computer readable storage mediums, which can To be non-transient.Memory 1102 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 1102 can Storage medium is read for storing at least one instruction, at least one instruction performed by processor 1101 for realizing this Shen Please in the image that provides of embodiment of the method change face method.
In some embodiments, terminal 1100 is also optional includes: peripheral device interface 1103 and at least one periphery are set It is standby.It can be connected by bus or signal wire between processor 1101, memory 1102 and peripheral device interface 1103.It is each outer Peripheral equipment can be connected by bus, signal wire or circuit board with peripheral device interface 1103.Specifically, peripheral equipment includes: In radio circuit 1104, display screen 1105, camera 1106, voicefrequency circuit 1107, positioning component 1108 and power supply 1109 extremely Few one kind.
Peripheral device interface 1103 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 1101 and memory 1102.In some embodiments, processor 1101, memory 1102 and periphery Equipment interface 1103 is integrated on same chip or circuit board;In some other embodiments, processor 1101, memory 1102 and peripheral device interface 1103 in any one or two can be realized on individual chip or circuit board, this implementation Example is not limited this.
Radio circuit 1104 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal. Radio circuit 1104 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 1104 is by telecommunications Number being converted to electromagnetic signal is sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 1104 include: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, volume solution Code chipset, user identity module card etc..Radio circuit 1104 can by least one wireless communication protocol come with it is other Terminal is communicated.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio frequency electrical Road 1104 can also include NFC (Near Field Communication, wireless near field communication) related circuit, the application This is not limited.
Display screen 1105 is for showing UI (User Interface, user interface).The UI may include figure, text, Icon, video and its their any combination.When display screen 1105 is touch display screen, display screen 1105 also there is acquisition to exist The ability of the touch signal on the surface or surface of display screen 1105.The touch signal can be used as control signal and be input to place Reason device 1101 is handled.At this point, display screen 1105 can be also used for providing virtual push button and/or dummy keyboard, it is also referred to as soft to press Button and/or soft keyboard.In some embodiments, display screen 1105 can be one, and the front panel of terminal 1100 is arranged;Another In a little embodiments, display screen 1105 can be at least two, be separately positioned on the different surfaces of terminal 1100 or in foldover design; In still other embodiments, display screen 1105 can be flexible display screen, is arranged on the curved surface of terminal 1100 or folds On face.Even, display screen 1105 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 1105 can be with Using LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) etc. materials preparation.
CCD camera assembly 1106 is for acquiring image or video.Optionally, CCD camera assembly 1106 includes front camera And rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.In In some embodiments, rear camera at least two is that main camera, depth of field camera, wide-angle camera, focal length are taken the photograph respectively As any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide Pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are realized in camera fusion in angle Shooting function.In some embodiments, CCD camera assembly 1106 can also include flash lamp.Flash lamp can be monochromatic temperature flash of light Lamp is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for Light compensation under different-colour.
Voicefrequency circuit 1107 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and It converts sound waves into electric signal and is input to processor 1101 and handled, or be input to radio circuit 1104 to realize that voice is logical Letter.For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 1100 to be multiple. Microphone can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 1101 or radio frequency will to be come from The electric signal of circuit 1104 is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramics loudspeaking Device.When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, can also be incited somebody to action Electric signal is converted to the sound wave that the mankind do not hear to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 1107 may be used also To include earphone jack.
Positioning component 1108 is used for the current geographic position of positioning terminal 1100, to realize navigation or LBS (Location Based Service, location based service).Positioning component 1108 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 1109 is used to be powered for the various components in terminal 1100.Power supply 1109 can be alternating current, direct current Electricity, disposable battery or rechargeable battery.When power supply 1109 includes rechargeable battery, which can support wired Charging or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 1100 further includes having one or more sensors 1110.One or more sensing Device 1110 includes but is not limited to: acceleration transducer 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensing Device 1114, optical sensor 1115 and proximity sensor 1116.
Acceleration transducer 1111 can detecte the acceleration in three reference axis of the coordinate system established with terminal 1100 Size.For example, acceleration transducer 1111 can be used for detecting component of the acceleration of gravity in three reference axis.Processor The 1101 acceleration of gravity signals that can be acquired according to acceleration transducer 1111, control display screen 1105 with transverse views or indulge The display of direction view progress user interface.Acceleration transducer 1111 can be also used for adopting for game or the exercise data of user Collection.
Gyro sensor 1112 can detecte body direction and the rotational angle of terminal 1100, gyro sensor 1112 Acquisition user can be cooperateed with to act the 3D of terminal 1100 with acceleration transducer 1111.Processor 1101 is according to gyro sensors The data that device 1112 acquires, following function may be implemented: action induction (for example changing UI according to the tilt operation of user) is clapped Image stabilization, game control and inertial navigation when taking the photograph.
The lower layer of side frame and/or display screen 1105 in terminal 1100 can be set in pressure sensor 1113.Work as pressure When the side frame of terminal 1100 is arranged in sensor 1113, user can detecte to the gripping signal of terminal 1100, by processor 1101 carry out right-hand man's identification or prompt operation according to the gripping signal that pressure sensor 1113 acquires.When pressure sensor 1113 When the lower layer of display screen 1105 is set, the pressure operation of display screen 1105 is realized to UI according to user by processor 1101 Operability control on interface is controlled.Operability control includes button control, scroll bar control, icon control, dish At least one of single control part.
Fingerprint sensor 1114 is used to acquire the fingerprint of user, is collected by processor 1101 according to fingerprint sensor 1114 Fingerprint recognition user identity, alternatively, by fingerprint sensor 1114 according to the identity of collected fingerprint recognition user.Knowing Not Chu the identity of user when being trusted identity, authorize the user to execute relevant sensitive operation by processor 1101, which grasps Make to include solving lock screen, checking encryption information, downloading software, payment and change setting etc..Fingerprint sensor 1114 can be set Set the front, the back side or side of terminal 1100.When being provided with physical button or manufacturer Logo in terminal 1100, fingerprint sensor 1114 can integrate with physical button or manufacturer Logo.
Optical sensor 1115 is for acquiring ambient light intensity.In one embodiment, processor 1101 can be according to light The ambient light intensity that sensor 1115 acquires is learned, the display brightness of display screen 1105 is controlled.Specifically, when ambient light intensity is higher When, the display brightness of display screen 1105 is turned up;When ambient light intensity is lower, the display brightness of display screen 1105 is turned down.Another In one embodiment, the ambient light intensity that processor 1101 can also be acquired according to optical sensor 1115, dynamic adjustment camera shooting The acquisition parameters of head assembly 1106.
Proximity sensor 1116, also referred to as range sensor are generally arranged at the front panel of terminal 1100.Proximity sensor 1116 for acquiring the distance between the front of user Yu terminal 1100.In one embodiment, when proximity sensor 1116 is examined When measuring the distance between the front of user and terminal 1100 and gradually becoming smaller, display screen 1105 is controlled from bright screen by processor 1101 State is switched to breath screen state;When proximity sensor 1116 detects that the distance between user and the front of terminal 1100 gradually become When big, display screen 1105 is controlled by processor 1101 and is switched to bright screen state from breath screen state.
It, can be with it will be understood by those skilled in the art that the restriction of the not structure paired terminal 1100 of structure shown in Figure 11 Including than illustrating more or fewer components, perhaps combining certain components or being arranged using different components.
Figure 12 is a kind of structural schematic diagram of server provided by the embodiments of the present application, the server 1200 can because of configuration or Performance is different and generates bigger difference, may include one or more processors (central processing units, CPU) 1201 and one or more memories 1202, wherein be stored at least one in one or more of memories 1202 Item instruction, at least one instruction are loaded by one or more of processors 1201 and are executed to realize above-mentioned each method The method that embodiment provides.Certainly, which can also have wired or wireless network interface, keyboard and input defeated The components such as outgoing interface, to carry out input and output, which can also include other portions for realizing functions of the equipments Part, this will not be repeated here.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, the memory for example including instruction, Above-metioned instruction can be executed by processor is changed face method with the image completed in above-described embodiment.For example, the computer-readable storage Medium can be read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), CD-ROM (Compact Disc Read-Only Memory, CD-ROM), tape, floppy disk and light data Store equipment etc..
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, which can store in a kind of computer-readable storage In medium, storage medium mentioned above can be read-only memory, disk or CD etc..
It above are only the preferred embodiment of the application, it is all in spirit herein and principle not to limit the application Within, any modification, equivalent replacement, improvement and so on should be included within the scope of protection of this application.

Claims (11)

1. a kind of method that image is changed face, which is characterized in that the described method includes:
Receive the second account of correspondence that the first terminal of the first Account Logon is sent first is changed face request, wherein described to change face The face-image set of the first personage is carried in request;
Receive the first account of correspondence that the second terminal of the second Account Logon is sent second is changed face request, wherein described to change face The face-image set of the second personage is carried in request;
The face-image set of face-image set and second personage based on first personage carries out model training, First after being trained changes face second changing face model after model and training, wherein first after the training changes face model It changes face for changing face the face-image of first personage for the face-image of second personage, second after the training Model is for changing face the face-image of second personage for the face-image of first personage;
First after sending the training to the first terminal changes face model, after Xiang Suoshu second terminal sends the training Second changes face model.
2. the method according to claim 1, wherein the face-image set based on first personage and The face-image set of second personage, carries out model training, first after train change face model and it is trained after the Two change face model, comprising:
Alternating obtains the face figure in the face-image set of first personage and the face-image set of second personage Picture;
Every face-image for obtaining first personage, distorts the face-image of first personage, after obtaining distortion The first personage face-image, the face-image input feature vector of the first personage after distortion is extracted into model, obtains the first spy Image is levied, master mould is gone back into fisrt feature image input second, the first output image is obtained, based on first currently obtained The face-image of personage and the first output image, go back master mould to the Feature Selection Model and described second, are joined Number updates;
Every face-image for obtaining second personage, distorts the face-image of second personage, after obtaining distortion The second personage face-image, the face-image input feature vector of the second personage after distortion is extracted into model, obtains the second spy Image is levied, master mould is gone back into second feature image input first, the second output image is obtained, based on second currently obtained The face-image of personage and the second output image, go back master mould to the Feature Selection Model and described first, are joined Number updates;
Face-image and all second personages based on all first personages face-image to the Feature Selection Model, institute State first and go back master mould and described second and go back after master mould carries out parameter update, based on the updated Feature Selection Model of parameter and Parameter updated first goes back master mould, and first after determining training is changed face model, is based on the updated feature extraction mould of parameter Type and parameter updated second go back master mould, and second after determining training is changed face model.
3. the method according to claim 1, wherein it is described send the training to the first terminal after One changes face after model, the method also includes:
When the termination of changing face for receiving correspondence first account that the second terminal is sent is requested, Xiang Suoshu first terminal First after sending the corresponding training deletion for changing face model notifies.
4. a kind of method that image is changed face, which is characterized in that the described method includes:
The request of changing face of corresponding second account is sent to server, wherein the face of the first personage is carried in the request of changing face Portion's image collection;
First after receiving the training that the server is sent changes face model, wherein first after the training changes face model use It changes face in by the face-image of first personage as the face-image of second personage;
When receive corresponding second account change face instruct when, after the first image wait change face is inputted the training the One changes face model, the second image after being changed face.
5. according to the method described in claim 4, it is characterized in that, described ask to corresponding the changing face for second account of server transmission Before asking, institute's delivery method further include:
Play tutorial message and/or display tutorial message, wherein the tutorial message is used to indicate first personage and makes not Same movement;
During playing tutorial message and/or display tutorial message, the face-image set of first personage is shot.
6. according to the method described in claim 5, it is characterized in that, the face-image set of the shooting first personage, Include:
In the state of closing Image Adjusting function, the face-image set of first personage is shot.
7. a kind of device that image is changed face, which is characterized in that described device includes:
Receiving module, receive the second account of correspondence that the first terminal of the first Account Logon is sent first are changed face request, wherein The face-image set of the first personage is carried in the request of changing face;Receive pair that the second terminal of the second Account Logon is sent The second of the first account is answered to change face request, wherein to carry the face-image set of the second personage in the request of changing face;
Training module, the face-image set of face-image set and second personage based on first personage carry out Model training, first after being trained changes face second changing face model after model and training, wherein first after the training Model of changing face is used to change face the face-image of first personage for the face-image of second personage, after the training Second changes face model for changing face the face-image of second personage for the face-image of first personage;
Sending module, what Xiang Suoshu first terminal sent after the training first changes face model, and Xiang Suoshu second terminal sends institute Second after stating training changes face model.
8. a kind of device that image is changed face, which is characterized in that described device includes:
Sending module, Xiang Suoshu server send the request of changing face of corresponding second account, wherein carry in the request of changing face The face-image set of first personage;
Receiving module, first after receiving the training that the server is sent changes face model, wherein first after the training changes Face model is for changing face the face-image of first personage for the face-image of second personage;
Change face module, when receive corresponding second account change face instruct when, described in the first image input that will be to be changed face First after training changes face model, the second image after being changed face.
9. a kind of system for carrying out image and changing face, which is characterized in that the system comprises first terminal, second terminal and services Device, in which:
The server, the first of the second account of correspondence that the first terminal of the first Account Logon of reception is sent, which is changed face, asks It asks, wherein the face-image set of the first personage is carried in the request of changing face;Receive described the second of the second Account Logon The second of the first account of correspondence that terminal is sent is changed face request, wherein it is described change face request in carry the face of the second personage Image collection;The face-image set of face-image set and second personage based on first personage carries out model Training, first after train change face model and it is trained after second change face model, wherein first after the training changes face Model is used to change face the face-image of first personage for the face-image of second personage, and second after the training Model of changing face is for changing face the face-image of second personage for the face-image of first personage;Eventually to described first What end sent after the training first changes face model, and what Xiang Suoshu second terminal sent after the training second changes face model.
The first terminal, Xiang Suoshu server send the request of changing face of corresponding second account;Receive what the server was sent First after training changes face model;When receive corresponding second account change face instruct when, by the first image to be changed face First after inputting the training changes face model, the second image after being changed face.
The second terminal, Xiang Suoshu server send the request of changing face of corresponding first account;Receive what the server was sent Second after training changes face model;When receive corresponding first account change face instruct when, by the second image to be changed face Second after inputting the training changes face model, the first image after being changed face.
10. a kind of computer equipment, which is characterized in that the computer equipment includes one or more processors and one or more A memory is stored at least one instruction in one or more of memories, and described instruction is by one or more of Reason device load and executed is changed face behaviour performed by method with realization such as claim 1 to the described in any item images of claim 6 Make.
11. a kind of computer readable storage medium, which is characterized in that be stored at least one in the computer readable storage medium Item instruction, described instruction are loaded by processor and are executed to realize such as claim 1 to the described in any item images of claim 6 Operation performed by method of changing face.
CN201910833438.0A 2019-09-04 2019-09-04 Image face changing method, device, system, equipment and storage medium Active CN110533585B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910833438.0A CN110533585B (en) 2019-09-04 2019-09-04 Image face changing method, device, system, equipment and storage medium
PCT/CN2020/112777 WO2021043121A1 (en) 2019-09-04 2020-09-01 Image face changing method, apparatus, system, and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910833438.0A CN110533585B (en) 2019-09-04 2019-09-04 Image face changing method, device, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110533585A true CN110533585A (en) 2019-12-03
CN110533585B CN110533585B (en) 2022-09-27

Family

ID=68666849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910833438.0A Active CN110533585B (en) 2019-09-04 2019-09-04 Image face changing method, device, system, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110533585B (en)
WO (1) WO2021043121A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111263226A (en) * 2020-01-17 2020-06-09 中国科学技术大学 Video processing method, video processing device, electronic equipment and medium
CN111986301A (en) * 2020-09-04 2020-11-24 网易(杭州)网络有限公司 Method and device for processing data in live broadcast, electronic equipment and storage medium
WO2021043121A1 (en) * 2019-09-04 2021-03-11 广州华多网络科技有限公司 Image face changing method, apparatus, system, and device, and storage medium
CN112752147A (en) * 2020-09-04 2021-05-04 腾讯科技(深圳)有限公司 Video processing method, device and storage medium
CN113487745A (en) * 2021-07-16 2021-10-08 思享智汇(海南)科技有限责任公司 Method, device and system for enhancing reality

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494002B (en) * 2022-03-30 2022-07-01 广州公评科技有限公司 AI face changing video-based original face image intelligent restoration method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104244022A (en) * 2014-08-29 2014-12-24 形山科技(深圳)有限公司 Method and system for processing image
US20150049247A1 (en) * 2013-08-19 2015-02-19 Cisco Technology, Inc. Method and apparatus for using face detection information to improve speaker segmentation
CN106331569A (en) * 2016-08-23 2017-01-11 广州华多网络科技有限公司 Method and system for transforming figure face in instant video picture
CN106534757A (en) * 2016-11-22 2017-03-22 北京金山安全软件有限公司 Face exchange method and device, anchor terminal and audience terminal
CN107564080A (en) * 2017-08-17 2018-01-09 北京觅己科技有限公司 A kind of replacement system of facial image
CN108347578A (en) * 2017-01-23 2018-07-31 腾讯科技(深圳)有限公司 The processing method and processing device of video image in video calling

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9697266B1 (en) * 2013-09-27 2017-07-04 EMC IP Holding Company LLC Management of computing system element migration
CN108040290A (en) * 2017-12-22 2018-05-15 四川长虹电器股份有限公司 TV programme based on AR technologies are changed face method in real time
CN109063658A (en) * 2018-08-08 2018-12-21 吴培希 A method of it is changed face using deep learning in multi-mobile-terminal video personage
CN110533585B (en) * 2019-09-04 2022-09-27 广州方硅信息技术有限公司 Image face changing method, device, system, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150049247A1 (en) * 2013-08-19 2015-02-19 Cisco Technology, Inc. Method and apparatus for using face detection information to improve speaker segmentation
CN104244022A (en) * 2014-08-29 2014-12-24 形山科技(深圳)有限公司 Method and system for processing image
CN106331569A (en) * 2016-08-23 2017-01-11 广州华多网络科技有限公司 Method and system for transforming figure face in instant video picture
CN106534757A (en) * 2016-11-22 2017-03-22 北京金山安全软件有限公司 Face exchange method and device, anchor terminal and audience terminal
CN108347578A (en) * 2017-01-23 2018-07-31 腾讯科技(深圳)有限公司 The processing method and processing device of video image in video calling
CN107564080A (en) * 2017-08-17 2018-01-09 北京觅己科技有限公司 A kind of replacement system of facial image

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021043121A1 (en) * 2019-09-04 2021-03-11 广州华多网络科技有限公司 Image face changing method, apparatus, system, and device, and storage medium
CN111263226A (en) * 2020-01-17 2020-06-09 中国科学技术大学 Video processing method, video processing device, electronic equipment and medium
CN111263226B (en) * 2020-01-17 2021-10-22 中国科学技术大学 Video processing method, video processing device, electronic equipment and medium
CN111986301A (en) * 2020-09-04 2020-11-24 网易(杭州)网络有限公司 Method and device for processing data in live broadcast, electronic equipment and storage medium
CN112752147A (en) * 2020-09-04 2021-05-04 腾讯科技(深圳)有限公司 Video processing method, device and storage medium
CN113487745A (en) * 2021-07-16 2021-10-08 思享智汇(海南)科技有限责任公司 Method, device and system for enhancing reality

Also Published As

Publication number Publication date
CN110533585B (en) 2022-09-27
WO2021043121A1 (en) 2021-03-11

Similar Documents

Publication Publication Date Title
CN108833818B (en) Video recording method, device, terminal and storage medium
CN110533585A (en) A kind of method, apparatus that image is changed face, system, equipment and storage medium
CN110139142A (en) Virtual objects display methods, device, terminal and storage medium
CN108401124B (en) Video recording method and device
CN110572711B (en) Video cover generation method and device, computer equipment and storage medium
CN108900858A (en) A kind of method and apparatus for giving virtual present
CN109982102A (en) The interface display method and system and direct broadcast server of direct broadcasting room and main broadcaster end
CN109246452A (en) virtual gift display method and device
CN109618212A (en) Information display method, device, terminal and storage medium
CN108965757B (en) Video recording method, device, terminal and storage medium
CN108833963A (en) Method, computer equipment, readable storage medium storing program for executing and the system of display interface picture
CN110213608A (en) Show method, apparatus, equipment and the readable storage medium storing program for executing of virtual present
CN110166786A (en) Virtual objects transfer method and device
CN108848394A (en) Net cast method, apparatus, terminal and storage medium
CN110865754A (en) Information display method and device and terminal
CN109285178A (en) Image partition method, device and storage medium
CN109246123A (en) Media stream capturing method and device
CN110278464A (en) The method and apparatus for showing list
CN109729378A (en) Information processing method, the method and device that welfare is got in live streaming platform
CN109525883A (en) Interact Special display effect method, apparatus, electronic equipment, server and storage medium
CN108900925A (en) The method and apparatus of live streaming template are set
CN110418152A (en) It is broadcast live the method and device of prompt
CN108897597A (en) The method and apparatus of guidance configuration live streaming template
CN111339938A (en) Information interaction method, device, equipment and storage medium
CN110139143A (en) Virtual objects display methods, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210111

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511446 28th floor, block B1, Wanda Plaza, Wanbo business district, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20191203

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000054

Denomination of invention: The invention relates to a method, a device, a system, a device and a storage medium for image face changing

License type: Common License

Record date: 20210208

EE01 Entry into force of recordation of patent licensing contract
GR01 Patent grant
GR01 Patent grant