Video generation method and device, computer equipment and storage medium

By acquiring the target image and generating multiple stylized images based on its stylized description information, the problem of cumbersome and slow speed of generating stylized videos in the prior art is solved, and the effect of quickly generating multiple stylized videos is achieved.

CN119421009APending Publication Date: 2025-02-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310927044.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When generating stylized videos, the prior art requires first editing the videos and then performing stylization processing separately, which leads to cumbersome operation steps and slow generation speed, making it difficult to quickly generate videos containing multiple styles.

Method used

By acquiring the target image and determining its corresponding multiple stylized description information, the images are processed based on these description information and the stylized model, multiple stylized images are generated, and then the images are combined into stylized videos.

Benefits of technology

After obtaining the target image and stylized description information, it is possible to automatically generate stylized videos containing multiple styles, which simplifies operation steps and improves generation speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119421009A_ABST
    Figure CN119421009A_ABST
Patent Text Reader

Abstract

The invention provides a video generation method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a target image, and determining various stylized description information corresponding to the target image; based on the stylized description information and a corresponding stylized model, processing the target image to obtain a plurality of stylized images under the stylized description information; and generating a stylized video corresponding to the target image based on the stylized image. Through the method, quick generation of the stylized video can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a video generation method, apparatus, computer equipment and storage medium. Background Art

[0002] At present, when generating stylized videos, it is generally necessary to shoot a video first, and then stylize the video. For example, the shot video can be stylized by a pre-trained neural network. However, the video generated in this way only contains a single style. If you want to generate a video with multiple styles, you need to edit the video first, and then stylize each edited video based on different neural networks, and then splice the stylized videos. This method is more cumbersome and the speed of generating videos is slow. Summary of the invention

[0003] The embodiments of the present disclosure at least provide a video generation method, apparatus, computer equipment, and storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a video generation method, including:

[0005] Acquire a target image, and determine a plurality of stylized description information corresponding to the target image;

[0006] Based on the stylized description information and the corresponding stylized model, the target image is processed to obtain a plurality of stylized images under the stylized description information;

[0007] Based on the stylized image, a stylized video corresponding to the target image is generated.

[0008] In a second aspect, the present disclosure also provides a video generation device, including:

[0009] An acquisition module, used to acquire a target image and determine a plurality of stylized description information corresponding to the target image;

[0010] A processing module, configured to process the target image based on the stylized description information and a corresponding stylized model to obtain a plurality of stylized images under the stylized description information;

[0011] A generating module is used to generate a stylized video corresponding to the target image based on the stylized image.

[0012] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0013] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.

[0014] In the video generation method, apparatus, computer device and storage medium provided by the embodiments of the present disclosure, after obtaining the target image, multiple stylized images can be directly generated according to the multiple stylized description information corresponding to the target image, and then a stylized video corresponding to the target image can be generated based on the multiple stylized images. In this way, after only determining the target image and the stylized description information, a stylized video containing multiple styles can be automatically generated, the operation steps are simple, and the generation speed is fast.

[0015] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0017] Figure 1 A flow chart of a video generation method provided by an embodiment of the present disclosure is shown;

[0018] Figure 2 A flowchart of another video generation method provided by an embodiment of the present disclosure is shown;

[0019] Figure 3 A schematic diagram of a video generating device provided by an embodiment of the present disclosure is shown;

[0020] Figure 4A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0023] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0024] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] To facilitate understanding of the present embodiment, a video generation method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the video generation method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the video generation method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0029] See also Figure 1 FIG. 1 is a flowchart of a video generation method provided by an embodiment of the present disclosure, wherein the method includes steps 101 to 103, wherein:

[0030] Step 101: Acquire a target image and determine a plurality of stylized description information corresponding to the target image.

[0031] Step 102: Based on the stylized description information and the corresponding stylized model, the target image is processed to obtain a plurality of stylized images under the stylized description information.

[0032] Step 103: Generate a stylized video corresponding to the target image based on the stylized image.

[0033] The following is a detailed description of the above steps.

[0034] For step 101,

[0035] The target image may be an image to be stylized, and the acquired target image may be an image captured by a user, or an image locally uploaded by a user, etc. The present disclosure does not limit the method of acquiring the target image.

[0036] The stylized description information is description information of the style into which the target image needs to be processed. For example, the stylized description information may include cartoon style, stick figure style, oil painting style, etc.

[0037] In a possible implementation manner, the stylized description information corresponding to each image may be preset, and the stylized description information corresponding to each image is the same.

[0038] Exemplarily, fixed N types of stylized description information may be preset, and no matter what target image is received, the received target image may be processed according to the preset N types of stylized description information.

[0039] In another possible implementation, different users may have different stylization requirements, so the user can set stylized description information, and when determining multiple stylized description information corresponding to the target image, the multiple stylized description information corresponding to the target image input by the user can be received.

[0040] Optionally, the user may input the multiple types of stylized description information simultaneously when uploading the target image, or may upload the stylized description information after uploading the target image.

[0041] However, since users may have different levels of understanding of various styles, if we rely entirely on users to input stylized description information, the final generated stylized video may not necessarily meet the user's needs. Therefore, we can also combine image features to match the most appropriate stylized description information for the target image.

[0042] Specifically, when determining the multiple types of stylized description information corresponding to the target image, the image features of the target image may be extracted first, and then the multiple types of stylized description information matching the target image features may be determined.

[0043] Here, the image features of the target image are extracted, for example, by extracting the image features of the target image through a feature extraction network. When determining a plurality of stylized description information matching the image features, for example, semantic features of each preset stylized description information can be extracted, and then the feature similarity between the image features of the target image and the semantic features of each preset stylized description information is calculated, and then the stylized description information whose feature similarity meets the preset conditions is used as the stylized description information corresponding to the target image.

[0044] The similarity satisfies a preset condition, which may refer to, for example, that the similarity exceeds a preset similarity threshold, or that the similarities are ranked in the top K positions after being sorted in descending order, where K is a preset positive integer.

[0045] For step 102,

[0046] In a possible implementation, each stylized model may only perform one stylization process. In this implementation, the stylized description information corresponds one-to-one to the stylized model, and the number of the stylized description information is the same as the number of the stylized models that need to be called.

[0047] In another possible implementation, each stylized model can perform at least one stylized processing, and some stylized models can perform multiple stylized processing. In this implementation, the amount of stylized description information is greater than or equal to the amount of stylized models that need to be called.

[0048] In the case where the stylized model can perform multiple stylized processing, the same stylized processing can be performed by multiple stylized models. For example, if the stylized description information is comic style, stylized model A can perform comic style processing, and stylized model B can also perform comic style processing.

[0049] In this case, when determining the stylized model corresponding to the stylized description information, for any stylized description information, if there are multiple models that perform stylized processing corresponding to the stylized description information, one of the models can be selected as the stylized model corresponding to the stylized description information based on the principle of load balancing.

[0050] In a possible implementation, when the target image is processed by a stylized model corresponding to the stylized description information, for any type of stylized description information, N groups of stylized parameters under the stylized description information can be determined; wherein N is a preset positive integer; and then for any group of stylized parameters, the target image can be processed according to the group of stylized parameters by a stylized model corresponding to the stylized description information to obtain a stylized image under the stylized description information.

[0051] The above execution steps can be understood as a loop execution process, that is, loop execution of steps for processing the target image, the stylization parameters applied in each loop process are different, and each loop process can process the target image based on a set of stylization parameters and a stylization model.

[0052] The stylization parameters include stylization degree information and / or noise information; wherein the noise information is used to increase the difference between the multiple stylized images under the same stylization description information.

[0053] The stylization degree information is used to indicate the intensity of stylization processing. For example, the stylization degree information of complete stylization is 100%, and the stylization degree information of no stylization processing is 0.

[0054] The noise information may exemplarily be noise used to adjust hue, brightness, saturation, contrast, etc. for processing the target image, or may be Gaussian noise added to the intermediate processed feature image when the stylized model processes the target image.

[0055] For example, taking N as 10, if the stylized description information includes style A and style B, then for style A, the target image can be processed by the stylized model corresponding to style A according to the various groups of stylized parameters under style A to obtain 10 stylized images under style A; for style B, the target image can also be processed by the stylized model corresponding to style B according to the various groups of stylized parameters under style B to obtain 10 stylized images under style B.

[0056] When generating a stylized image, the target image, the stylized parameters, and the stylized description information (here the stylized description information may be used as prompt information) may be input into a stylized model, and the stylized model may output a corresponding stylized image.

[0057] Here, it should be noted that if there are multiple stylized models corresponding to the multiple stylized description information, the process of stylizing the target image by the multiple stylized models can be executed in parallel, so that the stylized image corresponding to the target image can be quickly generated, thereby improving the generation speed of the stylized video.

[0058] For step 103,

[0059] In a possible implementation, when generating a stylized video corresponding to the target image based on the stylized image, multiple stylized images under multiple types of stylized description information may be randomly arranged to generate a stylized video corresponding to the target image.

[0060] For example, if there are a types of stylized description information and b stylized images under each type of stylized description information, there are a*b stylized images in total. When generating a stylized video, the a*b stylized images can be directly randomly arranged to obtain the stylized video corresponding to the target image.

[0061] In another possible implementation, since the differences between stylized images under the same stylized description information are relatively small, if the stylized images under the same stylized description information are arranged together, an animation display effect can be formed. Therefore, when generating a stylized video corresponding to the target image based on the stylized image, a first order between the multiple stylized description information can be first determined; and a second order of the multiple stylized images under each stylized description information can be determined; and then the multiple stylized images under each stylized description information are arranged according to the first order and the second order to obtain the stylized video corresponding to the target image.

[0062] For example, if there are three types of stylized description information, a, b, and c, and there are 10 stylized images under each type of stylized description information, then the first order of the three types of stylized description information can be determined first, for example, a→c→b, and then the second order of the stylized images under each type of stylized description information can be determined, that is, order 1 for stylized images a1 to a10, order 2 for stylized images b1 to b10, and order 3 for stylized images c1 to c10, and then the stylized images a1 to a10 are arranged first according to order 1, then the stylized images c1 to c10 are arranged according to order 3, and then the stylized images b1 to b10 are arranged according to order 2.

[0063] Optionally, since the number of the generated stylized images may be small, in order to improve the frame rate of the stylized video, frame interpolation may be performed based on the generated stylized images.

[0064] Specifically, for any stylized description information, frame interpolation processing can be performed based on multiple stylized images under the stylized description information to determine multiple interpolated frame images, and then a stylized video corresponding to the target image is generated based on the multiple stylized images and the interpolated frame images.

[0065] When performing interpolation based on multiple stylized images, a pixel weighting method can be used as an example. If interpolation is performed between stylized image 1 and stylized image 2, the pixel values ​​at each pixel position of stylized image 1 and stylized image 2 can be weighted and summed (the weight can be related to the stylized description information, or can be related to the image distance between the interpolated frame image to be interpolated and each stylized image), and then the weighted summation result is used as the value of the interpolated frame image between stylized image 1 and stylized image 2 at the corresponding pixel position.

[0066] For any two stylized images, Image 1 and Image 2, if it is necessary to interpolate multiple video frames between the two stylized images, the pixel weighting method can be used to interpolate between the two stylized images to obtain interpolated frame image 1, and then interpolate based on interpolated frame image 1 and Image 1, and interpolate based on array image 1 and Image 2... and so on, until the preset number of interpolated frames is reached.

[0067] Here, it should be noted that when performing the frame interpolation process, the stylized images may be sorted according to the second order and then the frame interpolation process may be performed between any two stylized images.

[0068] In another possible implementation, after determining a first order between the multiple types of stylized description information; and determining a second order of the multiple stylized images under each type of stylized description information, the multiple stylized images under each type of stylized description information are first arranged according to the first order and the second order to obtain an initial stylized video, and then frame interpolation is performed on any two video frames in the initial stylized video to finally obtain a stylized video corresponding to the target image.

[0069] When performing frame interpolation processing, the target frame number of the stylized video can be determined first, and then based on the target frame number of the stylized video and the number of stylized images, the number of interpolation images of the frames to be interpolated can be determined, and then the frame interpolation processing can be performed according to the number of interpolation images of the frames to be interpolated.

[0070] The target frame number of the stylized video may be preset, or the target frame number of the stylized video may be determined according to device parameters.

[0071] In a possible scenario, the step of generating a stylized image may be performed by a server. After generating the stylized image, the server may send the stylized image to a user terminal, and the user terminal may generate a stylized video offline according to the stylized image.

[0072] Therefore, in this scenario, due to the different performance of devices on different user ends, if stylized videos are generated according to a unified frame rate standard, the performance of some devices may be insufficient, causing some devices to take too long to process the frames, resulting in a slow speed in generating stylized videos.

[0073] Therefore, for different user terminals, different target frame numbers may be set in combination with different device performance parameters. The device performance parameters may include, for example, the utilization rate of a central processing unit.

[0074] Alternatively, in another possible implementation, different stylized description information may have different frame number requirements, and therefore, the target frame number of the stylized video may be determined according to the stylized description information.

[0075] Specifically, videos of different styles may require stylized images with different frame rates to represent them. For example, for a comic style, more frame rates of stylized images may be required to generate a stylized video, so that the generated stylized video can be more vivid; while for a stick drawing style, fewer frame rates of stylized images may be required to generate a stylized video, so that the generated stylized video can be more concise.

[0076] When determining the target frame number of the stylized video, the target frame number of the stylized video may be determined according to the preset frame numbers corresponding to various stylized description information and the various stylized description information obtained in step 101 .

[0077] Correspondingly, when performing frame interpolation processing, the number of interpolation frames required for each stylized description information can be determined based on the preset number of frames corresponding to each stylized description information and the number of stylized images under each stylized description information, and then the frame interpolation processing can be performed according to the number of interpolation frames.

[0078] The above frame interpolation processing is not limited to the frame interpolation processing between stylized images under the same stylized description information, but may also include the frame interpolation processing between stylized images under different stylized description information. The above frame interpolation processing method is only for illustrative purposes, and the present disclosure is also applicable to other frame interpolation processing methods, which are not limited here.

[0079] By performing frame interpolation processing, the frame number of the stylized video can be increased, the smoothness of the stylized video can be ensured, and the display effect of the stylized video can be improved.

[0080] In an optional scenario, the above method can also be used to generate a stylized video based on a video. Figure 2 As shown, another video generation method provided by the embodiment of the present disclosure includes the following steps:

[0081] Step 201: Obtain the video to be processed.

[0082] Step 202: extract frames from the video to be processed to obtain multiple target images.

[0083] Step 203: for any target image, based on the video generation method described in the above embodiment, generate multiple stylized images under multiple stylized description information corresponding to the target image.

[0084] Step 204: Generate a stylized video corresponding to the video to be processed based on multiple stylized images under multiple stylized description information corresponding to each target image.

[0085] Optionally, when generating a stylized video corresponding to the video to be processed based on multiple stylized images under multiple stylized description information corresponding to each target image, the third order of each target image in the video to be processed can be determined first, and then based on the stylized videos corresponding to each target image and the third order, the stylized video corresponding to the video to be processed is generated.

[0086] Specifically, a stylized video corresponding to each target image can be generated based on multiple stylized images under multiple stylized description information corresponding to each target image (for specific steps, refer to Figure 1 Description of the embodiment); then based on the third order of each target image in the image to be processed, the stylized videos corresponding to each target image are spliced ​​to obtain the stylized video corresponding to the video to be processed.

[0087] In a specific implementation, in order to improve processing efficiency, the same stylization parameters may be used for t adjacent target images when generating stylized images.

[0088] Here, since the target image is obtained by extracting frames from the video to be processed, the video frames that are not extracted from the video to be processed are not processed in the present disclosure, and the stylized video finally generated does not include the video frames that are not extracted.

[0089] Therefore, in order to avoid excessive differences between the stylized video and the video to be processed, a higher frame extraction number can be set when extracting the target image from the video to be processed; or, frame extraction can be performed based on the similarity between video frames in the video to be processed. For video clips with higher video frame similarity, a lower frame extraction number can be set, and for video clips with lower video frame similarity, a higher frame extraction number can be set.

[0090] Through this method, the video frames in the video to be processed can be quickly stylized, and the generated stylized video corresponding to the video to be processed contains multiple styles, thereby improving the diversity of the stylized video.

[0091] In the video generation method provided by the embodiment of the present disclosure, after obtaining the target image, multiple stylized images can be directly generated according to the multiple stylized description information corresponding to the target image, and then a stylized video corresponding to the target image can be generated based on the multiple stylized images. In this way, after only determining any target image and stylized description information, a stylized video containing multiple styles can be automatically generated, the operation steps are simple, and the generation speed is fast.

[0092] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0093] Based on the same inventive concept, a video generating device corresponding to the video generating method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned video generating method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0094] Reference Figure 3 , which is a schematic diagram of the architecture of a video generation device provided by an embodiment of the present disclosure, the device comprises: an acquisition module 301, a processing module 302, and a generation module 303; wherein,

[0095] An acquisition module 301 is used to acquire a target image and determine a plurality of stylized description information corresponding to the target image;

[0096] A processing module 302 is used to process the target image based on the stylized description information and the corresponding stylized model to obtain a plurality of stylized images under the stylized description information;

[0097] The generating module 303 is configured to generate a stylized video corresponding to the target image based on the stylized image.

[0098] In a possible implementation, the acquisition module 301, when determining the multiple types of stylized description information corresponding to the target image, is used to:

[0099] receiving a plurality of stylized description information corresponding to the target image input by a user; or,

[0100] The image features of the target image are extracted, and a plurality of stylized description information matching the image features is determined.

[0101] In a possible implementation, for any stylized description information, the processing module 302, when processing the target image based on the stylized description information and the corresponding stylized model to obtain multiple stylized images under the stylized description information, is configured to:

[0102] Determine the corresponding stylized model based on the stylized description information;

[0103] For a certain stylized description information, determine N groups of stylized parameters, where N is a preset positive integer;

[0104] Based on the stylization parameters, the target image is processed by the corresponding stylization model to obtain a stylized image corresponding to the stylization parameters under the certain stylization description information;

[0105] The above steps of processing the target image are executed repeatedly to obtain multiple stylized images under the stylized description information.

[0106] In a possible implementation, when generating a stylized video corresponding to the target image based on the stylized image, the generating module 303 is configured to:

[0107] Determining a first order among the plurality of stylized description information; and determining a second order among the plurality of stylized images under each stylized description information;

[0108] Arrange the multiple stylized images under each stylized description information according to the first order and the second order to obtain a stylized video corresponding to the target image.

[0109] In a possible implementation, when generating a stylized video corresponding to the target image based on the stylized image, the generating module 303 is configured to:

[0110] For any stylized description information, performing frame interpolation processing based on multiple stylized images under the stylized description information to determine multiple interpolated frame images;

[0111] Based on the multiple stylized images and the interpolated frame images, a stylized video corresponding to the target image is generated.

[0112] In a possible implementation manner, the acquisition module 301, when acquiring the target image, is used to:

[0113] Acquire a video to be processed, and extract frames from the video to be processed to obtain the target image;

[0114] The generating module 303 is further used for:

[0115] Determining a third order of each target image in the video to be processed;

[0116] Based on the stylized videos corresponding to the target images and the third order, a stylized video corresponding to the video to be processed is generated.

[0117] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0118] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 4 , which is a schematic diagram of the structure of a computer device 400 provided in an embodiment of the present disclosure. The computer device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., or various forms of servers, such as independent servers or server clusters. Figure 4 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0119] like Figure 4 As shown, the computer device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only storage device (ROM) 402 or a program loaded from a storage device 405 to a random access storage device (RAM) 403. Various programs and data required for the operation of the computer device 400 are also stored in the RAM 403. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0120] Typically, the following devices may be connected to the I / O interface 405: input devices 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 408 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 409. The communication devices 409 may allow the computer device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The computer device 400 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0121] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing a method for recommending words. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0122] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the video generation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0123] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the video generation method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0124] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0125] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0128] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0129] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A video generation method, characterized in that: include: Acquire a target image, and determine a plurality of stylized description information corresponding to the target image; Based on the stylized description information and the corresponding stylized model, the target image is processed to obtain a plurality of stylized images under the stylized description information; Based on the stylized image, a stylized video corresponding to the target image is generated.

2. The method according to claim 1, characterized in that: The determining of a plurality of stylized description information corresponding to the target image includes: receiving a plurality of stylized description information corresponding to the target image input by a user; or, The image features of the target image are extracted, and a plurality of stylized description information matching the image features is determined.

3. The method according to claim 1, characterized in that The step of processing the target image based on the stylized description information and the corresponding stylized model to obtain a plurality of stylized images under the stylized description information includes: Determine the corresponding stylized model based on the stylized description information; For a certain stylized description information, determine N groups of stylized parameters, where N is a preset positive integer; Based on the stylization parameters, the target image is processed by the corresponding stylization model to obtain a stylized image corresponding to the stylization parameters under the certain stylization description information; The above steps of processing the target image are executed repeatedly to obtain multiple stylized images under the stylized description information.

4. The method according to claim 3, characterized in that The stylization parameters include stylization degree information and / or noise information; wherein the noise information is used to increase the difference between the multiple stylized images under the same stylization description information.

5. The method according to claim 1, characterized in that The step of generating a stylized video corresponding to the target image based on the stylized image includes: Determining a first order among the plurality of stylized description information; and determining a second order among the plurality of stylized images under each stylized description information; Arrange the multiple stylized images under each stylized description information according to the first order and the second order to obtain a stylized video corresponding to the target image.

6. The method according to claim 1 or 5, characterized in that: The step of generating a stylized video corresponding to the target image based on the stylized image includes: For any stylized description information, performing frame interpolation processing based on multiple stylized images under the stylized description information to determine multiple interpolated frame images; Based on the multiple stylized images and the interpolated frame images, a stylized video corresponding to the target image is generated.

7. The method according to claim 1, characterized in that The acquiring of the target image comprises: Acquire a video to be processed, and extract frames from the video to be processed to obtain the target image; The method further comprises: Determining a third order of each target image in the video to be processed; Based on the stylized videos corresponding to the target images and the third order, a stylized video corresponding to the video to be processed is generated.

8. A video generating device, characterized in that: include: An acquisition module, used to acquire a target image and determine a plurality of stylized description information corresponding to the target image; A processing module, configured to process the target image based on the stylized description information and a corresponding stylized model to obtain a plurality of stylized images under the stylized description information; A generating module is used to generate a stylized video corresponding to the target image based on the stylized image.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the video generation method according to any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the video generation method according to any one of claims 1 to 7 are executed.

Citation Information

Cited By

  • Video generation method and device, electronic equipment, storage medium and program product

    CN121012973A