Video editing and editing model generation method, device, equipment, program and medium
By automatically identifying and editing video clips, the problem of long video editing and low operating efficiency in the existing technology is solved, and efficient video editing and more accurate collection of target object appearance information are achieved.
Patent Information
- Application Number
- CN202111530280.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-12-14
AI Technical Summary
The existing method of editing all video clips containing the target person in the video is time-consuming and has low operating efficiency, requiring the user to manually mark the start and end frames of the video clips.
By obtaining the image set of the target object, it automatically identifies and generates video clips of the target object. Combined with the pre-trained editing model, the video clips are automatically edited to reduce user manual operations.
It shortens the time-consuming process of video editing, improves operation efficiency, and improves the accuracy of editing by merging image sets from different angles and shapes.
Smart Images

Figure CN114401440B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a method, device, equipment, program and medium for video editing and editing model generation. Background Art
[0002] In the related art, when a user needs to edit all video clips containing a target person in a video, the user needs to watch the video from the beginning to the end, manually mark the start frame and end frame corresponding to each video clip in which the target person appears one by one during the video viewing process, and then edit each video clip based on the marked start frame and end frame corresponding to each video clip. The method of editing all video clips containing a target person in a video in the related art is time-consuming and has low operation efficiency. Summary of the invention
[0003] The present disclosure provides a method, device, equipment, program and medium for video editing and editing model generation, so as to at least solve the problem that the method of editing all video clips containing a target person in a video is time-consuming and has low operation efficiency in the related art. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a method for video editing and editing model generation is provided, comprising:
[0005] Acquire a target object image set, wherein the target object image set includes at least one first region image of the target object;
[0006] Acquire a video to be edited, and obtain a plurality of target video segments containing the target object in the video to be edited according to the at least one first area image;
[0007] In response to a change in the image of the target object within the target video segment, a second region image of the target object is generated, and the second region image is merged into the target object image set.
[0008] Optionally, the at least one first area image corresponds to at least one angle or at least one form of the target object.
[0009] Optionally, acquiring a target object image set includes:
[0010] In a pre-established appearance database, the target object image set is searched based on the identifier of the target object.
[0011] Optionally, acquiring a target object image set includes:
[0012] Acquire at least one image to be processed input by a user;
[0013] Identify objects contained in each image to be processed;
[0014] Among the objects contained in each of the images to be processed, determining the same target object contained in each of the images to be processed;
[0015] At least one first area image of the target object is extracted from the at least one image to be processed.
[0016] Optionally, after extracting at least one first region image of the target object from the at least one image to be processed, the method further includes:
[0017] In response to a modification operation performed by the user on any one of the at least one first region image, the any one region image is modified.
[0018] Optionally, after extracting at least one first region image of the target object from the at least one image to be processed, the method further includes:
[0019] Determine, based on the extracted at least one first region image of the target object, a third region image of another angle of the target object, wherein the other angle is an angle other than the angle corresponding to the at least one first region image;
[0020] The third region image is merged into the target object image set.
[0021] Optionally, after extracting at least one first region image of the target object from the at least one image to be processed, the method further includes:
[0022] In response to a sharing operation on the at least one first area image, acquiring an identifier of the target object input by the user;
[0023] The at least one first region image and the identification of the target object are associated and uploaded to an appearance database.
[0024] Optionally, acquiring a target object image set includes:
[0025] Acquire a fourth region image of the target object at a preset angle;
[0026] Taking the fourth region image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object;
[0027] At least one first region image of the target object is extracted from the at least one video frame.
[0028] Optionally, after obtaining a plurality of target video segments containing the target object in the video to be edited according to the at least one first region image, the method further includes:
[0029] The target video segment is output.
[0030] Optionally, after outputting the target video segment, the method further includes:
[0031] In response to a user's deletion operation on any one of the target video segments, the any one of the target video segments is deleted.
[0032] Optionally, obtaining, according to the at least one first region image, a plurality of target video segments containing the target object in the video to be edited includes:
[0033] The at least one first region image and the video to be edited are input into a pre-trained editing model to obtain a plurality of target video segments containing the target object in the video to be edited.
[0034] Optionally, after deleting any one of the target video segments, the method further includes:
[0035] Based on deleting the target video segment of any of the video segments, the editing model is optimized and trained.
[0036] Optionally, obtaining, according to the at least one first region image, a plurality of target video segments containing the target object in the video to be edited includes:
[0037] If the target video segment of the target object contained in the video to be edited is not identified according to the at least one first area image, a prompt message is output, wherein the prompt message is used to prompt a user that the target video segment of the target object contained in the video to be edited is not identified.
[0038] Optionally, generating the second area image of the target object includes:
[0039] In response to a manual matting operation on an image of a target object within the target video segment, a second region image of the target object is generated.
[0040] According to a second aspect of an embodiment of the present disclosure, a video editing and editing model generation device is provided, including:
[0041] An acquisition unit is configured to acquire a target object image set, wherein the target object image set includes at least one first region image of the target object;
[0042] An editing unit is configured to obtain a video to be edited, and obtain a plurality of target video segments containing the target object in the video to be edited according to the at least one first area image;
[0043] The merging unit is configured to generate a second region image of the target object in response to a change in the image of the target object in the target video segment, and merge the second region image into the target object image set.
[0044] Optionally, the at least one first area image corresponds to at least one angle or at least one form of the target object.
[0045] Optionally, the acquisition unit is configured to execute:
[0046] In a pre-established appearance database, the target object image set is searched based on the identifier of the target object.
[0047] Optionally, the acquisition unit is configured to execute:
[0048] Acquire at least one image to be processed input by a user;
[0049] Identify objects contained in each image to be processed;
[0050] Among the objects contained in each of the images to be processed, determining the same target object contained in each of the images to be processed;
[0051] At least one first area image of the target object is extracted from the at least one image to be processed.
[0052] Optionally, the device further comprises:
[0053] The modification unit is configured to modify any one of the at least one first region image in response to a modification operation performed by the user on the any one of the region images.
[0054] Optionally, the merging unit is further configured to execute:
[0055] Determine, based on the extracted at least one first region image of the target object, a third region image of another angle of the target object, wherein the other angle is an angle other than the angle corresponding to the at least one first region image;
[0056] The third region image is merged into the target object image set.
[0057] Optionally, the device further comprises a sharing unit;
[0058] The sharing unit is configured to execute:
[0059] In response to a sharing operation on the at least one first area image, acquiring an identifier of the target object input by the user;
[0060] The at least one first region image and the identification of the target object are associated and uploaded to an appearance database.
[0061] Optionally, the acquisition unit is configured to execute:
[0062] Acquire a fourth region image of the target object at a preset angle;
[0063] Taking the fourth region image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object;
[0064] At least one first region image of the target object is extracted from the at least one video frame.
[0065] Optionally, the device further comprises:
[0066] The output unit is configured to output the target video segment.
[0067] Optionally, the device further comprises:
[0068] The deleting unit is configured to delete any video segment in the target video segment in response to a user's deleting operation on any video segment in the target video segment.
[0069] Optionally, the editing unit is configured to execute:
[0070] The at least one first region image and the video to be edited are input into a pre-trained editing model to obtain a plurality of target video segments containing the target object in the video to be edited.
[0071] Optionally, the device further comprises:
[0072] The training unit is configured to perform optimization training on the editing model based on deleting the target video segment of any video segment.
[0073] Optionally, the editing unit is configured to execute:
[0074] If the target video segment of the target object contained in the video to be edited is not identified according to the at least one first area image, a prompt message is output, wherein the prompt message is used to prompt a user that the target video segment of the target object contained in the video to be edited is not identified.
[0075] Optionally, the merging unit is configured to execute:
[0076] In response to a manual matting operation on an image of a target object within the target video segment, a second region image of the target object is generated.
[0077] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0078] processor;
[0079] a memory for storing instructions executable by the processor;
[0080] Among them, the processor is configured to execute the instructions to implement the video editing and editing model generation method provided by the first aspect of the embodiment of the present disclosure.
[0081] According to the fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the video editing and editing model generation method provided in the first aspect of the embodiment of the present disclosure.
[0082] According to the fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the video editing and editing model generation method provided in the first aspect of the embodiments of the present disclosure.
[0083] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0084] By adopting the present disclosure, it is possible to automatically refer to the target object image set of the target object and edit several target video clips including the target object from the video to be edited. In this way, it is possible to avoid the user from watching the video to be edited from the beginning to the end, and avoid the user from manually marking the start frame and the end frame of all the video clips in which the target object appears to edit the video. Thus, by adopting the video editing method provided by the embodiment of the present disclosure, it is possible to shorten the time consumption of video editing and improve the operation efficiency of video editing.
[0085] In addition, since the target video segment is composed of a plurality of video frames containing the target object, the second region image of the target object can be extracted from the target video segment. Since the angle or form of the target object in each video frame of the target video segment is continuously changing, the second region image is also for different angles or different forms of the target object. The second region image can be merged into the target object image set as a supplementary content of the target object image set. In this way, when other videos to be edited are edited based on the region images in the target object image set, the appearance information of the target object is more sufficient, and the accuracy of video editing can be further improved.
[0086] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0088] Figure 1 is a flow chart of a method for video editing and editing model generation according to an exemplary embodiment;
[0089] Figure 2 is a schematic diagram of an interface of an application for intelligent video editing according to an exemplary embodiment;
[0090] Figure 3 is a schematic diagram of an interface of an application for intelligent video editing according to an exemplary embodiment;
[0091] Figure 4 is a schematic diagram of an interface of an application for intelligent video editing according to an exemplary embodiment;
[0092] Figure 5 is a schematic diagram of an interface of an application for intelligent video editing according to an exemplary embodiment;
[0093] Figure 6 is a schematic diagram of an interface of an application for intelligent video editing according to an exemplary embodiment;
[0094] Figure 7 is a block diagram of a video editing and editing model generation device according to an exemplary embodiment;
[0095] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0096] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0097] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0098] Figure 1 FIG. 1 is a flowchart of a method for video editing and editing model generation according to an exemplary embodiment, which method can be applied to electronic devices. Figure 1 As shown, the method may include the following steps.
[0099] In step S11 , a target object image set is acquired, where the target object image set includes at least one first region image of a target object.
[0100] In step S12, a video to be edited is obtained, and a plurality of target video segments containing a target object in the video to be edited are obtained according to at least one first region image.
[0101] In step S13, in response to the change of the image of the target object in the target video segment, a second region image of the target object is generated, and the second region image is merged into the target object image set.
[0102] In the disclosed embodiment, the target object may be an object with a relatively fixed shape, such as a person, an animal, an object, or a scene. The first region image may be an image obtained by cutting out a region corresponding to the target object from an entire image containing the target object.
[0103] Optionally, at least one first area image corresponds to at least one angle or at least one form of the target object.
[0104] If the entire image containing the target object is obtained by capturing the target object through an image capturing device, the target object captured from different angles can be obtained by adjusting the relative angle between the target object and the image capturing device, and the first region image cut out from the target object image corresponds to different angles of the target object. Alternatively, the target object can be allowed to pose in various postures, and the image capturing device can be used to capture images of the target object in different forms, and the first region image cut out from the images of the target object in different forms corresponds to different forms of the target object.
[0105] The following describes various methods for obtaining a target object image set provided by embodiments of the present disclosure.
[0106] Optionally, the process of acquiring the target object image set may be implemented as follows: searching for the target object image set in a pre-established appearance database based on the identifier of the target object.
[0107] It should be noted that the appearance database stores object image sets corresponding to multiple objects, and these object image sets can be uploaded to the appearance database by different users. Specifically, the object image sets in the appearance database can be supplemented by sharing user-generated content (UGC). In the appearance database, the object image set corresponding to the object is stored in association with the identifier of the object. Based on this, when the target object image set of a certain target object is needed, the target object image set can be searched in the appearance database by the identifier of the target object. The appearance database can be established in a server, and the user can download the searched target object image set to the terminal for local use.
[0108] For example, a user may search for the name of a famous person A in the appearance database. If the object image set corresponding to the famous person A is stored in the appearance database, the appearance database may output the object image set corresponding to the famous person A. The user may directly download the object image set corresponding to the famous person A to a local computer for use.
[0109] Optionally, the appearance database supports the user to modify different object image sets stored therein, the user may also delete certain object image sets stored therein, or the user may also choose to modify the identifications of certain objects therein.
[0110] The above method of obtaining the target object image set from the appearance database can save the user's operating cost of making the target object image set and greatly improve the operating efficiency.
[0111] Optionally, the process of obtaining a set of target object images can be implemented as follows: obtaining at least one image to be processed input by a user; identifying objects contained in each image to be processed; determining, among the objects contained in each image to be processed, the same target objects contained in each image to be processed; and extracting at least one first area image of the target object from at least one image to be processed.
[0112] In the embodiment of the present disclosure, if the user does not want to use the target object image set in the appearance database, or the target object image set cannot be searched in the appearance database, at least one first region image of the target object may be created.
[0113] First, the user can find several images to be processed containing the target object from the local image library. These images to be processed can be images of multiple angles containing the target object. Since the image to be processed contains other areas besides the target object, such as the background area, other areas will interfere with the subsequent steps, so it is necessary to extract the first area image of the target object from the image to be processed.
[0114] In order to improve intelligence, the first area image of the target object in different images to be processed can be cut out by automatic cutout. In the process of automatic cutout, the terminal can automatically identify the same object contained in each object to be processed, and use the same object as the target object, without the user specifying which object in the image to be processed is the target object to be cut out. This process can be implemented as follows: identify the objects contained in each image to be processed, and then determine the same target object contained in each image to be processed among the objects contained in each image to be processed.
[0115] Specifically, the process of determining the same target object contained in each to-be-processed image can be implemented as follows: calculating the similarity between objects contained in different to-be-processed images, and determining the target object contained in each to-be-processed image whose similarity is greater than a preset threshold.
[0116] For example, assuming that there are image A to be processed and image B to be processed, it can be identified that image A to be processed includes person 1 and person 2, and image B to be processed includes person 2 and person 3. The target object included in both image A to be processed and image B to be processed is person 2.
[0117] In the above solution, since at least one first region image is obtained by automatic cutout, the result obtained by automatic cutout may have certain errors. Based on this, in order to eliminate the error, optionally, after extracting at least one first region image of the target object from at least one image to be processed, the method provided by the embodiment of the present disclosure may also include: in response to a user's modification operation on any region image in the at least one first region image, modifying any region image.
[0118] In actual applications, after automatic cutout, the terminal can display the result of automatic cutout to the user. If the user is not satisfied with the result of automatic cutout, he can adjust it manually. For example, the terminal highlights the first area image of the target object cutout automatically, and the user can manually drag the outer edge of the highlighted part to adjust the cutout area.
[0119] It is worth noting that if the first region images of the target object at sufficient angles can be obtained, the appearance information of the target object will be more complete, which is more conducive to the processing of subsequent steps. Based on this, after extracting at least one first region image of the target object from at least one image to be processed, the method provided by the embodiment of the present disclosure may also include: based on the extracted at least one first region image of the target object, determining the third region images of other angles of the target object, the other angles being angles other than the angles corresponding to the at least one first region image; and merging the third region images into the target object image set.
[0120] In the solution provided by the embodiment of the present disclosure, a third area image of the target object at other angles can be automatically generated based on at least one first area image of the target object that has been extracted, thereby supplementing the original appearance information of the target object to make the appearance information of the target object more complete.
[0121] In practical applications, a three-dimensional model of the target object may be established based on at least one first region image extracted from the target object, and then third region images of the target object at other angles may be generated based on the three-dimensional model.
[0122] Optionally, after producing at least one first region image of the target object, the at least one first region image can be added to a target object image set, and then the target object image set can be uploaded to the appearance database to supplement the appearance database. In this way, other users can download the target object image set from the appearance database and use it directly. Based on this, the method provided by the embodiment of the present disclosure may also include: in response to a sharing operation of at least one first region image, obtaining an identifier of the target object input by a user; and associating the at least one first region image with the identifier of the target object and uploading it to the appearance database.
[0123] In the disclosed embodiment, the video to be edited corresponding to the target object can also be obtained. For example, if the target object is a well-known actor, the video to be edited can be a film or TV work shot by the well-known actor, a live record of an event attended by the actor, etc.
[0124] In some application scenarios, the user cannot obtain the first area images of sufficient angles corresponding to the target object, and only has the fourth area image of the target object at a preset angle. For example, the user only has the image to be processed of the front of a person, and based on the image to be processed of the front of the person, only the fourth area image of the front of the person can be extracted. Due to the lack of sufficient appearance information of the target object, and the difficulty in supplementing the third area images of other angles with only a single fourth area image of the target object at a preset angle, it is necessary to find other ways to obtain sufficient appearance information of the target object. In this case, the appearance information of the target object can be supplemented based on the video to be edited.
[0125] Based on this, optionally, the process of obtaining a set of target object images can be implemented as follows: obtaining a fourth area image of the target object at a preset angle; using the fourth area image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object; and extracting at least one first area image of the target object from at least one video frame.
[0126] It is understandable that some video clips in the video to be edited will contain video frames corresponding to the target object. Therefore, the fourth area image of the target object at a preset angle can be used as the tracking target to track the video to be edited. In this way, at least one video frame containing the target object in the video to be edited can be determined, and then at least one first area image of the target object can be extracted from the at least one video frame.
[0127] For example, the fourth region image of the front of a person can be used as the tracking target, and the first video clip corresponding to the target object appearing in the video to be edited, which is composed of 5 consecutive video frames, can be tracked. The 5 consecutive video frames can be extracted, and then the 5 consecutive video frames can be automatically cut out to extract the 5 first region images of the target object contained in each video frame.
[0128] Through the above method, at least one first area image of the target object can be obtained. After obtaining the at least one first area image of the target object and the video to be edited, several target video segments containing the target object in the video to be edited can be obtained according to the at least one first area image.
[0129] Optionally, the process of obtaining several target video segments containing the target object in the video to be edited based on at least one first area image can be implemented as follows: inputting at least one first area image and the video to be edited into a pre-trained editing model to obtain several target video segments containing the target object in the video to be edited.
[0130] By using the editing model, it is possible to automatically refer to at least one first region image of the target object and edit several video clips including the target object from the video to be edited. This can avoid the user from watching the video to be edited from the beginning to the end, and avoid the user from manually marking the start frame and end frame of all video clips where the target object appears to edit the video. Thus, the video editing method provided by the embodiment of the present disclosure can improve the operational efficiency of video editing.
[0131] If, as described above, in addition to obtaining at least one first region image of the target object, a third region image of the target object is also obtained, then the at least one first region image of the target object, the third region image and the video to be edited can be input into the editing model together to obtain a plurality of target video segments containing the target object in the video to be edited. The more comprehensive the region images corresponding to each angle of the target object input into the editing model are, the more accurate the target video segments containing the target object edited by the editing model with reference to the region images corresponding to each angle of the target object are.
[0132] After identifying several target video segments containing the target object in the video to be edited, a second region image of the target object can be generated in response to changes in the image of the target object in the target video segment, and the second region image can be merged into the target object image set.
[0133] It is understandable that, based on the first regional image, several target video segments containing the target object in the video to be edited can be automatically edited out. Since the target video segment is composed of multiple video frames containing the target object, the second regional image of the target object can be extracted from the target video segment. Since the angle or form of the target object in each video frame of the target video segment is continuously changing, the second regional image is also aimed at different angles or different forms of the target object. The second regional image can be merged into the target object image set as a supplementary content of the target object image set. In this way, when other videos to be edited are edited based on the regional images in the target object image set later, the appearance information of the target object is more sufficient, which can further improve the accuracy of editing.
[0134] Optionally, the process of generating the second region image of the target object may be implemented as follows: generating the second region image of the target object in response to a manual cutout operation on the image of the target object in the target video segment.
[0135] Since there are other regions besides the target object in each video frame of the target video segment, the second region image of the target object can be cut out from each video frame of the target video segment. Specifically, the user can cut out the second region image of the target object from each video frame of the target video segment by manually cutting out the image.
[0136] After identifying a plurality of target video segments containing the target object in the video to be edited, the target video segments can also be output. Outputting the target video segments can be implemented by displaying the target video segments to the user. Optionally, the user can annotate the recognition result. The process of annotating the recognition result can be implemented by: in response to the user's deletion operation on any video segment in the target video segments, deleting any video segment in the target video segments.
[0137] For example, suppose a film or TV work is co-starred by character 1, character 2, character 3, and character n, and the user needs to edit all the target video clips that contain character 2 in the film or TV work. Suppose the result output by the editing model includes 5 video clips, and the 5 video clips can be displayed to the user. Suppose that among the 5 video clips, video clips 1, 3, 4, and 5 are all video clips containing character 2, and video clip 2 only contains character 3 and character 2 has never appeared. In this case, video clip 2 can be considered as an erroneous output result. The user can choose to delete video clip 2 from the 5 output video clips.
[0138] If the video to be edited does not contain any video clip of the target object, the editing result is empty. Optionally, the process of obtaining several target video clips containing the target object in the video to be edited according to at least one first region image can also be implemented as follows: if the target video clip of the target object contained in the video to be edited is not identified according to at least one first region image, a prompt message is output, and the prompt message is used to prompt the user that the target video clip of the target object contained in the video to be edited is not identified.
[0139] Optionally, in order to improve the accuracy of the editing model in intelligently editing the video to be edited, the editing model may be optimized and trained based on a target video segment by deleting any video segment.
[0140] It is understandable that the user has manually annotated the results output by the editing model, and the manually annotated correct target video clips containing the target object can be used as positive samples to optimize the editing model for training, so as to improve the accuracy of the editing model in editing the video to be edited.
[0141] For ease of understanding, the specific implementation of the video editing and editing model generation method provided above is exemplified in combination with the following application scenarios.
[0142] Assume that the user needs to edit the video clip containing person 1 from the video to be edited. Figure 2 This is a schematic diagram of the interface of the smart video editing application. In this interface, there is a preview window of the video to be edited, from which the video to be edited can be played. There is also a play progress bar below the preview window, which can be used to check the play progress of the video to be edited. At the same time, there are also controls such as fast forward, rewind, and pause in the interface to control the play progress of the video to be edited.
[0143] exist Figure 2In the interface shown, a search dialog box is also provided, in which the name of the object whose regional image needs to be downloaded from the appearance database can be input. Below the search dialog box, an operation control for importing images from the album can be provided. Near the operation control, preview images and logos of some popular objects can be provided for the user to directly select from them.
[0144] In response to a selection operation on the operation control, Figure 3 As shown, an album list may pop up, which includes thumbnails of multiple images, from which the user can select the images to be imported. Figure 3 In the example shown, the user selects four photos of angles A, B, C, and D corresponding to person 1 as images to be processed. After the user selects the images to be imported, the user can click the Finish button set at the bottom of the interface.
[0145] After the user clicks the Done button, jump to Figure 4 The interface shown in the figure enters the step of automatic cutout. A preview window of the image to be processed is provided in the interface, and the image to be processed that needs to be cutout can be viewed from the preview window. An operation control for intelligent cutout is provided below the preview window. When the user selects the operation control, the current image to be processed can be automatically cutout. A modification control is also provided next to the operation control for intelligent cutout. When the user selects the modification control, the cutout result can be adjusted based on the intelligent cutout.
[0146] After completing the intelligent cutout and modifying the cutout result, the intelligent video editing application can cut out the video clip containing person 1 from the video to be edited based on the final confirmed area images of angles A, B, C, and D corresponding to person 1. Figure 5 The results of smart cropping are displayed in the interface shown. Figure 5 In the example shown, the smart video editing application cuts 4 video clips from the video to be edited. Person 1 does not appear in the second video clip, so the user can choose to delete the video clip, and the interface jumps to Figure 6 .
[0147] It should be noted that in Figure 5 , Figure 6In the interface shown, an operation control for adding the current frame can also be set. Through this operation control, the user can select the currently playing video frame from the video to be edited, cut out the currently playing video frame and add it to the appearance information of the person 1 to improve the accuracy of smart editing. In addition, a modification control can also be set. Through this modification control, the user can modify the regional images of different angles corresponding to the entered person 1, which can also further improve the accuracy of smart cropping.
[0148] By adopting the present disclosure, it is possible to automatically refer to the target object image set of the target object and edit several target video clips including the target object from the video to be edited. In this way, it is possible to avoid the user from watching the video to be edited from the beginning to the end, and avoid the user from manually marking the start frame and the end frame of all the video clips in which the target object appears to edit the video. Thus, by adopting the video editing method provided by the embodiment of the present disclosure, it is possible to shorten the time consumption of video editing and improve the operation efficiency of video editing.
[0149] In addition, since the target video segment is composed of a plurality of video frames containing the target object, the second region image of the target object can be extracted from the target video segment. Since the angle or form of the target object in each video frame of the target video segment is continuously changing, the second region image is also for different angles or different forms of the target object. The second region image can be merged into the target object image set as a supplementary content of the target object image set. In this way, when other videos to be edited are edited based on the region images in the target object image set, the appearance information of the target object is more sufficient, and the accuracy of video editing can be further improved.
[0150] Figure 7 FIG. 1 is a block diagram of a video editing and editing model generation device according to an exemplary embodiment. Figure 7 , the device comprises:
[0151] An acquiring unit 71 is configured to acquire a target object image set, wherein the target object image set includes at least one first region image of a target object;
[0152] The editing unit 72 is configured to obtain the video to be edited, and obtain a plurality of target video segments containing the target object in the video to be edited according to the at least one first region image;
[0153] The merging unit 73 is configured to generate a second region image of the target object in response to a change in the image of the target object in the target video segment, and merge the second region image into the target object image set.
[0154] Optionally, the at least one first area image corresponds to at least one angle or at least one form of the target object.
[0155] Optionally, the acquiring unit 71 is configured to execute:
[0156] In a pre-established appearance database, the target object image set is searched based on the identifier of the target object.
[0157] Optionally, the acquiring unit 71 is configured to execute:
[0158] Acquire at least one image to be processed input by a user;
[0159] Identify objects contained in each image to be processed;
[0160] Among the objects contained in each of the images to be processed, determining the same target object contained in each of the images to be processed;
[0161] At least one first area image of the target object is extracted from the at least one image to be processed.
[0162] Optionally, the device further comprises:
[0163] The modification unit is configured to modify any one of the at least one first region image in response to a modification operation performed by the user on the any one of the region images.
[0164] Optionally, the merging unit 73 is further configured to execute:
[0165] Determine, based on the extracted at least one first region image of the target object, a third region image of another angle of the target object, wherein the other angle is an angle other than the angle corresponding to the at least one first region image;
[0166] The third region image is merged into the target object image set.
[0167] Optionally, the device further comprises a sharing unit;
[0168] The sharing unit is configured to execute:
[0169] In response to a sharing operation on the at least one first area image, acquiring an identifier of the target object input by the user;
[0170] The at least one first region image and the identification of the target object are associated and uploaded to an appearance database.
[0171] Optionally, the acquiring unit 71 is configured to execute:
[0172] Acquire a fourth region image of the target object at a preset angle;
[0173] Taking the fourth region image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object;
[0174] At least one first region image of the target object is extracted from the at least one video frame.
[0175] Optionally, the device further comprises:
[0176] The output unit is configured to output the target video segment.
[0177] Optionally, the device further comprises:
[0178] The deleting unit is configured to delete any video segment in the target video segment in response to a user's deleting operation on any video segment in the target video segment.
[0179] Optionally, the editing unit 72 is configured to execute:
[0180] The at least one first region image and the video to be edited are input into a pre-trained editing model to obtain a plurality of target video segments containing the target object in the video to be edited.
[0181] Optionally, the device further comprises:
[0182] The training unit is configured to perform optimization training on the editing model based on deleting the target video segment of any video segment.
[0183] Optionally, the editing unit 72 is configured to execute:
[0184] If the target video segment of the target object contained in the video to be edited is not identified according to the at least one first area image, a prompt message is output, wherein the prompt message is used to prompt a user that the target video segment of the target object contained in the video to be edited is not identified.
[0185] Optionally, the merging unit 73 is configured to execute:
[0186] In response to a manual matting operation on an image of a target object within the target video segment, a second region image of the target object is generated.
[0187] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0188] In one possible design, the above Figure 7 The structure of the video editing and editing model generation device shown can be implemented as an electronic device, such as Figure 8 As shown, the electronic device may include: a processor 91 and a memory 92. The memory 92 stores executable code, and when the executable code is executed by the processor 91, the processor 91 can at least implement the above-mentioned Figures 1 to 6 The video editing and editing model generation method provided in the illustrated embodiment.
[0189] Optionally, the electronic device may further include a communication interface 93 for communicating with other devices.
[0190] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 92 including instructions, and the instructions can be executed by a processor 91 of the server to complete the above method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0191] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, which, when executed by the processor 91, implements the aforementioned Figures 1 to 6 The video editing and editing model generation method provided in the illustrated embodiment.
[0192] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0193] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A video editing and editing model generation method, characterized in that: include: Acquire a target object image set, wherein the target object image set includes at least one first region image of the target object; Acquire a video to be edited, and obtain a plurality of target video segments containing the target object in the video to be edited according to the at least one first area image; In response to a change in the image of the target object in the target video clip, generating a second region image of the target object, and merging the second region image into the target object image set; Based on the at least one first region image of the target object, determine a third region image of another angle of the target object, where the other angle is an angle other than the angle corresponding to the at least one first region image, and the third region image is determined by a three-dimensional model constructed based on the at least one first region image; The third region image is merged into the target object image set.
2. The method according to claim 1, characterized in that The at least one first area image corresponds to at least one angle or at least one form of the target object.
3. The method according to claim 1, characterized in that The step of acquiring a target object image set comprises: In a pre-established appearance database, the target object image set is searched based on the identifier of the target object.
4. The method according to claim 1, characterized in that: The step of acquiring a target object image set comprises: Acquire at least one image to be processed input by a user; Identify objects contained in each image to be processed; Among the objects contained in each of the images to be processed, determining the same target object contained in each of the images to be processed; At least one first area image of the target object is extracted from the at least one image to be processed.
5. The method according to claim 4, characterized in that After extracting at least one first region image of the target object from the at least one image to be processed, the method further includes: In response to a modification operation performed by the user on any one of the at least one first region image, the any one region image is modified.
6. The method according to claim 4, characterized in that After extracting at least one first region image of the target object from the at least one image to be processed, the method further includes: In response to a sharing operation on the at least one first area image, acquiring an identifier of the target object input by the user; The at least one first region image and the identification of the target object are associated and uploaded to an appearance database.
7. The method according to claim 1, characterized in that The step of acquiring a target object image set comprises: Acquire a fourth region image of the target object at a preset angle; Taking the fourth region image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object; At least one first region image of the target object is extracted from the at least one video frame.
8. The method according to claim 1, characterized in that After obtaining a plurality of target video segments containing the target object in the video to be edited according to the at least one first region image, the method further includes: The target video segment is output.
9. The method according to claim 8, characterized in that After outputting the target video segment, the method further includes: In response to a user's deletion operation on any one of the target video segments, the any one of the target video segments is deleted.
10. The method according to claim 9, characterized in that The step of obtaining a plurality of target video segments containing the target object in the video to be edited according to the at least one first region image comprises: The at least one first region image and the video to be edited are input into a pre-trained editing model to obtain a plurality of target video segments containing the target object in the video to be edited.
11. The method according to claim 10, characterized in that After deleting any one of the target video segments, the method further includes: Based on deleting the target video segment of any of the video segments, the editing model is optimized and trained.
12. The method according to claim 1, characterized in that The step of obtaining a plurality of target video segments containing the target object in the video to be edited according to the at least one first region image comprises: If the target video segment of the target object contained in the video to be edited is not identified according to the at least one first area image, a prompt message is output, wherein the prompt message is used to prompt a user that the target video segment of the target object contained in the video to be edited is not identified.
13. The method according to claim 1, characterized in that The generating a second area image of the target object comprises: In response to a manual matting operation on an image of a target object within the target video segment, a second region image of the target object is generated.
14. A video editing and editing model generation device, characterized in that: include: An acquisition unit is configured to acquire a target object image set, wherein the target object image set includes at least one first region image of the target object; An editing unit is configured to obtain a video to be edited, and obtain a plurality of target video segments containing the target object in the video to be edited according to the at least one first area image; A merging unit is configured to generate a second area image of the target object in response to a change in the image of the target object in the target video clip, and merge the second area image into the target object image set; determine a third area image of other angles of the target object based on at least one first area image extracted from the target object, the other angle being an angle other than the angle corresponding to the at least one first area image, and the third area image being determined by a three-dimensional model constructed based on the at least one first area image; and merge the third area image into the target object image set.
15. The device according to claim 14, characterized in that The at least one first area image corresponds to at least one angle or at least one form of the target object.
16. The device according to claim 14, characterized in that The acquisition unit is configured to execute: In a pre-established appearance database, the target object image set is searched based on the identifier of the target object.
17. The device according to claim 14, characterized in that The acquisition unit is configured to execute: Acquire at least one image to be processed input by a user; Identify objects contained in each image to be processed; Among the objects contained in each of the images to be processed, determining the same target object contained in each of the images to be processed; At least one first area image of the target object is extracted from the at least one image to be processed.
18. The device according to claim 17, characterized in that The device also includes: The modification unit is configured to modify any one of the at least one first region image in response to a modification operation performed by the user on the any one of the region images.
19. The device according to claim 17, characterized in that The device also includes a sharing unit; The sharing unit is configured to execute: In response to a sharing operation on the at least one first area image, acquiring an identifier of the target object input by the user; The at least one first region image and the identification of the target object are associated and uploaded to an appearance database.
20. The device according to claim 14, characterized in that The acquisition unit is configured to execute: Acquire a fourth region image of the target object at a preset angle; Taking the fourth region image as a tracking target, performing tracking processing on the video to be edited to determine at least one video frame in the video to be edited that contains the target object; At least one first region image of the target object is extracted from the at least one video frame.
21. The device according to claim 14, characterized in that The device also includes: The output unit is configured to output the target video segment.
22. The device according to claim 21, characterized in that The device also includes: The deleting unit is configured to delete any video segment in the target video segment in response to a user's deleting operation on any video segment in the target video segment.
23. The device according to claim 22, characterized in that The editing unit is configured to execute: The at least one first region image and the video to be edited are input into a pre-trained editing model to obtain a plurality of target video segments containing the target object in the video to be edited.
24. The device according to claim 23, characterized in that The device also includes: The training unit is configured to perform optimization training on the editing model based on deleting the target video segment of any video segment.
25. The device according to claim 14, characterized in that The editing unit is configured to execute: If the target video segment of the target object contained in the video to be edited is not identified according to the at least one first area image, a prompt message is output, wherein the prompt message is used to prompt a user that the target video segment of the target object contained in the video to be edited is not identified.
26. The device according to claim 14, characterized in that The merging unit is configured to perform: In response to a manual matting operation on an image of a target object within the target video segment, a second region image of the target object is generated.
27. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the video editing and editing model generation method as described in any one of claims 1-13.
28. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the video editing and editing model generation method as described in any one of claims 1-13.
29. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the video editing and editing model generation method described in any one of claims 1-13 is implemented.
