Video editing method, device, electronic device, and medium
The method enhances video editing by precisely identifying and isolating singing segments using audio and visual features, addressing inefficiencies in existing video editing technologies.
Patent Information
- Application Number
- JP2022581589
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-12-15
- Filing Date
- 2022-07-08
- Publication Date
- 2024-09-25
- Estimated Expiration
- 2042-07-08
AI Technical Summary
Existing video editing methods struggle to accurately extract and edit segments of singing, speech, and background music from videos, particularly in live broadcasts, leading to inefficiencies in generating short video clips.
A method involving video segmentation, label determination, and segment set generation to identify and isolate singing segments, using audio and visual features for precise boundary detection and expansion, enabling accurate video editing.
Enables the generation of high-quality short videos by accurately distinguishing between singing, speech, and background music segments, enhancing video editing efficiency and flexibility.
Smart Images

Figure 0007556063000001 
Figure 0007556063000002 
Figure 0007556063000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 2021115365056, filed on December 15, 2021, the entirety of which is incorporated herein by reference. The present disclosure relates to the field of data processing technology, in particular to video processing and artificial intelligence, and in particular to a video editing method, device, electronic device, computer-readable storage medium and computer program product. [Background technology]
[0002] As one of the information media, video format information is attracting more and more attention. In particular, short video format is more popular and attracts more attention from viewers. Based on this, it is meaningful to know how to edit videos to extract effective and excellent short videos.
[0003] The approaches described in this section are not necessarily approaches that have been previously contemplated or adopted. Unless otherwise noted, any approach described in this section should not be believed to be prior art merely by its inclusion in this section. Similarly, unless otherwise noted, the subject matter addressed in this section should not be believed to be an admission of any prior art. Summary of the Invention
[0004] The present disclosure provides a video editing method, apparatus, electronic device, computer-readable storage medium and computer program product. According to one aspect of the present disclosure, there is provided a video editing method, the method including: acquiring the first video; dividing the first video to acquire a plurality of segments; determining a plurality of labels respectively corresponding to the plurality of segments, each label in the plurality of labels being selected from one of a first label, a second label, a third label, or a fourth label, the first label indicating a singing segment, the second label indicating a speech segment, the third label indicating a background music segment, and the fourth label indicating a segment not corresponding to any of the first label, the second label, and the third label; determining a singing segment set including two or more consecutive segments having the first label in the plurality of segments based on the plurality of labels; and generating the second video based on the singing segment set.
[0005] According to another aspect of the present disclosure, there is provided a video editing device including: a first video acquisition unit for acquiring the first video; a segment acquisition unit for dividing the first video to acquire a plurality of segments; a label determination unit for determining a plurality of labels respectively corresponding to the plurality of segments, wherein each label in the plurality of labels is selected from one of a first label, a second label, a third label, or a fourth label, wherein the first label indicates a singing segment, the second label indicates a speech segment, the third label indicates a background music segment, and the fourth label indicates a segment that does not correspond to any of the first label, the second label, and the third label; a segment set determination unit for determining a singing segment set including two or more consecutive segments having the first label in the plurality of segments based on the plurality of labels; and a second video generation unit for generating the second video based on the singing segment set.
[0006] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform a video editing method according to one or more embodiments of the present disclosure.
[0007] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon computer instructions for causing the computer to perform a method for editing a video according to one or more embodiments of the present disclosure.
[0008] According to another aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements a method for editing videos according to one or more embodiments of the present disclosure.
[0009] According to one or more embodiments of the present disclosure, videos related to singing can be obtained by precisely editing the videos. It should be understood that the contents described in this section are not intended to identify key or important features of the embodiments of the present disclosure, and are not intended to limit the scope of protection of the present disclosure. Other features of the present disclosure will be readily understood from the following description. [Brief description of the drawings]
[0010] The drawings illustratively illustrate the examples, constitute a part of the specification, and together with the written description of the specification serve to explain exemplary embodiments of the examples. The illustrated examples are for illustrative purposes only and are not intended to limit the scope of the claims. In all the drawings, the same reference numerals refer to similar, but not necessarily identical, elements. [Figure 1] 1 shows a schematic diagram of an example system capable of implementing various methods described herein, according to embodiments of the present disclosure. [Diagram 2]1 is a flowchart illustrating a video editing method according to an embodiment of the present disclosure. [Diagram 3] 1 is a schematic diagram of a data stream illustrating a video editing method according to an embodiment of the present disclosure. [Figure 4] 1 is a configuration block diagram illustrating a video editing device according to an embodiment of the present disclosure. [Diagram 5] FIG. 1 is a block diagram illustrating an example electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, exemplary embodiments of the present disclosure will be described in conjunction with the drawings, and various details in the embodiments of the present disclosure contained therein are to be considered as merely illustrative, in order to facilitate understanding. Therefore, it should be recognized that those skilled in the art can make various changes and modifications to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the following description omits descriptions of known functions and structures.
[0012] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," and the like to describe various elements is not intended to limit the location, timing, or importance of those elements. Such terms are used only to distinguish one element from another. In some instances, a first element and a second element may refer to the same instance of an element, or in some cases, may refer to different instances based on the contextual description.
[0013] The terms used in the description of various examples of the present disclosure are intended only to describe particular examples and are not intended to be limiting. Unless otherwise clearly indicated by the context, an element may be one or more, unless specifically limited in number. It should be noted that the term "and / or" as used in the present disclosure covers any and all possible combinations of the listed items.
[0014] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. 1 illustrates a schematic diagram of an example system 100 in which various methods and apparatus described herein may be implemented, according to embodiments of the present disclosure. With reference to FIG. 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0015] In an embodiment of the present disclosure, the server 120 is operable to execute one or more services or software applications of the video editing method according to the present disclosure. In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized and virtualized environments. In some embodiments, these services may be provided as web-based or cloud services, for example, provided to users of client devices 101, 102, 103, 104, 105, and / or 106 in a Software-as-a-Service (SaaS) model.
[0016] In the arrangement shown in Figure 1, the server 120 may include one or more assemblies that implement the functions performed by the server 120. These assemblies may include software assemblies, hardware assemblies, or a combination thereof that may be executed on one or more processors. Users operating the client devices 101, 102, 103, 104, 105, and / or 106 may interact with the server 120 using one or more client applications to utilize the services provided by these assemblies. It should be understood that a variety of different system configurations are possible and may differ from system 100. Thus, Figure 1 is an example of a system for implementing various methods described herein and is not intended to be limiting.
[0017] A user may use client devices 101, 102, 103, 104, 105, and / or 106 to view videos, edit videos, provide feedback on the results of video editing, etc. The client devices may provide an interface through which a user of the client device interacts with the client device. The client devices may also output information to the user through the interface. Although only six client devices are shown in FIG. 1, one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0018] The client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as portable handheld devices, general purpose computers (e.g., personal computers or laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (e.g., GOOGLE Chrome OS), and may include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android, and the like. Portable handheld devices may include mobile phones, intelligent phones, tablets, personal digital assistants (PDAs), and the like. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices, and the like. The client devices may run a variety of applications, such as Internet-related applications, communication applications (eg, email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
[0019] Network 110 may be any type of network known to those skilled in the art that may use any one of a number of available protocols to support data communications, including, but not limited to, TCP / IP, SNA, IPX, etc. By way of example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token loop, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and other networks.
[0020] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may also include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of virtualized logical storage devices to maintain the server's virtual storage). In various embodiments, server 120 may execute one or more services or software applications that provide the functionality described below.
[0021] The computing units in server 120 may run one or more operating systems, including any of the operating systems listed above and any commercially available server operating system. Server 120 may also run any one of a variety of additional server applications and / or mid-tier applications, including an HTTP server, an FTP server, a CGI server, a JAVA server, a database server, etc.
[0022] In some embodiments, server 120 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications for displaying data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0023] In some embodiments, the server 120 may be a server of a distributed system or a server incorporating blockchain. The server 120 may be a cloud server, or an intelligent cloud computing server or an intelligent cloud host equipped with artificial intelligence technology. The cloud server is a host product in a cloud computing service system, which solves the defects of the traditional physical host and virtual private server (VPS) services, such as high management difficulty and low business scalability.
[0024] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data or other information. For example, one or more of databases 130 may be used to store information such as audio files or video files. Databases 130 may be located in a variety of locations. For example, a database used by server 120 may be local to server 120 or may be remote from server 120 and in communication with server 120 over a network or a dedicated connection. Databases 130 may be of a variety of types. In some embodiments, a database used by server 120 may be a relational database. One or more of these databases may store, update, and retrieve data from the database and from the database in response to instructions.
[0025] In some embodiments, one or more of databases 130 may be used by an application to store data for the application. The databases used by the application may be various types of databases, such as a key-value repository, an object repository, a general-purpose repository supported by a file system, etc.
[0026] The system 100 of FIG. 1 can be configured and operated in a variety of ways to accommodate the application of the various methods and apparatus described in accordance with this disclosure. Hereinafter, a video editing method 200 according to an exemplary embodiment of the present disclosure will be described with reference to FIG.
[0027] In step S201, a first moving image is acquired. In step S202, the first moving image is divided to obtain a plurality of segments. In step S203, a plurality of labels respectively corresponding to the plurality of segments are determined, and each label in the plurality of labels is selected from one of a first label, a second label, a third label or a fourth label, where the first label indicates a singing segment, the second label indicates a speech segment, the third label indicates a background music segment, and the fourth label indicates a segment that does not correspond to any of the first label, the second label and the third label.
[0028] In step S204, a singing segment set is determined based on the plurality of labels, the singing segment set including two or more consecutive segments in the plurality of segments having a first label.
[0029] In step S205, a second moving image is generated based on the singing segment set. According to the method of the embodiment of the present disclosure, a video about singing can be obtained by accurately editing the video. Specifically, according to the method 200, by distinguishing between singing and other voices (such as speech) and between singing and background music, the boundaries of singing can be accurately obtained, thereby obtaining more accurate and flexible video editing effects.
[0030] Currently, various live broadcasts, such as singing and dancing, have great market potential, so using such resources to generate complete singing segments is very helpful for resource distribution and popularity. According to the embodiment of the present disclosure, a video clip can be realized based on modal information such as audio, video, and voice, and may be applied to technical fields such as short movie or live broadcast streaming processing. According to the embodiment of the present disclosure, a short movie detection algorithm is obtained that can distinguish whether or not a song is spoken without relying on a fixed duration, and thus has a clear singing boundary. In particular, by distinguishing the singing type and the speaking type, the "background music" and other types in the segment that is neither singing nor speaking can be distinguished, and the real singing segment can be more accurately selected, and thus the singing short movie is accurately obtained.
[0031] According to some embodiments, generating a second moving image based on the singing segment set may include, in response to determining that the singing segment set has at least one adjacent segment having a third label, determining an extended segment set based on the at least one adjacent segment having a third label, and generating a second moving image based on the singing segment set and the extended segment set.
[0032] In such an embodiment, more flexible blending of vocal segments and background music segments can be performed. As one specific, non-limiting example scenario, a vocal video in a longer video may have a piece of unvoiced music before and / or after it, and in such a case the music is often an intro or outro to the vocals, and as such, adjacent segments with a "third label", i.e., background music label, may be included before and after the vocal segment.
[0033] According to some embodiments, determining the extended segment set based on at least one adjacent segment having a third label includes determining a first segment in response to determining that a segment in the plurality of segments before a start segment of the set of singing segments has a third label, the first segment being before the start segment in the plurality of segments, the first segment having a third label, a segment before the first segment having a fourth label, there being no segment between the first segment and the start segment whose label is not the third label, and determining that two or more segments from the first segment to the start segment are adjacent to the start segment. and in response to determining that a segment in the plurality of segments following the end segment of the set of sung segments has the third label, determining a second segment, the second segment being after the end segment in the plurality of segments, the second segment having the third label, the segment following the second segment having a fourth label, there being no segment between the second segment and the end segment whose label is not the third label, and determining an extended segment set including two or more segments from the end segment to the second segment.
[0034] In such an embodiment, the boundary of the second video can be more accurately extended based on the background music. That is, the conversion only for the labels is extended from the fourth label to the third label to the first label, and so on for adjacent segments (or the boundary after the singing segment is extended from the first label to the third label to the fourth label, and it should be understood that the order here does not limit the contents of the present disclosure). As one non-limiting example, if there is a single voiceless music before and / or after the singing video, the part before / after may be "speech", e.g., speech first, music is played, singing is performed, and the music in between may be unrelated to singing, i.e., speech in the background music first, and then singing begins. Therefore, in such a case, it can be determined that the background music segment is not an intro or outro, and the boundary is not extended.
[0035] According to some embodiments, generating a second moving image based on the singing segment set may include determining a boundary adjustment amount for the singing segment set in response to determining that at least one of the start segment and the end segment of the singing segment set does not satisfy a confidence requirement, and determining the second moving image based on the singing segment set and the boundary adjustment amount.
[0036] In such an embodiment, when the label confidence is not satisfied, fine-grained adjustment to the boundary can be performed. Specifically, suppose that the segment at the boundary does not meet the confidence requirement (it cannot be accurately determined whether it is real singing or not), and the occurrence of such a scene may be because the traditional segment granularity is too long and covers mixed scenes. For example, suppose that the segment length is 3 seconds, and it actually covers the previous 2 seconds of speaking and the next 1 second of singing. In such a case, a second boundary check needs to be performed to determine the boundary adjustment amount (e.g., adjusted to cover only 1 second of singing), thus obtaining a more accurate boundary.
[0037] According to some embodiments, each segment in the plurality of segments may have a first length, and determining a boundary adjustment amount of the singing segment set may include: for each adjusted segment that does not satisfy the confidence requirement at the start segment and the end segment, obtaining two adjustment segments related to the adjusted segment, each of the two adjustment segments having a first length, the two adjustment segments being adjacent to the first adjustment timing, and the first adjustment timing falling within the adjusted segment period; determining a label for each of the two adjustment segments, each label being selected from one of a first label, a second label, a third label and a fourth label; and adjusting a corresponding boundary of the singing segment set to the first adjustment timing by determining a boundary adjustment amount of the singing segment set in response to the labels respectively corresponding to the two adjustment segments satisfying the boundary condition.
[0038] As a non-limiting example, assume that the first length is 3s, i.e., each segment length is 3s. The original boundary is denoted as time 0, and the time length of the boundary segment (assumed to be the starting boundary segment) is denoted as [0,3]. For example, a time window with a length of 3s and a step size of 1s may be used to perform division near the boundary segment, or division may be performed in other ways, and two related adjustment segments may be generated, denoted as [-2,1] and [-1,2], respectively. Then, perform label classification on the two adjustment segments, respectively. For example, if it is determined that the second adjustment segment [-1,2] is singing or background music, and the first adjustment segment [-2,1] is speech or other scenes, the updated boundary may be considered as t=-1, thus achieving finer boundary granularity. It should be understood that the above are all examples, and any other segment length, step size, division manner, granularity, etc. that can be conceived by a person skilled in the art can be used to realize the method of the embodiment of the present disclosure.
[0039] According to some embodiments, the boundary condition may include at least one of: in response to determining that the adjusted segment association is a start segment, the previous adjusted segment in the two adjusted segments has a second label or a fourth label, and the next adjusted segment has a first label or a third label; in response to determining that the adjusted segment association is an end segment, the previous adjusted segment in the two adjusted segments has a first label or a third label, and the next adjusted segment has a second label or a fourth label. In other words, the boundary condition may include performing fine-grained division on the boundary audio to obtain an updated boundary when the confidence is insufficient. For example, in the current granular segment, there is a possibility that there is speech in the previous second and singing in the next two seconds.
[0040] Furthermore, the adjustment segment with the third label, i.e., "background music", can be included in the updated boundary, i.e., appropriate expansion can be made for the background music. As one specific and non-limiting example, when two seconds in the boundary segment (still set to 3 seconds in length) include background music and the remaining one second is "other scenes", the two seconds of background music may be included therein and expanded to the intro or outro of the vocal segment, but not expanded for other types of segments, e.g., segments with the second and fourth labels.
[0041] According to some embodiments, determining a plurality of labels corresponding to the plurality of segments may include determining a confidence level for each of the first, second, third, and fourth labels for each segment in the plurality of segments, and determining the label with the highest confidence level as the label of the segment. In such embodiments, the confidence requirement of the segment may include at least one of: a difference between the confidence level of the first label and the confidence level of the second label of the segment is greater than a first threshold value, or a difference between the confidence level of the first label and the confidence level of the fourth label of the segment is greater than a second threshold value. The confidence requirement may include a small difference in the confidence levels of the two kinds of labels, which may cover a mixed scene, such as speaking in the previous two seconds and singing in the next second. It should be understood that the above is merely illustrative, and the present disclosure is not limited thereto.
[0042] According to some embodiments, determining a plurality of labels respectively corresponding to the plurality of segments may include determining a label for each segment in the plurality of segments based on audio and visual characteristics of the segment.
[0043] Thus, based on both audio and image features, it can be determined whether it is singing / speech / background music, etc. The audio feature extraction can be audio event feature extraction based on Mel spectrum, for example, audio feature extraction can be based on a bottom-up method of local features. In addition to the audio information, image information in the video can be used for further feature extraction and classification to identify the scenes where the anchor is playing a song but is not singing.
[0044] According to some embodiments, the screen features may include face features and lip region time series features. The face can determine whether the presenter is on screen or not, and is used to avoid the situation where the presenter has left the screen but still plays the audio, and the lip action features can identify the situation where the presenter is singing or playing the song, etc. This allows for more accurate labeling and more accurate boundaries.
[0045] Below, a schematic diagram of a data stream in an exemplary embodiment of label determination and feature extraction according to one embodiment of the present disclosure will be described in conjunction with FIG. Divide the first video 310 into a number of segments of the same length (e.g., 3s). The length can be selected by considering the richness of information and the required accuracy granularity. For example, a long video segment contains more information, and a short video segment has more accurate time granularity when selected from the starting point, so the length may be determined to be, for example, 0.5s, 1s, 3s, 5s, 10s, etc. according to needs, and the present disclosure is not limited thereto. Obtain video frame data, i.e., screen data 312 and audio data 314, respectively.
[0046] The screen data 312 may be extracted, for example, at one frame per second or other frequency to obtain an image. The image is then input to a facial feature extraction unit 320, for example, a CNN or other neural network. The facial feature extraction unit 320 may output facial features that may be used to determine whether the anchor is on screen or not, and to avoid a situation where the anchor is away from the screen but audio is being played. The facial feature extraction unit 320 may be or include a multi-task convolutional neural network (MTCNN), although the present disclosure is not limited thereto.
[0047] The facial feature extraction unit 320 may further output the region position of the lip feature at the face key point. The lip feature is output to the lip time series feature extraction unit 330. The lip time series feature extraction unit 330 performs time series superposition on the features of the lip region of the face and extracts the lip movement feature. The feature can be used to identify whether the anchor in the video is singing or not, and thus to identify the situation such as whether the anchor is singing or playing a song. The lip time series feature extraction unit 330 may be or include a Temporal Segment Network (TSN), but the present disclosure is not limited thereto.
[0048] After extracting mel-spectrum features from the audio data 312 and converting it into image information, audio feature extraction 340 is used to extract audio features using, for example, a neural network (eg, CNN).
[0049] The extracted face, lip and audio features are input to a feature fusion unit 350, which is used to perform stacking on the voice features, face features and lip movement features, e.g., concat the features. Then, a classification unit 360, e.g., a long short-term memory network (LSTM), in particular, a feature fusion long short-term memory network (FFLSTM), determines a label, i.e., a classification result 370, for each segment, and then the singing activity start time, end time, etc., in time sequence, i.e., the singing segment set described in this specification can be clustered.
[0050] Post-processing 380 may include steps such as boundary extension, boundary checking, etc. described herein, as well as other video processing and video editing steps known to those skilled in the art, such as generating a second movie, rendering, etc., and it should be understood that this disclosure is not limited in this respect. In this way, a second movie 390 may be obtained.
[0051] It should be understood that, although the diagram illustrates a classification unit 360, e.g., a classification network, the present disclosure is not limited thereto. For example, the facial feature extraction unit 320 may include a facial feature extraction and classification network, which is used to output keypoint features of facial features to the lip time series feature extraction and classification network 340, which outputs the facial classification result to the feature fusion unit 340. Similarly, the lip time series feature extraction and audio feature extraction units may each include a classification result, and in such a case, the feature fusion unit 340 only fuses the three types of classification results to generate the classification result 370. It should be understood that both the classification and feature stacking and feature stacking may be used in the embodiments described in the present disclosure, and the method of the embodiments of the present disclosure may be applied to other methods of classification based on audio and image features that can be understood by those skilled in the art, including methods of classification without using a neural network.
[0052] Now, a video editing apparatus 400 according to an embodiment of the present disclosure will be described with reference to Fig. 4. The video editing apparatus 400 may include a first video obtaining unit 401, a segment obtaining unit 402, a label determining unit 403, a segment set determining unit 404 and a second video generating unit 405.
[0053] The first video acquisition unit 401 may be used to acquire a first video. The segment acquisition unit 402 may be used to divide the first video to obtain a plurality of segments. The label determination unit 403 may be used to determine a plurality of labels corresponding to the plurality of segments respectively, and each label in the plurality of labels is selected from one of a first label, a second label, a third label, or a fourth label, where the first label indicates a singing segment, the second label indicates a speech segment, the third label indicates a background music segment, and the fourth label indicates a segment not corresponding to the first label, the second label, or the third label. The segment set determination unit 404 may be used to determine a singing segment set based on the plurality of labels, the singing segment set including two or more consecutive segments in the plurality of segments having the first label. The second video generation unit 405 may be used to generate a second video based on the singing segment set.
[0054] The device according to the embodiment of the present disclosure can obtain singing-related videos by editing the videos precisely. According to some embodiments, the second moving image generation device 405 may include a unit for determining, in response to determining that the singing segment set has at least one adjacent segment having a third label, an extended segment set based on the at least one adjacent segment having a third label, and a unit for generating a second moving image based on the singing segment set and the extended segment set.
[0055] According to some embodiments, the unit for determining the extended segment set based on at least one adjacent segment having a third label is configured to determine a first segment in response to a segment in the plurality of segments preceding a start segment of the singing segment set having a third label, the first segment being preceding the start segment in the plurality of segments, the first segment having a third label, a segment preceding the first segment having a fourth label, there being no segment between the first segment and the start segment whose label is not the third label, and determining an extended segment set including two or more segments from the first segment to the start segment. and in response to a segment in the plurality of segments following the end segment of the set of vocal segments having the third label, determining a second segment, the second segment being after the end segment in the plurality of segments, the second segment having the third label, the segment following the second segment having a fourth label, there being no segment between the second segment and the end segment whose label is not the third label, and determining an extended segment set including two or more segments from the end segment to the second segment.
[0056] According to some embodiments, the second moving image generation device 405 may include a unit for determining a boundary adjustment amount of the singing segment set in response to determining that at least one of the start segment and the end segment of the singing segment set does not satisfy a confidence requirement, and a unit for determining a second moving image based on the singing segment set and the boundary adjustment amount.
[0057] According to some embodiments, each segment in the plurality of segments has a first length, and the unit for determining a boundary adjustment amount of the singing segment set may include a unit that performs the operations of: for each adjusted segment that does not satisfy the confidence requirement at the start segment and the end segment, obtaining two adjustment segments related to the adjusted segment, each adjustment segment of the two adjustment segments having a first length, the two adjustment segments being adjacent to the first adjustment timing, and the first adjustment timing falling within the adjusted segment period; determining a label for each of the two adjustment segments, each label being selected from one of a first label, a second label, a third label and a fourth label; and adjusting corresponding boundaries of the singing segment set to the first adjustment timing by determining a boundary adjustment amount of the singing segment set in response to the labels respectively corresponding to the two adjustment segments satisfying the boundary condition.
[0058] According to some embodiments, the label determination unit 403 may include a unit for performing an operation of determining, for each segment in the plurality of segments, a confidence level for each label in the first label, the second label, the third label and the fourth label, and determining the label with the highest confidence level as the label of the segment. The confidence requirement of the segment may include at least one of: a difference between the confidence level of the first label and the confidence level of the second label of the segment is greater than a first threshold, or a difference between the confidence level of the first label and the confidence level of the fourth label of the segment is greater than a second threshold.
[0059] According to some embodiments, the label determining unit 403 may include, for each segment in the plurality of segments, a unit for determining a label based on audio and visual features of the segment.
[0060] According to some embodiments, the screen features may include facial features and time series features of the lip area. In the technical solution disclosed herein, the collection, acquisition, storage, use, processing, transmission, provision and disclosure and utilization of relevant user personal information shall all comply with the provisions of relevant laws and regulations and shall not violate public order and morals.
[0061] According to embodiments of the present disclosure, an electronic device, a readable storage medium, and a computer program product are further provided. As shown in FIG. 5, a configuration block diagram of an electronic device 500 that can be used as a server or client of the present disclosure, which is an example of a hardware device applicable to various aspects of the present disclosure, will be described here. The electronic device refers to various forms of digital electronic computing devices, such as laptop computers, desktop computers, stages, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also refer to various forms of mobile devices, such as personal digital processing, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections, and their functions shown herein are merely exemplary and do not limit the implementation of the present disclosure described and / or claimed herein.
[0062] 5, the electronic device 500 includes a computing unit 501, which can perform various suitable operations and processes according to a computer program stored in a read-only memory (ROM) 502 or loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may further store various programs and data necessary for operating the electronic device 500. The computing unit 501, the ROM 502 and the RAM 503 are connected to each other by a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0063] The components in the electronic device 500 are connected to an I / O interface 505, and include an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may generate input numeric or character information and key signal inputs related to user settings and / or function control of the electronic device, and may include, but are not limited to, a mouse, a keyboard, a touch screen, a track board, a track ball, a control lever, a microphone, and / or a remote control. The output unit 507 may be any type of device capable of presenting information, and may include, but are not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but are not limited to, a magnetic disk, an optical disk. The communication unit 509 enables the electronic device 500 to exchange information / data with other devices via a computer network, e.g., the Internet, and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, e.g., a Bluetooth™ device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0064] The computing unit 501 may be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 may include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that execute machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes each of the methods and processes described above, such as method 200 and its variations. For example, in some embodiments, method 200 and its variations may be embodied as a computer software program and tangibly included in a machine-readable medium, such as the storage unit 508. In some embodiments, some or all of the computer program may be loaded and / or installed in the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method 200 and its variations described above may be executed. Alternatively, in other embodiments, the computing unit 501 may be configured (eg, by firmware) in any other suitable manner to perform method 200 and variations thereof.
[0065] Various embodiments of the systems and techniques described herein may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), software hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and may include receiving data and instructions from a storage system, at least one input device, at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0066] The program code implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus, so that when executed by the processor or controller, the program code performs the functions / operations specified in the flowcharts and / or block diagrams. The program code may be entirely executed on a machine, partly executed on a machine, partly executed on a machine and partly executed on a remote machine as a separate software package, or entirely executed on a remote machine or server.
[0067] In the context of this disclosure, a machine-readable medium may be a tangible medium, which may include or store a program for use in or in conjunction with an instruction execution system, apparatus, or device. A 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 above. More specific examples of machine-readable storage media include an electrical connection with one or more leads, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0068] To provide for interaction with a user, a computer may implement the systems and techniques described herein and include a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which the user may provide input to the computer. Other types of devices may also be provided for providing interaction with a user. For example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and may receive input from the user in any form (including audio input, speech input, or tactile input).
[0069] The systems and techniques described herein may be implemented in a computing system including a backstage component (e.g., as a data server), a middleware component (e.g., an application server), a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with the system or technique embodiment), or any combination of backstage, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0070] The computer system may include a client side and a server. The client side and the server are generally remote from each other and usually interact with each other via a communication network. The relationship between the client side and the server is generated by running computer programs having a client side-server relationship with each other on corresponding computers. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0071] It should be understood that the steps may be reordered, added, or removed using the various forms of flow described above, for example, the steps described in the present disclosure may be performed in parallel, sequentially, or in a different order, and the present disclosure is not limited thereto as long as the technical solutions disclosed in the present disclosure can achieve the desired results.
[0072] Although the embodiments or examples of the present disclosure have been described with reference to the drawings, it should be understood that the above methods, systems, and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the scope of the claims and their equivalents after grant. Various elements of the embodiments or examples may be omitted or replaced by their equivalent elements. In addition, each step may be performed in a different order from the order described in this disclosure. Furthermore, various elements of the embodiments or examples may be combined in various ways. It is important to note that with the evolution of technology, many elements described herein may be replaced by equivalent elements that appear later in this disclosure.
Claims
1. A method for editing a video, comprising: Obtaining a first moving image; Dividing the first moving image to obtain a plurality of segments; determining a plurality of labels respectively corresponding to the plurality of segments, each label in the plurality of labels being selected from one of a first label, a second label, a third label, or a fourth label, the first label indicating a singing segment, the second label indicating a speech segment, the third label indicating a background music segment, and the fourth label indicating a segment not corresponding to any of the first label, the second label, and the third label; determining a singing segment set based on the plurality of labels, the singing segment set including two or more consecutive segments in the plurality of segments that have the first label; generating a second video based on the set of vocal segments; generating the second video based on the set of vocal segments, in response to determining that the set of singing segments has at least one adjacent segment having the third label, determining an extended set of segments based on the at least one adjacent segment having the third label; A method for editing a video comprising: generating the second video based on the set of singing segments and the extended set of segments.
2. Determining an extended segment set based on the at least one adjacent segment having the third label includes: in response to determining that a segment in the plurality of segments preceding a starting segment of the set of vocal segments has the third label, determining a first segment, the first segment being in the plurality of segments before the start segment, the first segment having the third label, a segment before the first segment having the fourth label, and no segment between the first segment and the start segment having a label other than the third label; determining the extended segment set including two or more segments from the first segment to the starting segment; in response to determining that a segment in the plurality of segments following an ending segment of the set of singing segments has the third label, determining a second segment, the second segment being after the end segment in the plurality of segments, the second segment having the third label, a segment following the second segment having the fourth label, and no segment between the second segment and the end segment having a label other than the third label; and determining the extended segment set to include two or more segments from the ending segment to the second segment.
3. generating the second video based on the set of vocal segments, determining a boundary adjustment amount for the set of singing segments in response to determining that at least one of the start segment and the end segment of the set of singing segments does not satisfy a confidence requirement; The method of claim 1 or 2, further comprising determining the second moving image based on the set of vocal segments and the boundary adjustment amount.
4. Each segment in the plurality of segments has a first length, and determining a boundary adjustment amount for the set of singing segments includes, for each adjusted segment that does not satisfy a confidence requirement for the start segment and the end segment, obtaining two adjusted segments associated with the adjusted segment, each adjusted segment of the two adjusted segments having the first length, the two adjusted segments adjacent to a first adjusted timing, and the first adjusted timing falling within a period of the adjusted segment; determining a label for each of the two alignment segments, each label being selected from one of the first label, the second label, the third label, and the fourth label; The method of claim 3, further comprising: in response to the labels corresponding to the two adjustment segments respectively satisfying a boundary condition, determining a boundary adjustment amount of the singing segment set to adjust corresponding boundaries of the singing segment set to the first adjustment timing.
5. The boundary conditions are: in response to determining that the adjusted segment association is the starting segment, a previous adjusted segment in the two adjusted segments has the second label or the fourth label, and a next adjusted segment in the two adjusted segments has the first label or the third label; 5. The method of claim 4, further comprising at least one of: in response to determining that the adjusted segment association is the end segment, a previous adjustment segment in the two adjustment segments has the first label or the third label, and a next adjustment segment has the second label or the fourth label.
6. determining a plurality of labels respectively corresponding to the plurality of segments includes, for each segment in the plurality of segments, determining a confidence level for each label in the first label, the second label, the third label and the fourth label, and determining a label with the highest confidence level as a label for the segment; 5. The method of claim 4, wherein the confidence requirement for the segment includes at least one of: a difference between the confidence of the first label and the confidence of the second label of the segment is greater than a first threshold; or a difference between the confidence of the first label and the confidence of the fourth label of the segment is greater than a second threshold.
7. The method of claim 1 or 2, wherein determining a plurality of labels respectively corresponding to the plurality of segments comprises determining a label for each segment in the plurality of segments based on audio and visual features of the segment.
8. The method of claim 7 , wherein the screen features include facial features and lip region time series features.
9. A video editing device, comprising: a first moving image capture unit for capturing a first moving image; a segment obtaining unit for dividing the first moving image to obtain a plurality of segments; a label determination unit for determining a plurality of labels respectively corresponding to the plurality of segments, each label in the plurality of labels being selected from one of a first label, a second label, a third label or a fourth label, the first label indicating a singing segment, the second label indicating a speech segment, the third label indicating a background music segment, and the fourth label indicating a segment not corresponding to any of the first label, the second label and the third label; a segment set determining unit for determining a singing segment set including two or more consecutive segments in the plurality of segments having the first label based on the plurality of labels; a second video generation unit for generating a second video based on the set of singing segments; The second video generation unit includes: a unit for determining, in response to determining that the singing segment set has at least one adjacent segment having the third label, an extended segment set based on the at least one adjacent segment having the third label; a unit for generating the second video based on the singing segment set and the extended segment set.
10. The unit for determining an extended segment set based on the at least one adjacent segment having the third label, in response to a segment in the plurality of segments preceding a starting segment of the set of vocal segments having the third label, determining a first segment, the first segment being in the plurality of segments before the start segment, the first segment having the third label, a segment before the first segment having the fourth label, and no segment between the first segment and the start segment having a label other than the third label; a unit for performing an operation of determining the extended segment set including two or more segments from the first segment to the starting segment; in response to a segment in the plurality of segments following an ending segment of the set of singing segments having the third label, determining a second segment, the second segment being after the end segment in the plurality of segments, the second segment having the third label, a segment following the second segment having the fourth label, and no segment between the second segment and the end segment having a label other than the third label; and a unit for performing an operation of determining the extended segment set including two or more segments from the end segment to the second segment.
11. The second video generation unit includes: a unit for determining a boundary adjustment amount of the singing segment set in response to determining that at least one of the start segment and the end segment of the singing segment set does not satisfy a confidence requirement; 11. The apparatus according to claim 9 or 10, further comprising a unit for determining the second moving image based on the set of singing segments and the boundary adjustment amount.
12. Each segment in the plurality of segments has a first length, and the unit for determining a boundary adjustment amount for the set of singing segments comprises, for each adjusted segment that does not satisfy a confidence requirement for the start segment and the end segment, obtaining two adjusted segments associated with the adjusted segment, each adjusted segment of the two adjusted segments having the first length, the two adjusted segments adjacent to a first adjusted timing, and the first adjusted timing falling within a period of the adjusted segment; determining a label for each of the two alignment segments, each label being selected from one of the first label, the second label, the third label, and the fourth label; The device of claim 11, further comprising a unit for performing the operation of: in response to the labels respectively corresponding to the two adjustment segments satisfying a boundary condition, determining a boundary adjustment amount of the singing segment set to adjust the corresponding boundaries of the singing segment set to the first adjustment timing.
13. The label determination unit includes a unit for performing an operation of determining a reliability for each label in the first label, the second label, the third label, and the fourth label for each segment in the plurality of segments, and determining a label having the highest reliability as a label for the segment; 13. The apparatus of claim 12, wherein the confidence requirement for the segment includes at least one of: a difference between the confidence of the first label and the confidence of the second label of the segment is greater than a first threshold, or a difference between the confidence of the first label and the confidence of the fourth label of the segment is greater than a second threshold.
14. The apparatus according to claim 9 or 10, wherein the label determination unit comprises: a unit for determining, for each segment in the plurality of segments, a label based on audio and visual features of the segment.
15. The apparatus of claim 14 , wherein the screen features include facial features and time series features of lip regions.
16. An electronic device, At least one processor; and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method of claim 1 or 2.
17. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to carry out the method according to claim 1 or 2.
18. A computer program which, when executed by a processor, implements the method according to claim 1 or 2.
Citation Information
Patent Citations
Singing video identification method and device, equipment and storage medium
CN113762056A
Video summarization using audio and visual cues
US20120281969A1
Audio driven accelerated binge watch
US20170309296A1
