Video information summary generation method, device, electronic device and storage medium
Through technologies such as open world target detection models and backbone networks, the problem in existing technologies of being unable to generate text summaries that correctly describe video content is solved, enabling rapid understanding and flexible application of video content in new scenarios.
Patent Information
- Application Number
- CN202410920291.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-10
AI Technical Summary
Existing technologies cannot effectively generate text summaries that correctly express video content. Especially when applied in new scenarios, traditional static video summarization technology requires retraining the target detection model, which is time-consuming, labor-intensive, and inflexible.
An open-world object detection model is used combined with a backbone network and image-text extraction unit to generate text summaries that correctly describe video content through key frame detection, clustering, semantic alignment and text generation.
It improves the accuracy and flexibility of text summarization, reduces the cost of application adaptation in new scenarios, and enables rapid understanding of video content in different scenarios.
Smart Images

Figure CN118467778B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a method, device, electronic device and storage medium for generating a video information summary. Background Art
[0002] In video surveillance scenarios such as security, transportation, kitchens, and schools, a large amount of video data is generated. These video data are often long and contain a lot of redundant and invalid information. It is very time-consuming and inefficient to directly watch these long videos to obtain useful information.
[0003] Video summarization technology mainly extracts and generates key frames of videos automatically / semi-automatically, helping users quickly understand the content of videos, especially the key information in long videos, so that users can know the specific content of videos without watching the entire video. Traditional static video summarization technology is mainly based on key frame representation, clustering and other methods to extract representative key frames from videos and combine them into new videos to extract video summaries. With the development of deep learning, some new methods for extracting key frames have also emerged. For example, by using the CNN model to extract spatial features from video frames, and then using the LSTM model to process temporal features, the model learns to identify important feature change points and predict key frames; or using the target detection algorithm to identify key frames containing the main objects. Then, static video summarization technology based on traditional target detection algorithms can only detect targets that can be recognized by the trained model and generate video summaries. If you want to apply this technology in a new scenario, you need to collect corresponding data to retrain the target detection model, which is time-consuming and labor-intensive, and limits the flexibility of technology application. Use the target detection algorithm to identify key objects, and use the video frames containing key objects as key frames to form video summaries. The video summary obtained in this way may contain multiple events. This type of video summary increases the difficulty of video understanding and ultimately makes it impossible to generate a text summary that correctly describes the video content.
[0004] There is currently no effective solution to the problem in related technologies that a text summary that correctly describes the video content cannot be generated. Summary of the invention
[0005] In this embodiment, a video information summary generation method, device, electronic device and storage medium are provided to solve the problem in the related art that a text summary that correctly expresses the video content cannot be generated.
[0006] In a first aspect, a method for generating a video information summary is provided in this embodiment, including:
[0007] Obtaining an initial video and a preset text description of a target object;
[0008] Input the initial video and text description into the trained open-world object detection model for key frame detection to obtain the key frames containing the target object in the initial video;
[0009] Clustering the key frames of several frames to obtain the initial video information summary;
[0010] Inputting the initial video information summary into the picture-text extraction unit to extract the text description, and obtaining the picture text description of the initial video information summary;
[0011] Inputting the picture text description of the initial video information summary and the initial video information summary into the video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation;
[0012] The aligned video feature representation is input into the text generation unit to obtain the target video information summary.
[0013] In some of the embodiments, clustering key frames of several frames to obtain an initial video information summary includes:
[0014] Extracting feature representations of key frames of several frames;
[0015] The feature representation of the key frame is input into the trained backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain the initial video information summary.
[0016] In some of the embodiments, the backbone network model adopts the Swin Transformer model.
[0017] In some of the embodiments, K-means clustering analysis is performed based on the backbone network model to obtain an initial video information summary, including:
[0018] Based on the backbone network model, the cosine similarity between key frames is used as the distance metric. According to the distance metric, K-means clustering analysis is performed to obtain the initial video information summary.
[0019] In some of the embodiments, the feature representation of the key frame is input into the trained backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain an initial video information summary, including:
[0020] The feature representation of the key frame containing the target object is input into the backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain multiple clustered initial video information summaries;
[0021] The K nearest neighbor method is used to detect abnormal frames in the clustered initial video information summary, and video frames with values greater than a preset threshold are eliminated to obtain the initial video information summary.
[0022] In some embodiments, the initial video information summary is input into a picture-text extraction unit to obtain a picture text description of the initial video information summary, including:
[0023] Extract the feature representation of key frames in the initial video information summary through the pre-trained BLIP-2 model;
[0024] The feature representation of the key frames in the initial video information summary is input into the autoregressive text generator for text generation to obtain the image text description of the initial video information summary.
[0025] In some of the embodiments, the text generation unit is an autoregressive text generator.
[0026] In a second aspect, a video information summary generation device is provided in this embodiment, including: an acquisition module, a key frame extraction module, a key frame clustering module, a picture-text conversion module, an alignment module and a generation module, wherein:
[0027] An acquisition module, used to acquire an initial video and a preset text description of a target object;
[0028] A key frame extraction module is used to input the initial video and text description into the trained open-world object detection model for key frame detection, and obtain the key frames containing the target object in the initial video;
[0029] A key frame clustering module is used to cluster key frames of several frames to obtain an initial video information summary;
[0030] A picture-text conversion module, used for inputting the initial video information summary into the picture-text extraction unit to extract the text description, and obtaining the picture-text description of the initial video information summary;
[0031] An alignment module, used for inputting the picture text description of the initial video information summary and the initial video information summary into the video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation;
[0032] The generation module is used to input the aligned video feature representation into the text generation unit to obtain the target video information summary.
[0033] In a third aspect, an electronic device is provided in this embodiment, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the video information summary generation method described in the first aspect is implemented.
[0034] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored. When the program is executed by a processor, the method for generating a video information summary described in the first aspect is implemented.
[0035] Compared with the related art, the video information summary generation method provided in this embodiment obtains the initial video and the preset text description for the target object; inputs the initial video and the text description into the trained open world target detection model for key frame detection to obtain the key frame containing the target object in the initial video; clusters the key frames of several frames to obtain the initial video information summary; inputs the initial video information summary into the picture-text extraction unit to extract the text description to obtain the picture text description of the initial video information summary; inputs the picture text description of the initial video information summary and the initial video information summary into the video-text semantic alignment unit for semantic alignment to obtain the aligned video feature representation; inputs the aligned video feature representation into the text generation unit to obtain the target video information summary. The text summary that correctly expresses the video content is generated, and the correctness of the text summary content is improved.
[0036] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0038] Figure 1 It is a hardware structure block diagram of a terminal of the video information summary generation method of this embodiment.
[0039] Figure 2 4 is a flowchart of the method for generating a video information summary of this embodiment.
[0040] Figure 3 4 is a flowchart of another method for generating a video information summary according to the present embodiment.
[0041] Figure 4 This is a preferred flow chart of the method for generating a video information summary of this embodiment.
[0042] Figure 5 It is a structural block diagram of the video information summary generation device of this embodiment. DETAILED DESCRIPTION
[0043] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0044] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0045] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 4 is a hardware structure diagram of a terminal of the video information summary generation method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0046] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the video information summary generation method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0048] In this embodiment, a method for generating a video information summary is provided. Figure 2 is a flow chart of the video information summary generation method of this embodiment. Figure 2 As shown, the process includes the following steps:
[0049] Step S201, obtaining an initial video and a preset text description for a target object.
[0050] Specifically, an initial video is obtained, wherein the initial video can come from various sources, such as surveillance cameras, social media platforms, personal mobile phones, professional filming equipment, etc. These videos may contain different resolutions, frame rates, encoding formats, etc. The initial video content may contain a variety of elements, such as people, animals, scenes, objects, etc. Specifically, the required initial video can be selected according to actual application requirements. This embodiment does not specifically limit this. A text description for the target object is pre-set in advance as needed. The text description is used to extract the required video summary. The text description can be the name, attributes, location, behavior, etc. of the target object.
[0051] Step S202 , inputting the initial video and text description into the trained open-world object detection model to perform key frame detection, and obtaining key frames containing the target object in the initial video.
[0052] The detection scope of traditional target detection algorithms (non-open world, Close-Set Object Detection) is limited to pre-defined known categories, that is, categories that have appeared in the training set, and cannot identify targets when targeting new scenes or new labels. For example, when there is a label of "lion" during training, the model will identify all targets labeled "lion", but the model cannot be used to detect horses, nor can it identify more precise targets, such as only identifying the lion on the left side of the picture. At the same time, most traditional target detection models are supervised models, which require the collection of a large amount of labeled data of target scenes for training. Every time you want to expand or change the set of recognizable objects, you need to collect and annotate data again, which is time-consuming and laborious, and lacks flexibility. In this application, an open-world target detection model is used as a target detection model. The open-world target detection model is first pre-trained to obtain a trained open-world target detection model. The preset text description of the target object and the initial video are input into the trained open-world target detection model for key frame detection to obtain a key frame containing the target object. The open-world target detection model can include multiple target events, thereby improving the target detection capability and flexibility.
[0053] Step S203: clustering key frames of several frames to obtain an initial video information summary.
[0054] Specifically, the key frames obtained according to the text description of the preset target objects include multiple preset target objects. When clustering the key frames, the analysis can be performed by identifying the scenes, actions and events corresponding to different target objects in the key frames, or by analyzing the colors, textures, shapes, etc. of different target objects in the key frames, or the key frames can be analyzed according to image quality, content similarity and action changes, or different target objects in the key frames can be analyzed according to semantic space correlation. After analysis, the main content, structure and timing relationship of different target objects in the key frames can be understood, and the key frames of the same target object in several key frames can be clustered to obtain a coherent video summary containing multiple groups of clusters of different target objects, that is, an initial video information summary.
[0055] Step S204: input the initial video information summary to the picture-text extraction unit to extract the text description, and obtain the picture text description of the initial video information summary.
[0056] The initial video information summary consists of a series of key frames that represent the main content of the video. Before being input into the image-text extraction unit, the key frames can be preprocessed, including scaling, cropping, denoising, etc., to improve the accuracy of subsequent image recognition and text extraction.
[0057] Before extracting text descriptions, the image-text extraction unit first loads models, algorithms, and parameters. The models can be pre-trained image recognition models, object detection models, OCR (optical character recognition) models, and natural language processing models.
[0058] The image-text extraction unit first performs image content recognition on each key frame in the initial video information summary, including identifying objects, scenes, actions, etc. in the image. By using the pre-trained image recognition model, the image-text extraction unit identifies the main content in the key frame and converts it into a picture text description.
[0059] Step S205 , inputting the picture text description of the initial video information summary and the initial video information summary into a video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation.
[0060] Specifically, the picture text description contains key information and descriptions extracted from key frames, and the initial video information summary contains the main content and structure of the video. The video-text semantic alignment unit semantically aligns the information in the picture text description with the information in the initial video information summary to obtain the corresponding video feature representation. The specific alignment method can be rule-based matching, statistical model-based matching, deep learning-based matching, etc. The specific alignment method can be determined according to actual conditions, and this application makes specific restrictions on this. Through alignment, the various parts in the picture text description are matched with the corresponding content in the initial video information summary to ensure their semantic consistency and enhance the feature representation of the video summary.
[0061] Step S206: input the aligned video feature representation into a text generation unit to obtain a target video information summary.
[0062] Specifically, the text generation unit is a module that converts input data into a target video information summary. The aligned video feature representation is input into the text generation unit, and the aligned video feature representation is converted into a corresponding text description to obtain a target video information summary.
[0063] Through the above steps S201 to S206, the initial video and the preset text description for the target object are obtained; the initial video and the text description are input into the trained open-world target detection model for key frame detection to obtain the key frames containing the target object in the initial video; the key frames of several frames are clustered to obtain the initial video information summary; the initial video information summary is input into the picture-text extraction unit to extract the text description to obtain the picture text description of the initial video information summary; the picture text description of the initial video information summary and the initial video information summary are input into the video-text semantic alignment unit for semantic alignment to obtain the aligned video feature representation; the aligned video feature representation is input into the text generation unit to obtain the target video information summary. Compared with the current traditional static video summary technology that extracts representative key frames from the video to form a new video, the present application extracts the key frames in the initial video according to the preset text description of the target object by using the open-world target detection model, and then clusters the key frames to obtain the video information summary of multiple target objects, and then extracts the picture text description from the video information summary of multiple target objects, and aligns the picture text description information with the initial video information summary information and converts it into text output to obtain the target video information summary. It is possible to generate a text summary that correctly describes the video content, thereby improving the accuracy of the text summary content.
[0064] In some embodiments, clustering the key frames of several frames to obtain an initial video information summary includes: extracting feature representations of the key frames of several frames; inputting the feature representations of the key frames into a trained backbone network model, and performing K-means clustering analysis based on the backbone network model to obtain the initial video information summary. Wherein, on the basis of the backbone network model using the Swin Transformer model, the cosine similarity between the key frames is used as a distance metric, and a K-means clustering analysis is performed based on the distance metric to obtain the initial video information summary.
[0065] Specifically, different backbone network models have different representation capabilities. The present invention adopts the Swin Transformer model as the backbone network model. Through the characteristics of hierarchical feature representation and shift window calculation, the model can have stronger modeling capabilities at different scales, and has the complexity of linear calculation, which enhances the performance and speeds up the operation. Since there may be multiple target objects in the preset text description of the target object, the key frames with the same features are clustered according to different target objects or requirements to obtain the initial video information summary of different target objects. Through the embedding module, the feature representation of the key frames of several frames is extracted, and the feature representation of the key frames is input into the trained backbone network model Swin Transformer model, the cosine similarity between the key frames is calculated, and the cosine similarity is used as a distance metric to perform K-means clustering to obtain N / M (rounded up, where N is the number of video frames after clustering, and M is the number of frames contained in the initial video summary) clustering, that is, the initial video information summary.
[0066] In another embodiment, the feature representation of the key frame is input into the trained backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain an initial video information summary, including:
[0067] The feature representation of the key frame containing the target object is input into the backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain multiple clustered initial video information summaries. The K nearest neighbor method is used to detect abnormal frames in the clustered initial video information summaries, and video frames with a value greater than a preset threshold are eliminated to obtain the initial video information summary.
[0068] Specifically, the key frames are clustered based on the features to obtain a clustered initial video information summary, which may contain abnormal frames. For the abnormal frames, an abnormal frame detection module is set to perform abnormal detection. This embodiment uses the K nearest neighbor method to perform abnormal frame detection on the clustered initial video information summary, which specifically includes:
[0069] (1) While obtaining the key frames, record the frame numbers of the key frames and arrange the key frames in the clustered initial video information summary in ascending order according to the frame numbers;
[0070] (2) Set the number of nearest neighbor points k=5;
[0071] (3) Calculate the average distance between each frame number and its nearest k points;
[0072] (4) Remove key frames whose average distance is greater than a threshold (set to 5 in this embodiment). Such key frames are abnormal frames.
[0073] In some of the embodiments, the initial video information summary is input into a picture-text extraction unit to obtain a picture text description of the initial video information summary, including: extracting feature representations of key frames in the initial video information summary through a pre-trained BLIP-2 model; inputting the feature representations of the key frames in the initial video information summary into an autoregressive text generator for text generation, to obtain a picture text description of the initial video information summary.
[0074] Specifically, the feature representation of the key frames in the initial video information summary is extracted through the BLIP-2 (Bidirectional Language-Image Pre-training with Pairings 2) model. The BLIP-2 model can process image and text data simultaneously. Through its visual-language interaction ability, it can identify the key frames in the video and then convert these key frames into feature representations. These feature representations contain the visual information of the key frames and provide a basis for subsequent text generation. The feature representation of the extracted key frames is input into the autoregressive text generator, and the text description is generated using an autoregressive method to obtain the image text description of the initial video information summary.
[0075] In some of the embodiments, the aligned video feature representation is input into a text generation unit to obtain a target video information summary, wherein the text generation unit is an autoregressive text generator.
[0076] Specifically, an autoregressive text generator is used in the text generation unit, which takes the aligned video feature representation as input and generates the corresponding target video information summary based on the prediction and autoregressive function of the autoregressive text generator.
[0077] This embodiment also provides a method for generating a video information summary. Figure 3 is a flowchart of another method for generating a video information summary according to this embodiment. Figure 3 As shown, the process includes the following steps:
[0078] Step S301, extracting text description by a picture-text extraction unit;
[0079] Specifically, the clustered multiple videos in the initial video information summary obtained by clustering are taken as input, the feature representation of the key frames in each video is extracted, and the feature representation is input into the sub-regression text generator to generate a text description of the key frames.
[0080] Step S302: semantically align the text description information with the initial video information summary through a video-text semantic alignment unit to obtain an aligned video feature representation.
[0081] Specifically, the text description information and the initial video information summary are input into the video-text semantic alignment unit, and the features in the text description information are matched with the features in the initial video information to obtain the aligned video feature representation, ensuring their semantic consistency and enhancing the feature representation of the video summary. In the video-text semantic alignment unit, the visual embedder is built based on the video converter VideoSwin Transformer, and the text embedder Text Embedder is built based on the clip text encoder CLIP Text Encoder.
[0082] Step S303: Input the aligned video feature representation into the autoregressive text generator through the text generation unit to obtain the target video information summary.
[0083] Specifically, the text generation unit uses an autoregressive text generator, takes the aligned video feature representation as input, and generates the corresponding target video information summary based on the prediction and autoregressive function of the autoregressive text generator. The autoregressive text generator is constructed using a transformer encoder structure.
[0084] Through the above steps S301 to S303, the text description of each frame in the initial video information summary is obtained by the picture-text extraction unit, the feature representation of the initial video information summary is enhanced by the semantic information of the text description of each frame by the video-text semantic alignment unit, and finally the target video information summary is obtained by the text generation unit in an autoregressive manner. The video information summary generation algorithm architecture proposed in this embodiment can reduce the semantic gap between video and text, map visual and language representations to a shared semantic space, improve the video description capability, and improve the correctness of the text summary content.
[0085] Figure 4 is a preferred flow chart of the video information summary generation method of this embodiment, such as Figure 4 As shown, the video information summary generation method includes the following steps:
[0086] Step S401, obtaining an initial video and a preset text description for a target object;
[0087] Step S402, inputting the initial video and text description into the trained open-world object detection model to perform key frame detection, and obtaining key frames containing the target object in the initial video;
[0088] Step S403, extracting feature representations of key frames of several frames;
[0089] Step S404, inputting the feature representation of the key frame into the trained Swin Transformer backbone network model, using the cosine similarity between the key frames as the distance metric, performing K-means clustering analysis, and obtaining multiple clustered initial video information summaries;
[0090] Step S405, using the K nearest neighbor method to perform abnormal frame detection on the clustered initial video information summary, removing video frames with a value greater than a preset threshold, and obtaining the initial video information summary;
[0091] Step S406, extracting feature representations of key frames in the initial video information summary through the pre-trained BLIP-2 model;
[0092] Step S407, inputting the feature representation of the key frame in the initial video information summary into the picture-text extraction unit for text generation to obtain a picture text description of the initial video information summary;
[0093] Step S408, inputting the picture text description of the initial video information summary and the initial video information summary into a video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation;
[0094] Step S409: input the aligned video feature representation into a text generation unit to obtain a target video information summary.
[0095] In this embodiment, a video information summary generating device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0096] Figure 5 is a structural block diagram of the video information summary generating device of this embodiment, such as Figure 5 As shown, the device 50 includes: an acquisition module 51, a key frame extraction module 52, a key frame clustering module 53, a picture-text conversion module 54, an alignment module 55 and a generation module 56, wherein:
[0097] An acquisition module 51 is used to acquire an initial video and a preset text description of a target object;
[0098] A key frame extraction module 52 is used to input the initial video and text description into the trained open world object detection model to perform key frame detection, and obtain key frames containing the target object in the initial video;
[0099] A key frame clustering module 53, used for clustering key frames of a plurality of frames to obtain an initial video information summary;
[0100] The image-text conversion module 54 is used to input the initial video information summary into the image-text extraction unit to extract the text description, and obtain the image-text description of the initial video information summary;
[0101] An alignment module 55 is used to input the picture text description of the initial video information summary and the initial video information summary into a video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation;
[0102] The generation module 56 is used to input the aligned video feature representation into the text generation unit to obtain the target video information summary.
[0103] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0104] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0105] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0106] S1, obtaining an initial video and a preset text description of the target object;
[0107] S2, inputting the initial video and text description into the trained open-world object detection model for key frame detection, and obtaining the key frames containing the target object in the initial video;
[0108] S3, clustering the key frames of several frames to obtain an initial video information summary;
[0109] S4, inputting the initial video information summary into the picture-text extraction unit to extract the text description, and obtaining the picture text description of the initial video information summary;
[0110] S5, inputting the picture text description of the initial video information summary and the initial video information summary into the video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation;
[0111] S6, input the aligned video feature representation into the text generation unit to obtain the target video information summary.
[0112] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0113] In addition, in combination with the video information summary generation method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any of the video information summary generation methods in the above embodiments is implemented.
[0114] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0115] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0116] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0118] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A video information summary generation method, It is characterized in that include: Obtaining an initial video and a preset text description of a target object; Inputting the initial video and the text description into a trained open-world object detection model to perform key frame detection to obtain a key frame containing the target object in the initial video; Clustering the key frames of a plurality of frames to obtain an initial video information summary; Inputting the initial video information summary into a picture-text extraction unit to extract a text description, thereby obtaining a picture text description of the initial video information summary; Inputting the picture text description of the initial video information summary and the initial video information summary into a video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation; Inputting the aligned video feature representation into a text generation unit to obtain a target video information summary; The step of inputting the initial video information summary into a picture-text extraction unit to extract a text description to obtain a picture text description of the initial video information summary includes: Extracting feature representations of key frames in the initial video information summary through a pre-trained BLIP-2 model; The feature representation of the key frame in the initial video information summary is input into the autoregressive text generator for text generation to obtain a picture text description of the initial video information summary.
2. The method for generating a video information summary according to claim 1, It is characterized in that The step of clustering the key frames of a plurality of frames to obtain an initial video information summary includes: Extracting feature representations of the key frames of the plurality of frames; The feature representation of the key frame is input into the trained backbone network model, and K-means clustering analysis is performed based on the backbone network model to obtain the initial video information summary.
3. The video information summary generation method according to claim 2, It is characterized in that The backbone network model adopts the Swin Transformer model.
4. The method for generating a video information summary according to claim 2, It is characterized in that The step of performing K-means clustering analysis based on the backbone network model to obtain the initial video information summary includes: Based on the backbone network model, the cosine similarity between the key frames is used as a distance metric, and a K-means clustering analysis is performed according to the distance metric to obtain the initial video information summary.
5. The video information summary generation method according to claim 2, It is characterized in that The step of inputting the feature representation of the key frame into the trained backbone network model, and performing K-means clustering analysis based on the backbone network model to obtain the initial video information summary includes: Inputting the feature representation of the key frame containing the target object into the backbone network model, performing K-means clustering analysis based on the backbone network model, and obtaining a plurality of clustered initial video information summaries; The K nearest neighbor method is used to detect abnormal frames on the clustered initial video information summary, and video frames with a value greater than a preset threshold are eliminated to obtain the initial video information summary.
6. The method for generating a video information summary according to claim 1, It is characterized in that The text generation unit is an autoregressive text generator.
7. A video information summary generation device, It is characterized in that include: Acquisition module, key frame extraction module, key frame clustering module, image-text conversion module, alignment module and generation module, where: The acquisition module is used to acquire an initial video and a preset text description of the target object; The key frame extraction module is used to input the initial video and the text description into the trained open world object detection model to perform key frame detection, so as to obtain the key frame containing the target object in the initial video; The key frame clustering module is used to cluster the key frames of several frames to obtain an initial video information summary; The image-text conversion module is used to input the initial video information summary into the image-text extraction unit to extract the text description, and obtain the image-text description of the initial video information summary; wherein, the inputting the initial video information summary into the image-text extraction unit to extract the text description, and obtaining the image-text description of the initial video information summary, includes: Extracting feature representations of key frames in the initial video information summary through a pre-trained BLIP-2 model; Inputting the feature representation of the key frame in the initial video information summary into the autoregressive text generator for text generation to obtain a picture text description of the initial video information summary; The alignment module is used to input the picture text description of the initial video information summary and the initial video information summary into the video-text semantic alignment unit for semantic alignment to obtain an aligned video feature representation; The generation module is used to input the aligned video feature representation into a text generation unit to obtain a target video information summary.
8. An electronic device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and the processor is configured to run the computer program to execute the video information summary generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for generating a video information summary according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
System and method for automatic extraction and generation of audiovisual product content abstract
CN103646094A
Video abstract generation method and device, storage medium and electronic equipment
CN114245232A
Video abstract generation method and device, equipment and storage medium
CN114780791A
Video description method based on vision and language semantic autonomous optimization alignment and medium
CN114880521A
Video information abstract generation method and device, storage medium and computer equipment
CN115757867A
