A dense event description method based on graph neural network

Video features are extracted through optical flow method, 3D convolution network and 2D convolution network, combined with graph neural network and LSTM, to solve the problem of accuracy of event time and description in the video, and achieve accurate time segmentation and segmentation of all events in the video. Language description makes up for the shortcomings of existing technology.

CN113158735BActive Publication Date: 2024-08-23BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110075596.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-20
Publication Date
2024-08-23
Estimated Expiration
2041-01-20

AI Technical Summary

Technical Problem

The existing technology cannot accurately describe the occurrence time and language description of multiple events in the video, and cannot fully identify the events in the video, and the timing information is not fully utilized.

Method used

Optical flow method, 3D convolutional network and 2D convolutional network are used to extract video features, construct spatial graphs and temporal graphs, update object features and event features through graph neural networks, and use anchor borders and non-maximum suppression to screen candidate time regions. Combined with LSTM for language description.

Benefits of technology

It achieves accurate time segmentation and language description of dense events in videos, ensuring the completeness of event proposals and the rationality and accuracy of descriptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113158735B
    Figure CN113158735B
Patent Text Reader

Abstract

The present invention discloses a dense event description method based on a graph neural network, which can generate the time and corresponding text description of all events according to the video. The method comprises the following steps: extracting features from the video data using the optical flow method, 3D convolutional network and 2D convolutional network respectively; establishing a spatial graph for the features extracted by the 2D convolutional network, and splicing the features generated after the iteration of the graph convolutional network with the optical flow method and the 3D convolutional features into long features; using anchor frames to detect features of different time periods and divide them into different dense event time regions; using a non-maximum suppression strategy to eliminate candidate time regions with too many overlapping regions and low scores; constructing a time graph for each candidate region feature, and updating each node feature through GAT; decoding each candidate region feature into corresponding text output through LSTM. The present invention combines spatial information and temporal information to generate more accurate event occurrence time and corresponding description language.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video description, and in particular to a dense event description method based on graph neural network. Background Art

[0002] Video description is to describe the information content in the video in words, mainly for one event that occurs in the video. Dense event description is to divide multiple events that occur in the video and describe them separately on this basis. This research field is a research direction that combines computer vision with natural language processing. It is a research direction with practical significance and research value. The existing technology can describe the video in words but cannot determine the specific time of occurrence, and does not consider the problem of video timing. The present invention hopes to obtain a more precise event occurrence time and an accurate language description, and can obtain the start and end time of different events in the video and event descriptions.

[0003] Regarding the problem of video feature extraction, unlike images, videos have temporal significance. Although 3D convolution and other methods have been used to extract features with temporal information, the extraction effect is still not good enough. The most common method for the time division problem of dense event description is the action probability distribution curve, which divides the event proposal into two stages. First, the probability estimate of whether the current time point is an action is obtained by analyzing a single frame image. When applied to the entire video frame sequence, the action probability distribution curve with the horizontal axis corresponding to the video duration direction can be obtained. Then, candidate temporal action region proposals are generated from high-probability areas. Finally, the candidate proposal features are sent to the action classifier to give the result of temporal action detection. However, this method is prone to the lack of proposals, and the events in the video cannot be fully identified. The research on video description mainly includes description generation based on language templates and description generation based on sequence learning. The language template-based method combines the detected keywords with pre-defined language templates to generate a sentence sequence, but this method is not flexible enough and is limited to the number and types of templates, and cannot form diverse sentences. The language description based on sequence learning uses the framework of convolutional neural network + recurrent neural network to generate more flexible and varied language sentences. However, since the video is composed of pictures with timing information, timing information is very important for the description of language. Good use of timing information can better complete the language description.

[0004] There is currently no effective solution to the problems in related technologies. Summary of the invention

[0005] In order to solve the problem that the existing technology cannot accurately describe multiple events in a video, the present invention adopts optical flow method, 3D convolutional network and 2D convolutional network to extract features from the video, and builds spatial graph and time graph of the video to better learn the time dimension and spatial dimension information in the video, so as to better describe dense events. The purpose of the present invention is to segment the occurrence time of all dense events in a video and describe each event in turn with language and text.

[0006] The invention includes: extracting features from the video through three methods: optical flow method, 3D convolutional network and 2D convolutional network, wherein the optical flow method extracts video action features, the 3D convolutional network extracts video visual features, and the 2D convolutional network extracts video objects. If any one of these methods is missing, the video feature acquisition is incomplete. In order to obtain the relationship between objects, a spatial graph is established for the objects recognized by the 2D convolutional network, and the object features are updated through the existing graph convolutional neural network technology so that it carries the features of adjacent objects. An anchor frame of a fixed size is established and different candidate time regions are generated for different start times. The time regions with IoU greater than the threshold are screened through non-maximum suppression, and the start and end times corresponding to the time regions are output. A time graph is established for each time region to obtain the information of the frames before and after the time region, and each group of long features in the time region is used as a graph node, and the existing GAT network is used to update its nodes. Finally, the features are decoded into language text through LSTM and output corresponding to the previous time region.

[0007] A dense event description method based on graph neural network includes the following steps:

[0008] (1) Using the optical flow method, 3D convolutional network and 2D convolutional network to extract features from video data respectively, where the optical flow method extracts video action features, the 3D convolutional network extracts video visual features, and the 2D convolutional network extracts video objects;

[0009] (2) To obtain the relationship between objects in the video, a spatial graph is built for the objects extracted by the 2D convolutional network in each group in step (1). The object features iteratively generated by the graph convolutional network are concatenated with the optical flow method and the 3D convolutional features to form the long features of the group.

[0010] (3) In order to make each group of long features carry the information of the previous and next groups to better divide the event area, the long features of each group obtained in step (2) are input into the LSTM network in chronological order to obtain the features of each group with context information, and the features of all groups are spliced ​​into video features in chronological order;

[0011] (4) Using anchor boxes to detect video features and divide them into candidate time regions of different events, where the anchor boxes are pre-fixed windows of different sizes, and multiple time regions are obtained by sliding at different starting times;

[0012] (5) Extract the video features of each candidate time region, predict the score of each candidate region through two convolutional layers, use non-maximum suppression to filter the time regions, arrange all candidate time regions in descending order of scores, calculate the intersection over union (IoU) of the candidate time region with the highest score and the remaining candidate time regions, delete the time regions with IoU greater than the threshold, and the remaining time regions are the time regions where the events occur in the video. The start time and end time of each region are the start and end time of each event in the dense event description;

[0013] (6) In order to better decode each remaining time region into a text description, the long feature of each group obtains the feature information of other groups in the time region. Extract the video features of each remaining time region in step (5), construct a time graph for each time region, and update the node features through GAT to obtain dense event features;

[0014] (7) Each group of dense event features in step (6) is decoded into corresponding text output through LSTM. The output is the final event description. Each description corresponds to the start time and end time of step (4). The model output is the start time, end time and text description of the event.

[0015] The 3D convolution of step (1) adopts the C3D model, and the 2D convolution adopts the target detection model. The first 20 object categories and object features are obtained as the dense event description focus objects. Every 16 frames are used as a group to extract 3D convolution features and optical flow features, and one frame is randomly selected as a key frame to extract the object category and features.

[0016] The spatial graph nodes of step (2) are the 20 object categories and object features of the key frames. The connectivity between different objects is calculated by the cosine similarity of the object category word vectors. If it is higher than the threshold, they are connected, otherwise they are not connected.

[0017] The nodes of the time graph constructed in step (6) are different groups of long features in each time region.

[0018] The model GAT of step (6) uses a 2-layer GAT with a multi-head attention mechanism. Since the relationship between each set of features cannot be calculated using a formula, the GAT network is used to model the connection relationship from multiple angles through multiple attention matrices.

[0019] Beneficial Effects

[0020] The dense event description method based on graph neural network proposed in this invention can extract video features as completely as possible. Constructing spatial object connections by means of spatial graphs is more conducive to judging whether an event has occurred. Complete proposals are extracted by means of anchor borders to ensure that proposals for events occurring in the video are not lost. Finally, by establishing a time graph for the candidate area, event timing information is obtained to make the generated text description more reasonable and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Flow chart of the method of the present invention

[0022] Figure 2 The method model diagram of the present invention

[0023] Figure 3 Constructing a model for the spatial graph of the present invention DETAILED DESCRIPTION

[0024] The following further describes the embodiments of the present invention in conjunction with the accompanying drawings, but the implementation of the present invention is not limited thereto.

[0025] The flow chart of the present invention is as follows Figure 1 As shown, the following further describes.

[0026] like Figure 2 As shown, a dense event description method based on graph neural network specifically includes:

[0027] As shown in the figure, the video is a man playing a musical instrument from 0 to 69 seconds, and a woman laughing from 38 to 59 seconds. The input data is a video frame sequence V = {v1, v2, ..., v L}, L is the total number of video frames.

[0028] Step (1) comprises the following steps:

[0029] (1-1) The video is processed using the optical flow method: 16 frames of the video are taken as a group as input to extract action features. This video has a total of n = L / 16 groups. The previous and next frames are compared to calculate the change gradient in the x and y directions. The output channel is 2 action features f l ={f l1 ,f l2 ,…,f ln},like Figure 2 (a) The first branch is shown;

[0030] (1-2) Use 3D convolution processing on the video: Use the pre-trained C3D model to input the video into the model in groups of 16 frames and output the visual features f c ={f c1 ,f c2 ,…,f cn},like Figure 2 (a) The second branch is shown;

[0031] (1-3) 2D convolution is used to process the video: a frame is randomly generated in every 16 frames as a key frame, and the object category and features in the key frame are detected using the Faster R-CNN target detection model pre-trained on other datasets. The object category detection scores are arranged from high to low, and the object features corresponding to the top 20 object categories are taken as the features f of the video objects extracted by the 2D convolutional network. o ={f o1 ,f o2 ,…,f on}.

[0032] Step (2) comprises the following steps:

[0033] (2-1) Target feature f extracted from (1-3) o Construct a spatial graph G, such as Figure 3 As shown in Figure 1, G encodes 20 object categories and features into 20 graph nodes, obtains each object category word vector through pre-defined word vectors, and calculates the cosine similarity of word vectors. If the cosine similarity is higher than 60%, it means that the two nodes are connected, otherwise it means that the two nodes are not connected. In this way, the adjacency matrix A is established, and A=A+I is set to ensure the existence of self-connection, where I is the unit matrix. The updated object feature f is obtained by updating the node through the existing graph convolutional neural network g ={f g1 ,f g2 ,…,f gn}, that is, input the feature matrix into the graph convolutional neural network to obtain the updated object feature f g ,like Figure 2 (a) As shown in the third branch, the training method of the graph convolutional neural network adopts gradient descent to train the weight matrix of each layer, and each layer of weight matrix is ​​shared;

[0034] (2-2) Generate an action feature f every 16 frames l , visual feature f c , object feature f g , respectively representing the change of the previous and next frames, the visual features of the current segment, and the object connection of the current segment. Each group is concatenated into a long feature f = {f l ,f c ,f g};

[0035] Step (3) comprises the following steps:

[0036] The long short-term memory model LSTM is used to encode each group of long feature vectors obtained in step (2-2) again, and the long feature vectors of all groups f = {fl ,f c ,f g} is input to LSTM, and the output result contains the video features of the previous and next frames F = {f1′,f2′,...,f n ′}, where f n ′ represents the features after LSTM re-encodes the nth group of videos, which is used to better determine the behavior type;

[0037] Step (4) comprises the following steps:

[0038] The video feature F obtained in step (3) is detected using anchor frames in different time periods, such as Figure 2 As shown in (b), the anchor border is a pre-fixed window of different sizes. The sizes of the anchor border are set to 6 scales of 2, 4, 8, 16, 32, and 64 respectively. The scale unit is group. The anchor border is slid according to different starting times to obtain multiple candidate time regions. The rectangles in the second row and below in the figure are anchor borders, which are multi-scale windows predefined before training.

[0039] Step (5) comprises the following steps:

[0040] (5-1) The candidate time regions are classified and regressed by using a full convolution method. That is, the video features of the candidate time regions are sequentially input into two 1×1×1 convolutional layers to predict the probability score of each candidate time region containing dense events, so as to determine whether an event has occurred; wherein, the video features of each candidate time region are composed of the concatenation of the long features of all the groups contained in the time region.

[0041] (5-2) In order to eliminate the duplication of candidate time regions in step (4), a non-maximum suppression strategy is used to eliminate candidate time regions with too many overlapping time regions and low scores. That is, all candidate time regions are arranged in descending order according to the probability scores, and the intersection over union (IoU) of the candidate time region with the highest score and the remaining candidate time regions is calculated. In this embodiment, candidate time regions with a time region duplication higher than 80% and candidate time regions with a probability score lower than 0.8 are deleted. The full score is 1, and the score of the retained candidate time region is used as the time region where the event occurs in the video. The expression is as follows:

[0042]

[0043] in are the start and end time of the time zone respectively, and N is the number of the time zone.

[0044] In this example, N is 2, P1 = {0.0, 69.19}, P2 = {38.05, 59.52}.

[0045] Step (6) is as follows:

[0046] For each dense event occurrence time region P, group them and extract the long feature f = {f l ,f c ,f g}, each long feature is a node, and the long features of all groups in the time region are input into the existing multi-head attention mechanism graph neural network GAT to obtain the long feature f′ of the updated node, that is, the update of the time graph node is completed; Figure 2 (c) shows the process of constructing a time graph for a time region P.

[0047] Step (7) For the updated long feature f′ generated in step (6), LSTM is used as a decoder, and different groups of long features f′ in a time region are input into LSTM in sequence and decoded into corresponding words. In this example, the output is "start:0.0 end:69.19 A man is playing the bagpipes in front of people." "start:38.05end:59.52 The people on the couch in front of him start laughing.".

[0048] In step (6-1), the existing multi-head attention mechanism graph neural network GAT is used to update the time graph nodes, and the attention coefficient is calculated as follows:

[0049]

[0050] Among them, α ij is the attention coefficient from node j to node i, N i is the neighboring node of node i, f i 、f j is the feature vector of nodes i and j, W is the linear transformation weight matrix of each node, a is the weight vector, LeakyReLU is the activation function, and || means concatenating the two vectors.

[0051] The multi-head attention mechanism calculates the hidden state through k independent attention mechanisms, and then takes the average value as the node feature h′ associated with the node. i , and add it to the feature of this node as the updated long feature f′:

[0052]

[0053] in, is the normalized attention coefficient of the kth attention head, Wk are k weight matrices, h j is the long feature of the nodes except the i-node.

[0054] To sum up, with the help of the above technical scheme, the present invention proposes a intensive event description method based on graph neural network. By performing a series of operations such as feature extraction, event proposal division, and language and text description on the video, all events can be described in the form of text. It can find the events occurring in all videos as much as possible, and perform text descriptions with high accuracy in turn without manual editing, so that the viewer can clearly know all the contents that have occurred, which makes up for the defects of the existing intensive event description technology.

Claims

1. A dense event description method based on graph neural network, characterized in that: The specific steps include: (1) The videos to be analyzed are divided into groups, and features are extracted from each group of video data using the optical flow method, 3D convolutional network, and 2D convolutional network. The optical flow method extracts video action features, the 3D convolutional network extracts video visual features, and the 2D convolutional network extracts features and object categories of objects of interest that describe dense events. (2) To obtain the relationship between objects in the video, a spatial graph is established for the video objects extracted from each set of video data. The spatial graph represents the relationship between target objects in the form of a graph. A set of video data corresponds to a spatial graph. A spatial graph is represented by an adjacency matrix and a feature matrix. The adjacency matrix is ​​used to indicate whether there is a relationship between any two objects in the spatial graph. The feature matrix is ​​composed of the features of all nodes in the spatial graph, where the nodes are objects. A graph convolutional network is used to update all nodes on the spatial graph, that is, the feature matrix is ​​updated to a new feature matrix containing information about adjacent nodes. Among them, the method for determining whether there is a relationship between two objects is to calculate the cosine similarity between the two objects. If it is greater than a threshold, it is considered that there is a relationship, otherwise there is no relationship; The updated object features are concatenated with the video features obtained by the optical flow method and 3D convolution to form the long features of the video data of this group; (3) In order to make each group of long features carry the information of the previous and next groups so as to better divide the event area, the long features of each group obtained in step (2) are input into the LSTM network in chronological order to obtain the features of each group with context information, and the features of all groups are spliced ​​into video features in chronological order; (4) Anchor boxes are used to detect video features and divide them into candidate time regions of different events. The anchor boxes are pre-fixed windows of different sizes. The anchor boxes are slid at different starting times to obtain multiple candidate time regions. (5) Extract the video features of each candidate time region, predict the score of each candidate time region containing dense events through two convolutional layers, use non-maximum suppression to filter time regions, arrange all candidate time regions in order of scores from large to small, calculate the intersection over union (IoU) of the candidate time region with the highest score and the remaining candidate time regions, delete the time regions with IoU greater than the first threshold and probability scores less than the second threshold, and the remaining time regions are the time regions where events occur in the video. The start time and end time of each region are the start and end time of each event in the dense event description; (6) In order to better decode each time region into a text description, extract the video features of the time region where dense events occur obtained in step (5), construct a time graph for each time region, use the long features of each group in the time region as nodes of the time graph, and complete the update of the time graph through GAT to obtain the dense event features of each node that contain the feature information of other nodes in the time region where the dense events occur, so that the long features of each node can obtain the feature information of other nodes in the time region; (7) Each group of dense event features in step (6) is decoded into corresponding text output through LSTM in turn. The output is the final event description. Each description corresponds to the start time and end time of step (4). The model output is the start time, end time and text description of the event.

2. A dense event description method based on graph neural network according to claim 1, characterized in that: The video grouping described in step (1) refers to grouping every 16 frames in the video; the 3D convolution described in step (1) adopts the C3D model, and the 2D convolution adopts the target detection model.

3. A dense event description method based on graph neural network according to claim 2, characterized in that: The extraction process of the dense event description focus object refers to that the 2D convolutional network randomly generates a frame as a key frame in every 16 frames, detects the object category and features in the key frame, arranges the object category detection scores from high to low, and takes the object features corresponding to the top 20 object categories as the features of the video objects extracted by the 2D convolutional network. The top 20 object categories and object features are the dense event description focus objects.

4. The method for describing dense events based on graph neural network according to claim 1, characterized in that: The nodes of the spatial graph described in step (2) are the categories and features of the 20 objects in the key frame. The connectivity between different objects is calculated by the cosine similarity of the object category word vectors. If it is higher than the threshold, they are connected, otherwise they are not connected.

5. The method for describing dense events based on graph neural network according to claim 1, characterized in that: The model GAT described in step (6) uses a 2-layer multi-head attention mechanism GAT.