Generate method, apparatus, equipment and the computer readable storage medium of whole body images
Technical field
This disclosure relates to field of computer technology, specifically, this disclosure relates to a kind of method for generating whole body images, dress
It sets, equipment and computer readable storage medium.
Background technique
Artificial neural network (Artificial Neural Networks, ANNs) be referred to as neural network (NNs) or
Make link model (Connection Model), it is a kind of imitation animal nerve network behavior feature, carries out distributed parallel
The algorithm mathematics model of information processing passes through in the prior art by the half body image of people and the posture information of people to be generated
Neural network, obtains the whole body images of people, and complexity is higher and the effect of whole body images that generates is bad, user experience compared with
Difference.
Summary of the invention
The disclosure is directed to the shortcomings that existing mode, proposes a kind of method, apparatus, equipment and calculating for generating whole body images
How machine readable storage medium storing program for executing reduces by the complexity of half body image generation whole body images to solve, while realizing whole body figure
The good problem of the generation effect of picture.
In a first aspect, present disclose provides a kind of methods for generating whole body images, comprising:
Obtain the half body image of target object;
Half body image is input to preset network, obtains the first whole body images of target object;
Determine the key point of the posture of target object;
The key point of the posture of first whole body images and target object is input to preset network, to the first whole body images
Key point be corrected, determine the second whole body images of target object.
Optionally, half body image is input to preset network, obtains the first whole body images of target object, comprising:
Half body image is input to production confrontation network G AN, determines the first whole body images.
Optionally it is determined that the key point of the posture of target object, comprising:
First whole body images and thermodynamic chart heatmap are spliced, obtain the splicing of heatmap image, thermodynamic chart with
For characterizing the distribution of the key point of the posture of target object;
According to the splicing of heatmap image, the key point of posture is determined.
Optionally, according to the splicing of heatmap image, the key point of posture is determined, comprising:
According to the splicing of heatmap image, the information of the key point of each area of target object is determined;
According to the information of the key point of each area of target object, the key point of posture is determined.
Optionally, the key point of the posture of the first whole body images and target object is input to preset network, to first
The key point of whole body images is corrected, and determines the second whole body images of target object, comprising:
The key point of the posture of first whole body images and target object is input to GAN, to the key of the first whole body images
Point is corrected, and generates the second whole body images corresponding with the key point of posture.
Second aspect, present disclose provides a kind of devices for generating whole body images, comprising:
First processing module, for obtaining the half body image of target object;
Second processing module obtains the first whole body figure of target object for half body image to be input to preset network
Picture;
Third processing module, the key point of the posture for determining target object;
Fourth processing module, for the key point of the first whole body images and the posture of target object to be input to preset net
Network is corrected the key point of the first whole body images, determines the second whole body images of target object.
Second processing module determines the first whole body images for half body image to be input to production confrontation network G AN.
Third processing module is also used to splice the first whole body images and thermodynamic chart heatmap, obtains heatmap
The splicing of image, thermodynamic chart is with the distribution of the key point of the posture for characterizing target object;According to the spelling of heatmap image
It connects, determines the key point of posture.
The third aspect, present disclose provides a kind of electronic equipment, comprising: processor, memory and bus;
Bus, for connecting processor and memory;
Memory, for storing operational order;
Processor, for being instructed by call operation, the method for executing the generation whole body images of disclosure first aspect.
Fourth aspect, present disclose provides a kind of computer readable storage mediums, are stored with computer program, computer journey
The method that sequence is used to carry out the generation whole body images of disclosure first aspect.
The technical solution that the embodiment of the present disclosure provides, at least has the following beneficial effects:
Obtain the half body image of target object;Half body image is input to preset network, obtains the first of target object
Whole body images;Determine the key point of the posture of target object;The key point of the posture of first whole body images and target object is defeated
Enter to preset network, the key point of the first whole body images is corrected, determines the second whole body images of target object.Such as
This, first mends the half body image of target object at the first whole body images, then by the appearance of the first whole body images and target object
The key point of state is input to preset network, obtains the second whole body images, can reduce and generate whole body figure by one step of half body image
The complexity of picture, and the effect of the second whole body images generated is good, and the user experience is improved.
The additional aspect of the disclosure and advantage will be set forth in part in the description, these will become from the following description
It obtains obviously, or recognized by the practice of the disclosure.
Detailed description of the invention
It, below will be to institute in embodiment of the present disclosure description in order to illustrate more clearly of the technical solution in the embodiment of the present disclosure
Attached drawing to be used is needed to be briefly described.
Fig. 1 is a kind of flow diagram of the method for generation whole body images that the embodiment of the present disclosure provides;
Fig. 2 is a kind of structural schematic diagram of the device for generation whole body images that the embodiment of the present disclosure provides;
Fig. 3 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present disclosure provides.
Specific embodiment
Embodiment of the disclosure is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and is only used for explaining the disclosure, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the specification of the disclosure
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member
Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here
To explain.
How the technical solution of the disclosure and the technical solution of the disclosure are solved with specifically embodiment below above-mentioned
Technical problem is described in detail.These specific embodiments can be combined with each other below, for the same or similar concept
Or process may repeat no more in certain embodiments.Below in conjunction with attached drawing, embodiment of the disclosure is described.
Embodiment one
A kind of method for generating whole body images, the flow diagram of this method such as Fig. 1 institute are provided in the embodiment of the present disclosure
Show, this method comprises:
S101 obtains the half body image of target object.
Optionally, the half body image of the posture of human body is obtained.
Half body image is input to preset network by S102, obtains the first whole body images of target object.
Optionally, half body image is input to preset network, obtains the first whole body images of target object, comprising:
Half body image is input to production confrontation network G AN, determines the first whole body images.
Optionally, production confrontation network (GAN, Generative Adversarial Networks) is a kind of depth
Learning model is one of the method for unsupervised learning in complex distributions.Model passes through (at least) two modules in frame: generating mould
The mutual Game Learning of type (Generative Model) G network and discrimination model (Discriminative Model) D network
Generate fairly good output.Generally use deep neural network as G network and D network in practical.The effect of G network is raw
At image, after inputting a random coded, G network will export image that a width is automatically generated by neural network, false;D
Network is then the image that D network exports G network judges the true and false of diagram picture as input for judging, genuine defeated
Out 1, false output 0.G network is mainly used to learn true picture distribution to which the image for allowing itself to generate is truer, to deceive
Cross D network;D network then needs to carry out true and false differentiation to received image.In the whole process, G network hardy allows generation
Image is truer, and D network then hardy goes to identify the true and false of image, this process is equivalent to a two-person game, with
The passage of time, G network and D network fought constantly, final two networks have reached dynamic equalization: G net
The image that network generates is distributed close to true picture, and D Network Recognition does not go out true and false image.For example, GAN is applied to deep learning
In neural network, by G network and the continuous game of D network, and then make G e-learning to the distribution of data, if using image
In generation, then after the completion of training, G network can generate image true to nature from one section of random number.
Optionally, preset network is one of GAN;Preset network can synthesize the 2048*1024 image of high definition,
Preset Web vector graphic is by slightly to the G network and multiple dimensioned D network of essence.High-resolution, high quality can be generated in preset network
Image.Preset network takes the image for first exporting low resolution, using the low-resolution image exported before as another
Then the input of network generates the higher image of resolution ratio.
Optionally, the input of preset network is half body image, and the supervision output of preset network is the first whole body images,
The first whole body images can be generated by preset network in this way, i.e., completion be carried out by half body image, mended into the first whole body figure
Picture.
S103 determines the key point of the posture of target object.
Optionally, the first whole body images and thermodynamic chart heatmap are spliced, obtains the splicing of heatmap image, heat
Try hard to the distribution of the key point of the posture for characterizing target object;
According to the splicing of heatmap image, the key point of posture is determined.
Optionally, according to the splicing of heatmap image, the key point of posture is determined, comprising:
According to the splicing of heatmap image, the information of the key point of each area of target object is determined;
According to the information of the key point of each area of target object, the key point of posture is determined.
Optionally, the first whole body images and thermodynamic chart heatmap are spliced, obtains the splicing of heatmap image, H*
W*3 is the size of the first whole body images, and H*W*1 is the size of thermodynamic chart heatmap, and H*W*4 is the splicing of heatmap image;
Specifically, the H in H*W*D matrix and W indicates the height and width of image, and D indicates that each pixel is extracted in image
The dimension (port number) of feature vector, the colour model RGB of the first whole body images be it is three-dimensional, therefore, the first whole body images it is big
D value is that 3 expressions are three-dimensional in small H*W*3;Thermodynamic chart heatmap be it is one-dimensional, therefore, in the size H*W*1 of thermodynamic chart heatmap
D value is that 1 expression is one-dimensional;D value is 4 expression four-ways in the splicing H*W*4 of heatmap image.The size and mesh of thermodynamic chart
The in the same size of object is marked, thermodynamic chart can generate the Probability Region of Gaussian Profile in the key point region of the posture of target object
The central value in domain, the key point region of the posture of target object is maximum, and closest to 1, more around, probability is smaller.Heating power
Figure heatmap can intuitively be presented that some scripts are not readily understood or the data, such as density, frequency, temperature etc. of expression, use instead
Region and this mode being easier to understand of color are presented.According to the heatmap of image, the appearance of target object can detecte
The key point of state, for example, there is red area in the region of face, which is region locating for the key point of face.
The key point of the posture of first whole body images and target object is input to preset network by S104, complete to first
The key point of body image is corrected, and determines the second whole body images of target object.
Optionally, the key point of the posture of the first whole body images and target object is input to preset network, to first
The key point of whole body images is corrected, and determines the second whole body images of target object, comprising:
The key point of the posture of first whole body images and target object is input to GAN, to the key of the first whole body images
Point is corrected, and generates the second whole body images corresponding with the key point of posture.
Using the embodiment of the present disclosure, at least have the following beneficial effects:
Obtain the half body image of target object;Half body image is input to preset network, obtains the first of target object
Whole body images;Determine the key point of the posture of target object;The key point of the posture of first whole body images and target object is defeated
Enter to preset network, the key point of the first whole body images is corrected, determines the second whole body images of target object.Such as
This, first mends the half body image of target object at the first whole body images, then by the appearance of the first whole body images and target object
The key point of state is input to preset network, obtains the second whole body images, can reduce and generate whole body figure by one step of half body image
The complexity of picture, and the effect of the second whole body images generated is good, and the user experience is improved.
Embodiment two
Based on identical inventive concept, the embodiment of the present disclosure additionally provides a kind of device for generating whole body images, the device
Structural schematic diagram as shown in Fig. 2, generating the device 20 of whole body images, including first processing module 201, Second processing module
202, third processing module 203 and fourth processing module 204.
First processing module 201, for obtaining the half body image of target object;
Second processing module 202 obtains the first whole body of target object for half body image to be input to preset network
Image;
Third processing module 203, the key point of the posture for determining target object;
Fourth processing module 204, it is default for the key point of the first whole body images and the posture of target object to be input to
Network, the key point of the first whole body images is corrected, determines the second whole body images of target object.
Optionally, Second processing module 202 are determined specifically for half body image is input to production confrontation network G AN
First whole body images.
Optionally, third processing module 203, specifically for the first whole body images and thermodynamic chart heatmap are spliced,
Obtain the splicing of heatmap image;According to the splicing of heatmap image, the key point of posture is determined.
Optionally, third processing module 203 determines each of target object specifically for the splicing according to heatmap image
The information of the key point of a area;According to the information of the key point of each area of target object, posture is determined
Key point.
Optionally, fourth processing module 204, specifically for by the key point of the first whole body images and the posture of target object
It is input to GAN, the key point of the first whole body images is corrected, generates the second whole body figure corresponding with the key point of posture
Picture.
The content not being described in detail in the device for the generation whole body images that the embodiment of the present disclosure provides, can refer to above-described embodiment one
The method of the generation whole body images of offer, the beneficial effect that the device for the generation whole body images that the embodiment of the present disclosure provides can reach
Fruit is identical as the generation method of whole body images that above-described embodiment one provides, and details are not described herein.
Using the embodiment of the present disclosure, at least have the following beneficial effects:
Obtain the half body image of target object;Half body image is input to preset network, obtains the first of target object
Whole body images;Determine the key point of the posture of target object;The key point of the posture of first whole body images and target object is defeated
Enter to preset network, the key point of the first whole body images is corrected, determines the second whole body images of target object.Such as
This, first mends the half body image of target object at the first whole body images, then by the appearance of the first whole body images and target object
The key point of state is input to preset network, obtains the second whole body images, can reduce and generate whole body figure by one step of half body image
The complexity of picture, and the effect of the second whole body images generated is good, and the user experience is improved.
Embodiment three
Based on principle identical with the generation method of whole body images in embodiment of the disclosure, present disclose provides one kind
Electronic equipment, the electronic equipment include processor and memory;Memory, for storing operational order;Processor, for passing through
Call operation instruction executes method shown in any embodiment in the method such as the generation whole body images of the disclosure.
Based on principle identical with the generation method of whole body images in embodiment of the disclosure, present disclose provides one kind
Computer readable storage medium, storage medium are stored at least one instruction, at least a Duan Chengxu, code set or instruction set, until
A few instruction, an at least Duan Chengxu, code set or instruction set are loaded by processor and are executed to realize the generation such as the disclosure
Method shown in any embodiment in the method for whole body images.
In one example, as shown in figure 3, it illustrates the electronic equipments 800 for being suitable for being used to realize the embodiment of the present disclosure
Structural schematic diagram.Electronic equipment in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, number
Word radio receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal
The fixed terminal of the mobile terminal of (such as vehicle mounted guidance terminal) etc. and such as number TV, desktop computer etc..Fig. 3 shows
Electronic equipment out is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 3, electronic equipment 800 may include processing unit (such as central processing unit, graphics processor etc.)
801, random access can be loaded into according to the program being stored in read-only memory (ROM) 802 or from storage device 808
Program in memory (RAM) 803 and execute various movements appropriate and processing.In RAM 803, it is also stored with electronic equipment
Various programs and data needed for 800 operations.Processing unit 801, ROM 802 and RAM 803 pass through the phase each other of bus 804
Even.Input/output (I/O) interface 805 is also connected to bus 804.
In general, following device can connect to I/O interface 805: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph
As the input unit 806 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration
The output device 807 of dynamic device etc.;Storage device 808 including such as tape, hard disk etc.;And communication device 809.Communication device
809, which can permit electronic equipment 800, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 3 shows tool
There is the electronic equipment 800 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with
Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communication device 809, or from storage device 808
It is mounted, or is mounted from ROM 802.When the computer program is executed by processing unit 801, the embodiment of the present disclosure is executed
Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated,
In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to
Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit
Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned
Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not
It is fitted into the electronic equipment.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the electricity
When sub- equipment executes, so that the electronic equipment executes method shown in above method embodiment;Alternatively, above-mentioned computer-readable Jie
Matter carries one or more program, when said one or multiple programs are executed by the electronic equipment, so that the electronics
Equipment executes method shown in above method embodiment.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof
Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+
+, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can
Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package,
Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part.
In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN)
Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service
Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard
The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, the
One acquiring unit is also described as " obtaining the unit of at least two internet protocol addresses ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure
Can technical characteristic replaced mutually and the technical solution that is formed.