CN114283060A - Video generation method, device, equipment and storage medium - Google Patents
Video generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114283060A CN114283060A CN202111566280.9A CN202111566280A CN114283060A CN 114283060 A CN114283060 A CN 114283060A CN 202111566280 A CN202111566280 A CN 202111566280A CN 114283060 A CN114283060 A CN 114283060A
- Authority
- CN
- China
- Prior art keywords
- information
- attribute
- video
- feature information
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000009466 transformation Effects 0.000 claims abstract description 55
- 230000003287 optical effect Effects 0.000 claims abstract description 49
- 230000001131 transforming effect Effects 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 31
- 239000011159 matrix material Substances 0.000 claims description 28
- 230000006978 adaptation Effects 0.000 claims description 19
- 238000004364 calculation method Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 230000004927 fusion Effects 0.000 claims description 7
- 238000000605 extraction Methods 0.000 claims description 5
- 238000005070 sampling Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 239000013598 vector Substances 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 208000037170 Delayed Emergence from Anesthesia Diseases 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000037303 wrinkles Effects 0.000 description 1
Images
Abstract
The embodiment of the disclosure discloses a video generation method, a video generation device, video generation equipment and a storage medium. Extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image; acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information; transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images; and splicing the plurality of target images to obtain a target video. According to the video generation method provided by the embodiment of the disclosure, the original image is transformed based on the first characteristic information and the plurality of optical flow transformation information corresponding to the original driving video, so that the expression of a character in the original driving video is transferred to the character in the original image, the generation efficiency of the expression driving video can be improved, and the interestingness of the generated video is also improved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of image processing, and in particular, to a video generation method, device, equipment and storage medium.
Background
With the continuous development of artificial intelligence technology, deep neural networks have become increasingly popular in computer vision, natural language processing, and other interdisciplinary research fields. The expression driving technology is an important computer vision application based on a deep neural network, and can transfer a motion track in a driving video to a target image by inputting the target image and the corresponding driving video to generate the video with the motion track of the driving video by taking the target image as a reference.
The existing expression driving technology is difficult to process in real time due to huge model calculation amount, insufficient computer and insufficient memory of traditional calculation equipment, so that additional calculation and storage equipment are needed for heterogeneous acceleration, but due to the limitation of the calculation process of the prior art, the traditional heterogeneous calculation scheme faces additional data transmission, and the following two problems are caused:
1. the extra transmission time results in inability to perform expression driven video generation in real time.
2. The extra data storage overhead is excessive, resulting in the problem of insufficient storage space for single-card devices.
Disclosure of Invention
The embodiment of the disclosure provides a video generation method, a video generation device, video generation equipment and a storage medium, which can improve the generation efficiency of expression driving videos.
In a first aspect, an embodiment of the present disclosure provides a video generation method, including:
extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image;
acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information;
transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images;
and splicing the plurality of target images to obtain a target video.
In a second aspect, an embodiment of the present disclosure further provides a video generating apparatus, including:
the characteristic information extraction module is used for extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image;
an optical flow transformation information acquisition module configured to acquire a plurality of optical flow transformation information based on the first feature information and each of the second feature information;
a target image obtaining module, configured to perform transformation processing on the original image according to the first feature information and the plurality of optical flow transformation information to obtain a plurality of target images;
and the target video acquisition module is used for splicing the plurality of target images to obtain a target video.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processing devices;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processing devices, the one or more processing devices are caused to implement the video generation method according to the embodiment of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer readable medium, on which a computer program is stored, which when executed by a processing device, implements a video generation method according to the disclosed embodiments.
The embodiment of the disclosure provides a video generation method, a video generation device, video generation equipment and a storage medium. Extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein, the original image and the original driving video both comprise character images; acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information; transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images; and splicing the plurality of target images to obtain a target video. According to the video generation method provided by the embodiment of the disclosure, the original image is transformed based on the first characteristic information and the plurality of optical flow transformation information corresponding to the original driving video, so that the expression of a character in the original driving video is transferred to the character in the original image, the generation efficiency of the expression driving video can be improved, and the interestingness of the generated video is also improved.
Drawings
Fig. 1 is a flow chart of a video generation method in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of determining optical flow transformation information in an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of a video generation apparatus in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a video generation method provided in an embodiment of the present disclosure, where this embodiment is applicable to a case where a human expression in a video is transferred to a human in an original image, and the method may be executed by a video generation apparatus, where the apparatus may be composed of hardware and/or software, and may be generally integrated in a device with a video generation function, where the device may be an electronic device such as a server, a mobile terminal, or a server cluster. As shown in fig. 1, the method specifically includes the following steps:
step 110, extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video.
Wherein, the original image and the original driving video both comprise character images. The first characteristic information comprises first key point information and first attribute characteristic information; the second feature information includes second keypoint information and second attribute feature information. The key point information can be understood as information formed by key points on a character image and can be represented by a vector or a matrix; the attribute feature information can be understood as high-order abstract features of the character, such as skin color, wrinkles and other feature information, and can be represented by vectors or matrixes.
In this embodiment, a standard convolution network may be used to extract feature information of each video frame in the original image and the original drive video. Standard convolution calculations may include: convolutional layers, active layers, and residual blocks, etc. The principle of feature extraction may be: an RGB image is input and output as a feature vector of the image. And inputting the size of the image as H W C, and outputting to perform dimensionality reduction to obtain a low-dimensional feature vector. The feature vector is a high-order expression of the picture, has the features of the picture, and can represent some abstract features of the picture.
In this embodiment, each video frame in the original driving video may be extracted from the original driving video according to the set sampling frequency. Setting the sampling frequency may be understood as extracting a video frame every set duration or every set number of frames. The set duration may be any value greater than or equal to 0, and the set frame number may be any integer greater than or equal to 0.
And a step 120 of acquiring a plurality of optical flow transformation information according to the first characteristic information and the second characteristic information.
The optical flow transformation information comprises adaptation information between the original image and each video frame and attribute information after linear transformation.
Specifically, the manner of acquiring the plurality of optical-flow transform information from the first feature information and the second feature information may be: determining the area of a first convex hull according to the first key point information; determining the area of a second convex hull according to the second key point information; for the Nth video frame, performing linear processing on the first convex hull area and the second convex hull area to obtain adaptation information; wherein N is a positive integer greater than or equal to 1; performing linear processing on the first attribute characteristic information and the second attribute characteristic information to obtain target attribute characteristic information; and obtaining optical flow transformation information corresponding to the Nth video frame according to the adaptation information and the target attribute characteristic information.
Wherein, the area enclosed by the outline of the character image can be understood by the convex hull area. The convex hull area may be calculated by using an existing convex hull algorithm (Graham scanning method) or a boundary method, which is not limited herein.
In this embodiment, for the convex hull area of each video frame in the original driving video, the respective convex hull area may be respectively calculated according to the second keypoint information of each video frame, or only the convex hull area of the first frame may be calculated, and then the convex hull area of the first frame is used as the convex hull area of the subsequent video frame. This has the advantage that the computational effort can be reduced considerably.
In this embodiment, the linear processing on the first convex hull area and the second convex hull area may be performed by directly dividing the first convex hull area and the second convex hull area; or firstly, the first convex hull area and the second convex hull area are subjected to mathematical calculation, and then the first convex hull area and the second convex hull area after the mathematical calculation are divided.
Optionally, the first convex hull area and the second convex hull area are linearly processed, and the manner of obtaining the adaptation information may be: performing root of square calculation on the first convex hull area and the second convex hull area respectively; and dividing the first convex hull area and the second convex hull area calculated by the root of the square root to obtain the adaptation information of the Nth video frame.
The root calculation may be 2 times or 3 times, and preferably, the root calculation is performed 2 times on the first convex hull area and the second convex hull area, respectively.
Optionally, the first attribute feature information and the second attribute feature information are linearly processed, and the manner of obtaining the target attribute feature information may be: performing linear fusion on the second attribute information of the Nth video frame and the second attribute information of the first video frame to obtain second intermediate attribute feature information; and linearly fusing the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information.
And the first attribute characteristic information and the second attribute characteristic information are both represented by a matrix. Then, the process of linearly fusing the second attribute information of the nth video frame and the second attribute information of the first video frame to obtain the second intermediate attribute feature information may be: and performing inverse transformation on the matrix corresponding to the second attribute information of the Nth video frame, and multiplying the matrix by the matrix corresponding to the second attribute information of the first video frame to obtain second intermediate attribute characteristic information. The process of linearly fusing the second intermediate attribute information and the first attribute feature information to obtain the target attribute feature information may be: and multiplying the matrix corresponding to the second intermediate attribute characteristic information by the matrix corresponding to the first attribute characteristic information to obtain the target attribute characteristic information.
Specifically, the proof corresponding to the second attribute feature information of the nth video frame is inversely transformed, the inversely transformed proof is multiplied by the matrix corresponding to the second attribute information of the first video frame, and finally the multiplied proof is multiplied by the matrix corresponding to the first attribute feature information of the original image to obtain the target attribute feature information.
Illustratively, fig. 2 is a schematic diagram of the present embodiment for determining optical-flow transform information. As shown in fig. 2, the first convex hull area is obtained by calculating the convex hull area according to the key point information of the original image, the root of the square root of the calculated convex hull area is obtained, then the convex hull area is calculated according to the key point information of the current frame or the key point information of the first frame, the second convex hull area is obtained, the root of the square root of the second convex hull area is obtained, and finally the first convex hull area after the root of the square root is multiplied by the second convex hull area after the root of the square root, so as to obtain the adaptation information. And multiplying the attribute characteristic information of the first frame by the inverse matrix of the attribute characteristic information of the current frame, and then multiplying by the attribute characteristic information of the original image to obtain target attribute characteristic information. And obtaining optical flow change information according to the adaptation information and the target attribute feature information.
And step 130, carrying out transformation processing on the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images.
Specifically, the original image is subjected to transformation processing according to the first feature information and the plurality of optical flow transformation information, and the plurality of target images are obtained by: the original image, the first feature information, and the plurality of optical flow transform information are input to a setting decoder, and a plurality of target images are obtained.
Wherein the configuration decoder includes a plurality of convolutional layers. For each video frame, inputting an original image, first key point information, first attribute feature information and optical flow transformation information corresponding to the video frame into a setting decoder to obtain a target image corresponding to the video frame. Thereby transferring the expression of the character in the video frame to the character in the original image.
And step 140, splicing the multiple target images to obtain a target video.
Specifically, after a plurality of target images are obtained, the target images are subjected to splicing coding to obtain a target video.
According to the technical scheme of the embodiment of the disclosure, first characteristic information of an original image and second characteristic information of each video frame in an original driving video are extracted; wherein, the original image and the original driving video both comprise character images; acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information; transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images; and splicing the plurality of target images to obtain a target video. According to the video generation method provided by the embodiment of the disclosure, the original image is transformed based on the first characteristic information and the plurality of optical flow transformation information corresponding to the original driving video, so that the expression of a character in the original driving video is transferred to the character in the original image, the generation efficiency of the expression driving video can be improved, and the interestingness of the generated video is also improved.
Fig. 3 is a schematic structural diagram of a video generation apparatus according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus includes:
the feature information extraction module 210 is configured to extract first feature information of an original image and second feature information of each video frame in an original driving video; wherein, the original image and the original driving video both comprise character images;
an optical-flow transformation information acquisition module 220 configured to acquire a plurality of optical-flow transformation information from the first feature information and each of the second feature information;
a target image obtaining module 230, configured to perform transformation processing on the original image according to the first feature information and the plurality of optical flow transformation information to obtain a plurality of target images;
and the target video obtaining module 240 is configured to splice the multiple target images to obtain a target video.
Optionally, the first feature information includes first key point information and first attribute feature information; the second characteristic information comprises second key point information and second attribute characteristic information; the optical-flow transformation information obtaining module 220 is further configured to:
determining the area of a first convex hull according to the first key point information;
determining the area of a second convex hull according to the second key point information;
for the Nth video frame, performing linear processing on the first convex hull area and the second convex hull area to obtain adaptation information; wherein N is a positive integer greater than or equal to 1;
performing linear processing on the first attribute characteristic information and the second attribute characteristic information to obtain target attribute characteristic information;
and obtaining optical flow transformation information corresponding to the Nth video frame according to the adaptation information and the target attribute characteristic information.
Optionally, the optical-flow transformation information obtaining module 220 is further configured to:
performing root of square calculation on the first convex hull area and the second convex hull area respectively;
and dividing the first convex hull area and the second convex hull area calculated by the root of the square root to obtain the adaptation information of the Nth video frame.
Optionally, the optical-flow transformation information obtaining module 220 is further configured to:
performing linear fusion on the second attribute information of the Nth video frame and the second attribute information of the first video frame to obtain second intermediate attribute feature information;
and linearly fusing the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information.
Optionally, the first attribute feature information and the second attribute feature information are both represented by a matrix; the optical-flow transformation information obtaining module 220 is further configured to:
performing inverse transformation on a matrix corresponding to the second attribute information of the Nth video frame and multiplying the matrix by a matrix corresponding to the second attribute information of the first video frame to obtain second intermediate attribute characteristic information;
performing linear fusion on the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information, wherein the method comprises the following steps:
and multiplying the matrix corresponding to the second intermediate attribute characteristic information by the matrix corresponding to the first attribute characteristic information to obtain the target attribute characteristic information.
Optionally, the target image acquiring module 230 is further configured to:
inputting an original image, first characteristic information and a plurality of optical flow transformation information into a setting decoder to obtain a plurality of target images; wherein the configuration decoder includes a plurality of convolutional layers.
Optionally, the method further includes: a video frame extraction module to:
and extracting video frames from the original driving video according to the set sampling frequency to obtain a plurality of video frames.
The device can execute the methods provided by all the embodiments of the disclosure, and has corresponding functional modules and beneficial effects for executing the methods. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the disclosure.
Referring now to FIG. 4, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like, or various forms of servers such as a stand-alone server or a server cluster. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 300 may include a processing means (e.g., central processing unit, graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a read-only memory device (ROM)302 or a program loaded from a storage device 305 into a random access memory device (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program containing program code for performing a method for recommending words. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 305, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image; acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information; transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images; and splicing the plurality of target images to obtain a target video.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the disclosed embodiments, the disclosed embodiments disclose a video generation method, including:
extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image;
acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information;
transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images;
and splicing the plurality of target images to obtain a target video.
Further, the first feature information includes first key point information and first attribute feature information; the second characteristic information comprises second key point information and second attribute characteristic information; acquiring a plurality of optical flow transform information from the first feature information and each of the second feature information, including:
determining the area of a first convex hull according to the first key point information;
determining a second convex hull area according to the second key point information;
for the Nth video frame, performing linear processing on the first convex hull area and the second convex hull area to obtain adaptation information; wherein N is a positive integer greater than or equal to 1;
performing linear processing on the first attribute feature information and the second attribute feature information to obtain target attribute feature information;
and obtaining optical flow transformation information corresponding to the Nth video frame according to the adaptation information and the target attribute feature information.
Further, performing linear processing on the first convex hull area and the second convex hull area to obtain adaptation information, including:
performing root of square calculation on the first convex hull area and the second convex hull area respectively;
and dividing the first convex hull area and the second convex hull area calculated by the root of the square to obtain the adaptation information of the Nth video frame.
Further, performing linear processing on the first attribute feature information and the second attribute feature information to obtain target attribute feature information, including:
performing linear fusion on the second attribute information of the Nth video frame and the second attribute information of the first video frame to obtain second intermediate attribute feature information;
and linearly fusing the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information.
Further, the first attribute feature information and the second attribute feature information are both characterized by a matrix; the second attribute information of the Nth video frame and the second attribute information of the first video frame are linearly fused to obtain second intermediate attribute feature information, and the method comprises the following steps:
performing inverse transformation on a matrix corresponding to the second attribute information of the Nth video frame and multiplying the matrix by a matrix corresponding to the second attribute information of the first video frame to obtain second intermediate attribute characteristic information;
performing linear fusion on the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information, including:
and multiplying the matrix corresponding to the second intermediate attribute characteristic information by the matrix corresponding to the first attribute characteristic information to obtain target attribute characteristic information.
Further, transforming the original image according to the first feature information and the plurality of optical flow transformation information to obtain a plurality of target images, including:
inputting the original image, the first feature information and the plurality of optical flow transformation information into a setting decoder to obtain a plurality of target images; wherein the set decoder includes a plurality of convolutional layers.
Further, before extracting the first feature information of the original image and the second feature information of each video frame in the original driving video, the method further comprises:
and extracting video frames from the original driving video according to a set sampling frequency to obtain a plurality of video frames.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present disclosure and the technical principles employed. Those skilled in the art will appreciate that the present disclosure is not limited to the particular embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the present disclosure. Therefore, although the present disclosure has been described in greater detail with reference to the above embodiments, the present disclosure is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present disclosure, the scope of which is determined by the scope of the appended claims.
Claims (10)
1. A method of video generation, comprising:
extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image;
acquiring a plurality of optical flow transformation information according to the first characteristic information and each second characteristic information;
transforming the original image according to the first characteristic information and the plurality of optical flow transformation information to obtain a plurality of target images;
and splicing the plurality of target images to obtain a target video.
2. The method according to claim 1, wherein the first feature information includes first keypoint information and first attribute feature information; the second characteristic information comprises second key point information and second attribute characteristic information; acquiring a plurality of optical flow transform information from the first feature information and each of the second feature information, including:
determining the area of a first convex hull according to the first key point information;
determining a second convex hull area according to the second key point information;
for the Nth video frame, performing linear processing on the first convex hull area and the second convex hull area to obtain adaptation information; wherein N is a positive integer greater than or equal to 1;
performing linear processing on the first attribute feature information and the second attribute feature information to obtain target attribute feature information;
and obtaining optical flow transformation information corresponding to the Nth video frame according to the adaptation information and the target attribute feature information.
3. The method of claim 2, wherein performing linear processing on the first convex hull area and the second convex hull area to obtain the adaptation information comprises:
performing root of square calculation on the first convex hull area and the second convex hull area respectively;
and dividing the first convex hull area and the second convex hull area calculated by the root of the square to obtain the adaptation information of the Nth video frame.
4. The method according to claim 2, wherein performing linear processing on the first attribute feature information and the second attribute feature information to obtain target attribute feature information comprises:
performing linear fusion on the second attribute information of the Nth video frame and the second attribute information of the first video frame to obtain second intermediate attribute feature information;
and linearly fusing the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information.
5. The method of claim 4, wherein the first attribute feature information and the second attribute feature information are each characterized by a matrix; the second attribute information of the Nth video frame and the second attribute information of the first video frame are linearly fused to obtain second intermediate attribute feature information, and the method comprises the following steps:
performing inverse transformation on a matrix corresponding to the second attribute information of the Nth video frame and multiplying the matrix by a matrix corresponding to the second attribute information of the first video frame to obtain second intermediate attribute characteristic information;
performing linear fusion on the second intermediate attribute information and the first attribute feature information to obtain target attribute feature information, including:
and multiplying the matrix corresponding to the second intermediate attribute characteristic information by the matrix corresponding to the first attribute characteristic information to obtain target attribute characteristic information.
6. The method according to claim 1, wherein transforming the original image according to the first feature information and the plurality of optical flow transformation information to obtain a plurality of target images comprises:
inputting the original image, the first feature information and the plurality of optical flow transformation information into a setting decoder to obtain a plurality of target images; wherein the set decoder includes a plurality of convolutional layers.
7. The method according to claim 1, further comprising, before extracting the first feature information of the original image and the second feature information of each video frame in the original driving video:
and extracting video frames from the original driving video according to a set sampling frequency to obtain a plurality of video frames.
8. A video generation apparatus, comprising:
the characteristic information extraction module is used for extracting first characteristic information of an original image and second characteristic information of each video frame in an original driving video; wherein the original image and the original driving video both comprise a character image;
an optical flow transformation information acquisition module configured to acquire a plurality of optical flow transformation information based on the first feature information and each of the second feature information;
a target image obtaining module, configured to perform transformation processing on the original image according to the first feature information and the plurality of optical flow transformation information to obtain a plurality of target images;
and the target video acquisition module is used for splicing the plurality of target images to obtain a target video.
9. An electronic device, characterized in that the electronic device comprises:
one or more processing devices;
storage means for storing one or more programs;
when executed by the one or more processing devices, cause the one or more processing devices to implement the video generation method of any of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the video generation method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111566280.9A CN114283060A (en) | 2021-12-20 | 2021-12-20 | Video generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111566280.9A CN114283060A (en) | 2021-12-20 | 2021-12-20 | Video generation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114283060A true CN114283060A (en) | 2022-04-05 |
Family
ID=80873285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111566280.9A Pending CN114283060A (en) | 2021-12-20 | 2021-12-20 | Video generation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114283060A (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102157007A (en) * | 2011-04-11 | 2011-08-17 | 北京中星微电子有限公司 | Performance-driven method and device for producing face animation |
CN108416266A (en) * | 2018-01-30 | 2018-08-17 | 同济大学 | A kind of video behavior method for quickly identifying extracting moving target using light stream |
US20190050996A1 (en) * | 2017-08-04 | 2019-02-14 | Intel Corporation | Methods and apparatus to generate temporal representations for action recognition systems |
US10445921B1 (en) * | 2018-06-13 | 2019-10-15 | Adobe Inc. | Transferring motion between consecutive frames to a digital image |
CN111105382A (en) * | 2019-12-31 | 2020-05-05 | 北京大学 | Video repair method |
CN111368137A (en) * | 2020-02-12 | 2020-07-03 | 百度在线网络技术(北京)有限公司 | Video generation method and device, electronic equipment and readable storage medium |
US20200226416A1 (en) * | 2017-05-30 | 2020-07-16 | Google Llc | Systems and Methods of Person Recognition in Video Streams |
CN111476871A (en) * | 2020-04-02 | 2020-07-31 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating video |
US20200265239A1 (en) * | 2019-02-14 | 2020-08-20 | Alibaba Group Holding Limited | Method and apparatus for processing video stream |
CN111726621A (en) * | 2020-04-24 | 2020-09-29 | 中国科学院微电子研究所 | Video conversion method and device |
US20210097658A1 (en) * | 2018-03-30 | 2021-04-01 | Ordos Yuansheng Optoelectronics Co., Ltd. | Image processing method and apparatus, display device, and computer readable storage medium |
WO2021082941A1 (en) * | 2019-10-28 | 2021-05-06 | Oppo广东移动通信有限公司 | Video figure recognition method and apparatus, and storage medium and electronic device |
CN113313085A (en) * | 2021-07-28 | 2021-08-27 | 北京奇艺世纪科技有限公司 | Image processing method and device, electronic equipment and storage medium |
-
2021
- 2021-12-20 CN CN202111566280.9A patent/CN114283060A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102157007A (en) * | 2011-04-11 | 2011-08-17 | 北京中星微电子有限公司 | Performance-driven method and device for producing face animation |
US20200226416A1 (en) * | 2017-05-30 | 2020-07-16 | Google Llc | Systems and Methods of Person Recognition in Video Streams |
US20190050996A1 (en) * | 2017-08-04 | 2019-02-14 | Intel Corporation | Methods and apparatus to generate temporal representations for action recognition systems |
CN108416266A (en) * | 2018-01-30 | 2018-08-17 | 同济大学 | A kind of video behavior method for quickly identifying extracting moving target using light stream |
US20210097658A1 (en) * | 2018-03-30 | 2021-04-01 | Ordos Yuansheng Optoelectronics Co., Ltd. | Image processing method and apparatus, display device, and computer readable storage medium |
US10445921B1 (en) * | 2018-06-13 | 2019-10-15 | Adobe Inc. | Transferring motion between consecutive frames to a digital image |
US20200265239A1 (en) * | 2019-02-14 | 2020-08-20 | Alibaba Group Holding Limited | Method and apparatus for processing video stream |
WO2021082941A1 (en) * | 2019-10-28 | 2021-05-06 | Oppo广东移动通信有限公司 | Video figure recognition method and apparatus, and storage medium and electronic device |
CN111105382A (en) * | 2019-12-31 | 2020-05-05 | 北京大学 | Video repair method |
CN111368137A (en) * | 2020-02-12 | 2020-07-03 | 百度在线网络技术(北京)有限公司 | Video generation method and device, electronic equipment and readable storage medium |
CN111476871A (en) * | 2020-04-02 | 2020-07-31 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating video |
CN111726621A (en) * | 2020-04-24 | 2020-09-29 | 中国科学院微电子研究所 | Video conversion method and device |
CN113313085A (en) * | 2021-07-28 | 2021-08-27 | 北京奇艺世纪科技有限公司 | Image processing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111369427B (en) | Image processing method, image processing device, readable medium and electronic equipment | |
CN111368685A (en) | Key point identification method and device, readable medium and electronic equipment | |
CN110413812B (en) | Neural network model training method and device, electronic equipment and storage medium | |
CN110298851B (en) | Training method and device for human body segmentation neural network | |
CN112418249A (en) | Mask image generation method and device, electronic equipment and computer readable medium | |
CN114937192A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN114004905B (en) | Method, device, equipment and storage medium for generating character style pictogram | |
CN114863214A (en) | Image generation model training method, image generation device, image generation medium, and image generation device | |
CN114170342A (en) | Image processing method, device, equipment and storage medium | |
CN112714263B (en) | Video generation method, device, equipment and storage medium | |
CN112785669B (en) | Virtual image synthesis method, device, equipment and storage medium | |
CN111898338A (en) | Text generation method and device and electronic equipment | |
CN116596748A (en) | Image stylization processing method, apparatus, device, storage medium, and program product | |
CN114066722B (en) | Method and device for acquiring image and electronic equipment | |
CN115757933A (en) | Recommendation information generation method, device, equipment, medium and program product | |
CN114187177A (en) | Method, device and equipment for generating special effect video and storage medium | |
CN112070888B (en) | Image generation method, device, equipment and computer readable medium | |
CN114283060A (en) | Video generation method, device, equipment and storage medium | |
CN114418835A (en) | Image processing method, apparatus, device and medium | |
CN114399814A (en) | Deep learning-based obstruction removal and three-dimensional reconstruction method | |
CN113902838A (en) | Animation generation method, animation generation device, storage medium and electronic equipment | |
CN114422698A (en) | Video generation method, device, equipment and storage medium | |
CN112418233A (en) | Image processing method, image processing device, readable medium and electronic equipment | |
CN110717467A (en) | Head pose estimation method, device, equipment and storage medium | |
CN114049417B (en) | Virtual character image generation method and device, readable medium and electronic equipment |
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 |