Video description method and system based on text content feature alignment

By extracting video features through a pre-trained visual encoder and combining them with text-video correlation maps for feature fusion and pooling, the problem of supervisory ambiguity in video text alignment is solved, and the accuracy of video description and subtitle quality are improved.

CN118628963AActive Publication Date: 2024-09-10JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS

Patent Information

Application Number
CN202411082674.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-09-10
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

The existing technology has the problem of supervisory ambiguity in video text alignment, which leads to inaccuracy in video description, especially insufficient alignment of video and subtitles, which affects the quality of video subtitles.

Method used

The video spatiotemporal features and action features are extracted through the pre-trained visual encoder, combined with the text video correlation map to perform feature fusion and pooling operations, generate target description text, and optimize video representation to achieve video text alignment.

Benefits of technology

It effectively suppresses redundant visual information and motion information, provides diverse video representations, and improves the accuracy of video text alignment and subtitle quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628963A
    Figure CN118628963A
Patent Text Reader

Abstract

The invention provides a video description method and system based on text content feature alignment. The method comprises the following steps: extracting a video through a pre-trained visual encoder and obtaining original video spatio-temporal features and original video action features; inputting the video frame and the text into a pre-trained visual language model to obtain a bounding box set and a confidence score set, and constructing a text video correlation graph based on the bounding box set and the confidence score set; obtaining refined spatial-temporal features and refined action features by using the text video correlation graph; and obtaining a target description text based on the original video spatio-temporal features, the refined spatio-temporal features, the original video action features and the refined action features. According to the method, a text is taken as a condition, a text video correlation graph is constructed by combining video frames, and video representation is optimized by fusing the text video correlation graph with video spatial-temporal features and video action features, so that the effect of video text alignment is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision and video processing, and in particular relates to a video description method and system based on text content feature alignment. Background Art

[0002] Video description is an active research topic, and the goal is to describe the content of a video in natural language sentences. It has a wide range of applications, such as assisting the visually impaired, video retrieval, and human-computer interaction. In recent years, video captioning technology has made significant progress due to the advancement of deep learning technology and the collection of large-scale datasets such as MSR-VTT and MSVD. However, since the video itself contains a variety of objects, events, and complex scenes, it is difficult for annotators to fully describe the video in one sentence, so each video often has multiple descriptions to mitigate annotation bias. In order to more accurately understand the relationship between video and description, researchers continue to explore advanced model architectures. Despite the progress made in existing models, they still face a key problem: the problem of ambiguous supervision, also known as the "one-to-many" problem, which ultimately stems from the insufficient alignment of videos and subtitles.

[0003] To solve this problem, the latest research methods attempt to achieve video-text alignment by masking video frames with low similarity to text. However, this method may cause a large amount of spatial details to be lost during operation, and is mainly used for cross-modal retrieval tasks and cannot be directly applied to video caption generation tasks.

[0004] As mentioned above, there is still a lack of reliable methods based on video text alignment, which directly affects the accuracy of video description. Based on this, it is necessary to propose a new method to achieve video text alignment and improve the quality of subtitles to solve the above technical problems. Summary of the invention

[0005] In view of the above situation, the main purpose of the present invention is to propose a video description method based on text content feature alignment to solve the above technical problems.

[0006] The present invention provides a video description method based on text content feature alignment, the method comprising the following steps: Step 1: extract the video through the pre-trained visual encoder and obtain the original video spatiotemporal features and the original video motion features; Step 2: Input the video frame and text into the pre-trained visual language model to obtain a bounding box set and a confidence score set, and construct a text-video correlation graph based on the bounding box set and the confidence score set; Step 3: Use the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; The original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features are fused, and the fusion result is used as the video representation. The video representation is decoded to obtain the target description text.

[0007] The present invention also proposes a video description system based on text content feature alignment, the system comprising: The feature extraction module extracts the video through the pre-trained visual encoder and obtains the original video spatiotemporal features and original video motion features; A correlation graph construction module inputs video frames and text into a pre-trained visual language model to obtain a set of bounding boxes and a set of confidence scores, and constructs a text-video correlation graph based on the set of bounding boxes and the set of confidence scores; The description text generation module uses the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features are fused, and the fusion result is used as the video representation, and the video representation is decoded to obtain the target description text.

[0008] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention takes text content as a condition and combines video frames to construct a text-video correlation graph, and integrates it with video spatiotemporal features and video motion features to optimize video representation. It not only provides diversified video representations, but also suppresses redundant or distracting visual information and motion information, realizes video-text alignment, and generates target description text.

[0009] 2. Additional aspects and advantages of the present invention will be given in part in the following description, and in part will become apparent from the following description, or will be understood through embodiments of the present invention.

[0010] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description or learned through embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A flowchart of the video description method based on text content feature alignment proposed by the present invention; Figure 2 This is the overall framework diagram of the video description system based on text content feature alignment proposed by the present invention. DETAILED DESCRIPTION

[0012] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0013] These and other aspects of the embodiments of the present invention will be apparent with reference to the following description and accompanying drawings. In these descriptions and accompanying drawings, some specific implementations of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0014] See also Figure 1 The embodiment of the present invention provides a video description method based on text content feature alignment, the method comprising the following steps: Step 1: extract the video through the pre-trained visual encoder and obtain the original video spatiotemporal features and the original video motion features; In step 1, the video is extracted by SwinTransformer to extract the grid and obtain the original video spatiotemporal features and the original video motion features. The specific steps are as follows; Each video is uniformly sampled, and the pre-trained visual encoder is used to extract and obtain the visual grid features. The process has the following relationship: ; in, Indicates The visual grid features of the frame, represents the number of grid features per frame, Indicates Frame Visual grid features of block areas; All visual grid features are spliced ​​together to obtain the original video spatiotemporal features. The process has the following relationship: ; in, represents the spatiotemporal characteristics of the original video, represents the number of frames uniformly sampled from each video, and ; Text4Vis is used to extract the action features of each frame of the video to obtain the original video action features. The process has the following relationship: ; in, Indicates The motion characteristics of the frame, Indicates the sequence number of the video frame, Represents the original video action features.

[0015] Step 2: Input the video frame and text into the pre-trained visual language model to obtain a bounding box set and a confidence score set, and construct a text-video correlation graph based on the bounding box set and the confidence score set; In step 2, since the video is inconsistent with the text description in time and space, in order to accurately match the fine-grained image-text correspondence, the pre-trained visual language model is first used to find the bounding box set related to the given text and obtain the corresponding confidence score set. The video frame and text are input into the pre-trained visual language model to obtain the bounding box set and the confidence score set. Based on the bounding box set and the confidence score set, a text-video correlation graph is constructed. The specific steps are as follows: The pre-trained visual language model uses the GLIPv2 model, which finds the set of bounding boxes related to the given text and calculates the corresponding set of confidence scores; Since the pre-trained visual language model may generate low-confidence bounding boxes, it means that these bounding box areas have a low degree of match with the text content or are even wrong and should be discarded. Therefore, a confidence threshold is set to filter the bounding box set to obtain the collection of all bounding boxes after filtering. The process has the following relationship: ; in, Indicates the filtered The set of all bounding boxes for a frame, Indicates Frame bounding boxes, Indicates the ordinal number of the bounding box, Indicates The total number of bounding boxes in the frame; The set of confidence scores corresponding to the set of all bounding boxes after filtering is: ; in, Representation and The corresponding set of confidence scores, Indicates Frame The confidence of the bounding box, and ; In step 2, a blank image is constructed for each frame in the video. The process has the following relationship: ; in, and Respectively represent the height and width of the video frame, Indicates Blank picture of the frame; Map the confidence score set corresponding to all the bounding box sets after filtering to the blank image and get the heat map. The process has the following relationship: ; in, represents pixel coordinates, Indicates the sequence number of the grid area, Indicates Heatmap of frames, represents the indicative function, represents the average pooling operation; The heat map is divided and average pooled to obtain the text-video correlation map. The process has the following relationship: ; in, Indicates Text-video correlation graph of frames, Indicates the video area number. Indicates Frame No. The similarity between the block video area and the given text; After the above steps, the text-video correlation graph is constructed, which can be used for the subsequent fine-grained alignment of video and text.

[0016] Step 3: Use the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; fuse the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features, and use the fusion result as the video representation, decode the video representation, and obtain the target description text.

[0017] In step 3, the text-video correlation graph is used to perform a pooling operation on the original video spatiotemporal features and the original video action features in the time dimension to obtain refined spatiotemporal features and refined action features. The specific steps are as follows: The text-video correlation graph is normalized to obtain a normalized text-video correlation graph. The normalized text-video correlation graph is used to perform a pooling operation on the original video spatiotemporal features in the time dimension to obtain refined spatiotemporal features. The process has the following relationship: ; in, represents the refined video features, represents the normalized weight, Indicates Frame No. The grid characteristics of the block area, Indicates Frame No. The similarity between the grid features of the block area and the given text, Indicates The refined visual features of the block area, Indicates Frame No. The similarity between the grid features of the block area and the given text; In step 3, the text-video correlation graph is subjected to frame-level average pooling operation to obtain a pooled text-video correlation graph, and the original video action features are subjected to time-dimension pooling operation using the pooled text-video correlation graph to obtain refined action features. The process has the following relationship: ; in, Represents the refined action characteristics, Indicates The weight after frame pooling, Indicates The weight of the frame after pooling; In step 3, in order to improve the video text alignment, the original video spatiotemporal features and the original video action features are selectively fused to optimize the video representation according to the correlation graph constructed across video frames. A high score in the correlation graph indicates that the spatiotemporal region is closer to the semantic relevance of the given title, so the corresponding features should be emphasized, and vice versa. The target description text is obtained based on the original video spatiotemporal features, the refined spatiotemporal features, the original video action features, and the refined action features. The specific steps are as follows: The fusion of the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features, and the refined motion features is achieved by splicing operations. The corresponding relationship is as follows: ; in, represents video representation; The video representation obtained above is fed into the Transformer decoder to generate the target description text.

[0018] See also Figure 2 The embodiment of the present invention further provides a video description system based on text content feature alignment, the system comprising: The feature extraction module extracts the video through the pre-trained visual encoder and obtains the original video spatiotemporal features and original video motion features; A correlation graph construction module inputs video frames and text into a pre-trained visual language model to obtain a set of bounding boxes and a set of confidence scores, and constructs a text-video correlation graph based on the set of bounding boxes and the set of confidence scores; The description text generation module uses the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; and obtains the target description text based on the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features.

[0019] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0020] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0021] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A video description method based on text content feature alignment, characterized in that: The method comprises the following steps: Step 1: extract the video through the pre-trained visual encoder and obtain the original video spatiotemporal features and the original video motion features; Step 2: Input the video frame and text into the pre-trained visual language model to obtain a set of bounding boxes and a set of confidence scores, and construct a text-video correlation graph based on the set of bounding boxes and the set of confidence scores; Step 3: Use the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; The original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features are fused, and the fusion result is used as the video representation. The video representation is decoded to obtain the target description text.

2. The video description method based on text content feature alignment according to claim 1, characterized in that: In step 1, the video is extracted through a pre-trained visual encoder to obtain the original video spatiotemporal features and the original video motion features, and the specific steps are as follows; Each video is uniformly sampled, and the pre-trained visual encoder is used to extract and obtain the visual grid features. The process has the following relationship: ; in, Indicates The visual grid features of the frame, represents the number of grid features per frame, Indicates Frame Visual grid features of block areas; All visual grid features are spliced ​​together to obtain the original video spatiotemporal features. The process has the following relationship: ; in, represents the spatiotemporal characteristics of the original video, represents the number of frames uniformly sampled from each video, and ; The pre-trained visual encoder is used to extract the action features of each frame of the video to obtain the original video action features. The process has the following relationship: ; in, Indicates The motion characteristics of the frame, Indicates the sequence number of the video frame, Represents the original video action features.

3. The video description method based on text content feature alignment according to claim 2, characterized in that: In step 2, the video frame and text are input into the pre-trained visual language model to obtain a bounding box set and a confidence score set, and a text-video correlation graph is constructed based on the bounding box set and the confidence score set. The specific steps are: The pre-trained visual language model uses the GLIPv2 model, which finds the set of bounding boxes related to the given text and calculates the corresponding set of confidence scores; Set the confidence threshold, filter the bounding box set, and obtain the set of all bounding boxes after filtering. The process has the following relationship: ; in, Indicates the filtered The set of all bounding boxes for a frame, Indicates Frame bounding boxes, Indicates the ordinal number of the bounding box, Indicates The total number of bounding boxes in the frame; The set of confidence scores corresponding to the set of all bounding boxes after filtering is: ; in, Representation and The corresponding set of confidence scores, Indicates Frame The confidence of the bounding box, and .

4. The video description method based on text content feature alignment according to claim 3 is characterized in that: Construct a blank image for each frame in the video. The process has the following relationship: ; in, and Respectively represent the height and width of the video frame, Indicates Blank picture of the frame; Map the confidence score set corresponding to all the bounding box sets after filtering to the blank image and get the heat map. The process has the following relationship: ; in, represents pixel coordinates, Indicates the sequence number of the grid area, Indicates Heatmap of frames, represents the indicative function, represents the average pooling operation; The heat map is divided and average pooled to obtain the text-video correlation map. The process has the following relationship: ; in, Indicates Text-video correlation graph of frames, Indicates the video area number. Indicates Frame No. The similarity between the block video region and the given text.

5. The video description method based on text content feature alignment according to claim 4, characterized in that: In step 3, the text-video correlation graph is used to perform a pooling operation on the original video spatiotemporal features and the original video action features in the time dimension to obtain refined spatiotemporal features and refined action features. The specific steps are as follows: The text-video correlation graph is normalized to obtain a normalized text-video correlation graph. The normalized text-video correlation graph is used to perform a pooling operation on the original video spatiotemporal features in the time dimension to obtain refined spatiotemporal features. The process has the following relationship: ; in, represents the refined video features, represents the normalized weight, Indicates Frame No. The grid characteristics of the block area, Indicates Frame No. The similarity between the grid features of the block area and the given text, Indicates The refined visual features of the block area, Indicates Frame No. The similarity between the grid features of the block area and the given text.

6. The video description method based on text content feature alignment according to claim 5, characterized in that: The text-video correlation graph is subjected to frame-level average pooling operation to obtain a pooled text-video correlation graph. The pooled text-video correlation graph is used to perform a time-dimension pooling operation on the original video action features to obtain refined action features. The process has the following relationship: ; in, Represents the refined action characteristics, Indicates The weight after frame pooling, Indicates The weights after frame pooling.

7. The video description method based on text content feature alignment according to claim 6, characterized in that: In step 3, the fusion of the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features, and the refined motion features is achieved by using a splicing operation, and the corresponding relationship is as follows: ; in, Represents a video representation.

8. The video description method based on text content feature alignment according to claim 7, characterized in that: In step 3, the decoding operation adopts a Transformer decoder.

9. A video description system based on text content feature alignment, characterized in that: The system applies the video description method based on text content feature alignment as described in any one of claims 1 to 8 above, and the system comprises: The feature extraction module extracts the video through the pre-trained visual encoder and obtains the original video spatiotemporal features and original video motion features; A correlation graph construction module inputs video frames and text into a pre-trained visual language model to obtain a set of bounding boxes and a set of confidence scores, and constructs a text-video correlation graph based on the set of bounding boxes and the set of confidence scores; The description text generation module uses the text-video correlation graph to perform pooling operations on the original video spatiotemporal features and the original video motion features in the time dimension to obtain refined spatiotemporal features and refined motion features; the original video spatiotemporal features, the refined spatiotemporal features, the original video motion features and the refined motion features are fused, and the fusion result is used as the video representation, and the video representation is decoded to obtain the target description text.

Citation Information

Patent Citations

  • Video abstraction method in self-supervision mode

    CN117150076A

  • Video description method and system based on multi-modal fine-grained alignment network

    CN117372936A

  • Systems and methods for video and language pre-training

    US20230154146A1

Cited By

  • Double-relation-based time alignment and adaptive region optimization method and system

    CN120526437A